0

I had Xubuntu installed on my laptop on hard disk drive /dev/sda on partition /dev/sda1.

Something bad happened and when I restarted my laptop, a black screen appeared with "kernel panic" message.

So I decided to install Lubuntu from a live CD. I installed it on /dev/sda5 (it has a 6 GB size).

It was initially a swap partition, but I decided that I didn't need to have a swap partition, because I have 2 GB RAM.

So, I installed Lubuntu without problems. After a restart, a black screen with the following message appeared:

no such partition
grub rescue>

So I booted again from the live CD and changed the boot partition to /dev/sda5 in fdisk. After a restart, I can only see the GRUB command line.

fdisk -l shows:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c212c

Device Boot Start End Blocks Id System
/dev/sda1 1 18706 150253568 83 Linux
/dev/sda2 18706 19458 6034433 5 Extended
/dev/sda5 * 18706 19458 6034432 83 Linux

How can I repair GRUB to be able to boot to /dev/sda5 with Lubuntu?

1 Answer 1

2

If you are able to see the GRUB menu coming up during boot, you can interrupt it with a key press.

Then select your Lubuntu entry, press e and check root, kernel showing all to sda5.

GRUB uses another naming scheme internally, so sda5 would be hd(0,4).

Then b to boot that entry.

If you only see the GRUB rescue screen, you can try the following to boot into your Lubuntu on sda5:

root hd(0,4)
kernel /path/to/vmlinux root=/dev/sda5
boot

Once booted, check with GRUB commands that you boot into Lubuntu each time.

6
  • I'm not sure what I can see after restart. It's not Grub menu and it's not rescue screen. It's grub command line now. OK, I will try the commands you advise in grub command line. Could you tell me what is /path/to/vmlinux? thank you
    – xralf
    Mar 26, 2011 at 19:43
  • It's the path to the kernel boot file. Should normaly be in /boot/.
    – derchris
    Mar 26, 2011 at 19:46
  • root hd(0,4) was OK kernel /boot/vmlinuz-2.6.35-22-generic root=/dev/sda5 writes error: unknown command 'kernel'.
    – xralf
    Mar 26, 2011 at 20:01
  • I tried linux command instead of kernel command. I'm not sure which version of vmlinuz I chosen (there were more options). After the boot command I was in my Lubuntu, but the touchpad and internet connection wasn't working. I rebooted and I was again in grub command line instead of grub menu.
    – xralf
    Mar 26, 2011 at 20:27
  • It worked now. I had to copy the vmlinuz-2.6.35-22-generic (I used bad version of kernel before) to the /boot directory in /dev/sda1 and then I used the command linux /boot/vmlinuz-2.6.35-22-generic root=/dev/sda5. But after restart I always have to play with the grub command line. I suppose that solution is in your sentence Once booted check with Grub commands that you boot into Lubuntu each time. Could you please explain how do you think it? thank you
    – xralf
    Mar 26, 2011 at 21:48

You must log in to answer this question.

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