[conspire] Kubuntu Parted Question

Nick Moffitt nick at zork.net
Tue Nov 20 16:04:39 PST 2007

Rick Moen:
> Quoting Tony Godshall (togo at of.net):
> > Boot flag is what DOS bootloaders use to distinguish between data
> > and OS partitions.  It's irrelevant if your bootloader is grub.
> It's irrelevant if your bootloader is GRUB _and_ GRUB's first-stage
> code got written to the MBR.  However, correct me if I'm wrong, but:
> I got the strong impression that most people install GRUB to the
> superblock of the Linux boot partition, not to the MBR.

Just for the record, most people don't create separate /boot partitions
these days.  Since ext3 makes the old "chop up filesystems to resemble a
PDP with a handful of disk packs because that localizes filesystem
corruption" tactic less important, most OS installers simply create a
swap partition to match RAM size (good for software-hibernating to more
than actually paging out to at runtime, these days) and allocate the
rest to /.  

Surely the superblock of this partition (or even of a separate /boot
partition) would be an ext3 filesystem superblock, and not some funny
grub program.  Although I suppose if one were running fast and loose one
could sacrifice the main superblock and rely on one of the several
backups that ext3 keeps scatted along the disk.  I just can't help but
feel that I'd have *heard* if this were the case.

> If my assumption's correct, then the MBR program area (initial 446 bytes
> out of 512 total in sector zero) probably still contains Microsoft/IBM's
> unnamed MBR bootloader left over from DOS.  

My understanding is that Ubuntu installs the stage 1 grub loader into
the MBR, complete with the four-entry DOS-style Partition Table at
0x01BE.  It then has the device ID, partition number, and offset in
sectors where stage 2 can be found.  It loads and jumps into that using
BIOS interrupts, and stage 2 does its fancy read-only ext2 "It's a Unix
system!  I know this!" game to find the menu.lst and other gear.

I suppose that the task performed by the stage 1 loader *could* be done
by the old DOS one, but I am fairly confident that most Linuxes these
days assume that our boot loader technology is always preferable to
random proprietary cruft found in boot sectors.  

After all, you wouldn't run untrusted code at such a critical time as
System Boot, would you?

"As I soared high into the tag cloud Xeni Jardin             Nick Moffitt
carefully put up for me, I couldn't help but wonder how     nick at zork.net
high we were above the blogosphere." -- Carlos Laviola

More information about the conspire mailing list