Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Grub boot loader is not working anymore


ghost's Avatar
0 0

Hey people, was playing with boot loader screens and i accidently mentally disabled my grub with it.

after rebooting i was thrown in a grub shell like this:

grub>

so i did:

find /etc/passwd (hd0,0)

so i thought that grub should be there too. Just some extra checking to be sure of it…

find /grub/stage1 error 15 (not found error)

find /boot/grub/stage1 (hd0,0)

allright, grub should be installed on hd0,0

root (hd0,0) Filesystem type is ext2fs, parition type 0x83

okay… lets load the kernel

kernel /boot/vmlinuz-2.6.<tab> *26-1-686 *26-1-amd64 *26-1-486 *26-1-686-bigmem *26-1-openvz-686 *26-1-686 etc etc

generally i use the 26-1-686, its working, never had problems with it. so..

kernel /boot/kernel-2.4.20 root=/dev/sda1 ro

So then i type boot and here it fails.

[ 0.832928] input: AT Translated Set 2 keyboard as /class/input/input0 [ 0.933147] List of all partitions: [ 0.933217] No filesystem could be mount root, tried: [ 0.933333] Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Looks like (0,0) is not the right place huh? But if i mount it on my filesystem i always use /dev/sda1.

My grub doesn't has something like ls or dir, so i used a little trick i found out to list my dir's; kernel /dev/s<tab> does not return anything so i think that it can not see it or my hdd is playing hide and seek or something.

live disk results: $ ls | grep sda sda sda1 sda2 sda5

$ mkdir /mnt/sda1 ; mount /dev/sda1 /mnt/sda1 ; cd /mnt/sda1 $ ls <gives 'normal' file system>

$ grub –version grub (GNU GRUB 0.97)

The menu.list file in /boot/grub/ is not really containing any usable information since it was overwritten or something.

I really wonder what happend here and some help will be greatly appreciated


AldarHawk's Avatar
The Manager
0 0

Not knowing what Linux/BSD you are running I cannot give you too entailed an answer but the short of it would be, DID YOU GOOGLE?!?!?! http://www.sorgonet.com/linux/grubrestore/ http://ubuntuforums.org/archive/index.php/t-24113.html http://www.linuxquestions.org/questions/general-10/how-to-restore-grub-after-win-xp-install-446952/

These are the first three results for RESTORE GRUB search

Basically:

  1. Boot your computer up with Linux Flavour Disc
  2. Go through all the process until you reach "[!!!] Disk Partition"
  3. Select Manual Partition
  4. Mount your appropriate Linux partitions

/ ; /boot ; swap ; etc…

  1. DO NOT FORMAT THEM.
  2. Finish the manual partition
  3. Say "Yes" when it asks you to save the changes
  4. It will give you errors saying that "the system couldn't install ….." after that
  5. Ignore them, keep select "continue" until you get back to the Linux installation menu
  6. Jump to "Install Grub …."
  7. Once it is finished, just restart your computer

Hope that helps…and remember Just Fucking Google It!


hellboundhackersok's Avatar
Banned
0 0

after entering root (hd0,0) try setup (hd0) that should repair it


shadowls's Avatar
You Like this!
90 0

If you are using Fedora, and trying to reinstall grub, all you have to do is go to retreive or back linux partition and type in

chroot /mnt/sysimage then grub-install /dev/hda or it might be sda

depending on your HDD.

Shadowls


ghost's Avatar
0 0

Hey, with my ubuntu live disk i just installed ubuntu, resized my main partition, anyway im in ubuntu again feels like linux but my Debian partition is still unreachable :( I downloaded a grub boot fix disk that shouldve repaired my grub http://www.supergrubdisk.org/ i was able to destroy grub, uninstall it and let it auto detect my ubuntu again and now its working again (phew!) Im sure its a great toy and helped alot of people out but it was not the key for me. I tried all the above things, none worked. I got access to my pc right now and while typing this i just came on the genious idea to do root (hd0,2) kernel blablabla root=/dev/sda1 because i can mount my hdd from here with mount /dev/sda1 /mnt/sda1 So brb and ill just push that post reply button and ill brb :)


ghost's Avatar
0 0

didnt excectly worked as i hoped immidiatly but great news, i was able to get into a bash shell

root@laptop:/mnt/sda1/boot# cp vmlinuz-2.6.26-1-686 /boot/vmlinuz-2.6.26-1-686 root@laptop:/mnt/sda1/boot# cp initrd.img-2.6.26-1-686 /boot/initrd.img-2.6.26-1-686

– menu.lst –

title Debian test root (hd0,2) kernel /boot/vmlinuz-2.6.26-1-686 /boot/vmlinuz-2.6.26-1-686 root=/dev/sda1 ro quiet splash initrd /boot/initrd.img-2.6.26-1-686

I actually copied the kernel from /mnt/sda1/boot/kernel and changed my menu.lst file.

Im going to give this a shot with the other kernel's too, maybe it works.