You are not logged in.

#1 2020-09-15 21:34:32

nemophilia
Member
Registered: 2020-05-28
Posts: 1

forgot to mount /boot partition during installation, virtualbox

Hi,

This spring, I installed arch and forgot to mount my efi partition to boot before pacstrapping. For the most part nothing has broken in the meantime, but I receive the error

"Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

'/sbin/vboxconfig'

as root.

If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT. "

when trying to start a virtual machine on virtualbox. I have virtualbox-host-modules installed and I also have swapped it out for virtualbox-host-dkms as is recommended for the lts kernel, however the error persists in both cases. and I believe this is because it is looking for a kernel and cannot find it, because i have not mounted anything in /boot.
Currently my pacman -Qi linux output is

Name            : linux
Version         : 5.7.12.arch1-1
Description     : The Linux kernel and modules
Architecture    : x86_64
URL             : https://git.archlinux.org/linux.git/log/?h=v5.7.12-arch1
Licenses        : GPL2
Groups          : None
Provides        : VIRTUALBOX-GUEST-MODULES  WIREGUARD-MODULE
Depends On      : coreutils  kmod  initramfs
Optional Deps   : crda: to set the correct wireless channels of your country
                  linux-firmware: firmware images needed for some devices [installed]
Required By     : virtualbox-host-modules-arch
Optional For    : base
Conflicts With  : None
Replaces        : virtualbox-guest-modules-arch  wireguard-arch
Installed Size  : 75.85 MiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Fri 31 Jul 2020 10:38:22 AM PDT
Install Date    : Thu 06 Aug 2020 07:17:25 PM PDT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

and the output of uname -r is

5.4.55-1-lts

As the two kernels are different, I am thinking that because I didn't add the boot partition to my fstab or mount it during installation (I am dualbooting arch with manjaro and at the time of installation was using the bootloader that came with manjaro), so I was worried that this would overwrite the current bootloader. I have never updated the kernel at boot since installation in early spring. Additionally, nothing is mounted at mount | grep boot ( no output from this)


from some other threads that I have been reading (namely https://bbs.archlinux.org/viewtopic.php?id=196056) It seems like what I should do is to mount the current efi partition at /mnt, copy over the files in /boot, namely the initramfs images, intel ucode, and vm-linuz-linux kernels over to the sda2 partition,regenerate or update fstab, and edit grub.cfg, and then reboot.

lsblk looks like

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 238.5G  0 disk 
├─sda1   8:1    0   529M  0 part 
├─sda2   8:2    0   100M  0 part 
├─sda3   8:3    0    16M  0 part 
├─sda4   8:4    0   204G  0 part /
└─sda5   8:5    0  30.1G  0 part /run/media/i/2f24a519-2318-4c09-a730-a17cac5ae0e3

sudo fdisk -l /dev/sda

Disk /dev/sda: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: Micron_1100_MTFD
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 672C7B89-2AB7-4FF7-8B60-20660955A45A

Device         Start       End   Sectors  Size Type
/dev/sda1       2048   1085439   1083392  529M Windows recovery environment
/dev/sda2    1085440   1290239    204800  100M EFI System
/dev/sda3    1290240   1323007     32768   16M Microsoft reserved
/dev/sda4    9166848 437055487 427888640  204G Linux filesystem
/dev/sda5  437056003 500117503  63061501 30.1G Linux filesystem

To clarify, arch is on sda4, and manjaro is on sda5, the esp is sda2, and it seems like the boot folder on /boot in /sda4 is not the same as the partition on sda2, and I am planning on copying over the /boot files to the actual sda2 partition (after mounting it) and updating fstab.

After mounting sda2 on /mnt, inside there is /mnt/EFI/Manjaro/grubx64.efi. If I were to copy over  the contents of my current /boot folder, which has contents

EFI   initramfs-linux-fallback.img  initramfs-linux-lts-fallback.img  intel-ucode.img  vmlinuz-linux-lts
grub  initramfs-linux.img           initramfs-linux-lts.img           vmlinuz-linux

(EFI folder is empty, grub folder is populated but I cannot find an .efi file, does this mean that previously I was booting from an EFIstub directly?)

my questions are what sorts of edits should I make to the grub.cfg file? if I were to copy everything over to the sda2 partition from /boot, delete the original manjaro bootloader efi file, and have the fstab written such that sda2 would be mounted at /boot, would there be a better / more efficient way of doing this? Like just mounting sda2 at /boot  and then pacman -Syu?



Thanks a bunch in advance, any help will be extremely appreciated.

EDIT: I forgot to mention that my system is using UEFI firmware, and secure boot is off. Additionally there are other items within /EFI, however I believe the efi file is /mnt/EFI/Manjaro/grubx64.efi

EDIT2: it looks like upgrading the manjaro system has changed the kernel at boot for arch as well? I am guessing this means that somehow they share the same kernel?

Last edited by nemophilia (2020-09-16 03:49:01)

Offline

#2 2020-09-16 07:05:28

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 168

Re: forgot to mount /boot partition during installation, virtualbox

To reinstall the driver do :

sudo /etc/rc.d/vboxdrv setup.
dkms install --no-depmod -m vboxhost -v 6.1.14_OSE -k 5.8.9-arch2-1

To set the automatic mount of boot partition you have to modify your /etc/fstab filel ike this ;

 
#/dev/$BOOTPARTITION
UUID=$PARTUUID      $MOUNTPOINT   $FILESYSTYPE(Think vfat)   $OPTIONS (Example: rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)	0 2)

If your boot partition is empty mount it and the do :

bootctl --path=$MOUNTPOINTBOOTPARTITION install

Can you post you fstab file now ?

Last edited by Khere (2020-09-16 08:13:19)


Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

Board footer

Powered by FluxBB