데비안의 VirtualBox

데비안의 VirtualBox

3.5.0과 3.6.0이라는 두 개의 커널이 설치되어 있습니다. 여러 가지 이유로 커널 3.5.0을 실행해야 합니다. VirtualBox는 3.6.0에서는 완벽하게 작동하지만 3.5.0에서는 작동하지 않습니다.

커널 3.5.0을 부팅한 후 apt-get --reinstall install virtualbox-dkms. 이로써 VirtualBox 모듈이 성공적으로 다시 컴파일되었습니다. 그러나 로드에 실패합니다.

# modprobe vboxdrv
ERROR: could not insert 'vboxdrv': Exec format error

/var/log/messages:

warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)
vboxdrv: disagrees about version of symbol module_layout

모듈이 올바르게 설치된 것 같습니다.

$ ls /lib/modules/3.5.0/updates/dkms/
vboxdrv.ko  vboxnetadp.ko  vboxnetflt.ko  vboxpci.ko

시스템 정보: 데비안이 불안정합니다. 패키지가 virtualbox-dkms이미 설치되어 있습니다.

$ uname -r
3.5.0

$ apt-cache show virtualbox | grep Version
Version: 4.1.18-dfsg-1.1

$ apt-cache show dkms | grep Version
Version: 2.2.0.3-1.2

다음은 모듈 빌드의 출력입니다.

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 4.1.18
Kernel:  3.5.0 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.5.0/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.

-------- Uninstall Beginning --------
Module:  virtualbox
Version: 4.1.18
Kernel:  3.6.0 (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.6.0/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.6.0/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.6.0/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxpci.ko:
 - Uninstallation
   - Deleting from: /lib/modules/3.6.0/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod....

DKMS: uninstall completed.

------------------------------
Deleting module version: 4.1.18
completely from the DKMS tree.
------------------------------
Done.
Unpacking replacement virtualbox-dkms ...
Setting up virtualbox-dkms (4.1.18-dfsg-1.1) ...
Loading new virtualbox-4.1.18 DKMS files...
Building for 3.5.0 and 3.6.0
Building initial module for 3.5.0
Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.5.0/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.5.0/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.5.0/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.5.0/updates/dkms/

depmod....

DKMS: install completed.
Building initial module for 3.6.0
Done.

vboxdrv:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.6.0/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.6.0/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.6.0/updates/dkms/

vboxpci.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/3.6.0/updates/dkms/

depmod....

DKMS: install completed.
[ ok ] Stopping VirtualBox kernel modules.
[FAIL] Starting VirtualBox kernel modules[....] modprobe vboxdrv failed. Please use 'dmesg' to find out why ... failed!
 failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.

3.5.0에서 VirtualBox를 실행하는 방법은 무엇입니까?

답변1

링크를 주신 Warlock에게 감사드립니다. 버전 불일치가 있는 것 같습니다. kernel-source패키지를 만들지 않아서 발생한 것 같습니다 . 대신, 다른 여러 버전을 컴파일하는 데에도 사용되는 git 저장소를 사용했습니다.

먼저 패키지 linux-imagelinux-headers (현재 실행 중인 커널)을 제거했습니다.

다음 단계는 완전히 깔끔한 체크아웃입니다(디렉토리에 빌드가 남아 있지 않음). 그런 다음 커널을 빌드하고 패키지 linux-imagelinux-headers패키지를 만들고 linux-source설치했습니다. 그 후 VirtualBox 모듈이 성공적으로 빌드되고 로드됩니다.

이전에 어떤 버전이 일치하지 않았는지 알 수 없지만 다음 단계를 따르면 버전 불일치가 발생하지 않습니다.

답변2

이 패키지를 설치하셨나요 virtualbox-dkms?
일반적으로 커널을 업그레이드할 때마다 다시 설치해야 합니다. 이는 dkms 부분이 손상되었다는 신호라고 생각하지만 다시 설치하면 효과가 있었습니다. 새 커널이 아닌 다른 커널에 다시 설치해 본 적은 없지만 현재 실행 중인 커널에 대해 빌드해야 한다고 가정합니다.

관련 정보