Re: master boot record



kature wrote:
Regards to everyone!
I am a Linux begginer, and just installed Ubuntu 7.10 on my machine (I have two hard disks, on first there is Windows XP installed, and on otherUbuntu), every went down ok.

If someone could help me I would like to know following:

- is it possible to edit boot record so during boot choice the Windows Xp are on top, and Ubuntu options bellow
- additionally I would like to set timer of 30 seconds, so if no choice is confirm Windows XP starts automatically (because it is marked)

Thank you in advance!

The most important and useful linux commands are

- grub
- fdisk
- mount
- tar
- dd

NOTHING will pay off like learning these right off the bat.

There's no such thing as a master boot record, MBR, or a boot sector, but there is a PLACE on every disk that is THE root sector (every partition has one too). A disk sector is 512 bytes and is not part of a partition but a partition root sector is a part of its partition. You'll see what this means when you first try fdisk to create a second primary partition of the same size as the first or a first logical partition the same size as the second primary :-)

The DISK root sector hosts both the partition table and boot code. If grub is installed it can be run to write boot code to the part of the disk root sector reserved for it. Here is another bit of confusing terminology when people tell you to install grub to make things bootable. Installing software means copying it to disk and integrating it into the OS to the extent that it needs to me integrated. In the case of grub it does nothing for booting, but once grub is installed it can be run to write or deploy boot code to the disk root sector (sometimes to other places instead of or in addition to).

I always name my own boot menu file something other than the default menu.lst and place it somewhere other than the default /boot/grub folder. This way it will never be stepped on nor will I step on system written stuff which will always remain where it had been written to as it had been written. Everybody happy. I use a /boot/user folder and my grub menu or config file is usually something like menu.usr

Sometimes I place a copy of the entire /boot folder on every single partition and that way I don't even have to worry about where I point grub to. This menu file is a simple text file and is easy enough to edit at will ..after a while.

So, in a case of using the /boot folder on partition-5 (grub counts from 0 until the next release) with the menu file being
/boot/user/menu.usr you would first invoke grub by its name
and then use its interactive CLI (command shell) to make it
write boot code referencing your menu file.

grub
root (hd0,4)
install /boot/grub/stage1 (hd0) /boot/grub/stage2 p /boot/user/menu.usr

If you want to make a boot floppy, copy just the grub and user folders into the /boot folder of a dos (or ext2) floppy and do

grub
root (fd0)
install /boot/grub/stage1 (fd0) /boot/grub/stage2 p /boot/user/menu.usr
Once you have edited your menu file a few times you will remember where it is by heart, and will also repeat the above by heart.

BTW, the logical method of listing those bootable partitions that you want listed is, well, the logical partition sequence.

HTH
.



Relevant Pages

  • Re: Grub doesnt offer menu
    ... help to explain why Feisty doesn't boot. ... forget that GRUB uses the BIOS for disk access and if the BIOS can't see ... the partition than GRUB can't either. ...
    (uk.comp.os.linux)
  • Re: Grub doesnt offer menu
    ... help to explain why Feisty doesn't boot. ... forget that GRUB uses the BIOS for disk access and if the BIOS can't see ... the partition than GRUB can't either. ...
    (uk.comp.os.linux)
  • fixing grub : mbr fix when windows install after linux
    ... "There is not a boot manager screen at all, ... windows but GRUB boot window does not appear. ... "I forgot to install GRUB, I didn't install GRUB in the MBR, I chose ... Fedora but that was not an active primary partition". ...
    (comp.os.linux.misc)
  • SUMMARY: Moving /usr From Under Root "/" To Its Own Partition
    ... One of the reasons for doing this is to end up with a smaller root ... Install the boot block and boot off the new drive. ... " In order for the root partition to be fscked and remounted ... D> temporarily on the existing disk. ...
    (SunManagers)
  • Re: grub does nothing
    ... boot a live CD and try to see what's in it's belly. ... > rootwhich looks to me like a first partition on a secondary hdd. ... Grub is on the primary master boot record and works fine in booting windows.. ... I tried installing to a partition on the first disk - didnt fix it, ...
    (Ubuntu)