LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   yet another grub reinstallation (https://www.linuxquestions.org/questions/linux-newbie-8/yet-another-grub-reinstallation-417131/)

guedellas 02-19-2006 07:42 AM

yet another grub reinstallation
 
Hi all!!

I had to mend my windows xp partition due to problems so I reinstall it knowing that it will screw up grub. I documented myself about how to bring my linux partion back to live reinstalling grub but the process doesn't work for me.

as I don't have a debian rescue disk, I'm using knoppix to boot my system. So:

1.- I boot my system with knoppix
2.- mount /mnt/hda1 [which is my linux partition]
3.- chroot /mnt/hda1
4.- grub-install /dev/hda

After this done, the followin errors are given:
Code:

/sbin/grub-install: line 485: /dev/null: Permission denied
/sbin/grub-install: line 487: /dev/null: Permission denied
The file /boot/grub/stage1 not read correctly.

I also trid installing grub natively, but the system said:
1.- I boot my system with knoppix
2.- mount /mnt/hda1 [which is my linux partition]
3.- chroot /mnt/hda1
4.- grub> root (hd0,0)
Code:

Error 21: Selected disk does not exist
¿Am I doing something wrong? :confused:

Thanks in advance

PS: I do not have a /boot partition, just a ext3 partition for my whole linux

reddazz 02-19-2006 08:00 AM

That is a common problem with Knoppix when you chroot to another Linux OS. You need to unmount /dev/hda1 and then remount it as follows,
Code:

#mount /dev/hda1 /mnt/hda1 -o rw

jschiwal 02-19-2006 08:16 AM

Sometimes it is a good idea to "mount -a" & "bash -l". If /boot is on its own partition for example, you want it mounted. The "bash -l" will start a login shell, which will run your normal ~/.bash_profile for the root user.

guedellas 02-19-2006 08:55 AM

Thank you so much!! it worked like a charm :)


All times are GMT -5. The time now is 02:08 AM.