View previous topic :: View next topic |
Author |
Message |
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Tue Jan 25, 2005 9:02 pm Post subject: can't edit grub.conf |
|
|
I'm installing 2004.3, and when I edit grub.conf and try to save it I get a read-only error:
"Error writing /boot/grub/grub.conf: Read-only file system"
I didn't get this error on the other files I edited.....
So what stupid mistake did I make?
Thanks for any help you can give! |
|
Back to top |
|
|
Vanquirius Retired Dev
Joined: 14 Jun 2002 Posts: 1297 Location: Ethereal plains
|
Posted: Tue Jan 25, 2005 9:07 pm Post subject: |
|
|
Your /boot partition is probably mounted as read-only.
When you issue the "mount" command you should be able to see a list of mounted file systems. If your /boot partition shows a (ro) next to it, it is indeed mounted as read-only. A fix for this is going to /etc/fstab, removing the "ro" option from the /boot partition, umount-ing and re-mount-ing your /boot partition.
Ps.: Not sure if I answered correctly. One note though: you most likely have to deal with this _outside_ of the chroot'ed environment. _________________ Hello. |
|
Back to top |
|
|
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Tue Jan 25, 2005 9:20 pm Post subject: |
|
|
How can I exit the chroot'ed environment without loosing what I've done so far? |
|
Back to top |
|
|
Vanquirius Retired Dev
Joined: 14 Jun 2002 Posts: 1297 Location: Ethereal plains
|
Posted: Tue Jan 25, 2005 9:52 pm Post subject: |
|
|
You _won't_ lose anything you have done so far, it is in your hard-drive already. You can exit the chroot'ed environent using "exit", and go back to your system using chroot /mnt/gentoo, env-update and source /etc/profile. If you reboot, you'll additionally have to mount your partitions before chroot'ing into them.
But it should be even easier to do "Control-Alt-F2" to a different terminal and use the LiveCD's environment (as opposed to chroot'ed environment). _________________ Hello. |
|
Back to top |
|
|
Tahoe_Strider Apprentice
Joined: 06 Jul 2003 Posts: 152 Location: Amador County, Awarded 9th Best Place to live in Rural America
|
Posted: Tue Jan 25, 2005 9:56 pm Post subject: |
|
|
Typing "exit" will get you out. Nothing will be lost. Simply exit out, make your needed changes, chroot back in, and pick up where you left off. I had the same concerns when I performed my first installation. Not to worry... _________________ "It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds." |
|
Back to top |
|
|
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Tue Jan 25, 2005 10:26 pm Post subject: |
|
|
Here's what I get when I check my mounts:
/dev/ROOT on / type xfs (rw,noatime)
/newroot/dev/cdroms/cdrom0 on /mnt/cdrom type iso9660 (ro)
/dev/loop/0 on mnt/livecd type squashfs (ro)
So it looks to me like /dev/root is (rw)?
Please forgive my ignorance, I use linux everyday at work, but never install it like this. |
|
Back to top |
|
|
Tahoe_Strider Apprentice
Joined: 06 Jul 2003 Posts: 152 Location: Amador County, Awarded 9th Best Place to live in Rural America
|
Posted: Tue Jan 25, 2005 10:36 pm Post subject: |
|
|
Correct me if I'm wrong, but it doesn't appear to me that your boot partition is mounted. I do see your root partition, but not your boot. GRUB resides on the boot partition. Of course it does require mounting before you can write to it. Once you mount it, you should be able to see if it's rw or ro. _________________ "It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds." |
|
Back to top |
|
|
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Tue Jan 25, 2005 10:40 pm Post subject: |
|
|
sorry, there's more:
tmpfs on /usr/lib/hotplug/firmware type tmpfs (rw)
/dev/hda3 on /mnt/gentoo type ext3 (rw)
/dev/hda1 on /mnt/gentoo/boot type ext3 (rw) |
|
Back to top |
|
|
DrWoland l33t
Joined: 13 Nov 2004 Posts: 603
|
Posted: Tue Jan 25, 2005 10:41 pm Post subject: |
|
|
It doesn't look like you edited your /etc/fstab properly. Read the docs again. |
|
Back to top |
|
|
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Tue Jan 25, 2005 10:49 pm Post subject: |
|
|
This is what I have (from gentoo handbook):
/dev/hda1 /boot ext2 defaults,noatime 1 2
/dev/hda2 none swap sw 0 0
/dev/hda3 / ext3 noatime 0 1
none /proc proc defaults 0 0
none /dev/shm tmpfs nodev,nosuid,noexec 0 0
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 |
|
Back to top |
|
|
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Tue Jan 25, 2005 11:38 pm Post subject: |
|
|
I just tried manually putting rw in fstab for boot, but that didn't work either.
Still getting a Read-only filesystem error. |
|
Back to top |
|
|
Tahoe_Strider Apprentice
Joined: 06 Jul 2003 Posts: 152 Location: Amador County, Awarded 9th Best Place to live in Rural America
|
Posted: Tue Jan 25, 2005 11:44 pm Post subject: |
|
|
Out of curiosity, what does "stat /dev/hda1" tell you? _________________ "It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds." |
|
Back to top |
|
|
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Wed Jan 26, 2005 12:56 am Post subject: |
|
|
hmmm.....
File: '/dev/hda1
Size: 0 Blocks: 0 IO Block: 4096 block special file
Device 303h/771d Inode: 2409400 Links: 1 Device type: 3,1
Access: (0660/brw-rw----) Uid: ( 0/ root) Gid: ( 6/ disk)
Access: 2005-01-24 17:32:37
Modify: 2004-10-24 00:02:37
Change: 2005-01-24 17:36:02 |
|
Back to top |
|
|
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Wed Jan 26, 2005 3:32 pm Post subject: |
|
|
though I'd see if anyone else had any ideas. |
|
Back to top |
|
|
Tahoe_Strider Apprentice
Joined: 06 Jul 2003 Posts: 152 Location: Amador County, Awarded 9th Best Place to live in Rural America
|
Posted: Wed Jan 26, 2005 4:21 pm Post subject: |
|
|
I am by no stretch adept at deciphering access rights, but it looks to me as if you don't have the appropriate access rights as indicated by the:
"brw-rw----"
Mine looks like the following:
"lr-xr-xr-x"
Someone may have to correct me here, but the first bit(0) indicates the type of device, the next 3(1,2, and 3) bits indicate owner rights, the next 3(4,5,and 6) indicate group rights, and 7,8, and 9 indicate other rights. I hope i'm not sending you on a wild goose chase, but I'll check it out later today if nobody else chimes in. Sorry I couldn't be of any further help. _________________ "It does not require a majority to prevail, but rather an irate, tireless minority keen to set brush fires in people's minds." |
|
Back to top |
|
|
silent1 n00b
Joined: 25 Jan 2005 Posts: 9
|
Posted: Wed Jan 26, 2005 5:10 pm Post subject: |
|
|
Any idea on how I can change that? |
|
Back to top |
|
|
kimchi_sg Advocate
Joined: 26 Nov 2004 Posts: 2969
|
Posted: Wed Jan 26, 2005 10:59 pm Post subject: |
|
|
Hmm... I'd advise NOT to touch the file /dev/hda1! Below is the stat output from a working system.
Code: | [shrek@maximus ~]$ stat /dev/hda1
File: `/dev/hda1'
Size: 0 Blocks: 0 IO Block: 4096 block special file
Device: dh/13d Inode: 1118 Links: 1 Device type: 3,1
Access: (0660/brw-rw----) Uid: ( 0/ root) Gid: ( 6/ disk)
Access: 2005-01-26 12:16:54.392110811 +0800
Modify: 2005-01-26 12:15:21.877391384 +0800
Change: 2005-01-26 12:15:29.493233600 +0800
|
|
|
Back to top |
|
|
|