I`m trying to launch existing Archlinux installation inside Virtualbox on Windows host. Linux uses EFISTUB, Windows - its own EFI bootloader.

- /dev/sda1 - EFI partition, also mounted as /boot for linux on host. It contains vmlinuz-linux and initramfs. Windows Boot manager is there too.

- /dev/sda2 - Linux partition

- /dev/sda3 - Windows partition

I have created .vmdk file which represents partitions sda1 & sda2, then launched Vbox with administrator rights. Attached .vmdk to a VM. Then booted from a live-DVD iso inside the VM, executed

# efibootmgr -d /dev/sda -p 1 -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/sda2 rw initrd=/initramfs-linux.img"

(i know, not the best idea, because Vbox will erase all EFI variables after closing the VM. But I dont have any bootloader installed on /sda1)

Efi boot option was created successfully. But it causes

Waiting 10 secs for device /dev/sda2 ...
ERROR: device '/dev/sda2' not found.  Skipping fsck.
ERROR: Unable to find root device '/dev/sda2'.
You are being dropped to a recovery shell 

Has anyone succeeded in configuring EFISTUB in such case? Or should I try grub-efi?

  • It looks to me like your virtualized environment does not map the true /dev/sda2 to the virtualized /dev/sda2, hence the problem. OTOH, I'm not an expert on giving VirtualBox access to "real" disk devices, so I may be misinterpreting something here.... – Rod Smith Jul 19 '17 at 16:35
  • @Rod-Smith Thanks for hypothesis. I checked it using PARTUUID instead of /dev/sda/ while creating EFI boot entry. Got a bit different result than before - ERROR: Unable to find root device /dev/disk/by-partuuid/MY_PARTUUID. PARTUUID inside the virtualized environment is the same as on real hardware. System from live-dvd is able to see all partitions inside VM, but can read and write only to sda1 & sda2. – MichaelZelenoborskyLong Jul 21 '17 at 11:54

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.