virtualizing opensuse 12.3 with virtualbox

Hi opensusers!

I am trying to virtualize an old 12.3 system (uefi, dualboot with windows).

The stepes I followed were:

  1. clone the disk using macrium software.

  2. create 4 raw images of the old partitions with:

 
sudo dd if=/dev/sdb8 bs=1M of=/run/media/phaethon/New_Volume/home.raw
sudo dd if=/dev/sdb7 bs=1M of=/run/media/phaethon/New_Volume/root.raw
sudo dd if=/dev/sdb2 bs=1M of=/run/media/phaethon/New_Volume/boot.raw
sudo dd if=/dev/sdb6 bs=1M of=/run/media/phaethon/New_Volume/swap.raw

  1. convert the raw images to virtualbox virtual disks

VBoxManage convertfromraw /run/media/phaethon/New_Volume/home.raw home.vdi --format VDI
VBoxManage convertfromraw /run/media/phaethon/New_Volume/root.raw root.vdi --format VDI
VBoxManage convertfromraw /run/media/phaethon/New_Volume/boot.raw boot.vdi --format VDI 
VBoxManage convertfromraw /run/media/phaethon/New_Volume/swap.raw swap.vdi --format VDI 

  1. Create a new virtualbox machine and assign these virtual disks to virtual box “storage” disks,
    selecting within virtualbox menu:
    Settings->Controller:SATA->add hard disk
    and add the 4 drives home.vdi, root.vdi, boot.vdi and swap.vdi

  2. Download opensuse 12.3 installation iso and add it in virtualbox controller,
    selecting within virtualbox menu:
    Settings->Controller:IDE->add optical drive
    and select the opensuse iso

Unfortunately it did not work.
The original disk partitions are distributed as follows:


Parted -l
Number Start End Size File system Name Flags
1 1049kB 1075MB 1074MB ntfs Basic data partition hidden, diag
**2** 1075MB 1347MB 273MB fat32 Basic data partition boot       **# boot**   
3 1347MB 1482MB 134MB ntfs Basic data partition msftres
4 1482MB 392GB 390GB ntfs Basic data partition
5 392GB 392GB 367MB ntfs hidden, diag
**6** 392GB 392GB 2157MB linux-swap(v1) primary                   **#swap**
**7** 394GB 416GB 21.5GB ext4 primary                                   **#/**
**8** 416GB 738GB 322GB ext4 primary                                    **#/home**
9 738GB 750GB 12.0GB ntfs Basic data partition hidden, diag

  • I tried to reconfigure GRUB following these steps:
    **I. **Start the virtual machine in rescue mode, selecting “rescue system”.
    I get one failure:

      ...
     [FAILED] Failed to start System Logging Service 
      ...
     login: root
     

II. Activate the usb disk of virtualbox, in order to detect the external usb disk with the vdisks.
III. Mount the partitions


mount /dev/sda7 /mnt 
mount /dev/sda2 /mnt/boot/efi 
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc 
mount --bind /dev /mnt/dev 
mount --bind /run /mnt/run

IV.

chroot /mnt

V. Change the label of the original disk in fstab,

vi /etc/fstab

replacing it with the output of

ls -l /dev/disk/by-id/ata*

VI. reinitialize the bootloader

update-bootloader --reinit

The last command gives me the following error though:

 
Perl-Bootloader: <3> pbl-358.2 Core::RunCommand.1642:Error: Command '/usr/sbin/grub2-install --target=x84_64-efi >/var/log/YaST@/y2log_bootloader 2>&1' failed with code 256 and output: Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.

When running

modprobe efivars 

it gives:

FATAL: Could not load /lib/modules/3.7.10-1.1-default/modules.dep: No such file or directory

What can I do?

I tried 12.3 a few months ago. This was in a KVM virtual machine. I did a clean install. That was pretty normal.

As I recall, I had to disable secure-boot. There’s probably an expired certificate somewhere in the secure-boot authentication chain.