You are not logged in.

#1 2019-12-20 13:44:57

yaharga
Member
Registered: 2019-12-18
Posts: 4

[Solved] How to install refind on Virtualbox 6.0?

My hardware is as follows:
Motherboard: Gigabyte X570 I AORUS PRO WIFI
CPU             : AMD 3800x
GPU             : Radeon 5700x

I'm currently running Ubuntu and I am using Oracle VM Virtualbox 6.0 to try and install Arch and configure. I'm ashamed to say I've been having trouble installing it in the first place.

I'm trying to get the minimum installation going, but I'm even having trouble with that.

I'll try to give as much details as to be precise.

I set up a VM with Arch Linux, enable the EFI, and use the disk ISO set as the one taken from Arch Linux's Download page (the torrent from the magnet link).

Takes a while to boot up, and then it takes me to the live environment; here's what I do then:

# Create Partitions Using cfdisk
/      8GB   Linux Root (x86-x64)
/boot  4GB   EFI System
/swap  4GB   Linux Swap
/home  16GB  Linux Home

# Format Partitions
mkfs.ext4       /dev/sda1
mkfs.vfat -F32  /dev/sda2
mkswap          /dev/sda3
swapon          /dev/sda3
mkfs.ext4       /dev/sda4

# Mount Partitions
mount /dev/sda1 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot
mkdir /mnt/home
mount /dev/sda4 /mnt/home

# Install Base Packages
pacstrap /mnt base linux linux-firmware

# Enable Automounting
genfstab -U /mnt >> /mnt/etc/fstab

# Changing root to get into the disk.
arch-chroot /mnt

# Install Refind
pacman -S refind-efi
refind-install

# Rename the file to the default name to avoid issue with Virtualbox < 6.1 as stated by wiki.
mv /boot/efi/refind.efi /boot/efi/bootx64.efi

# Shutdown
shutdown

Once I shutdown, I remove the virtual disk and boot the machine. I usually get the UEFI interactive shell. I tried some other methods including running

refind-install --usedefault /dev/sd2

and it only gave me the refind GUI but I can't see any OSs to choose from, like this.

Before this, I tried to install systemd-boot to no avail, either. I followed the same steps as above, except after

arch-chroot /mnt

I ran the following:

bootctl --path=/boot$esp install

and it would boot to an error:

Error: device '' not found. Skipping fsck.

:: mounting '' on real root

mount: /new_root: no filesystem type specified.

You are being dropped into an emergency shell.

sh: can't access tty; job control turned off

I want to use UEFI and refind now, not systemd-boot. I thought I would include it since I must be doing something wrong that's causing both bootloaders to not work properly.

Last edited by yaharga (2019-12-20 19:02:01)

Offline

#2 2019-12-20 14:07:55

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [Solved] How to install refind on Virtualbox 6.0?

Welcome to the forum. Please see How to Post and change your topic title so that it describes your issue.

Also see https://bbs.archlinux.org/viewtopic.php?id=57855 -- "to no avail" and  "it would boot to an error" does not help us help you.

Offline

#3 2019-12-20 14:24:50

yaharga
Member
Registered: 2019-12-18
Posts: 4

Re: [Solved] How to install refind on Virtualbox 6.0?

2ManyDogs wrote:

Welcome to the forum. Please see How to Post and change your topic title so that it describes your issue.

Also see https://bbs.archlinux.org/viewtopic.php?id=57855 -- "to no avail" and  "it would boot to an error" does not help us help you.

I hope I fixed it; I changed the title and added the output.

Last edited by yaharga (2019-12-20 14:25:06)

Offline

#4 2019-12-20 14:49:19

loqs
Member
Registered: 2014-03-06
Posts: 19,097

Re: [Solved] How to install refind on Virtualbox 6.0?

When you are dropped to the rescue prompt what is the output of

cat /proc/cmdline

Offline

#5 2019-12-20 15:59:11

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: [Solved] How to install refind on Virtualbox 6.0?

Did you run mkinitcpio?
Also check:

To enable EFI for a virtual machine using the graphical interface, open the the settings of the virtual machine, choose System item from the panel on the left and Motherboard tab from the right panel, and check the checkbox Enable EFI (special OSes only).

I'm also not sure about this:

# Rename the file to the default name to avoid issue with Virtualbox < 6.1 as stated by wiki.
mv /boot/efi/refind.efi /boot/efi/bootx64.efi

Which wiki was this?

Offline

#6 2019-12-20 17:25:39

yaharga
Member
Registered: 2019-12-18
Posts: 4

Re: [Solved] How to install refind on Virtualbox 6.0?

loqs wrote:

When you are dropped to the rescue prompt what is the output of

cat /proc/cmdline

You mean the rescue prompt of refind? How can I run commands when I'm at it?

Offline

#7 2019-12-20 17:53:01

loqs
Member
Registered: 2014-03-06
Posts: 19,097

Re: [Solved] How to install refind on Virtualbox 6.0?

I mean the emergency shell,  which produced the output:

You are being dropped into an emergency shell.

Is keyboard input not functional in the shell?

Offline

#8 2019-12-20 18:59:05

yaharga
Member
Registered: 2019-12-18
Posts: 4

Re: [Solved] How to install refind on Virtualbox 6.0?

I knew Virtualbox < 6.1 had issues with EFI, but I didn't find the section on REFInd's section regarding it until later. I put them together to figure out my mistake; I ran

refind-install

and

refind-install --usedefault

but without any arguments. Once I used

refind-install --usedefault /dev/sda2

and shutdown, removed the disk, it booted properly. Hope this helps someone in the future, and thanks for all the help!

Offline

Board footer

Powered by FluxBB