grub2 - Unexpected boot sequence with two cloned hard drives - Ask Ubuntu


for redundancy purposes, computer has 2 identical hard drives.

i installed ubuntu 12.04 , grub in /dev/sda.

i cloned /dev/sda /dev/sdb (i used fog)

when change primary hard drive in bios don't hard drive boot. doesn't start grub installed in "primary hard drive".

i have read information boot sequence

http://www.dedoimedo.com/computers/grub.html

http://www.golinuxhub.com/2014/03/step-by-step-linux-boot-process.html

http://www.thegeekstuff.com/2011/02/linux-boot-process/

but i'm still unable consistently boot drive want. fstab uses uuid.

after clone, partitions in sda , sdb have same uuid. changed uuid of partions in /dev/sdbx with

tune2fs -u random /dev/sdbx 

and updated /etc/fstab file in /dev/sdb1 use new uuids. updated grub with

sudo update-grub 

and installed in both hard drives:

sudo install-grub /dev/sda sudo install-grub /dev/sdb 

when boot again, doesn't matter if choose first (sda) or fourth (sdb) option in grub, boots sda.

the file /boot/grub/grub.cfg uses uuid. related problem?

to cloned drive boot need reinstall grub on drive. boot sda , when grub-menu appears choose ubuntu installed on 'sdb' start. open terminal (ctrl+alt+t) , run command

sudo grub-install /dev/sdb

this reinstall grub mbr of sdb , grub points partition ubuntu installed on same drive. other drive sda untouched , work before.

checking uuid's of partitions on sdb with

sudo blkid

as mentioned in comment of twicejr idea, have adapt uuid's in /etc/fstab on sdb.

that's it, should able boot directly sdb choosing drive first drive in boot-order in bios.

note: valid if ubuntu installed in legacy-mode ( old bios-mode). in uefi-mode different!


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User