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.

2
  • Is it a Virtual Machine? If yes, are you able to choose the boot-device? Are you able to get/check/update the GRUB configuration? Can you check what's inside the /etc/fstab? The boot process is NOT trivial, so lots of details are needed in order to understand what's going on, exactly. Jan 3, 2016 at 11:17
  • As for the boot process, even if quite old, this ( ibm.com/developerworks/library/l-linuxboot ) is a must-read, expecially for "young" Linux sysadmins Jan 3, 2016 at 11:20

1 Answer 1

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.

1
  • The partition table is usually parsed by the master boot record which is in the same sector as the partition table. If you have installed GRUB in the master boot record I think GRUB is going to boot regardless of whether you have marked any partition on that disk as bootable.
    – kasperd
    Jul 15, 2017 at 19:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .