Change Linux Boot Partition /dev/sda5 root(hd0,4) to /dev/sda1 root (hd0,0),

Scenario : Under Linux Operating system, I have the two boot partition /dev/sda1 and /dev/sda5.currently it is booting from /dev/sda5 I want to change boot partition into /dev/sda1. How to change,How to address Master boot record boot partition from /dev/sda4 to /dev/sda1
Solution: when ever the Linux operating system boot, first it will load mbr (master boot record) these mbr load the grub loader(grub.conf).
To change these /dev/sda4/grub.conf to /dev/sda1/grub.conf mab  follow the procedure.
1)grub>find /boot/grub/stage1
root(hd0,0)
root(hd0,4)
If you get any error message like
"Error 15: File not found"
Then try following command,
While we check "find /boot/grub/stage1" if it is not found,
Then can check "find /grub/stage1"
grub> find /grub/stage1
(hd0,0)
(hd0,4)
From these
Here I have two boot partition so it show the two parameter,(hd0,0), (hd0,4)
we need to confirm which partition we want to install that grub
2)grub>root (hd0,0)
3)grub>setup (hd0)
Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.
From there last line we can confirm the grub conf file located (hd0,0)/grub/grub.conf
4)Go to /dev/sda1-/etc/fstab add boot partition.
/etc/fstab
/dev/sda1 /boot
How to change Linux Booting partition from /dev/sda4 root(hd4,0) to /dev/sda1 root(hd0,0)
Change the boot partition.

Related post