Slackware 12 - Moving an installed system from physical IDE disk to virtualized Virtualbox - LILO error L 01 01 01 01
An installation of Slackware 12 was in need of being moved from a physical computer with IDE drive to a virtualized Virtualbox machine with a virtual drive. I booted into Gparted on the physical machine. I made a copy of the partitions before doing the shrinking and moving as Gparted sometimes fail fatally, this copies 30 GB from the start: dd if=/dev/hdX of=disk-backup.img bs=1024M count=30 Then I shrinked and moved around the partitions. I and then again I copied the new shrinked and resized version to an image file, which was only about 10-15 GB: dd if=/dev/hdX of=disk.img bs=1024M count=15 I moved disk.img to the target host machine containing the Virtualbox install I converted the dd image to a vdi disk: VBoxManage convertdd disk.img disk.vdi --format VDI (More here: https://blog.sleeplessbeastie.eu/2012/04/29/virtualbox-convert-raw-image-to-vdi-and-otherwise/ ) I made up a machine in Virtualbox and attached the disk and tried to boot it, which resulted in the following output: L 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 Slackware was as user friendly as usual. I figured LILO was angry of the moving, shrinking and disk type changes from IDE to virtual box SATA. I booted Gparted, and opened a terminal and jumped into a root shell: sudo bash Then I checked partitions - my disk.img was on /dev/sda: cfdisk /dev/sda It turned out the system was on /dev/sda1 partition. So I mounted it: mount /dev/sda1 /mnt I jumped into a chroot: chroot /mnt /bin/bash (More here: http://docs.slackware.com/howtos:slackware_admin:how_to_chroot_from_media ) I edited /etc/lilo.conf, in my case I use jed: jed /etc/lilo.conf Of course there was the wrong disk represented there multiple times, lines like this has to be changed to sda instead of hda. boot = /dev/hda -- change to --> boot = /dev/sda root = /dev/hda1 -- change to --> root = /dev/sda1 I saved the file and then I ran lilo to update it, which suprisingly worked: lilo This was not enough, fstab had to be edited too: jed /etc/fstab /dev/hda1 reiserfs default 1 1 -- change to --> /dev/sda1 reiserfs default 1 1 Then I tried to boot again. Which made Slackware boot, but it halted: VFS: Cannot open root device It turned out that I had the disk attached to an IDE controller and not a SATA controller in Virtualbox. Moving the disk.img from the IDE to SATA fixed this.
This is a personal note. Last updated: 2015-06-12 00:07:44.