In rescue mode, after doing chroot /mnt/sysimage file system still stays read only
I am using RHEL 5 Kernel-2.6.18-8.el5 and grub on my pc got corrupt.
So, I tried reinstalling grub. i restarted my system in rescue mode and selected Continue, it mounted the file system under the directory /mnt/sysimage/ then i used chroot /mnt/sysimage and tried reinstalling grub
with the command /sbin/grub-install /dev/hda2 because my boot partition was hda2 when i did fisk-l, i used /dev/hda2. It tried installing the grub but generated the following error:
mktemp: cannot create temp file /tmp/grub-install.img.lw2032: Read only file system
mktemp: cannot create temp file /tmp/grub-install.log.lVx2032: Read only file system
/sbin/grub-install: line 337: Cannot create temp file for here document: Read only file system
Please suggest what can be the problem am i doing something wrong. I faced the same problem when i went to Runlevel 1 when my system was working so i reinstalled a newer version of kernel-126.96.36.199.el5 which fixed the problem. I am new to linux please suggest