26

Running Ubuntu 14.04 on Oracle VirtualBox 4.3.24 and completely stuck with mounting guest additions. I've spent quite a time looking for a solution online, but nothing helped...

enter image description here

As suggested below, I've tried to mount manually and also download ISO from the web (version matching VirtualBox). The same error:

enter image description here

EDIT:

Now some folders became "read-only", which causes big troubles.. Even installing fresh Ubuntu 14.04 image doesn't help... So reinstalling of VirtualBox itself...

44

I was able to resolve the mounting issue by the reinstalling the linux image:

sudo apt-get install --reinstall linux-image-$(uname -r)

BTW, it all started with upgrading VirtualBox. Bidirectional clipboard stopped working so I tried to reinsert Guest Additions ISO. This caused above stuff. Now, Guest Additions are mounted back, but clipboard wtill doesn't work...

  • 5
    I had the same problems today (clipboard broken, no CD image would mount). Your solution plus reinstalling Guest Additions solves both. – Mark Smith Apr 24 '15 at 10:42
  • 1
    Worked for version 5.x also – Karl Morrison Mar 1 '16 at 1:36
14

TL;DR this can be quickly fixed by rebooting. Then the CD-ROM will work and the Guest Additions will be installable:

 sudo reboot

The "best" sequence to update the kernel on VirtualBox with Additions is:

 apt-get update
 apt-get upgrade              (or apt-get dist-upgrade)
 reboot                       

 (re)install VirtualBox Additions on the new kernel that is now running
 apt-get autoremove

(The next-to-latest old kernel might not be auto-removed for security reasons, to allow you to "go back").

How did this happen? (previous long answer)

Exactly this kind of problem will arise if you:

  • upgrade the kernel (say from .66 to .67)
  • run apt-get autoremove and somehow remove the running kernel, or manually remove the "old" kernel, thus removing all modules from /lib/modules/kernel.66
  • do not reboot, thereby keeping the "old" .66 kernel running. The loaded modules remain in memory and everything works, but no new modules can be loaded since .66 modules have been deleted.
  • try to do anything that requires loading a module that was not yet loaded

And installing the VirtualBox ISO may require exactly that -- loading the ISO9660 support module.

The requested module now can no longer be autoloaded, because the running kernel (.66) does not find anything in /lib/modules/kernel.66 . The module exists, but it is in /lib/modules/kernel.67, of which the current .66 kernel knows nothing about (and it's not recommended to load a mismatching module).

Reinstalling the uname'd kernel will of course reinstall the running kernel modules, thereby making ../.66/.../isofs.ko available again and making a reboot unnecessary. This is a downgrade of the installed kernel and the update issue will remain (see below).

That is, when you run Additions CD, it will install for the running .66 kernel, not the updated .67 kernel (which still isn't running).

If you are in such a situation you can also certainly fix it by rebooting (the new .67 running kernel will find its modules), and probably by loading the module belonging to the new kernel (isofs is pretty stable), which unless you've underwent an important kernel upgrade will still be compatible (this is still not recommended!):

# mount /dev/cdrom /mnt
mount: unknown filesystem type 'iso9660'

This above is the root error you're getting ("unknown filesystem type").

# uname -a
Linux virtual 3.13.0-66-generic ...

So we check which version of the modules is installed. It should be .66:

# ls /lib/modules
3.13.0-67-generic

...but there's only one directory and it's .67 (the .66 directory might be there, but empty; in this case du -sh /lib/modules/* will tell how much space is taken by the various directories, allowing to tell between empty ones and full ones).

Reinstalling the old kernel image with no re-grub will not fix the real problem

You reinstall the .66 kernel with its modules and headers. Now you have both kernels, with grub set to load the newer .67.

The ISO CD-ROM can be mounted (because the module is now present) and the VBox modules will compile (because the headers have been installed).

It will compile modules for the running .66 kernel, and they will work... for a while.

At the first reboot, you will find yourself with a .67 kernel with no VirtualBox additions at all.

Reinstalling the old kernel image with re-grub and re-boot will also not fix the real problem

As above, you reboot and find yourself with a downgraded kernel. Very soon, Ubuntu will try to upgrade it and you'll be back where you started (see below: "downgrading kernel").

Patching in the ISO module will also not fix the real problem

Chances are we can force load the ISO9660 module all the same, since no work was done between kernels 66 and 67 and the binary is essentially unchanged, so we try:

# insmod /lib/modules/3.13.0-67-generic/kernel/fs/isofs/isofs.ko

No errors. It worked. Kernel .66 loaded module from kernel .67. Let's try again to mount the CD-ROM:

# mount /dev/cdrom /mnt
mount: block device /dev/sr0 is write-protected, mounting read-only

This still won't help, because the CD being installed is VirtualBox Additions, which requires the running kernel headers to be installed. If the running kernel modules are no longer there, chances are that neither will the kernel headers.

Also, the newly compiled Virtualbox modules won't have anywhere to go, since the .66 modules directory has been cleaned.

But say you fix all that: you've essentially done an expensive (and partial) kernel downgrade, and the additions will be lost at next upgrade together with the rest of .66 kernel, exactly as in the case above.

Downgrading the kernel will work... for a while

If we remove the .67 kernel and reinstall the .66 kernel with modules in its stead, things will be hunky dory for a while. No reboot necessary, as in the "force ISO module" solution above.

And a reboot will not lose anything, since no Additions-challenged kernel is installed.

But this way the kernel will still be in the "to be upgraded" list, and this same problem is bound to arise sooner or later.

Granted, you can now have it arise in some more appropriate moment of your choice, which might be worth quite a lot.

Just reboot!

Rebooting, the more recent .67 kernel will be activated and all its modules and headers are there.

So, after the reboot, Guest Additions will work, and the upgrade will "take".

  • 1
    This answer should be rated much higher because it is the correct answer. For completeness' sake, you've properly explained the underlying issue and also the 2 step-fix necessary to arrive at the solution. – zero2cx Sep 18 '16 at 13:38
  • 1
    @Iserni I do not have enough reputation to edit your answer's tl;dr paragraph at the top. There, we should should mention step #2, i.e. re-installation of the Guest Additions ISO. People might be missing that necessary step by not reading to the answer's end. – zero2cx Sep 18 '16 at 13:48
4

As per others answer this can be usually fixed by rebooting.

Somehow "iso9660" module not loaded. depmod scans all modules and create module dependencies.

sudo depmod -a
sudo mount /dev/sr0 /mnt
ls -l /mnt

this will fix the issue.

2

In my case next workaround helped:

in guest ubuntu

sudo apt-get install virtualbox-guest-additions-iso

I think some dependencies which was installed solved problem

1

I solved this (on Ubuntu 16.04) by upgrading packages and restarting:

sudo apt-get update
sudo apt-get upgrade
sudo reboot
0

Try manually mounting it:

  • Open a terminal.
  • Type the following commands:

    sudo mount /dev/sr0 /mnt
    ls -l /mnt
    
  • Then if the CD contents was shown, open /mnt in Nautilus (a.k.a File Manager) and intall the Guest Additions.

If those steps didn't work, try this:

  • Download the guest additions ISO from the VM (via virtualbox website).
  • Right click on it --> Open with... --> Disk image mounter.
  • Open the newly mounted disk.
  • Hi Helio, I've tried both it didn't work. The same error. Please see edited answer – Oleg Shirokikh Mar 15 '15 at 9:03
  • The reason why this does not work is because this procedure will fix most problems arising from Linux not finding the device. Linux here is finding the device, it even recognizes the filesystem ("iso9660"), the problem is that it doesn't know how to read it. – LSerni Nov 8 '15 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.