virtualize old opensuse 12.3 system

Discussions related to using VirtualBox on Linux hosts.

virtualize old opensuse 12.3 system

Postby phaethon » 18. Oct 2021, 14:24

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   Expand viewCollapse view
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   Expand viewCollapse view
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   Expand viewCollapse view
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   Expand viewCollapse view
      ...
     [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   Expand viewCollapse view
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   Expand viewCollapse view
chroot /mnt


V. Change the label of the original disk in fstab,
Code: Select all   Expand viewCollapse view
vi /etc/fstab

replacing it with the output of:
Code: Select all   Expand viewCollapse view
ls -l /dev/disk/by-id/ata*


VI. reinitialize the bootloader
Code: Select all   Expand viewCollapse view
update-bootloader --reinit


but the last command, gives me the following error:
Code: Select all   Expand viewCollapse view
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   Expand viewCollapse view
modprobe efivars

I get:
Code: Select all   Expand viewCollapse view
FATAL: Could not load /lib/modules/3.7.10-1.1-default/modules.dep: No such file or directory


What else can I try?
phaethon
 
Posts: 1
Joined: 18. Oct 2021, 14:11

Re: virtualize old opensuse 12.3 system

Postby mpack » 18. Oct 2021, 14:51

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
mpack
Site Moderator
 
Posts: 34928
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 20 guests