How to change the boot order if Two boot partitions exist on the Linux Machine

0

I have an open vpn server running on my Ubuntu server 14.04.I took the backup of hard disk /dev/xvda (which includes the boot files) to an img file using the dd command.

Machine A

dd if=/dev/xvda of=/backup/backup.img 

Then it is transferred to another Linux machine(Ubuntu 14.04) and restored it to /dev/xvdm disk.

Machine B

dd if=/data-backup/backup.img of=/dev/xvdm

After restoring, fdisk command showing both disks.

# fdisk -l
Disk /dev/xvda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *       16065    16771859     8377897+  83  Linux

Disk /dev/xvdm: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders, total 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot      Start         End      Blocks   Id  System
/dev/xvdm1   *       16065    16771859     8377897+  83  Linux

After rebooting the server system is booted with /dev/xvdm1 not with /dev/xvda1. Also the partition /dev/xvda1 is unmounted. So how or where can I adjust the server boot order if two partitions contains the boot files.

linux
ubuntu
partition
boot
asked on Server Fault Jan 3, 2016 by Jyothish Kumar S • edited Jan 3, 2016 by Jakuje

1 Answer

0

Those are two different disks. From which one is system booted depends on BIOS and its configuration, not on configuration of system. But in most cases disk which does not have any partition with boot flag (also known as active) is not booted by BIOS.

Therefore you can try to remove boot flag from /dev/xvdm1 via fdisk a option.

answered on Server Fault Jul 15, 2017 by Pali

User contributions licensed under CC BY-SA 3.0