PDA

View Full Version : Problems with hard drive access permissions



willkill69
09-21-2004, 06:50 PM
I am trying to install GRUB to my MBR using a shell in Knoppix in order to get my SUSE install to work. I ran the command:

grub-install /dev/hda

but the following error message came up:

mkdir: cannot create directory '/boot/grub' : read only filesystem.

Please help, someone on another forum told my I had to change the access permitions for the drive and I do not know how to do this. BTW: I am a quite a noob, I have only got linux working once before on a single partition, I have never got it to dual boot with window$ xp before.

UnderScore
09-21-2004, 08:12 PM
First check the grub-install man page at http://www.fifi.org/doc/grub-doc/html/grub_16.html. Maybe it will help you.
Try the following in a root shell to help get around the read-only error:

mount /mnt/hda3

chroot /mnt/hda3 /bin/bash
where hda2 represents your linux / partition. In my pc hda1 is windowsXP, hda2 is swap and hda3 is linux / so I would use hda3.
Then try your grub-install /dev/hda command. To get out of the chroot, type exit or use the key combo CTRL-D.

I hope this helps.
James

willkill69
09-21-2004, 08:27 PM
Thanks james, I will try that. My hard drive is partitioned that way as well, with windows xp as hda1 and linux hda3 with the swap partition hda2. I will look at the link as well. In linux do you have to have the swap file in a seperate partition because in windows it is just a file in the root drive (C:\)
??

mzilikazi
09-21-2004, 08:34 PM
I am trying to install GRUB to my MBR using a shell in Knoppix in order to get my SUSE install to work. I ran the command:

grub-install /dev/hda

but the following error message came up:

mkdir: cannot create directory '/boot/grub' : read only filesystem.

Please help, someone on another forum told my I had to change the access permitions for the drive and I do not know how to do this. BTW: I am a quite a noob, I have only got linux working once before on a single partition, I have never got it to dual boot with window$ xp before.

You need to use the --root-directory option like so:

mount /dev/hda1 /mnt/hda1
grub-install --root-directory=/mnt/hda1

voila! :)

willkill69
09-21-2004, 09:07 PM
Thanks very much for replying but none of the suggestions work. I have realised what I think the problem is. The windows partition is NTFS so I am probably unable to write anything onto it. I assume I was supposed to be using hda1 and not the Suse partition which is hda3???

I think that I will just have to install SUSE again unless anyone has any other ideas. What about installing lilo onto the mbr? How would I do that and would that be a reasonable solution to my problem?

mzilikazi
09-21-2004, 10:05 PM
Thanks very much for replying but none of the suggestions work. I have realised what I think the problem is. The windows partition is NTFS so I am probably unable to write anything onto it. I assume I was supposed to be using hda1 and not the Suse partition which is hda3???

I think that I will just have to install SUSE again unless anyone has any other ideas. What about installing lilo onto the mbr? How would I do that and would that be a reasonable solution to my problem?

To install lilo you'd need to use the chroot method posted by UnderScore. chroot and install lilo from there.

The win part format has nothing to do with your MBR as the MBR lives on the hidden track on the outside of the disc. Of course you need to install a boot loader into the MBR (or edit ntldr). The easiest way would be to boot into SuSE and install a boot loader from there. I prefer GRUB to lilo any day of the week. I realize that you cannot boot into SuSE. Does the SuSE install disc have some way of creating a boot floppy or perhaps even using GRUB from the bootable cd that you installed from? You could also make your own GRUB boot floppy and simply tell GRUB which kernel you have and where it lives and boot SuSE that way.