Page 1 of 1

virtualize old opensuse 12.3 system

Posted: 18. Oct 2021, 14:24
by phaethon
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:

Code: Select all

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
3. convert the raw images to virtualbox virtual disks:

Code: Select all

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
4. 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

5. 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:

Code: Select all

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:

Code: Select all

      ...
     [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:

Code: Select all

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.

Code: Select all

chroot /mnt
V. Change the label of the original disk in fstab,

Code: Select all

vi /etc/fstab
replacing it with the output of:

Code: Select all

ls -l /dev/disk/by-id/ata*
VI. reinitialize the bootloader

Code: Select all

update-bootloader --reinit
but the last command, gives me the following error:

Code: Select all

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

Code: Select all

modprobe efivars
I get:

Code: Select all

FATAL: Could not load /lib/modules/3.7.10-1.1-default/modules.dep: No such file or directory
What else can I try?

Re: virtualize old opensuse 12.3 system

Posted: 18. Oct 2021, 14:51
by mpack
Disks should be imaged as one whole, not as a bunch of partitions. None of the partition images is a disk image, without the partition map they are effectively just random data.

There was another discussion just today that tells you how to do it properly.
viewtopic.php?f=3&t=104156