VirtualBox

Opened 8 years ago

Last modified 8 years ago

#15579 closed defect

Bug in VBoxLinuxAdditions.sh 5.0.24_108355 — at Version 1

Reported by: billR Owned by:
Component: guest additions Version: VirtualBox 5.0.24
Keywords: dracut VBoxLinuxAdditions.sh Cc:
Guest type: Linux Host type: Windows

Description (last modified by 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

Change History (1)

comment:1 by Frank Mehnert, 8 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use