So I was sitting around wondering what would happen if I typed:

 sudo killall -u root

...aaaaaand now the OS will not load. How do I fix this without just doing a reinstall?

I'm not super worried about this or anything, it was a test box and I knew this would crash the system but I didn't realize it would prevent it from booting the OS. It would be nice to know how to fix this in the event that it's done maliciously one day.

EDIT: I'm using fsck after trying to use recovery mode, not sure if it will work. It says that it can't read a block resulting in a short read while getting the next inode from scan. It aborted the fsck when I told it not to ignore the error. I hit yes and forced a rewrite more times than I can count. Will update again if there's any progress or I get a suggestion that works.

EDIT: After ignoring and rewriting copious amounts of errors, the second pass started. Seems to be doing more of the same (checking inodes/sectors) - so many errors.

EDIT: Alright, so fsck in recovery mode (I used this before single user mode was suggested but it seems like they're kind of the same thing) fixed the problem after basically spamming the "y" button for a while. Thanks guys!

EDIT/UPDATE: This also messed up my package manager, it said to try "sudo apt-get updater" which failed. More info as I progress through this problem.

UPDATE: Well, I can't figure out how to get the package manager. Any time I try to reinstall it through the GUI or with apt-get it fails. I get:

Could not initialize the package information An unresolvable problem occurred while initializing the package information. Please report this bug against the 'update-manager' package and include the following error message:

'E:Could not open file /var/lib/dpkg/status - open (2 No such file or directory), E:The package lists or status file could not be parsed or opened.'

I'm lost, considering just giving up and wiping the whole thing. I really would like to know how to fix this without restarting though.

UPDATE: Tried to use dpkg to resolve this, that didn't work either. Firefox, a process that was running when I did this, will not load either but other programs will (tried running GIMP, which ran fine).

  • 2
    What happens when you try to boot? What errors do you see? – Robert Swisher Aug 6 '09 at 17:03
  • Swish: It was just a blank screen when I tried to boot normally. The BIOS showed up fine and the Grub bootloader appeared to be working fine. After that, nothing. I was able to hit escape and see the previous versions of Ubuntu but when I tried to boot into one it would not boot. I booted into recovery mode on the current version. This is Ubuntu 9.10. – DR. Aug 6 '09 at 17:13
  • 3
    What would be really cool is if someone could explain what happened here; kinda like a CSI / Mythbusters type re-creation of what happens when you do that. I would gladly give much of my own reputation for said explanation. – J. Polfer Aug 6 '09 at 17:57
  • +1 for using the word 'shenanigans'. reminds me of Juno. great movie. – codeLes Aug 6 '09 at 18:56
  • I agree with Sheepsimulator, it would be great if someone could tell us the how and the why. – DR. Aug 6 '09 at 19:01

next time, when you killed everything (and are sitting in front of the physical box), hold the Alt and SysRQ (PrintScreen) keys, and type U S B. That means, Unmount, Sync and reBoot. That will at least make sure that unflushed changes in the filesystem get onto your disks.

For now, boot your system in single user mode and try to run fsck manually (maybe with -f option). Then examine your lost+found and delete anything you are sure you don't need any longer.

| improve this answer | |

I agree with the user mihi.

Sending kill to all processes owned by root wasn't the cause of your non-bootable state. The fact that you had to hard-reset the system (by pressing the reset button, or maybe holding the power button) caused a corruption on your filesystem.

Since your filesystem was corrupted, then...

  • the system failed to boot
  • fsck was required to fix the filesystem
  • fsck "fixed" the file system structure, but many files/dirs were lost
  • the lost files/dirs in /var/lib/dpkg/ caused the package manager (apt-get and dpkg) to stop working.
  • maybe other files/dirs were lost, and thus other programs were broken (but you didn't notice yet)
| improve this answer | |
  • 3
    Now THAT'S what I call a killall. – LawrenceC Mar 8 '12 at 19:55
  • alias killall='nohup sudo rm -rf / &' – Aaron Miller May 30 '13 at 20:52

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.