grub

All posts tagged grub

Make sure that grub is looking at the correct location for the kernel.   I just had a situation where I copied a VM grub menu which was using LVM to a physical host on accident , when I rebooted grub errored out.   This is a work in progress..

Drop to grub command line.

esc

type ‘c’

grub>  find /boot/vmlinuz

(hd0,2)

 

hit esc

select your correct kernel in grub, type ‘e’

Verify your config is pointing to correct partition, if not as was the case for me, change to whatever find found and hit enter, then type ‘b’ to boot.

Fix/Repair grub

. Suppose linux lies on /dev/sda6 (fdisk -l)
# mount /dev/sda6 /mnt # mount the linux partition on /mnt
# mount –bind /proc /mnt/proc # mount the proc subsystem into /mnt
# mount –bind /dev /mnt/dev # mount the devices into /mnt
# chroot /mnt # change root to the linux partition
# grub-install /dev/sda # reinstall grub with your old settings

Forgot where I found this but here’s a crazy grub menu with 100+ entries for different distros.

4 disks used

Disk 1 = hda 300Gb IDE with 60 partitions
Disk 2 = hdc 200Gb IDE with 54 partitions
Disk 3 = sda 200Gb Sata with 15 partitions
Disk 4 = sdb 200Gb Sata with 15 partitions
(See Part 2 for BSD and Solaris systems on their own hard disks)