Crap. My Ubuntu machine won’t boot

This sucks. On some very rare occasions, when I connect an SD card reader to my Ubuntu machine, it freezes. Normally I just reboot and everything is fine. But this time my Ubuntu machine won’t boot, and it shows a message like

Starting up …
Loading, please wait…
kinit: name_to_dev_t(/dev/disk/by-uuid/bd656dcd-04b4-412f-a880-62a6553bd8b) = sda5(8,5)
kinit: trying to resume from /dev/disk/by-uuid/bd656dcd-04b4-412f-a880-62a6553bd8b
kinit: No resume image, doing normal boot…

Then it hangs forever. Any Ubuntu/Linux gurus have suggestions on how to repair my system so it will boot?

Update: I think the machine is fixed now. Thanks to Sérgio Carvalho and Chris Fleming for the suggestions. It looks like somehow my swap partition got messed up, which affected things when my Linux machine got confused about whether my machine had hibernated. The fix was:

– When the machine boots up, press ‘Esc’ to get to the Grub menu
– Select one of the “recovery mode” options. This will boot you up to a single-user root prompt.
– Run “sudo fdisk /dev/sda” (this assumes that your hard drive is at sda)
– Type “p” to see which hard drive partition is labeled “Linux swap”. In my case the partition was /dev/sda5. Type “q” to exist fdisk.
– Type these commands:

sudo swapoff /dev/sda5
(Use whatever partition was labeled as “Linux swap” in fdisk. For me, this was /dev/sda5)
sudo mkswap /dev/sda5
sudo update-initramfs -u

These commands say “Stop using /dev/sda5 as a swap partition,” then mkswap tells your computer to set up /dev/sda5 as a new/fresh swap partition. Finally, update-initramfs with the -u (update) option will generate an initramfs image. The initramfs image is a gzipped blob of data that the Linux kernel unzips into RAM and then mounts to use as an initial file system.
– Type “reboot” and cross your fingers for your machine to boot up. For me, it rebooted just fine and started working normally.

Thanks to everyone who chimed in with an opinion on this.

34 Responses to Crap. My Ubuntu machine won’t boot (Leave a comment)

  1. buy a WinXP machine 😉

    Judging from the thread: there are reported delays in boot procedure for more then 2 minutes. How long did you wait before “it hangs forever” conclusion?
    There are multiple solutions offered in the thread. Nobody says that his machine hangs though.
    If your machine does hang forever, you will probably need to boot from your ubuntu livecd, check that the data on your hard drive is still intact and linux boot image is present, and reinstall grub.

  3. Piero B. Contezini

    This problem is weird, as the USB driver implementation detects everything as SCSI drivers, and ubuntu likes to map everything as SCSI too (i really dont know why) you fstab and initrd images are configured to lookup for sda as you root disk, and when you connect your SD card it somehow detects it as SDA too..
    for me it solves by removing the usb reader, turning the machine entirely off (even takin the power cable off, sometimes it just works doing this) waiting a few secs and then trying again.

  4. I suppose you have disconnected the SD reader and you did connect it via USB. It seems that by that last reboot your box flagged the internal status as “suspended to disk” – a state that still causes problems on various machines.

    I *GUESS* you have to play around with the GRUB boot options to tell your box not to recover from suspension!


    start with that.

    A simple howto is here:

  5. Some extra information, such as more meaningful boot messages, could be useful. 🙂 Remove the quiet option from the boot loader to see these.

    I’d reckon that running a memory test would be a good idea, as well.

  6. Boot in single-user mode and fix it. Press Esc when the bootloader allows you to. Then, press E to edit the boot line, and append “noresume init=/bin/sh”. Press Enter then b to boot. When the shell prompt comes up, remount root read-write (mount / -o remount,rw) and take a look at /var/log/messages to see what is preventing the machine from booting.

  7. Matt… there’s this search engine that you can use to help with these kind of questions:

    These messages don’t necessarily indicate a error, as Linux is checking to see if the machine was hibernated. What you need to do is boot from a live CD and try something like:

    $ sudo swapoff /dev/sda5
    (this assumes that sda5 is a swap partition)
    $ sudo mkswap /dev/sda5
    $ sudo update-initramfs -u

  8. to make it not search for a resume image, try giving ‘noresume’ (without quotes) as an option to grub. (press ‘e’ at the grub screen to edit an entry), or try exchanging the standard notation for the root device with the readable one (/dev/sda1 or whatever instead of “UUID=0ae4021- ….” apart from that cause there’s no actual error message, hard to tell what’s wrong, so your best bet would be to search ubuntu forums or asking there I guess.

  9. Gary Schubert, I waited overnight. 🙂

    I’m at work now, but thanks for the excellent suggestions, Sérgio Carvalho and flo. Chris Fleming, that search engine sounds pretty handy. 🙂 I’d done some looking around, and it did sound like using a livecd was a way to go, but I wasn’t sure from there. I’d love it if only my swap partition was horked, and I’ll try that tonight — thanks!

  10. Isn’t that fun to be Matt Cutts? Your Linux doesn’t start, so you make a new post in your blog, and tadam! people come TO YOU with the answer. We, the little people, search google until we solve it… 😀 Just kidding Matt, you have earned your audience honestly…

  11. I am a highly trained US Navy Electronics Tech and I would like to offer my expertise by suggesting the use of the “cabinet reset”. The only way to use this switch only a few are aware of is to hit the side of the machine with such force it almost flies off the desk or table it is resting on. If it doesn’t work the first time try once again hitting it the other direction. If that don’t work…order a new one. Hope that helps 🙂

  12. dude you’re getting a Dell

  13. I had a similar problem once and one thing that worked was just to edit /etc/fstab and use the human readable /dev/sdaX form, replacing the uuids, and making sure that swap is enabled – check the man pages for swapon, swapoff and mkswap.

    A general handy thing for fixing boot problems is to boot into knoppix, using the boot flag ‘knoppix 2’ for a clean terminal. Then mount the filesystem that you want to be your boot partition and chroot into it, and reinstall grub with the command ‘grub-install’ – it will re-run the grub installer which tends to find everything.

  14. @ Matt. Dude I have some buddies over at this linux forum who can help you out.

  15. have you tried using supergrub to create a bootable floppy/cd ?

    try this :
    mirrors located here:

  16. Dave (Original)

    You get what you pay for 🙂

  17. Hi Matt,

    I would use a LiveCD. Keeping one handy has saved me a lot of times. All operating systems suffer from problems like this but only Linux will allow you to boot from a LiveCD. 🙂

    My hunch is that you just have some problems with your filesystem.


  18. Matt,

    “I’d love it if only my swap partition was horked, and I’ll try that tonight — thanks!”

    Any good news? we need that “Ubuntu machine” to write your next Gadgets post 🙂

  19. I think people have already said try a live cd – some of the security/recovery ones can even rescue disks that are starting to go bad. Back track is the one I prefer

    I like TomG’s suggestion back in the day certain CBM Pet disk drives (the 3000 series drives) required a light tap to settle the floppy disks on the spindles.

  20. Hey Matt,
    I’ve had the same problem, but with my Ipod connected to my Dell Laptop (older model) and latest version of Ubuntu the machine won’t boot. I have to disconnect the Ipod from the USB port and for some strange reason it works.

    Ubuntu is ok once its up and running, the Ipod is recognised and the song library available. Very odd.

  21. Dear Matt,

    Ubuntu is good for daily use, your problem seems the hd reboot issue.

    You can boot with a Ubuntu Live-CD to fix it , or do it like this

    in terminal

    sudo nano /etc/initramfs-tools/conf.d/resume

    add # in front of RESUME= /dev/disk/by-uuid/bd656dcd-04b4-412f-a880-62a6553bd8b( your case)

    sudo update-initramfs -u

  22. Btw….

    Matt has posted yesterday very informative article on Google blog:

    Using data to fight webspam

    Not good news for spammers 🙂

  23. Harith, I don’t normally post to the Google Blog; I like the cozy feel here on my personal blog. 🙂

  24. Matt,

    “I like the cozy feel here on my personal blog”

    Thanks, the same here. I keep a good record in my “RAM” of the posts on your blog, you know 🙂

  25. Don´t worry… I have the same problem… but you´ll figure out soon…

  26. Hi, I have a Untube OS, will this affect me the same way as it does for the pc’s?

  27. Hey, can anyone explain to me why hardly anything works properly with Linux distros? Or is it something the developers think is trendy?

  28. John Bolton, you must have crappy hardware.

  29. Hi,

    I am a diffrent problem. I have Ubuntu 8.10 kernel 2.6.27-11-generic.

    I reboot my machine, it goes to GRUB and then it just hangs. All I see is the mouse going in round circle but no login page or any other pages.

    I have tried everything in my power but can not figure it out. any help?

  30. This is the most closely relate forum covering a similar problem as mine. The solution I would suspect is also quite similare to what will help my box.

    I have a IBM Thinkpad (Lenovo), the thing is that I recived a system update from the synaptic or Linux Mint updater AUTOMATICALY it occured when I attempted an installation of something and it required a updated package. Exactly I installed a tor server and It requested that I start installing many updates, in the sources.list apparently for that particular update set I had a upgraded version (Helena–ie. the ubuntu Karmic set) opposed to the old jaunty (Glorea) set.

    well long story short , I ended up uninstalling some dpkg deb pacs and reinstalled their jaunty counterparts, unfortunately in this process something broke, I would like to best think that in the update process something went haywire with the way the mint linux kinit is called at boot.

    It says the exact same error message as above aforementioned. except that it wont boot at all it gives a kernel pannic, and error and I don’t know if that drops me to a unreadable abit usable system with no display of just stops and hangs like others in the forum suggested.

    I believe on startup I read and wrote down the UUID that was called by the kinit and found (It is the wrong UUID for the Linux boot main partition) my linux boot partiton is sda6 the one in the kinit call is sda5!! I checked it with a reinstall of grub using the chroot environment from live DVD,

    Well to fix it I have so far set up a chroot environment using the Linux mint 64 Live CD and then chrooted in and cleaned up all the packages, and I just checked it again same error.

    So thats a good check that the system needs some update in the init file.

    i will attempt to try the first solution above however, as the sd5 is the swap and if I change the UUID I am expecting a different error next time. HHA wish me luck.


  31. When designing with stylesheets how does Google treat ranking with pseudo class H1 tags vs plan H1 tags? In other words how does it see left.H1 vs H1. If you have multiple pseudo H1s is there a limit and do any of them count?

  32. Esc doesn’t do anything on mine apart from beep at me. The machine hangs and just sits there with a blank screen and flashing prompt. I can load any version of ubuntu and run it from a memory stick, and it runs okay. I can ask it to install. But the resulting installation won’t boot from the system disk. I’ve tried it on 3 other machines, and only one of them results in a bootable system disk.

    Like so many have pointed out, Linux is pretty crap really. I’ve been writing code for processors for 35 years, and still have to have to write noddy bits of code to fix stupid problems that shouldn’t be there. Nothing has changed. We used to accept it then as being in the forefront of technology, but it’s not acceptable now.