#author("2019-12-30T17:06:47+09:00","","")
#author("2022-01-03T14:50:53+09:00","","")
#navi(../)
* Debian 10 Buster にVirtualBox guest additionsをインストールする [#ia069f01]
Debian 10 BusterにVirtualBoxのGuest Additionsをインストールした時の備忘録です。

&color(red){Debian 11 (bullseye)でも同様の操作でインストールできました。};

#htmlinsert(linux_ads_top.html)
#contents


* 動作環境 [#b0ca2b00]
-ホストOS~
Windows 10 ver.1909 64bit
-ゲストOS~
 $ lsb_release -d
 Description:    Debian GNU/Linux 10 (buster)

* Guest Additonsのインストール手順 [#g7fce7d6]
以下の手順でVirtualBoxのGuest Additionsをインストールしました。

Guest Additionsのインストールに必要と思われるパッケージをインストールします。
+ rootにスイッチユーザ(su)します。
 su -
+ 端末(ターミナル)を起動し、アップデートします。~
 apt update && apt upgrade -y
+ アップデートがあった場合、再起動します。(Debian VMの再起動)
 reboot
+ パッケージをインストールします。
 apt install -y dkms build-essential module-assistant
+ m-aコマンドの実行
 m-a prepare
+ 端末(ターミナル)は下の操作で使いますので、閉じないでください。

* Guest additonsのISOイメージのマウント [#ied94c5d]
以下の手順で Guest additions のISOイメージをマウントします。
+メニューバーの「デバイス」をクリックします。
+ 「Guest Additions CD イメージ挿入...」をクリックします。
#ref(01.png)
#br
マウントされているパスが /media/cdrom0 であることが確認できます。
#ref(02.png)
#br
+ /media/cdrom0 に cd します。
 cd /media/cdrom0/
+ ls コマンドを実行すると以下のように Guest Additions のファイル群を確認できます。~
今回利用するのは、''VBoxLinuxAdditions.run''になります。
 root@debian:/media/cdrom0# ls -ltr
 合計 62774
 -r--r--r-- 1 root root      763  1月 22  2019 AUTORUN.INF
 -r--r--r-- 1 root root     3949 10月 11 03:44 VBoxDarwinAdditionsUninstall.tool
 -r--r--r-- 1 root root  3732506 10月 11 03:44 VBoxDarwinAdditions.pkg
 -r-xr-xr-x 1 root root     4821 10月 11 03:46 runasroot.sh
 -r-xr-xr-x 1 root root     6384 10月 11 03:46 autorun.sh
 -r--r--r-- 1 root root 16585216 10月 11 03:46 VBoxSolarisAdditions.pkg
 -r-xr-xr-x 1 root root  8611252 10月 11 03:46 VBoxLinuxAdditions.run
 -r-xr-xr-x 1 root root   270104 10月 11 03:46 VBoxWindowsAdditions.exe
 -r-xr-xr-x 1 root root 12135624 10月 11 03:48 VBoxWindowsAdditions-x86.exe
 -r-xr-xr-x 1 root root 22920216 10月 11 03:51 VBoxWindowsAdditions-amd64.exe
 dr-xr-xr-x 2 root root      792 10月 11 03:52 cert
 -r--r--r-- 1 root root      547 10月 11 03:52 TRANS.TBL
 dr-xr-xr-x 2 root root     2652 10月 11 03:52 OS2
 dr-xr-xr-x 2 root root     1824 10月 11 03:52 NT3x
+ ''VBoxLinuxAdditions.run''を実行します。
 bash ./VBoxLinuxAdditions.run
+ 以下のようにメッセージが出力され、コンパイル&インストールが開始されます。
 root@debian:/media/cdrom0# bash ./VBoxLinuxAdditions.run
 Verifying archive integrity... All good.
 Uncompressing VirtualBox 6.0.14 Guest Additions for Linux........
 VirtualBox Guest Additions installer
 Copying additional installer modules ...
 Installing additional modules ...
 VirtualBox Guest Additions: Starting.
 VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
 modules.  This may take a while.
 VirtualBox Guest Additions: To build modules for other installed kernels, run
 VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
 VirtualBox Guest Additions: or
 VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
 VirtualBox Guest Additions: Building the modules for kernel 4.19.0-6-amd64.
 update-initramfs: Generating /boot/initrd.img-4.19.0-6-amd64
 VirtualBox Guest Additions: Running kernel modules will not be replaced until
 the system is restarted
 root@debian:/media/cdrom0#
+ Debianを再起動します。

以上の操作で、VirtualBox の Guest Additions のインストールは完了です。

#htmlinsert(linux_ads_btm.html)

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS