LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Problem on booting cloned VM (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/problem-on-booting-cloned-vm-4175489679/)

satimis 12-31-2013 04:32 AM

Problem on booting cloned VM
 
Hi all,

Host Ubuntu 12.043
Guest OpenSUSE 13.1
Oracle VirtualBox

All cloned guests can't boot

Warning:
Timed out waiting for device dev-disk-by\x2did-ata\x...2dpart1.device.
Dependency failed for /boot
Dependency failed for Local File Systems


Found following 2 threads:
Unable to use cloned VM, OpenSUSE, VirtualBox
http://superuser.com/questions/43235...use-virtualbox

Cannot boot OpenSuse 12 after cloning disk due to by-id access to the disk
http://diggerpage.blogspot.hk/2011/1...r-cloning.html

but couldn't resolve how to fix the problem. Please help

TIA

Rgds
satimis

jefro 12-31-2013 10:11 AM

Why did you clone the vm? How did you clone the vm? Usually you just copy the entire vm instead of a clone.


Yes, a normal computer that is cloned could have specific hardware that is mentioned in a few places. One is grub, another is fstab. A rule before clone is to make the terms generic like /dev/sda1 or such instead of my name or uuid.

You'll have to correct all entries that mention the old system to either generic or the new name/uuid or other. A live cd should help correct.

satimis 12-31-2013 10:21 AM

Quote:

Originally Posted by jefro (Post 5089664)
Why did you clone the vm? How did you clone the vm? Usually you just copy the entire vm instead of a clone. - snip -

The openSUSE VM was cloned on the same PC. The cloned VM has booting problem. I tried at least 3 times creating 3 cloned VMs.

However the strange thing is no problem on cloning Debian 7.3.1/LinuxMint16/Ubuntu12.04, all VMs cloned without booting issue.

satimis

jefro 01-02-2014 07:31 PM

Opensuse uses specifics in their boot and fstab. Change to generic or correct them to the new system.

satimis 01-02-2014 11:59 PM

Solved
 
Hi all,

Problem solved as follow;

Start the VM with live-kde-opensuse13.1 ISO

Start Terminal

linux@linux:~> su

# fdisk -l
Code:

Disk /dev/sda: 42.9 GB, 42949672960 bytes, 83886080 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 label type: dos
Disk identifier: 0x0002efa7

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2048      819199      408576  83  Linux
/dev/sda2          819200    83886079    41533440  8e  Linux LVM

Mount LVM

# pvs
Code:

  PV        VG    Fmt  Attr PSize  PFree
  /dev/sda2  system lvm2 a--  39.61g 8.00m

# lvdisplay /dev/system
Code:

.... 
  --- Logical volume ---
  LV Path                /dev/system/root
  LV Name                root
  VG Name                system

# mount /dev/system/root /mnt

# ls /mnt/
Code:

bin  dev  home  lib64      media  opt  root  sbin    srv  tmp  var
boot  etc  lib  lost+found  mnt    proc  run  selinux  sys  usr

# cp /mnt/etc/fstab /mnt/etc/fstab.ORIG_20140103

# nano /mnt/etc/fstab
change the line;
Code:

/dev/disk/by-id/ata-VBOX_HARDDISK_VBef165ce6-8bf1a0de-part1 /boot  ext4  acl,user_xattr 1 2
as;
Code:

/dev/sda1 /boot  ext4  acl,user_xattr 1 2
Shutdown the VM and remote the live-kde-opensuse13.1 ISO

Start VM. Now it can boot without problem.

Thanks


Edit
====
To avoid the step mounting the LVM do as follow;

After booting the Live-CD

Kmenu -> Applications -> System -> File Manager -> File Manager-Super User Mode

Then it can directly edit the "fstab" file there.


Rgds
satimis

jefro 01-04-2014 02:37 PM

Thank you for the detailed method to fix it.


All times are GMT -5. The time now is 07:46 PM.