grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How many sectors for GRUB 2


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: How many sectors for GRUB 2
Date: Sun, 04 Nov 2012 14:56:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.9) Gecko/20121014 Icedove/10.0.9

>>

>>> That's the problem!
>>> What will happen, if the gap is too small?
>> grub-install will complaint and the only possibility will be to use
>> block list (i.e. point boot sector directly to core.img on filesystem).
>>
>>> For that reason I *before* wanted to know how much space is needed.
>>>
>> To be honest, I do not understand what your goal is.
> 
> Well, after installing Windows 7 + Ubuntu on a new big (500 GB)
> harddisk, I was "disgusted" about the waste of 2048 sectors ahead the
> 1st partition, which I respect, that could be seen as nitpicking ;-)

1MiB is nothing on the disk sized several hundreds gigabytes and it's
surely not worth the pain and the speed penalty.

> This lead me to the assumption, that GRUB could use more than 62 sectors
> of the MBR gap if available, to avoid some kind of 2-step loading.
> Theoretically there could be a possibility to use GRUB without any
> dependency on an existing Linux installation/partition on the disk.
> My initial goal was to manually shrink the MBR gap to the "usual" 63
> sectors to avoid this "waste".

Aligning on MiB boundary increases speed as well. And do you really care
about 1 MiB on 500GB disk?

> A 2nd goal: reducing the size of my MBR+GRUB backup. As you know,
> installing whatever Microsoft OS will destroy that data. So why saving 1
> MiB (=2048 sectors) if ~26 kB are sufficient?

Wrong. Windows rewrites only MBR. Also the only officially supported way
to install GRUB is grub-install

> 3rd: To my knowledge, some old OS, e.g. MS-DOS, require the old CHS
> alignment of sectors on the disk, where the maximum for a cylinder is 63
> sectors. I suspect, if it is possible to install MS-DOS on a
> 2048-sector-aligned disk.

Only very old DOS may need something like that. Anything after ~1995
will work fine with unaligned partitions. And running anything made
before ~1998 natively on modern hardware is asking for trouble on many
levels. If you're interested in running such software, use VM, they're
very performant and save you loads of trouble when running dinosaurs

> 4th: the remaining space could be used for some other sophisticated
> purposes. This is not of my current interest, but theoretically may be
> for other people.
> 

This space is to be used only by bootloader. Anything else should use
files.Files is how data is organised on modern computers. You need a
very good reason to use anything else.

> 
> I do not understand, why all this information must be grabbed by a
> complicated error-prone script, instead of providing a command, maybe
> like "grub-info".

Because if you need this info, then you're doing something very wrong.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]