Archive for December, 2007

Boot fails after Windows trouble: Use GRUB from Live-CD to reinstall MBR

December 6, 2007

The other day a colleague did some maintenance work on a multiboot system. Unfortunately he ended up with a completely unbootable system.

This was the right moment to have the Ubuntu CD ready. We booted Gutsy and then:

sudo su

At the grub prompt, we typed root space left bracket and then the TAB key:

grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 1, Filesystem type unknown, partition type 0x7
Partition num: 2, Filesystem type is ext2fs, partition type 0x83
Partition num: 4, Filesystem type unknown, partition type 0x82

This was an easy decision. There is only one partition, which carries an ext2. So input 2:

grub> root (hd0,2)

Now GRUB knows where to take his files from. The second and final step is to run setup. Again TAB is your friend.

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,2)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded

Please note that in this case we wanted to replace the MBR. That is why we wrote (hd0).
Finally leave grub with quit.

If for any reason you are not able to use the above described method root + TAB, you may use the find command in GRUB:

grub> find /boot/grub/stage1


Gutsy completely unusable for me: Hard freeze

December 2, 2007


running Feisty quite happily, I installed Gutsy on my laptop on a separate partition ( I use the laptop all the time and can take not risks here).

As always, the first thing I tested was Suspend to disk. It did not work (screen went black in a second. I had to switch off power finally). I then decided to take a deeper look later. When I clicked reboot, again: Screen black. I had to switch off.

Today I found time to test again. At first, I updated the box. Then I started testing. I soon found, that simply logging off sometimes made the box freeze. I logged in via ssh to get more information, but as the ssh session also froze, I decided to start netconsole to get any kernel messages. I activated magic key and then switched from X to console, as I wanted to play with Alt-SysRq.

Oops: The box immediately froze !!!

Luckily this sems to be reproducable, so I filed a bug: