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.
Related Posts:- Converting deb files in Ubuntu
Different Linux distributions package up software in different ways. RedHat uses .rpm files, while Debian and Ubuntu use .deb files. To convert a .rpm to... - Formatting USB hard drives for Ubuntu (Gutsy Gibbon)
Recently my home Network Attached Storage (NAS) started acting flaky, so I wanted to back up my data. I picked up a 750 gigabyte Seagate... - Review: Ubuntu 6.06 (”Dapper Drake”)
I accidentally tripped and fell yesterday. My hand hit the keyboard along the way, and I accidentally installed Ubuntu on the way down. That's how... - Ubuntu Edgy Eft beta
A beta version ("knot2") of Ubuntu's new version is out. More info (including screenshots) is here: The Edgy Eft Knot 2 is the second alpha...
Jean-Noël Said,
June 26, 2008 @ 9:39 am
A large number of suggestions :
http://www.google.fr/search?hl=fr&q=No+resume+image%2C+doing+normal+boot%E2%80%A6&btnG=Recherche+Google&meta=
(Via Google)
ex-Yahoo Said,
June 26, 2008 @ 9:49 am
buy a WinXP machine
Gary Schubert Said,
June 26, 2008 @ 9:56 am
https://bugs.launchpad.net/ubuntu/+bug/103148
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.
Piero B. Contezini Said,
June 26, 2008 @ 10:18 am
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.
Puzzler Said,
June 26, 2008 @ 10:21 am
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!
acpi=off
start with that.
A simple howto is here:
http://grumpymole.blogspot.com/2007/05/ubuntu-how-to-edit-grub-boot-parameters.html
Peter Ortner Said,
June 26, 2008 @ 10:33 am
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.
Sérgio Carvalho Said,
June 26, 2008 @ 10:53 am
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.
Chris Fleming Said,
June 26, 2008 @ 10:53 am
Matt... there’s this search engine that you can use to help with these kind of questions:
http://www.google.com/search?q=ubuntu+hang+%22kinit%3A+No+resume+image%2C+doing+normal+boot%E2%80%A6+%22&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
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
flo Said,
June 26, 2008 @ 10:55 am
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.
Matt Cutts Said,
June 26, 2008 @ 11:09 am
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!
Danny Said,
June 26, 2008 @ 11:26 am
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...
TomG aka NavyCS Said,
June 26, 2008 @ 11:28 am
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
Chip Said,
June 26, 2008 @ 11:35 am
dude you’re getting a Dell
Timon Said,
June 26, 2008 @ 12:12 pm
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.
panzermike Said,
June 26, 2008 @ 12:54 pm
@ Matt. Dude I have some buddies over at this linux forum who can help you out. http://forum.linux.edu/
searchfacts Said,
June 26, 2008 @ 4:51 pm
have you tried using supergrub to create a bootable floppy/cd ?
try this : http://www.supergrubdisk.org/
mirrors located here: http://geocities.com/supergrubdisk/
Dave (Original) Said,
June 26, 2008 @ 9:23 pm
You get what you pay for
Mike Said,
June 26, 2008 @ 11:51 pm
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.
Mike
Harith Said,
June 27, 2008 @ 12:08 am
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
Maurice Said,
June 27, 2008 @ 5:45 am
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.
Gavin Doolan Said,
June 27, 2008 @ 5:46 am
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.
ivanusto Said,
June 27, 2008 @ 8:41 am
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
panzermike Said,
June 27, 2008 @ 1:06 pm
Dude go here. I know these guys. http://forum.linux.edu/index.php?t=i&rid=0&S=833b280edd395e8e48c4a22bfab68e16
Harith Said,
June 28, 2008 @ 2:18 pm
Btw....
Matt has posted yesterday very informative article on Google blog:
Using data to fight webspam
Not good news for spammers
Matt Cutts Said,
June 29, 2008 @ 8:24 pm
Harith, I don’t normally post to the Google Blog; I like the cozy feel here on my personal blog.
Harith Said,
June 29, 2008 @ 11:54 pm
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
Ruben Zevallos Jr. Said,
June 30, 2008 @ 9:50 am
Don´t worry... I have the same problem... but you´ll figure out soon...
Tom Engberg Said,
July 1, 2008 @ 11:45 pm
Hi, I have a Untube OS, will this affect me the same way as it does for the pc’s?