#15579 closed defect (fixed)
Bug in VBoxLinuxAdditions.sh 5.0.24_108355
回報者: | billR | 負責人: | |
---|---|---|---|
元件: | guest additions | 版本: | VirtualBox 5.0.24 |
關鍵字: | dracut VBoxLinuxAdditions.sh | 副本: | |
Guest type: | Linux | Host type: | Windows |
描述 (由 作最後更新)
Tracked down failures to install guest additions on CentOS 7. Symptom was constant syslogs:
dracut: Can't write to /boot/initramfs-: Directory /boot/initramfs- does not exist or is not accessible.
Upon rebooting, the system would be unbootable and required a rescue disk.
problem is on line 1042 of VBoxLinuxAdditions.sh:
for i in /lib/modules/*; do update_module_dependencies "${i#/lib/modules}" done
running the following code illustrates the problem:
# for i in /lib/modules/*; do echo update_module_dependencies "${i#/lib/modules}" done update_module_dependencies /3.10.0-327.22.2.el7.x86_64
the correct code puts a trailing '/' after 'modules':
for i in /lib/modules/*; do update_module_dependencies "${i#/lib/modules/}" done
To workaround this bug, do the following:
(mount GuestAdditions CD Image, cd to top level of CDROM).
# sh ./VBoxLinuxAdditions.sh
(errors - define the following shell function taken from the script)
# update_module_dependencies() { depmod "${1}" test -d "/lib/modules/${1}/initrd" && touch "/lib/modules/${1}/initrd/vboxvideo" test -n "${QUICKSETUP}" && return if type dracut >/dev/null 2>&1; then dracut -f "/boot/initramfs-${1}.img" elif type update-initramfs >/dev/null 2>&1; then update-initramfs -u -k "${1}" fi } # for i in /lib/modules/*; do update_module_dependencies "${i#/lib/modules/}" done
(the following files seem to be leftover and prevent my system from booting, delete them).
# rm -rf /var/lib/VBoxGuestAdditions
更動歷史 (5)
comment:3 8 年 前 由 編輯
confirmed the problem VB-5.1.0 and CentOS-7.7 VBoxLinuxAdditions.run fails with the default installation on CentOS-7 with /boot being read only to all, group and user # chmod u+w /boot and rerunning VBoxLinuxAdditions.run works. VBoxLinuxAdditions.run is supplied from the VBoxGuestAdditions.iso
On the whole this report looks very reasonable, except that there is no file "VBoxLinuxAdditions.sh". The code you mention exists in other places, and your change seems to make sense, but where did you find that file?