[arch-general] [patch] AIF, partition table compatibility with grub2.
Hi list, The attatched patch adds the `-D' option to the sfdisk call. This causes some extra space to be saved for the MBR, which is needed for grub2 in some cases. Please let me know what you think. Greetings/Groetjes Mark Pustjens -- I do note with interest that old women in my books become young women on the covers... this is discrimination against the chronologically gifted. (alt.fan.pratchett)
On Tue, 9 Feb 2010 20:26:45 +0100 (CET) Mark Pustjens <pustjens@dds.nl> wrote:
Hi list,
The attatched patch adds the `-D' option to the sfdisk call. This causes some extra space to be saved for the MBR, which is needed for grub2 in some cases.
Please let me know what you think.
Greetings/Groetjes
Mark Pustjens
Hi! man sfdisk: -D or --DOS For DOS-compatibility: waste a little space. (More precisely: if a partition cannot contain sector 0, e.g. because that is the MBR of the device, or contains the partition table of an extended partition, then sfdisk would make it start the next sector. However, when this option is given it skips to the start of the next track, wasting for example 33 sectors (in case of 34 sectors/track), just like certain versions of DOS do.) Certain Disk Managers and boot loaders (such as OSBS, but not LILO or the OS/2 Boot Manager) also live in this empty space, so maybe you want this option if you use one. I don't really see the point. this wastes some disk space to be compatible with old, past-legacy bootloaders and OS'es. why exactly would we want this? "some cases" ? Dieter
I don't really see the point. this wastes some disk space to be compatible with old, past-legacy bootloaders and OS'es. why exactly would we want this? "some cases" ?
As far as I can tell, if you install GRUB to the MBR it also lives in this empty space (between the first sector of the disk and the first sector of the first cylinder, typically LBA sector 63). Besides, the wasted space is not that much, you waste more at the end of the disk if you align partitions with cylinder boundaries.
On Tue, 9 Feb 2010, Dieter Plaetinck wrote:
On Tue, 9 Feb 2010 20:26:45 +0100 (CET) Mark Pustjens <pustjens@dds.nl> wrote:
Hi list,
The attatched patch adds the `-D' option to the sfdisk call. This causes some extra space to be saved for the MBR, which is needed for grub2 in some cases.
Please let me know what you think.
Greetings/Groetjes
Mark Pustjens
Hi! man sfdisk:
-D or --DOS For DOS-compatibility: waste a little space. (More precisely: if a partition cannot contain sector 0, e.g. because that is the MBR of the device, or contains the partition table of an extended partition, then sfdisk would make it start the next sector. However, when this option is given it skips to the start of the next track, wasting for example 33 sectors (in case of 34 sectors/track), just like certain versions of DOS do.) Certain Disk Managers and boot loaders (such as OSBS, but not LILO or the OS/2 Boot Manager) also live in this empty space, so maybe you want this option if you use one.
I don't really see the point. this wastes some disk space to be compatible with old, past-legacy bootloaders and OS'es. why exactly would we want this? "some cases" ?
The disc space wasted is about 32K, not realy something to be sad about. I used the term `some cases', as I do not know what cases these are exactly. I have only encountered one so far. I was installing arch in a VirtualBox machine. Then I wanted to install grub2 (and grub2-gfx). They complained they could not install properly, unless I chose to use (depreciated) so-called `block lists'. As it turns out, in my case the part of the bootloader which is normally installed in the MBR was too big. Using the -D flag of sfdisk a little extra space was left so this part of the bootloader did fit. As you can understand, grub2 cannot be called legacy.
Dieter
Greetings/Groetjes Mark Pustjens
Am Dienstag 09 Februar 2010 schrieb Mark Pustjens:
On Tue, 9 Feb 2010, Dieter Plaetinck wrote:
On Tue, 9 Feb 2010 20:26:45 +0100 (CET)
Mark Pustjens <pustjens@dds.nl> wrote:
Hi list,
The attatched patch adds the `-D' option to the sfdisk call. This causes some extra space to be saved for the MBR, which is needed for grub2 in some cases.
Please let me know what you think.
Greetings/Groetjes
Mark Pustjens
Hi!
man sfdisk: -D or --DOS
For DOS-compatibility: waste a little space. (More
precisely: if a partition cannot contain sector 0, e.g. because that is the MBR of the device, or contains the partition table of an extended partition, then sfdisk would make it start the next sector. However, when this option is given it skips to the start of the next track, wasting for example 33 sectors (in case of 34 sectors/track), just like certain versions of DOS do.) Certain Disk Managers and boot loaders (such as OSBS, but not LILO or the OS/2 Boot Manager) also live in this empty space, so maybe you want this option if you use one.
I don't really see the point. this wastes some disk space to be compatible with old, past-legacy bootloaders and OS'es. why exactly would we want this? "some cases" ?
The disc space wasted is about 32K, not realy something to be sad about. I used the term `some cases', as I do not know what cases these are exactly. I have only encountered one so far.
I was installing arch in a VirtualBox machine. Then I wanted to install grub2 (and grub2-gfx). They complained they could not install properly, unless I chose to use (depreciated) so-called `block lists'.
As it turns out, in my case the part of the bootloader which is normally installed in the MBR was too big. Using the -D flag of sfdisk a little extra space was left so this part of the bootloader did fit.
As you can understand, grub2 cannot be called legacy.
Dieter
Greetings/Groetjes
Mark Pustjens Just poked around with grub2 and kvm, you really need the extra space, else it will fail to install. creating partitions with cfdisk will also leave this space.
greetings tpowa -- Tobias Powalowski Archlinux Developer & Package Maintainer (tpowa) http://www.archlinux.org tpowa@archlinux.org
On Mon, 2010-02-22 at 23:21 +0100, Tobias Powalowski wrote:
Just poked around with grub2 and kvm, you really need the extra space, else it will fail to install. creating partitions with cfdisk will also leave this space.
With nowadays RAID and SSD stuff you want to align your partitions on stripe or blocksizes anyways. Some newer harddisks come with 4Kbyte sectors and have a mapping to 512byte sectors so old OS'es can work with it. You really want to align such devices, as performance is terrible without it.
With nowadays RAID and SSD stuff you want to align your partitions on stripe or blocksizes anyways. Some newer harddisks come with 4Kbyte sectors and have a mapping to 512byte sectors so old OS'es can work with it. You really want to align such devices, as performance is terrible without it.
Anyone with one of these new disks (such as the ones from WD, rotating platers disks, not ssd)? I'm curious to know if fdisk/cfdisk correctly detect the sector size or if the user needs to override what is detected.
On Tue, 23 Feb 2010 00:18:28 +0100 Jan de Groot <jan@jgc.homeip.net> wrote:
On Mon, 2010-02-22 at 23:21 +0100, Tobias Powalowski wrote:
Just poked around with grub2 and kvm, you really need the extra space, else it will fail to install. creating partitions with cfdisk will also leave this space.
With nowadays RAID and SSD stuff you want to align your partitions on stripe or blocksizes anyways. Some newer harddisks come with 4Kbyte sectors and have a mapping to 512byte sectors so old OS'es can work with it. You really want to align such devices, as performance is terrible without it.
Err... I'm a bit lost. But anyway, you agree we need the -D flag? I'm not really into these alignment things, but if you guys say I should apply it, then I'll do it. Dieter
On Wed, Feb 24, 2010 at 2:37 PM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Tue, 23 Feb 2010 00:18:28 +0100 Jan de Groot <jan@jgc.homeip.net> wrote:
On Mon, 2010-02-22 at 23:21 +0100, Tobias Powalowski wrote:
Just poked around with grub2 and kvm, you really need the extra space, else it will fail to install. creating partitions with cfdisk will also leave this space.
With nowadays RAID and SSD stuff you want to align your partitions on stripe or blocksizes anyways. Some newer harddisks come with 4Kbyte sectors and have a mapping to 512byte sectors so old OS'es can work with it. You really want to align such devices, as performance is terrible without it.
Err... I'm a bit lost. But anyway, you agree we need the -D flag? I'm not really into these alignment things, but if you guys say I should apply it, then I'll do it.
I vote for it :)
On Wed, 24 Feb 2010 16:02:53 -0600 Aaron Griffin <aaronmgriffin@gmail.com> wrote:
On Wed, Feb 24, 2010 at 2:37 PM, Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Tue, 23 Feb 2010 00:18:28 +0100 Jan de Groot <jan@jgc.homeip.net> wrote:
On Mon, 2010-02-22 at 23:21 +0100, Tobias Powalowski wrote:
Just poked around with grub2 and kvm, you really need the extra space, else it will fail to install. creating partitions with cfdisk will also leave this space.
With nowadays RAID and SSD stuff you want to align your partitions on stripe or blocksizes anyways. Some newer harddisks come with 4Kbyte sectors and have a mapping to 512byte sectors so old OS'es can work with it. You really want to align such devices, as performance is terrible without it.
Err... I'm a bit lost. But anyway, you agree we need the -D flag? I'm not really into these alignment things, but if you guys say I should apply it, then I'll do it.
I vote for it :)
committed. thank you. http://projects.archlinux.org/aif.git/commit/?h=experimental&id=aa80222dfd8b99da392236d139517076b3292cf6 if anything is broken, blame Mark :) Dieter
participants (6)
-
Aaron Griffin
-
Dieter Plaetinck
-
Jan de Groot
-
Mark Pustjens
-
Mauro Santos
-
Tobias Powalowski