Moving /boot to separate partition and using 'grub' to boot
On a Linux OS ( Mepis 6.0 ) my /boot is not on a separate partition from the / partition. I have formatted a separate partition for it. I want to setup 'grub' ( I am knowledgable of how 'grub' refers to hard disk partitions' ) to boot directly into the new partition, not the MBR. What is the sequence of moving it to a separate partition ?
My understanding of the sequence is: a) mount the separate partition b) copy all the files and directories under the current /boot to the separate partition c) run grub shell 1) specify correct 'root' command ( is this supposed to be the current /boot partition or the new /boot partition ? ) 2) specify correct 'setup' command 3) exit grub shell d) edit /etc/fstab and add an entry for /boot e) edit the new /boot/grub/menu.lst and change the root command to point to the new partition. Any help getting this sequence exactly right would be appreciated. |
Let me see.. I'm not exactly an expert on this, but using "info grub", I guess that
between b) and c) you have to "ln -s . /mountpoint/of/new/partition" (so that the new partition contains the file /boot/grub/stage1) and in c.1) you have to specify the new /boot partition and in e) you should leave root pointing to your / partition (not 100% sure of that, but you should double-check) Also, stupid as that may sound, if you edit menu.lst in e), don't forget to mount /boot before. It' just one of those things one easily forgets. :) |
Corrected sequence
Quote:
Quote:
Quote:
|
'root' will not change, only the location of the boot image and initrd will change (the new /boot partition).
Here is an example for /boot/grub/menu.lst: title Linux kernel (hd0,6)/vmlinuz root=/dev/hda4 vga=0x31a selinux=0 splash=verbose initrd (hd0,6)/initrd Notice that kernel and initrd are directed to one partition (new /boot in this example), and root=/dev/hda4 is the location (partition) of the root of the filesystem. Be careful to get the names correct for vmlinuz and initrd. Edit /boot/grub/menu.lst to show the new location for /boot, then edit fstab to show the new partition. |
Quote:
In either case, you are not creating a link to the current working directory, because soft links are always taken relative to their parent directory (here: /mountpoint/of/new/partition). The effect will be that your new partition contains the link "boot" pointing to the root directory of that same partition. Because grub accesses the partition directly (instead of via Linux's virtual file system), this link will make sure it sees the "/boot/grub/*" files (imagine the new boot partition to be mounted as / if that helps you). Without the link, grub would only see "/grub/*", because it doesn't know that the partition will be mounted to /boot. Quote:
|
All times are GMT -5. The time now is 07:02 AM. |