[clue-tech] Partition madness

Angelo Bertolli angelo at freeshell.org
Mon Jul 25 18:13:30 MDT 2005


David L. Anselmi wrote:

> Angelo Bertolli wrote:
> [...]
>
>> /dev/hda1 Linux
>> /dev/hda2 HPFS/NTFS
>> /dev/hda4 Extended (which type?)
>> /dev/hda5 Win95 FAT32
>> /dev/hda6 Linux
>> /dev/hda7 Linux swap
>> /dev/hda8 Linux
>
>
> You delete hda5 and all the higher partitions get bumped down:
>
> /dev/hda1 Linux
> /dev/hda2 HPFS/NTFS
> /dev/hda4 Extended (which type?)
> /dev/hda5 Linux
> /dev/hda6 Linux swap
> /dev/hda7 Linux
>
> So your grub/lilo tells the kernel that root is on hda6 and the kernel
> dutifully tries to mount that on /.  That fails, it can't find
> /bin/init, and panics.  If you do something with the space at the
> beginning of the extended partition so it still counts as a logical
> partition the kernel can still find /.
>
> The reason for this is that (as mentioned) the first 4 (primary)
> partitions have space reserved in the MBR.  An extended partition
> points to the beginning of a linked list of logical partitions.  So if
> you take one out of the chain the rest get renumbered.  That's why
> gparted complains (so your disk partition tables and kernel tables
> don't get out of sync--the kernel always knows what's what but you can
> confuse yourself and do the wrong thing--fdisk doesn't care what you
> do to yourself).

Great!  That's the missing piece that I didn't understand:  "grub tells
the kernel that root is *HERE*"  You know I always wondered how that
worked since fstab happens to be on the partition that hasn't been
mounted  yet.

On a side note, is it still a good idea to have a boot partition at the
beginning fo the disk?

_______________________________________________
CLUE-tech mailing list
CLUE-tech at cluedenver.org
http://cluedenver.org/mailman/listinfo/clue-tech



More information about the clue-tech mailing list