Fixing the Fedora 12 VirtualBox Guest Additions problem

I’m a frequent VirtualBox user, and as I’ve noted in my previous posts, I’m an avid fan of Fedora as well.

However, there is a nasty bug in the most recent version of VirtualBox (3.1.2) when combined with Fedora 12. After installing the Guest Additions kernel modules as per the user docs, the system boots to a black screen with a cryptic error message that looks like a SELinux labeling problem (it’s not).

type=1305 audit(12587840002.571:32444): audit_enabled=0 old=1 auid=4294967295 ses=4294967295 subj=system_u:system_r:readahead_t:s0 res=1

The problem is actually with the Guest Additions video driver, the one that gives you the nice resizable desktop window. Once the driver is built and installed, for some reason the X server can’t find any screens and refuses to start.

Until the bug gets fixed in the video driver, here’s how you can fix the system so that it will boot correctly, although you’ll lose the dynamic resizing ability. You’ll have to stick with fixed, predefined resolutions for now.

  1. Mount a Fedora 12 ISO, such as the full or network install discs, and boot to it. Boot into Rescue Mode from the GRUB bootloader screen.
  2. Breeze through the language and network options, but be sure to have it mount your hard disk image (it will mount under /mnt/sysimage).
  3. Drop into a shell and change into your hard disk’s X11 config directory, so that would be:
    cd /mnt/sysimage/etc/X11
  4. Edit your xorg.conf file… but wait! In Fedora 12, they switched to HAL for X configuration, so there is no xorg.conf file! Never fear, you just need to create one and it will override the HAL:
    vi xorg.conf
  5. Now, use the following settings for the new xorg.conf file:
    Section "Device"
        Identifier "Configured Video Device"
        Driver "vboxvideo"
    EndSection
    
    Section "Monitor"
        Identifier "Configured Monitor"
    EndSection
    
    Section "Screen"
        Identifier "Configured Screen"
        Monitor "Configured Monitor"
        Device "Configured Video Device"
        SubSection "Display"
            Depth 24
            Modes "1440x900" "1680x1050"
        EndSubSection
    EndSection
    
    Section "InputDevice"
        Identifier "vboxmouse"
        Driver "vboxmouse"
        Option "CorePointer"
        Option "Device" "/dev/input/mice"
    EndSection
    
    Section "ServerLayout"
       Identifier   "Default Layout"
       Screen      "Configured Screen"   0 0
       InputDevice   "vboxmouse"
    EndSection
    
  6. You’ll see I’ve defined two resolutions, 1440×900 and 1680×1050. What this allows me to do is work windowed at 1440×900 and if I want to go full screen (remember, dynamic resizing won’t work) I can hit the full screen shortcut in VirtualBox (Host+F) and change the resolution within Fedora to match my screen res.
  7. Save from vi (:wq) and reboot the system. Remember to unmount the install disc! The system should boot correctly now, albeit without dynamic resizing.

A huge thanks goes out to Jits in the VirtualBox forums for this fix!

This entry was posted in Linux. Bookmark the permalink.

7 Responses to Fixing the Fedora 12 VirtualBox Guest Additions problem

  1. Matt says:

    Instead of having to use the Fedora rescue mode, you can boot into run level 3, or even 1, by changing the grub options. (Grub is the boot loader).

    Fedora’s grub usually never shows, but you can get to it by pressing the up or down arrow keys (not the right nor left ones) when the VirtualBox boot splash appears. You make have to let virtualbox grab your mouse by clicking the window. You’ll know you have it when you see a blue menu with Fedora entries.

    Anyhow, the first entry is usually the right one (Fedora …). Highlight it and press ‘e’ to edit. In the new menu highlight the middle one (kernel …) and press ‘e’. Add “3″ to the end of the line, with a space before it and no quotes. Press Enter. Then press ‘b’ to boot.

    Once you have logged in, you can proceed with the changes outlined in the article.

    There are many other options and commands for the grub menu, some of which are listed at the bottom of the it. Remember that whatever options you add or remove here are *temporary*. For permanent changes change grub.conf. Don’t know how? [Your favorite search engine here] is your friend.

    You can also use nano or jed if you aren’t familar with vi. Under run level 3 you should have networking (wireless maybe not). Just use ‘yum install nano’.

    Some other resolutions (depends on your desktop): 1020×600 1280×800

    To the author: Thanks! I “lost” two to this. Any chance you can have a link so we can use wget or something else to download the file, rather than having to type it all out?

  2. Joshua says:

    Apropos of Matt’s comment, just add “single” to grub’s list of arguments to the kernel. You’ll get to a single-user shell and will be able to edit the xorg.conf file with complete alacrity.

  3. Andre says:

    Installed the latest version VirtualBox this morning (3.1.2 r56127) with Fedore 12 and it works perfectly! Just had to follow the instructions (mainly to install dkms and gcc and dependencies) and all features from guest add-ons (including window resizing) works.

    André

  4. Mark says:

    I had the same problem with Fedora 12 and using the Vbox 3.1.2 r56127. This fix resolved the issue for now.

    There is a much easier way to install the fix, however. When the screen hangs, hit CTRL-ALT-F2, and you’ll get a terminal screen. Sign in as root, make the suggested file change, and save it. Now do “shutdown -r now” to reboot the system. If you didn’t make any keystroke errors on the file, you should now see a GUI screen.

    Hint: When keying in the config file, figure out what resolutions you most likely will need, and include them on the “Modes” line.

  5. Jits says:

    Hi,

    Glad it worked for you!

    Seems there may be a better solution.

    I haven’t tried this yet but will do in a bit.

    I don’t suppose you’ve been having regular problems with freezes with your VMs?

    Cheers,
    Jits

  6. Sslaxx says:

    Would this be the same kind of issue afflicting Lucid?

  7. misha says:

    nice post, many thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>