I was wanting to test moving the boot partition from where is it placed by default in SuSe (suse places it in /dev/sda1 and makes it 70MB by default… way to small). The problem I found was I was having a lot of trouble finding a good document on this. I thought I would post the procedure I used as an example. Hopefully it will be helpful to others.
1. start by creating you new partition:
yast2 -> partitioner
Add a partition -> primary partition -> choose a partition size -> format partition, do not mount -> finish
2. create a temp directory and mount the partition
#mkdir /mnt/newboot
#mount /dev/sdax /mnt/newboot
3. copy /boot partition data
#cp -dpR /boot/* /mnt/newboot
4. unmount your partitions and swap them around
#umount /boot
#umount /mnt/newboot
#mount /dev/sdax /boot
4. update the menu.lst file
#vi /boot/grub/menu.lst
change all of the hd(0,0) references, or whatever the default was to the correct drive. (ex. /dev/sda1 = hd(0,0) | /dev/sda3 = hd(0,2) | /dev/sdb1 = hd(1,0))
5. update fstab
#vi /etc/fstab
edit the line with /boot in it, and change the reference /dev/sdax to the correct partition
6. delete the old /boot partiton ( I had found that unless you remove the old one it will continue to try to boot from it)
yast2 -> partitioner
delete the original boot partition
**** DO NOT REBOOT AT THIS POINT ****
7. fix the boot loader (suse will not let you run grub-install so you need to do this with yast)
yast2 -> bootloader
select “boot loader installation”
Choose custom boot partition and specify the partition used (ex. /dev/sda3)
save, and reboot
At this point it should be booting from your new boot partition.
Leave a Reply