0

I just reinstalled Ubuntu 12.04 using a LiveCD mounted on a USB drive. When the USB drive isn't plugged in... things won't boot. I'm new to Ubuntu, so please bear with me. After a bit of reading I see that GRUB needs to be fixed/ updated along with the MBR. Unfortunately, I'm not sure how to go about this. When booting with the USB stick plugged in, I get a menu that displays the different boot options and I can boot in to either Ubuntu or Windows 7 like I should be able to. I also have the LiveCD USB stick listed as the first device accessed during the boot sequence. This thread seems to have a good walkthrough but I'm stuck on the first step.

When running ls, I see: (hd0), (hd0,msdos6), (hd0,msdos5), (hd0,msdos3), (hd0,msdos2), I think. This is from memory.

Starting the first step with ls (hd0,msdos6) returns Bad filename and ls (hd0,msdos5) etc returns error: unknown filesystem.

It would seem that msdos6 is the Ubuntu partition. But I can't access it. Any suggestions would be appreciated.

Jason
  • 1

1 Answers1

0

Assuming that the main drive is /dev/sda, I would use

sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo grub-install /dev/sda

To (re)install it.

John WH Smith
  • 2,018
  • 14
  • 21
  • is there a way to verify that? that the main drive is /dev/sda I mean. – Jason Jul 14 '13 at 21:12
  • Type sudo fdisk -l to list all available drives (lines beggining with "Disk *****:"). In most common installations, there's only one :) – John WH Smith Jul 14 '13 at 21:17
  • ok. better question... will doing this potentially mess everything up? :) – Jason Jul 14 '13 at 21:35
  • The -l option means "list". You'll just get some output :) – John WH Smith Jul 14 '13 at 21:36
  • sounds good. thank you. i'll report back in after I try it out. – Jason Jul 14 '13 at 21:46
  • Great. "Unknown command 'sudo'" Uh, any ideas? – Jason Jul 14 '13 at 22:23
  • Type whoami : are you root ? – John WH Smith Jul 14 '13 at 22:29
  • I don't really mind reinstalling from the LiveCD... as I'll only really lose a couple of hours work... but I don't want to wipe the hard drive clean as it's a dual boot system. The real question is how to do this but have the MBR working right (unlike the first time). – Jason Jul 14 '13 at 22:54
  • During the installation process, choose the drive for GRUB installation correctly. If your hard drive is /dev/sda, then you should install GRUB on /dev/sda. If you have a UEFI system, read this : https://help.ubuntu.com/community/UEFI – John WH Smith Jul 14 '13 at 22:55
  • That's the thing... I used the WUBI installer and installed it on the "existing Ubuntu partition"...ie, automatically. – Jason Jul 14 '13 at 23:06
  • off of a LinuxLive USB stick (added for clarification) – Jason Jul 14 '13 at 23:17