Difference between revisions of "Talk:Partitioning"
(→SSD?: rm closed discussion) |
(→Table draft 2: re) |
||
(89 intermediate revisions by 18 users not shown) | |||
Line 1: | Line 1: | ||
− | == | + | == Partition Alignment Verification == |
− | + | ''[moved from [[Talk:Solid State Drives#Partition Alignment Verification]] -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 20:13, 10 July 2014 (UTC)]'' | |
− | + | On my system 'blockdev --getalignoff /dev/sda5' returns zero, even though the partition seems not to be aligned optimally: | |
+ | Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors | ||
+ | Units: sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/physical): 512 bytes / 512 bytes | ||
+ | I/O size (minimum/optimal): 512 bytes / 512 bytes | ||
+ | Disklabel type: dos | ||
+ | Disk identifier: 0xd9a92553 | ||
+ | |||
+ | Device Boot Start End Blocks Id System | ||
+ | /dev/sda1 * 2048 1026047 512000 7 HPFS/NTFS/exFAT | ||
+ | /dev/sda2 1026048 479475711 239224832 7 HPFS/NTFS/exFAT | ||
+ | /dev/sda3 946051072 976771071 15360000 7 HPFS/NTFS/exFAT | ||
+ | /dev/sda4 479475712 946051071 233287680 5 Extended | ||
+ | /dev/sda5 479475775 518545791 19535008+ 83 Linux | ||
+ | /dev/sda6 518545855 541984626 11719386 83 Linux | ||
+ | /dev/sda7 541984690 557615871 7815591 82 Linux swap / Solaris | ||
+ | /dev/sda8 557615935 946051071 194217568+ 83 Linux | ||
− | [[User: | + | The command 'parted /dev/sda align-check optimal' gives the right message in my opinion: 'not aligned'. Should we replace blockdev command? |
− | : | + | |
− | : | + | [[User:Plk|Plk]] ([[User talk:Plk|talk]]) 18:31, 31 May 2014 (UTC) |
+ | |||
+ | :It seems you're right. After reading the warning about cfdisk alignment ("Warning: The first partition created by cfdisk starts at sector 63, instead of the usual 2048. This can lead to reduced performance on SSD and advanced format (4k sector) drives. It will cause problems with GRUB2, but GRUB legacy and Syslinux should work fine."), I created the first partition of the SSD I was working on with cfdisk - thus creating a bad alignment (I checked with ''fdisk -l /dev/sda'', the first partition effectively starts at sector 63 and not 2048). | ||
+ | :The ''blockdev --getalignoff /dev/sda1'' command returned zero (it shouldn't have) while your command ''parted /dev/sda align-check optimal'' returned 'not aligned', as expected. | ||
+ | :It seems to be a bug of blockdev in ArchLinux, as of util-linux v.2.24. | ||
+ | :I upgraded to util-linux v.2.25-3, and the problem is still present in blockdev. However, cfdisk has been entirely rewritten for util-linux 2.25 as described in this [http://karelzak.blogspot.fr/2014/06/new-cfdisk-util-linux-v225.html blog post] and now correctly starts the first partition at sector 2048 when creating it. | ||
+ | |||
+ | |||
+ | :So should we edit the wiki page for recommanding upgrade to util-linux 2.25 in order to use cfdisk with correct partition alignment ? As util-linux integrates multiple essential softwares, I don't know if upgrading it will or not break something with the other utilities it includes. | ||
+ | :In any case, I think we should disrecommend using blockdev to check partition alignment, and recommend using parted instead for the time being. Can anyone else confirm this bug, especially on other distributions ? We need to know if the problem is inherent to Arch's implementation of blockdev or to blockdev itself. | ||
+ | |||
+ | :--[[User:Irrodeus|Irrodeus]] ([[User talk:Irrodeus|talk]]) 01:56, 6 September 2014 (UTC) | ||
+ | |||
+ | == Restructuring == | ||
+ | |||
+ | === Example tables === | ||
+ | |||
+ | [https://wiki.archlinux.org/index.php?title=Partitioning&diff=440209&oldid=438934] moved tables from the [[Beginners' guide]] to [[Partitioning#Partition_scheme]], however it didn't fit in too well so I've removed it for now. | ||
+ | |||
+ | However, I think the basic idea is a sound one, but perhaps more expansive. We could include suggested [[File systems]], as well as more complex examples such as {{ic|/var}} and GRUB Boot partitions. | ||
+ | |||
+ | See the updated tables from the BG below for reference. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 00:20, 10 July 2016 (UTC) | ||
+ | |||
+ | === Table draft === | ||
+ | |||
+ | {| class="wikitable" | ||
+ | !colspan="5" | UEFI/GPT example layout | ||
+ | |- | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[w:GUID_Partition_Table#Partition_type_GUIDs|Partition type (GUID)]] | ||
+ | ! Bootable flag | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | /boot | ||
+ | | /dev/sd'''x'''1 | ||
+ | | [[EFI System Partition]] | ||
+ | | Yes | ||
+ | | 260–512 MiB | ||
+ | |- | ||
+ | | [SWAP] | ||
+ | | /dev/sd'''x'''2 | ||
+ | | Linux [[swap]] | ||
+ | | No | ||
+ | | More than 512 MiB | ||
+ | |- | ||
+ | | / | ||
+ | | /dev/sd'''x'''3 | ||
+ | | Linux | ||
+ | | No | ||
+ | | Remainder of the device | ||
+ | |- | ||
+ | !colspan="5" | MBR/BIOS example layout | ||
+ | |- | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[w:Partition type|Partition type]] | ||
+ | ! Bootable flag | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | [SWAP] | ||
+ | | /dev/sd'''x'''1 | ||
+ | | Linux [[swap]] | ||
+ | | No | ||
+ | | More than 512 MiB | ||
+ | |- | ||
+ | | / | ||
+ | | /dev/sd'''x'''2 | ||
+ | | Linux | ||
+ | | Yes | ||
+ | | Remainder of the device | ||
+ | |} | ||
+ | |||
+ | :I added these tables to the page. I also added one using a separate {{ic|/home}} since I imagine that is the most common scenario. I think 3 examples could be enough, but I am open to more. -- [[User:Rdeckard|Rdeckard]] ([[User_talk:Rdeckard|talk]]) 18:53, 11 October 2016 (UTC) | ||
+ | |||
+ | ::Nice work. One thing I was considering is to have multiple small tables under the various partition sections (like /home), instead of a single large one. Thoughts? -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 18:56, 13 October 2016 (UTC) | ||
+ | ::edit: I noticed you already split the tables; that leaves whether it makes sense to have them under sections like [[Partitioning#.2Fhome]] rather than [[Partitioning#Example layouts]]. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 19:01, 13 October 2016 (UTC) | ||
+ | |||
+ | :::All examples include the {{ic|/}} partition and swap. Avoiding duplication and forward references is probably one of the reasons why people invented [[w:appendix|appendix]]. -- [[User:Lahwaacz|Lahwaacz]] ([[User talk:Lahwaacz|talk]]) 19:15, 13 October 2016 (UTC) | ||
+ | |||
+ | === Table draft 2 === | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ BIOS/MBR | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[Wikipedia:Partition type|Partition type ID]] | ||
+ | ! [[Wikipedia:Boot flag|Boot flag]] | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | {{ic|/}} | ||
+ | | {{ic|/dev/sda1}} | ||
+ | | {{ic|83}}: Linux | ||
+ | | {{Yes}} | ||
+ | | 23 - 32 GiB | ||
+ | |- | ||
+ | | {{ic|[SWAP]}} | ||
+ | | {{ic|/dev/sda2}} | ||
+ | | {{ic|82}}: Linux [[swap]] | ||
+ | | {{No}} | ||
+ | | More than 512 MiB or the size of RAM to use [[hibernation]]. | ||
+ | |- | ||
+ | | {{ic|/home}} | ||
+ | | {{ic|/dev/sda3}} | ||
+ | | {{ic|83}}: Linux | ||
+ | | {{No}} | ||
+ | | Remainder of the device | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ BIOS/GPT with [[GRUB]] | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition type GUIDs|Partition type GUID]] | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition entries (LBA 2-33)|Partition attributes]] | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | {{Grey|None}} | ||
+ | | {{ic|/dev/sda1}} | ||
+ | | {{ic|21686148-6449-6E6F-744E-656564454649}}: [[BIOS boot partition]] | ||
+ | | | ||
+ | | 1 MiB | ||
+ | |- | ||
+ | | {{ic|/}} | ||
+ | | {{ic|/dev/sda2}} | ||
+ | | {{ic|4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709}}: Linux x86-64 root (/) | ||
+ | | | ||
+ | | 23 - 32 GiB | ||
+ | |- | ||
+ | | {{ic|[SWAP]}} | ||
+ | | {{ic|/dev/sda3}} | ||
+ | | {{ic|0657FD6D-A4AB-43C4-84E5-0933C84B4F4F}}: Linux [[swap]] | ||
+ | | | ||
+ | | More than 512 MiB or the size of RAM to use [[hibernation]]. | ||
+ | |- | ||
+ | | {{ic|/home}} | ||
+ | | {{ic|/dev/sda4}} | ||
+ | | {{ic|933AC7E1-2EB4-4F13-B844-0E14E2AEF915}}: Linux /home | ||
+ | | | ||
+ | | Remainder of the device | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ BIOS/GPT with [[Syslinux]] | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition type GUIDs|Partition type GUID]] | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition entries (LBA 2-33)|Partition attributes]] | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | {{ic|/}} | ||
+ | | {{ic|/dev/sda2}} | ||
+ | | {{ic|4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709}}: Linux x86-64 root (/) | ||
+ | | {{ic|2}}: Legacy BIOS bootable | ||
+ | | 23 - 32 GiB | ||
+ | |- | ||
+ | | {{ic|[SWAP]}} | ||
+ | | {{ic|/dev/sda3}} | ||
+ | | {{ic|0657FD6D-A4AB-43C4-84E5-0933C84B4F4F}}: Linux [[swap]] | ||
+ | | | ||
+ | | More than 512 MiB or the size of RAM to use [[hibernation]]. | ||
+ | |- | ||
+ | | {{ic|/home}} | ||
+ | | {{ic|/dev/sda4}} | ||
+ | | {{ic|933AC7E1-2EB4-4F13-B844-0E14E2AEF915}}: Linux /home | ||
+ | | | ||
+ | | Remainder of the device | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ UEFI/GPT with a [[boot loader]] which has a driver for your root file system (eg. [[GRUB]], [[rEFInd]]) | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition type GUIDs|Partition type GUID]] | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition entries (LBA 2-33)|Partition attributes]] | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | {{ic|/efi}} | ||
+ | | {{ic|/dev/sda1}} | ||
+ | | {{ic|C12A7328-F81F-11D2-BA4B-00A0C93EC93B}}: [[EFI system partition]] | ||
+ | | | ||
+ | | 550 MiB | ||
+ | |- | ||
+ | | {{ic|/}} | ||
+ | | {{ic|/dev/sda2}} | ||
+ | | {{ic|4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709}}: Linux x86-64 root (/) | ||
+ | | | ||
+ | | 23 - 32 GiB | ||
+ | |- | ||
+ | | {{ic|[SWAP]}} | ||
+ | | {{ic|/dev/sda3}} | ||
+ | | {{ic|0657FD6D-A4AB-43C4-84E5-0933C84B4F4F}}: Linux [[swap]] | ||
+ | | | ||
+ | | More than 512 MiB or the size of RAM to use [[hibernation]]. | ||
+ | |- | ||
+ | | {{ic|/home}} | ||
+ | | {{ic|/dev/sda4}} | ||
+ | | {{ic|933AC7E1-2EB4-4F13-B844-0E14E2AEF915}}: Linux /home | ||
+ | | | ||
+ | | Remainder of the device | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ UEFI/GPT with a [[boot loader]] without file system drivers or [[EFISTUB|without a boot loader]] at all | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition type GUIDs|Partition type GUID]] | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition entries (LBA 2-33)|Partition attributes]] | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | {{ic|/boot}} | ||
+ | | {{ic|/dev/sda1}} | ||
+ | | {{ic|C12A7328-F81F-11D2-BA4B-00A0C93EC93B}}: [[EFI system partition]] | ||
+ | | | ||
+ | | 550 MiB | ||
+ | |- | ||
+ | | {{ic|/}} | ||
+ | | {{ic|/dev/sda2}} | ||
+ | | {{ic|4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709}}: Linux x86-64 root (/) | ||
+ | | | ||
+ | | 23 - 32 GiB | ||
+ | |- | ||
+ | | {{ic|[SWAP]}} | ||
+ | | {{ic|/dev/sda3}} | ||
+ | | {{ic|0657FD6D-A4AB-43C4-84E5-0933C84B4F4F}}: Linux [[swap]] | ||
+ | | | ||
+ | | More than 512 MiB or the size of RAM to use [[hibernation]]. | ||
+ | |- | ||
+ | | {{ic|/home}} | ||
+ | | {{ic|/dev/sda4}} | ||
+ | | {{ic|933AC7E1-2EB4-4F13-B844-0E14E2AEF915}}: Linux /home | ||
+ | | | ||
+ | | Remainder of the device | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ BIOS&UEFI/GPT with [[GRUB]] | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition type GUIDs|Partition type GUID]] | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition entries (LBA 2-33)|Partition attributes]] | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | {{Grey|None}} | ||
+ | | {{ic|/dev/sda1}} | ||
+ | | {{ic|21686148-6449-6E6F-744E-656564454649}}: [[BIOS boot partition]] | ||
+ | | | ||
+ | | 1 MiB | ||
+ | |- | ||
+ | | {{ic|/efi}} | ||
+ | | {{ic|/dev/sda2}} | ||
+ | | {{ic|C12A7328-F81F-11D2-BA4B-00A0C93EC93B}}: [[EFI system partition]] | ||
+ | | | ||
+ | | 550 MiB | ||
+ | |- | ||
+ | | {{ic|/}} | ||
+ | | {{ic|/dev/sda3}} | ||
+ | | {{ic|4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709}}: Linux x86-64 root (/) | ||
+ | | | ||
+ | | 23 - 32 GiB | ||
+ | |- | ||
+ | | {{ic|[SWAP]}} | ||
+ | | {{ic|/dev/sda4}} | ||
+ | | {{ic|0657FD6D-A4AB-43C4-84E5-0933C84B4F4F}}: Linux [[swap]] | ||
+ | | | ||
+ | | More than 512 MiB or the size of RAM to use [[hibernation]]. | ||
+ | |- | ||
+ | | {{ic|/home}} | ||
+ | | {{ic|/dev/sda5}} | ||
+ | | {{ic|933AC7E1-2EB4-4F13-B844-0E14E2AEF915}}: Linux /home | ||
+ | | | ||
+ | | Remainder of the device | ||
+ | |} | ||
+ | |||
+ | {| class="wikitable" | ||
+ | |+ BIOS&UEFI/GPT with [[Syslinux]] | ||
+ | ! Mount point | ||
+ | ! Partition | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition type GUIDs|Partition type GUID]] | ||
+ | ! [[Wikipedia:GUID Partition Table#Partition entries (LBA 2-33)|Partition attributes]] | ||
+ | ! Suggested size | ||
+ | |- | ||
+ | | {{ic|/boot}} | ||
+ | | {{ic|/dev/sda1}} | ||
+ | | {{ic|C12A7328-F81F-11D2-BA4B-00A0C93EC93B}}: [[EFI system partition]] | ||
+ | | {{ic|2}}: Legacy BIOS bootable | ||
+ | | 550 MiB | ||
+ | |- | ||
+ | | {{ic|/}} | ||
+ | | {{ic|/dev/sda2}} | ||
+ | | {{ic|4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709}}: Linux x86-64 root (/) | ||
+ | | | ||
+ | | 23 - 32 GiB | ||
+ | |- | ||
+ | | {{ic|[SWAP]}} | ||
+ | | {{ic|/dev/sda3}} | ||
+ | | {{ic|0657FD6D-A4AB-43C4-84E5-0933C84B4F4F}}: Linux [[swap]] | ||
+ | | | ||
+ | | More than 512 MiB or the size of RAM to use [[hibernation]]. | ||
+ | |- | ||
+ | | {{ic|/home}} | ||
+ | | {{ic|/dev/sda4}} | ||
+ | | {{ic|933AC7E1-2EB4-4F13-B844-0E14E2AEF915}}: Linux /home | ||
+ | | | ||
+ | | Remainder of the device | ||
+ | |} | ||
+ | |||
+ | |||
+ | I didn't like the current [[Partitioning#Example layouts]] so I tried to make better ones, but I think I made too many of them. I'm not entirely certain if "GPT + BIOS & UEFI with Syslinux" is a good idea due to all of Syslinux's limitations, but GRUB doesn't use the "Legacy BIOS bootable" attribute and without the Syslinux example the whole column would become useless. Thoughts? -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 10:19, 1 January 2018 (UTC) | ||
+ | |||
+ | :If syslinux needs special mention in a manner that is exclusive to it, then I'd argue that the column is useless anyway except to draw attention to syslinux. It seems like a Note would be better for that, assuming we want to recommend syslinux at all. -- [[User:Eschwartz|Eschwartz]] ([[User talk:Eschwartz|talk]]) 05:30, 9 December 2018 (UTC) | ||
+ | |||
+ | ::It's not really Syslinux specific, theoretically the "Legacy BIOS bootable" attribute should be needed by any boot loader that puts stuff in the VBR (I wonder if that's also true for [[GRUB/Tips and tricks#Install to partition or partitionless disk|GRUB in VBR]]). -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 09:06, 9 December 2018 (UTC) | ||
+ | |||
+ | :::I think that's out of scope, if the user uses some bootloader which turns out to require a bootable flag, it's simple to go back into the ISO and set the flag accordingly. This is different from say, a BIOS Boot Partition (for [[GRUB]]) which would require actual changes in partitioning if not considered beforehand. | ||
+ | :::As such I suggest to go with the following: | ||
+ | ::::BIOS (MBR and GPT) | ||
+ | ::::* BIOS Boot Partition | ||
+ | ::::* / | ||
+ | ::::* [[swap]] (as [[Btrfs]] does not support swap files, and the examples should be as generic as possible) | ||
+ | ::::UEFI | ||
+ | ::::* EFI System Partition | ||
+ | ::::* / | ||
+ | ::::* [[swap]] | ||
+ | :::-- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 20:35, 20 December 2018 (UTC) | ||
+ | |||
+ | ::::The same reasoning applies to the "Boot flag" column in the BIOS/MBR example, so if we remove "Partition attributes" then we should also remove "Boot flag". -- [[User:nl6720|nl6720]] ([[User talk:nl6720|talk]]) 06:51, 21 December 2018 (UTC) | ||
+ | |||
+ | == mmcblk0p{1,2,3,4}, mmcblk0boot{0,1}, mmcblk0rpmb == | ||
+ | And my install usb showed up as sda instead.. Don't know how to best deal with that. "Boot" ones don't seem to provide disklabel type and identifier information, and are only 4MiB. My guess is to ignore them. {{ic|/dev/mmcblk0p3}} seems to be the one with windows on it.(ASUS Vivobook E200HA)[[User:Jasper1984|Jasper1984]] ([[User talk:Jasper1984|talk]]) 00:58, 25 December 2016 (UTC) | ||
+ | :Ended up just ignoring the {{ic|mmcblk0boot{0,1}}} entries, treating {{ic|mmcblk0p{1,2,3,4}}} as if were just sda, basically, it worked. (dont see the rpmb volumes now) More specifically, didnt reformat the first partition, instead just putting different files there. Tried the bind-mount approach in [[EFI System Partition]], but ended up the more regular approach. (not sure why it didnt co-operate) Would suspect that {{ic|mmcblk0boot{0,1}}} dont matter much, but would suggest just reusing the first partition nevertheless..(really, little reason to reformat that?)[[User:Jasper1984|Jasper1984]] ([[User talk:Jasper1984|talk]]) 00:34, 14 January 2017 (UTC) |
Latest revision as of 06:51, 21 December 2018
Contents
Partition Alignment Verification
[moved from Talk:Solid State Drives#Partition Alignment Verification -- Lahwaacz (talk) 20:13, 10 July 2014 (UTC)]
On my system 'blockdev --getalignoff /dev/sda5' returns zero, even though the partition seems not to be aligned optimally:
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xd9a92553 Device Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 7 HPFS/NTFS/exFAT /dev/sda2 1026048 479475711 239224832 7 HPFS/NTFS/exFAT /dev/sda3 946051072 976771071 15360000 7 HPFS/NTFS/exFAT /dev/sda4 479475712 946051071 233287680 5 Extended /dev/sda5 479475775 518545791 19535008+ 83 Linux /dev/sda6 518545855 541984626 11719386 83 Linux /dev/sda7 541984690 557615871 7815591 82 Linux swap / Solaris /dev/sda8 557615935 946051071 194217568+ 83 Linux
The command 'parted /dev/sda align-check optimal' gives the right message in my opinion: 'not aligned'. Should we replace blockdev command?
Plk (talk) 18:31, 31 May 2014 (UTC)
- It seems you're right. After reading the warning about cfdisk alignment ("Warning: The first partition created by cfdisk starts at sector 63, instead of the usual 2048. This can lead to reduced performance on SSD and advanced format (4k sector) drives. It will cause problems with GRUB2, but GRUB legacy and Syslinux should work fine."), I created the first partition of the SSD I was working on with cfdisk - thus creating a bad alignment (I checked with fdisk -l /dev/sda, the first partition effectively starts at sector 63 and not 2048).
- The blockdev --getalignoff /dev/sda1 command returned zero (it shouldn't have) while your command parted /dev/sda align-check optimal returned 'not aligned', as expected.
- It seems to be a bug of blockdev in ArchLinux, as of util-linux v.2.24.
- I upgraded to util-linux v.2.25-3, and the problem is still present in blockdev. However, cfdisk has been entirely rewritten for util-linux 2.25 as described in this blog post and now correctly starts the first partition at sector 2048 when creating it.
- So should we edit the wiki page for recommanding upgrade to util-linux 2.25 in order to use cfdisk with correct partition alignment ? As util-linux integrates multiple essential softwares, I don't know if upgrading it will or not break something with the other utilities it includes.
- In any case, I think we should disrecommend using blockdev to check partition alignment, and recommend using parted instead for the time being. Can anyone else confirm this bug, especially on other distributions ? We need to know if the problem is inherent to Arch's implementation of blockdev or to blockdev itself.
Restructuring
Example tables
[1] moved tables from the Beginners' guide to Partitioning#Partition_scheme, however it didn't fit in too well so I've removed it for now.
However, I think the basic idea is a sound one, but perhaps more expansive. We could include suggested File systems, as well as more complex examples such as /var
and GRUB Boot partitions.
See the updated tables from the BG below for reference. -- Alad (talk) 00:20, 10 July 2016 (UTC)
Table draft
UEFI/GPT example layout | ||||
---|---|---|---|---|
Mount point | Partition | Partition type (GUID) | Bootable flag | Suggested size |
/boot | /dev/sdx1 | EFI System Partition | Yes | 260–512 MiB |
[SWAP] | /dev/sdx2 | Linux swap | No | More than 512 MiB |
/ | /dev/sdx3 | Linux | No | Remainder of the device |
MBR/BIOS example layout | ||||
Mount point | Partition | Partition type | Bootable flag | Suggested size |
[SWAP] | /dev/sdx1 | Linux swap | No | More than 512 MiB |
/ | /dev/sdx2 | Linux | Yes | Remainder of the device |
- I added these tables to the page. I also added one using a separate
/home
since I imagine that is the most common scenario. I think 3 examples could be enough, but I am open to more. -- Rdeckard (talk) 18:53, 11 October 2016 (UTC)
- Nice work. One thing I was considering is to have multiple small tables under the various partition sections (like /home), instead of a single large one. Thoughts? -- Alad (talk) 18:56, 13 October 2016 (UTC)
- edit: I noticed you already split the tables; that leaves whether it makes sense to have them under sections like Partitioning#.2Fhome rather than Partitioning#Example layouts. -- Alad (talk) 19:01, 13 October 2016 (UTC)
Table draft 2
Mount point | Partition | Partition type ID | Boot flag | Suggested size |
---|---|---|---|---|
/
|
/dev/sda1
|
83 : Linux
|
Yes | 23 - 32 GiB |
[SWAP]
|
/dev/sda2
|
82 : Linux swap
|
No | More than 512 MiB or the size of RAM to use hibernation. |
/home
|
/dev/sda3
|
83 : Linux
|
No | Remainder of the device |
Mount point | Partition | Partition type GUID | Partition attributes | Suggested size |
---|---|---|---|---|
None | /dev/sda1
|
21686148-6449-6E6F-744E-656564454649 : BIOS boot partition
|
1 MiB | |
/
|
/dev/sda2
|
4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 : Linux x86-64 root (/)
|
23 - 32 GiB | |
[SWAP]
|
/dev/sda3
|
0657FD6D-A4AB-43C4-84E5-0933C84B4F4F : Linux swap
|
More than 512 MiB or the size of RAM to use hibernation. | |
/home
|
/dev/sda4
|
933AC7E1-2EB4-4F13-B844-0E14E2AEF915 : Linux /home
|
Remainder of the device |
Mount point | Partition | Partition type GUID | Partition attributes | Suggested size |
---|---|---|---|---|
/
|
/dev/sda2
|
4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 : Linux x86-64 root (/)
|
2 : Legacy BIOS bootable
|
23 - 32 GiB |
[SWAP]
|
/dev/sda3
|
0657FD6D-A4AB-43C4-84E5-0933C84B4F4F : Linux swap
|
More than 512 MiB or the size of RAM to use hibernation. | |
/home
|
/dev/sda4
|
933AC7E1-2EB4-4F13-B844-0E14E2AEF915 : Linux /home
|
Remainder of the device |
Mount point | Partition | Partition type GUID | Partition attributes | Suggested size |
---|---|---|---|---|
/efi
|
/dev/sda1
|
C12A7328-F81F-11D2-BA4B-00A0C93EC93B : EFI system partition
|
550 MiB | |
/
|
/dev/sda2
|
4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 : Linux x86-64 root (/)
|
23 - 32 GiB | |
[SWAP]
|
/dev/sda3
|
0657FD6D-A4AB-43C4-84E5-0933C84B4F4F : Linux swap
|
More than 512 MiB or the size of RAM to use hibernation. | |
/home
|
/dev/sda4
|
933AC7E1-2EB4-4F13-B844-0E14E2AEF915 : Linux /home
|
Remainder of the device |
Mount point | Partition | Partition type GUID | Partition attributes | Suggested size |
---|---|---|---|---|
/boot
|
/dev/sda1
|
C12A7328-F81F-11D2-BA4B-00A0C93EC93B : EFI system partition
|
550 MiB | |
/
|
/dev/sda2
|
4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 : Linux x86-64 root (/)
|
23 - 32 GiB | |
[SWAP]
|
/dev/sda3
|
0657FD6D-A4AB-43C4-84E5-0933C84B4F4F : Linux swap
|
More than 512 MiB or the size of RAM to use hibernation. | |
/home
|
/dev/sda4
|
933AC7E1-2EB4-4F13-B844-0E14E2AEF915 : Linux /home
|
Remainder of the device |
Mount point | Partition | Partition type GUID | Partition attributes | Suggested size |
---|---|---|---|---|
None | /dev/sda1
|
21686148-6449-6E6F-744E-656564454649 : BIOS boot partition
|
1 MiB | |
/efi
|
/dev/sda2
|
C12A7328-F81F-11D2-BA4B-00A0C93EC93B : EFI system partition
|
550 MiB | |
/
|
/dev/sda3
|
4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 : Linux x86-64 root (/)
|
23 - 32 GiB | |
[SWAP]
|
/dev/sda4
|
0657FD6D-A4AB-43C4-84E5-0933C84B4F4F : Linux swap
|
More than 512 MiB or the size of RAM to use hibernation. | |
/home
|
/dev/sda5
|
933AC7E1-2EB4-4F13-B844-0E14E2AEF915 : Linux /home
|
Remainder of the device |
Mount point | Partition | Partition type GUID | Partition attributes | Suggested size |
---|---|---|---|---|
/boot
|
/dev/sda1
|
C12A7328-F81F-11D2-BA4B-00A0C93EC93B : EFI system partition
|
2 : Legacy BIOS bootable
|
550 MiB |
/
|
/dev/sda2
|
4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709 : Linux x86-64 root (/)
|
23 - 32 GiB | |
[SWAP]
|
/dev/sda3
|
0657FD6D-A4AB-43C4-84E5-0933C84B4F4F : Linux swap
|
More than 512 MiB or the size of RAM to use hibernation. | |
/home
|
/dev/sda4
|
933AC7E1-2EB4-4F13-B844-0E14E2AEF915 : Linux /home
|
Remainder of the device |
I didn't like the current Partitioning#Example layouts so I tried to make better ones, but I think I made too many of them. I'm not entirely certain if "GPT + BIOS & UEFI with Syslinux" is a good idea due to all of Syslinux's limitations, but GRUB doesn't use the "Legacy BIOS bootable" attribute and without the Syslinux example the whole column would become useless. Thoughts? -- nl6720 (talk) 10:19, 1 January 2018 (UTC)
- If syslinux needs special mention in a manner that is exclusive to it, then I'd argue that the column is useless anyway except to draw attention to syslinux. It seems like a Note would be better for that, assuming we want to recommend syslinux at all. -- Eschwartz (talk) 05:30, 9 December 2018 (UTC)
- It's not really Syslinux specific, theoretically the "Legacy BIOS bootable" attribute should be needed by any boot loader that puts stuff in the VBR (I wonder if that's also true for GRUB in VBR). -- nl6720 (talk) 09:06, 9 December 2018 (UTC)
- I think that's out of scope, if the user uses some bootloader which turns out to require a bootable flag, it's simple to go back into the ISO and set the flag accordingly. This is different from say, a BIOS Boot Partition (for GRUB) which would require actual changes in partitioning if not considered beforehand.
- As such I suggest to go with the following:
- -- Alad (talk) 20:35, 20 December 2018 (UTC)
mmcblk0p{1,2,3,4}, mmcblk0boot{0,1}, mmcblk0rpmb
And my install usb showed up as sda instead.. Don't know how to best deal with that. "Boot" ones don't seem to provide disklabel type and identifier information, and are only 4MiB. My guess is to ignore them. /dev/mmcblk0p3
seems to be the one with windows on it.(ASUS Vivobook E200HA)Jasper1984 (talk) 00:58, 25 December 2016 (UTC)
- Ended up just ignoring the
mmcblk0boot{0,1}
entries, treatingmmcblk0p{1,2,3,4}
as if were just sda, basically, it worked. (dont see the rpmb volumes now) More specifically, didnt reformat the first partition, instead just putting different files there. Tried the bind-mount approach in EFI System Partition, but ended up the more regular approach. (not sure why it didnt co-operate) Would suspect thatmmcblk0boot{0,1}
dont matter much, but would suggest just reusing the first partition nevertheless..(really, little reason to reformat that?)Jasper1984 (talk) 00:34, 14 January 2017 (UTC)