VirtualBox

8 年 前 建立

8 年 前 結束

#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

描述 (由 Frank Mehnert 作最後更新)

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:1 8 年 前Frank Mehnert 編輯

描述: 修改 (差異)

comment:2 8 年 前Michael Thayer 編輯

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?

comment:3 8 年 前þorfinn 編輯

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

comment:4 8 年 前Frank Mehnert 編輯

Fix is part of VirtualBox 5.1 and will be also part of the next VirtualBox 5.0 maintenance release.

comment:5 8 年 前Frank Mehnert 編輯

狀態: newclosed
處理結果: fixed
注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette