Results 1 to 10 of 13
Hi,
I'm a novice Linux user.
I am trying to edit my grub.conf file. I am logged in as root. It says it is a read only file. I have ...
- 11-12-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
CentOS4.5 Edit grub.conf
Hi,
I'm a novice Linux user.
I am trying to edit my grub.conf file. I am logged in as root. It says it is a read only file. I have tried to set permission with chmod 777 and also tried through GUI. Using VI it says it's a read only file. Using nano it will not write either. I have two choices on boot up. I want to automatically go to second automatically. First at the moment is CentOS-4 i386 (2.6.9-55.ELsmp) and second is CentOS-4 i386 (2.6.9-55.EL). Any ideas?
Thanks
- 11-14-2010 #2
Hello!
Allow me to try to answer your question larrymac
Kindly execute as root and paste the output here.
# nano /boot/grub/grub.conf
- 11-14-2010 #3
Can you post the output of
we can then see how you have partitions mounted, and your current grub config.Code:mount cat /boot/grub/grub.cfg
- 11-14-2010 #4
How did you gain root privileges? IIRC, CentOS 4.5 uses GRUB Legacy and root user have full access to grub.conf file.
Try this
In case it doesn't work, post the output of thisCode:su - nano /boot/grub/grub.conf
Code:ls -l /boot/grub/gr*
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 11-15-2010 #5Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
Hi nujinini,
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS-4 i386 (2.6.9-55.ELsmp)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.ELsmp ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-55.ELsmp.img
title CentOS-4 i386-up (2.6.9-55.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-55.EL ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-55.EL.img
[ Read 21 lines ]
^G Get Help ^O WriteOut ^R Read File ^Y Prev Page ^K Cut Text ^C Cur Pos
^X Exit ^J Justify ^W Where Is ^V Next Page ^U UnCut Txt ^T To Spell
Thanks
- 11-15-2010 #6Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
Hi Jonathan183
[root@css grub]# mount
/dev/sda3 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
/dev/sda6 on /home type ext3 (rw)
/dev/sda2 on /usr type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Thanks
- 11-15-2010 #7Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
Hi devils casper,
Output from grub file posted previous.
[root@css ~]# ls -l /boot/grub/gr*
-rw------- 1 root root 721 Oct 8 16:40 /boot/grub/grub.conf
Thanks
- 11-15-2010 #8
As I suggested earlier, have you tried su - to gain root privileges? There is a difference between su and su -.
Code:su - nano /boot/grub/grub.conf
It is amazing what you can accomplish if you do not care who gets the credit.
New Users: Read This First
- 11-15-2010 #9Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
Hi There,
Yes I tried the su - command. As far as I am aware I am root with full privileges because I need to be for the application that's running. It states that the file is read-only when trying to make change....
Whe I right-click on file in GUI it states that owner is root and can read & write file!
- 11-15-2010 #10Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
My unhappy face icon should have been a confused face....


Reply With Quote
