by coq_vi on Mon Jul 07, 2008 4:28 pm
As eriefisher wrote, to create an independent boot partition I had to move the hole /boot directory to sda2 and reinstall grub.
To do so, as root, I had to mount sda2 :
# mount -t ext3 /dev/sda2 /mnt/sda2
Move the /boot directory to /mnt/sda2
Access the grub shell :
# grub
This takes a few minutes to access and issues :
grub>
As I had moved the grub installation to a different partition by moving my /boot to sda2, I had to ask the grub to find out on which partition it was installed :
grub> find /boot/grub/stage1
It returns the number of the partition in which Grub locates its installation files. In my case :
grub> find /boot/grub/stage1
(hd0,1)
For the grub hd0,1 is equivalent to sda2.
Before reinstalling Grub, I had to notify to him that my grub resided in the hd0,1 partition by typing the command :
grub> root (hd0,1)
Finally to reinstall grub in the MBR I had to set it up on sda without indicating the number part :
grub> setup (hd0)
Exit the grub-shell prompt using “Ctrl+c”.
As I also moved the kernel by moving the /boot directory I had to edit the /mnt/sda2/boot/grub/menu.lst file and correct the partition indications to (hd0,1)