After trying this FAQ, I believe the correct syntax is grub-install hd0, without the parentheses.
At any rate, I have had no luck fixing GRUB. I simply need to re-install it so I can boot Ubuntu again. (I installed Windoze on my Fat partition so I could play HL2, and of course NTLDR was happy to overwrite GRUB.)
When I issue the grub-install command in a root shell on Knoppix 3.4, I get the following:
Code:
root@ttyp0[knoppix]# grub-install hd0
mkdir: cannot create directory `/boot/grub': Read-only file system
Same if I give it a Unix device name.
Code:
root@ttyp0[knoppix]# grub-install /dev/hda
mkdir: cannot create directory `/boot/grub': Read-only file system
It is trying to rebuild a /boot dir on the Knoppix CDROM, which of course it cannot do.
I have tried chrooting into my Ubuntu install, but doing grub-install that way gave me other errors.
Code:
root@ttyp0[knoppix]# chroot /mnt/hdb3 /bin/bash
root@Knoppix:/ # grub-install /dev/hda
/sbin/grub-install: line 1: sort: command not found
/sbin/grub-install: line 1: uniq: command not found
/sbin/grub-install: line 1: expr: command not found
/sbin/grub-install: line 429: /dev/null: Permission denied
/sbin/grub-install: line 431: /dev/null: Permission denied
Those binaries are located in /usr, but for some reason I was not allowed to mount my /usr in the chrooted shell.
Code:
root@Knoppix:/ # mount /usr
mount: block device /dev/hdb5 is write-protected, mounting read-only
mount: cannot mount block device /dev/hdb5 read-only
It does this even though the partitions are not mounted according to Knoppix's /etc/mtab.
I've tried everything I can think of. I seek help from someone much smarter than I. 
Edit: fixed, with an unbelievably complicated mount. I booted the Ubuntu install disk, and after my partitions had been detected, switched to tty2 and did the following:
Code:
mkdir foo
mount /dev/ide/host0/bus0/target1/lun0/part3 foo
chroot foo /bin/bash
mount /usr
grub-install /dev/hda
/dev/ide/host0/bus0/target1/lun0/part3 is /dev/hdb3 in normal Linux land. That's the most confusing device name I have ever seen.
Bookmarks