Ubuntu 14.04 not booting after error message. /tmp could not be mounted

70,003

Solution 1

  1. In Windows Boot Manager, select Ubuntu.
  2. Press any key and enter GNU Grub2 menu.
  3. You can press "e" to edit GRUB2 boot entry.

You need to change the GRUB2 boot entry from "ro" to "rw",

e.g.

linux   /boot/vmlinuz-3.13.0-24-generic root=UUID=AAC884AC1F144321 loop=/ubuntu/disks/root.disk ro   quiet splash $vt_handoff

to

linux   /boot/vmlinuz-3.13.0-24-generic root=UUID=AAC884AC1F144321 loop=/ubuntu/disks/root.disk rw   quiet splash $vt_handoff

Press F10, you can boot in Ubuntu 14.04.

and you can fix GRUB2 boot entry:

sudo vi /etc/grub.d/10_lupin

Change the line:

linux   ${rel_dirname}/${basename} root=${LINUX_HOST_DEVICE} loop=${loop_file_relative} ro ${args}

to:

linux   ${rel_dirname}/${basename} root=${LINUX_HOST_DEVICE} loop=${loop_file_relative} rw ${args}

Regenerate GRUB2 boot entry:

sudo update-grub

Solution 2

The temporary fix - overriding the initial mounting of the root.disk to rw (read/write) instead of ro(read-only) is good. It's the only way to boot Wubi after a 14.04 install (or upgrade).

However, there is a better long term fix than permanently modifying the mount to read/write. It's best to modify the way the loop device is created in order to allow remounting as read-write. This will then allow you to use recovery mode.

Modify the file /usr/share/initramfs-tools/script/local as shown (one line removed, three added):

--- /home/bcbc/local   2014-11-19 20:25:12.274837304 -0800
+++ /usr/share/initramfs-tools/scripts/local   2014-11-19 20:28:37.990832807 -0800
@@ -143,7 +143,9 @@
        modprobe ${FSTYPE}

        # FIXME This has no error checking
-       mount ${roflag} -o loop -t ${FSTYPE} ${LOOPFLAGS} "/host/${LOOP#/}" ${rootmnt}
+       loopdev=`losetup -f`
+       losetup ${loopdev} "/host/${LOOP#/}"
+       mount ${roflag} -t ${FSTYPE} ${LOOPFLAGS} ${loopdev} ${rootmnt}        

        if [ -d ${rootmnt}/host ]; then
            mount -o move /host ${rootmnt}/host

After making the change, update the initial ramdisk:

sudo update-initramfs -u

For additional information, and credit for the fix see: https://code.launchpad.net/~noorez-kassam/ubuntu/utopic/initramfs-tools/fix-for-1317437/+merge/219927

Caution: obviously if you make some typos when applying this fix it may prevent your install from booting. So proceed with caution. And if unsure, use the easier Grub override. Make sure you use the ` quote, not ' for the loopdev= line.

If you attempt this and run into problems, there are a couple of things you can try:

  1. If you have more than one kernel, go to the Recovery menu and select an older kernel (with it's own initramfs).
  2. You could backup the initramfs (before updating), and then copy it over the bad one from a live DVD/USB.
  3. You could rebuild the initramfs in a chroot, but this is a bit involved.

If it's a fresh install, then reinstalling is your best option.

Share:
70,003

Related videos on Youtube

user272877
Author by

user272877

Updated on September 18, 2022

Comments

  • user272877
    user272877 almost 2 years

    I recently installed Ubuntu 14.04 using WUBI and after installation when it booted it showed an error:

    Serious errors were found while checking the disk drive for /. 
    

    There were three options:

    press [I] to ignore, press [S] to skip mounting and press [M] to mount manually. 
    

    After I pressed I, it showed /tmp could not be mounted and my Ubuntu isn't booting.

    • Can anybody please guide me to how to solve this problem?
    • user272877
      user272877 about 10 years
      I would like to install via wubi because then I can remove ubuntu whenever I want without any trouble. Can you please guide me to how to solve this problem
    • Admin
      Admin about 10 years
      I used the above and it works great. However, when I try to edit the GRUB2 boot entry; it will revert back to the original (even after saving it). I used the command: sudo gedit /etc/grub.d/10_lupin I was able to edit it and save it (changed ro to rw). But after rebooting, it reverts back to the original boot entry. How can I make it permanent? Many thanks,
    • Dirk
      Dirk almost 10 years
      holy cow, why is this even happening?
    • bain
      bain almost 10 years
  • user272877
    user272877 about 10 years
    Ok thanks for helping but last question how can I change the grub file without booting into ubuntu because I cant boot into my ubuntu
  • user273948
    user273948 about 10 years
    1. in windows boot manager, select Ubuntu . 2. press any key and go in GUN Grub2 menu. 3. you can press "e" to edit the commands before booting.
  • gfour
    gfour about 10 years
    After you select "Ubuntu" from the Windows boot manager, keep Shift pressed and the Grub menu should appear.
  • user272877
    user272877 about 10 years
    Thank you very much my ubuntu finally booted! Thanks to everyone
  • Duver
    Duver about 10 years
    I fix the issue with this answer, but now when i restart or shutdown the computer, after selecting ubuntu in boot options, the screen go black and never initiate. I reboot manually and then select ubuntu in boot options, in the menu press e and then F10 and it loads fine, always have to press e -> F10 in order to be able to load ubuntu. Any suggestions?
  • The Duke Of Marshall שלום
    The Duke Of Marshall שלום about 10 years
    You sir......are my hero. This was driving me crazy and your solution here brought me back to sanity. One suggestion I would make though is when editing the GRUB file to use sudo gedit /etc/grub.d/10_lupin instead of sudo vi /etc/grub.d/10_lupin. This works better for me as I have a more graphical interface, easier to read text, and I can be lazy by using the search function instead of having to look through many lines to find } ro ${. But again, THANK YOU!!
  • littleO
    littleO almost 10 years
    This solution actually worked, which amazes me. How in the world does somebody know this? Can somebody tell me where I should start reading / learning in order to understand issues like this and be able to solve problems like this? Is there a textbook I should read?
  • Anuj TBE
    Anuj TBE almost 10 years
    where to find windows boot manager in windows 8. I'm also having the same issue.
  • Bill
    Bill over 9 years
    Like yourself, I am trying to find a better long term solution to this problem. Tried your method, and ended up getting a lot of errors on reboot, some of which indicated missing files like /etc/fstab. Could be that I have made a typo, however, is it possible that 'losetup' is finding a different first unused loop device than is expected? Should I be using /dev/loop0 instead? At present, I have applied the easier Grub override.
  • bcbc
    bcbc over 9 years
    @Bill I'd guess there's a typo. If you pastebin your code and post the link I'll take a look.
  • Bill
    Bill over 9 years
    Thanks bcbc, Unfortunately, I cannot pastebin the original code since I ended up uninstalling and reinstalling wubi. What I will do, however, is pastebin the current code I intend to use to recreate initramfs. Here is the link: pastebin.com/bRKc9fdL
  • bcbc
    bcbc over 9 years
    @Bill that looks good.
  • Bill
    Bill over 9 years
    To quote Acts 8:8 - So there was much rejoicing in that city....so too was in the Tourloupis household that evening...! Thanks for your help bcbc. Solved my problem. Must have been a typo after all! Mind you, I had to copy and paste that portion of code into the latest copy of /usr/share/initramfs-tools/script/local, as it had been modified since I had posted my original comment. Otherwise, it worked like a charm! That is, after I changed the affected line of /etc/grub.d/10_lupin back to read-only. Once again, thank you for your help!
  • bcbc
    bcbc over 9 years
    @Bill Great! You're welcome. Your experience does highlight the risk of attempting this fix. I'll add some suggestions to my answer to get around the problem.
  • na-no.
    na-no. almost 6 years
    This is a life saver!