Recovering Ubuntu

So I’ve been using Ubuntu as my main machine at work for the last couple of months and have already managed to break it twice (once by accidentally removing all sudoers and once from an upgrade destroying my kde install somehow), here is one way to get into a live recovery mode when something like this happens and you cannot actually get logged in to fix things.

  • Burn Ubuntu to disk (ensure that if you are recovering a 32bit machine you burn the 32bit version and same for 64).
  • Boot from the CD
  • Launch the live CD mode (“Try Ubuntu”)
  • Hit Ctrl+Alt+F1 to get to a Unix style terminal (you can return using Ctrl+Alt+F7)
  • Enter “sudo mount /dev/sda1 /mnt” (where sda1 is your linux install – check using fdisk)
  • Enter “sudo chroot /mnt”

Now you are free to try and fix whatever it was that you broke.

About Ingmar Boddington

Codemonkey, Sheffield, UK
This entry was posted in Linux and tagged Ubuntu. Bookmark the permalink.