You are not logged in.

#1 2014-04-12 23:58:25

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

[SOLVED] Virtualbox module "vboxdrv" - loading at boot

I can manualy boot the "vboxdrv" module using

sudo modprobe vboxdrv

and this works every time - I can use Virtual box withouth problems. I would really like to load this module at boot time using the "/boot/syslinux/syslinux.cfg" file and then recompile the image using mkinitcpio -p. I edited the file like this, but the module doesn't get loaded.

LABEL arch
        MENU LABEL Linux (Arch)
        LINUX ../vmlinuz-linux
        APPEND root=/dev/sda3 rw init=/usr/lib/systemd/systemd vboxdrv
        INITRD ../initramfs-linux.img

I have seen that people useing "modeprobe.****=*****" command or something similar in this file to load modules. How should I use this to load vboxdrv module?

Last edited by 71GA (2014-04-13 11:48:36)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#2 2014-04-13 00:06:37

Oxyd
Member
From: Czech Republic
Registered: 2008-01-17
Posts: 167

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

If your goal is just to have the modules loaded automatically at boot time, then the Wiki shows you how to do that using /etc/modules-load.d/

As for doing it with Syslinux, I can't help you.

Edit: Fixed the link.

Last edited by Oxyd (2014-04-13 00:31:19)

Offline

#3 2014-04-13 00:17:19

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

Oxyd wrote:

If your goal is just to have the modules loaded automatically at boot time, then the Wiki shows you how to do that using /etc/modules-load.d/

As for doing it with Syslinux, I can't help you.

The part of the wiki you linked to refers to the guest modules, though.



Of course he'll have to put vboxdrv in his *.conf file in /etc/modules-load.d/ not the guest modules which are for when you run Arch itself in a VM.

Last edited by blackout23 (2014-04-13 09:35:47)

Offline

#4 2014-04-13 00:31:33

Oxyd
Member
From: Czech Republic
Registered: 2008-01-17
Posts: 167

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

blackout23 wrote:

The part of the wiki you linked to refers to the guest modules, though.

D'uh! You're right, of course. Edited my post to link to the correct section.

Offline

#5 2014-04-13 01:18:20

halimbo
Member
From: Krefeld, Germany
Registered: 2013-10-23
Posts: 67

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

Just add the module to the MODULES line in /etc/mkinitcpio.conf, and then regenerate your initramfs with

mkinitcpio -p linux

Offline

#6 2014-04-13 05:21:07

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,079

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

I have no idea why you would ever want vboxdrv in the initramfs.

Offline

#7 2014-04-13 09:35:16

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

halimbo wrote:

Just add the module to the MODULES line in /etc/mkinitcpio.conf, and then regenerate your initramfs with

mkinitcpio -p linux

Do you know what the initramfs is for?

Offline

#8 2014-04-13 10:30:59

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

@Oxyd thank you for the link. I know I can do it like this but was wondering if it is possible to do it using "/boot/syslinux/syslinux.cfg" or any other method like this one below:

blackout23 wrote:
halimbo wrote:

Just add the module to the MODULES line in /etc/mkinitcpio.conf, and then regenerate your initramfs with

mkinitcpio -p linux

Do you know what the initramfs is for?

Well I have seen that we can blacklist the modules in initramfs and I thought: "Why not loading them as well". Could you briefly expose the difference in loading the modules using
"/boot/syslinux/syslinux.cfg" and "/etc/mkinitcpio.conf". What is the core purpose of initramfs? Thank you.

Last edited by 71GA (2014-04-13 10:35:12)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#9 2014-04-13 11:32:50

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

initramfs is there to have an initial filesystem in memory with all the device drivers to mount the real physical root file sysytem. So it's purpose is to achive the startup of the system. vboxdrv in initramfs is clearly not needed to start the system.

Offline

#10 2014-04-13 11:48:08

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

blackout23 wrote:

initramfs is there to have an initial filesystem in memory with all the device drivers to mount the real physical root file sysytem. So it's purpose is to achive the startup of the system. vboxdrv in initramfs is clearly not needed to start the system.

So the most correct way to load ALL the drivers at boot is to just use "/etc/modules-load.d/" and for blacklisting modules there is "/etc/modprobe.d/"... I guess I ll have to just go with the flow. smile

Thank you!


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#11 2014-04-13 11:52:27

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

It's not only the correct way it's also way easier and faster since you don't have to "mkinitcpio -p linux" everytime you change something.

Offline

#12 2014-04-13 11:55:49

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

blackout23 wrote:

It's not only the correct way it's also way easier and faster since you don't have to "mkinitcpio -p linux" everytime you change something.

This is good point. But I don't know why my "vboxdrv" didn't work when put it in the APPEND section of syslinux.cfg... Maybe it was loadet at too early stage?

Last edited by 71GA (2014-04-13 11:56:30)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#13 2014-04-13 12:01:22

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

I have never used the kernel lines in the bootmanager to load modules only the init daemon (sys V init, systemd).

Offline

#14 2014-04-13 14:36:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,079

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

71GA, you're confusing the bootloader with the initramfs. syslinux loads the initramfs, but that's all. AFAIK, you cannot load modules with the bootloader. You can add modules to the initramfs, but the initramfs is there just to set things up so that the init system can run. There is absolutely no reason to add vboxdrv to the initramfs.

Last edited by Scimmia (2014-04-13 14:36:54)

Offline

#15 2014-04-13 18:24:53

halimbo
Member
From: Krefeld, Germany
Registered: 2013-10-23
Posts: 67

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

I don't see the problem in adding vboxdrv to the initramfs, when he clearly wants to have it loaded anytime he boots.
For the graphics drivers it's supposed in the wiki, too.
So I don't see a problem in adding the driver for virtualbox. but that's just me, i see.

When i follow your argumentation, there is no reason to add graphics drivers in /etc/mkinitcpio.conf because the drivers are not needed to mount the initial filesystem.

Last edited by halimbo (2014-04-13 18:27:29)

Offline

#16 2014-04-13 18:44:24

blackout23
Member
Registered: 2011-11-16
Posts: 781

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

halimbo wrote:

I don't see the problem in adding vboxdrv to the initramfs, when he clearly wants to have it loaded anytime he boots.
For the graphics drivers it's supposed in the wiki, too.
So I don't see a problem in adding the driver for virtualbox. but that's just me, i see.

When i follow your argumentation, there is no reason to add graphics drivers in /etc/mkinitcpio.conf because the drivers are not needed to mount the initial filesystem.

It's not only about mounting the real root it's about ensuring a succesfull bootup of the whole system and having graphics modules loaded early helps to do that. On my laptop for example there is a race condition with X11, which wants to start before udev figured out the appropriate graphics driver module to load. So it would boot into terminal and the display manager service would report "failed" as status otherwise.

Last edited by blackout23 (2014-04-13 18:45:14)

Offline

#17 2014-04-13 21:13:58

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

halimbo wrote:

I don't see the problem in adding vboxdrv to the initramfs, when he clearly wants to have it loaded anytime he boots.
For the graphics drivers it's supposed in the wiki, too.
So I don't see a problem in adding the driver for virtualbox. but that's just me, i see.

When i follow your argumentation, there is no reason to add graphics drivers in /etc/mkinitcpio.conf because the drivers are not needed to mount the initial filesystem.

Well adding the "vboxdrv" in the "syslinux.cfg" and doing "mkinitcpio -p" didn't work. I wonder why. It worked for module "radeon" for example.


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#18 2014-04-13 23:18:14

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,079

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

Because as I said, syslinux.cfg has nothing at all to do with the initramfs that you create with mkinitcpio.

Offline

#19 2014-04-14 12:11:52

halimbo
Member
From: Krefeld, Germany
Registered: 2013-10-23
Posts: 67

Re: [SOLVED] Virtualbox module "vboxdrv" - loading at boot

Okay so the whole thing is more about style and order, than about functionality, i get it.

Offline

Board footer

Powered by FluxBB