LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub reinstall help using knoppix (https://www.linuxquestions.org/questions/linux-newbie-8/grub-reinstall-help-using-knoppix-190938/)

gexzd 06-07-2004 10:55 PM

Grub reinstall help using knoppix
 
ok so i reinstalled windows 2000 added sp4 and grub went missing :confused:

so i downloaded knoppix

#i have no floppy drive and i know i can just goto 'rescue' or even
# 'upgrade' on redhat install discs to fix this problem but i dont want to

anyways so i go into knoppix and change the mounted patitions to write access by clicking on it and going to actions and change read write access

and changed to root using the 'su' command

and type in 'root@knoppix#grub-install hdb'

and i get this

'mkdir: cannot make directory '\boot\grub' : read-only filesystem

but i changed it to write access :confused:

so the i thought id do it manually



'root@knoppix#umount /mnt/hdb2'
'root@knoppix#umount /mnt/hdb3'

'root@knoppix# mount -o rw /dev/hdb2 /mnt/hdb2'
'root@knoppix# mount -o rw /dev/hdb3 /mnt/hdb3'

and got the same result.

#hdb1 is windows 2000

#hdb2 seems to compaling grub and its contents soo i assume thats the /boot parition

#hdb3 is the rest of red hat

im a newb so anyone tell me what im doing wrong ???

any help would be appreciated

motub 06-08-2004 01:56 AM

The thing is, it's looking for the grub-install version on the Knoppix disc, not the one on the partitions you just mounted.

In order to reconfigure a "foreign filetree" from a Live CD, you have to chroot the mounted filetree (tell the running OS that the / filetree starts from another location than the one it thinks; read man chroot for more information).

So what you'd most likely need to do is mount the main RH filetree (hdb 3), chroot /redhat/mount/point, mount hdb2 to /boot, then try grub-install again, to run the RedHat GRUB as if you were booted into RH, rather than the Knoppix GRUB.

Hope this helps; chroot is a very useful command, but read the man pages first and be careful with it, as it's also very powerful.

gexzd 06-08-2004 09:38 PM

thanks alot man ill try it and hopefully i dont do something stupid like format my partitions :D
cheers bro :D

motub 06-08-2004 09:46 PM

You're welcome, and good luck (but please look at my sig again-- neither a 'man', nor a 'bro').

:)

gexzd 06-08-2004 10:25 PM

my bad Common slang in New Zealand we call everyone man or bro , sorry if u took offense :D


ok so i ran the command chroot and this si what i got

root@ttyp0[knoppix]# chroot /mnt/hdb3
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
bash: /dev/null: Permission denied
[root@Knoppix /]# ll
bash: ll: command not found
[root@Knoppix /]# ls -l
total 204
drwxr-xr-x 2 root root 4096 Mar 24 01:56 bin
drwxr-xr-x 2 root root 4096 Mar 24 00:47 boot
drwxr-xr-x 21 root root 118784 May 29 13:14 dev
drwxr-xr-x 66 root root 8192 May 29 13:14 etc
drwxr-xr-x 7 root root 4096 May 19 10:58 home
drwxr-xr-x 2 root root 4096 Jan 25 2003 initrd
drwxr-xr-x 11 root root 4096 Mar 24 01:05 lib
drwx------ 2 root root 16384 Mar 24 00:46 lost+found
drwxr-xr-x 2 root root 4096 Sep 9 2003 misc
drwxr-xr-x 4 root root 4096 May 24 14:36 mnt
drwxr-xr-x 3 root root 4096 May 13 16:27 opt
drwxr-xr-x 2 root root 4096 Mar 24 00:47 proc
drwxr-x--- 36 root root 4096 May 29 13:13 root
drwxr-xr-x 2 root root 8192 Mar 24 00:58 sbin
drwxrwxrwt 16 root root 4096 May 29 13:14 tmp
drwxr-xr-x 16 root root 4096 Mar 23 17:53 usr
drwxr-xr-x 20 root root 4096 Mar 31 13:48 var


figured it was safe for me to run grub install so i did

[root@Knoppix /]# grub-install /dev/hdb
/dev/hdb does not have any corresponding BIOS drive.




i guess its looking for hdb2 and cant find it which is why its complaining.

so should wat should i try next should i just make the /mnt the root directory so it can see hdb2???

just to take note iam a complete moron so be warned i will ask stupid questions :D


All times are GMT -5. The time now is 02:19 PM.