1

My system (1 hdd, 2 partitions - 1=Windows, 2=Ubuntu) is not booting any longer, but when I shut it down from Ubuntu yesterday, there was no problem at all.

My last try was boot-repair (with recommended repair) started from a live Ubuntu-usb system.

That is the pastebin of various logs.

It seems that it worked perfect, because I get the screen with the choice of Windows and Ubuntu, but after I enter, an error-page appears.

Something like this:

Error at starting Windows, the source could be hardware or software changes in the past"

For me it looks like the typical defect-mbr-message, but then boot-repair didn't worked properly.

Anyone knows a trick, maybe a magic one?

Update: Now it's getting weird.

I try to reconstruct what I did in the last minutes. mistakes are not impossible.

I installed grub2 on my live-distro and executed this command.

sudo grub-install --boot-directory=/mnt/boot/ /dev/sda

I was not sure if the last parameter is /dev/sda or _/dev/sda_1, because sda1 was the first partition on the hdd, but when I executed it, an error appeared. So I tried just sda and it worked. Well, it seems that it worked.

Then I rebooted and got the grub recovery-line. The only possible command, that I knew was ls and it showed something like:

(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)

And when I tried to ls hd0, it showed unknown filesystem and ls hd0,msdos1-3 showed wrong filename.

So I started Ubuntu from my usb-drive again and I just wanted to get sure that my partitions are still ok and typed in sudo blkid.

This is the result:

/dev/sda1: LABEL="PENDRIVE" UUID="1A0C-1658" TYPE="vfat"
/dev/sdb1: LABEL="OS" UUID="9A34A62D34A60C77" TYPE="ntfs"
/dev/sdb2: LABEL="data" UUID="8A9AAA5C9AAA4513" TYPE="ntfs"

So my usb-drive is now sda instead of sdb and my hdd-partitions are sdb instead of sda.

Maybe I'm too tired and see ghosts, but what did I wrong?

2
  • If you can log into Ubuntu try installing and running the Boot-Repair App: help.ubuntu.com/community/Boot-Repair Feb 7, 2012 at 13:08
  • I have protected this question so you do not make the same mistake again, so to speak. If you need to add more information, use the edit function on your question.
    – RolandiXor
    Feb 9, 2012 at 15:29

1 Answer 1

3

Yes, it does look like a typical MBR error message. I ended up with a similar situation, although I was able to reinstall grub from a liveCD and then boot into Ubuntu well enough. (I don't know if your boot repair program reinstalls grub; if not, I'll post the instructions below. I can't take credit for them, but I don't know any longer where I got them.) I was never able to get Windows working again and in the end I had to remove it; I hope your situation can come out better. But, once I could boot into Ubuntu, at least, I was able to access my Windows partition and remove everything of value from it before I deleted the partition.


This is a quick and simple method of restoring a broken system's GRUB 2 files. The terminal is used for entering commands and the user must know the device name/partition of the installed system (sda1, sdb5, etc). The problem partition is located and mounted from the LiveCD. The files are then copied from the LiveCD libraries to the proper locations and MBR. It requires the least steps and fewer command line entries than the following methods. If for example Windows is on sda1 and Ubuntu is on sda5, and Windows has overwritten the MBR, then the target for grub installation will be /dev/sda5, and the MBR in the boot sector of sda will be re written for grub.

This operation will write to the MBR and restore the modules and core.img to /boot/grub. It will not replace or restore grub.cfg or fix corrupted files.

Boot the LiveCD Desktop.

Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.

Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L".

    sudo fdisk -l

    If the user isn't sure of the partition, look for one of the appropriate size or formatting.

    Running sudo blkid may provide more information to help locate the proper partition, especially if the partitions are labeled. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently. 
Mount the partition containing the Ubuntu installation.

sudo mount /dev/sdXY /mnt

Example: sudo mount /dev/sda1 Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot Note: If the user has a separate /home partition, this must be mounted to /mnt/home. Encrypted home partitions should work.

Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.

sudo grub-install --root-directory=/mnt /dev/sdX

Example: sudo grub-install --root-directory=/mnt /dev/sda 

In Grub 1.99, introduced with Ubuntu 11.04, Natty Narwhal, a new switch is available which more clearly defines where the grub folder is placed. The command above will still work with Grub 1.99, but the following command is preferred by the developers. The target directory in the command is the command into which the grub folder will be installed. By default, and without the switch, the location is /boot/grub. In these instructions, since the Ubuntu partition is mounted on /mnt, the target would be /mnt/boot/grub.

sudo grub-install --boot-directory=/mnt/boot /dev/sdX

Example: sudo grub-install --boot-directory=/mnt/boot/ /dev/sda

Reboot

Refresh the GRUB 2 menu with sudo update-grub

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .