# Read-only file system problem.    [SOLVED with fsck]

## cwc

I'm not sure why I have such a problem.  I edited my grub file to update my system rescue then when I rebooted I lost the ability to write to part of my file system.  I used the systemrescue cd and change my grub.conf file back to a working version.  My problem still exsists.

example:

When I startx

$startx

/usr/bin/startx: line 156: cannot create temp file for here-document: Read only file system..

When I list the /boot/ directory I do not see my kernel  /boot/vmlinuz-3.0.6-gentoo

When I try to copy a boot kernel from /usr/src/linux-3.2.12-gentoo/  I get the error:

cp: cannot create regular file /boot/kernel-3.2.12 : Read-only file system

Is there a way I can view my boot log?  There is an error there that I am unable to read due to speed.

As usual any help will be appreciated.  This is the best linux forum and distro in the world.

----------

## platojones

I would start with the dmesg command...any FS or HD issues are likely to show up there first.

----------

## cwc

 *platojones wrote:*   

> I would start with the dmesg command...any FS or HD issues are likely to show up there first.

 

I did a dmesg and tried to write it to a fike

eg:

#dmesg > /home/cwc/dmesg.txt

I could not write to the disk.  I have two other harddrives in the machine and I can't write to them either?

I did not see any FS or HD error. 

But I'll look a lot closer to be sure.

Thanks for the line!

----------

## BillWho

cwc,

You could always chroot from a live cd   :Exclamation:   or

If you're sure there's no disk problem try to remount with  

```
mount -o remount,rw  /
```

Good luck   :Wink: 

----------

## cwc

 *BillWho wrote:*   

> cwc,
> 
> You could always chroot from a live cd    or
> 
> If you're sure there's no disk problem try to remount with  
> ...

 

I was able to mount the boot partition drive using a live cd. I chrooted the files ystem and wrote to it.

I'm not sure what to do once I've mounted the drive?

How do I make it writable?  

I tried a chmod 755 to the boot kernel with no luck.  I believe the normal permission is 644.

Thanks for the line!

----------

## BillWho

cwc,

 *Quote:*   

> I edited my grub file to update my system rescue

 

Usually ro single is appended to the kernel line for recovery mode. 

The kernel should be set to 644 root root

Check the status of the mounts with mount|column -t

It should return (rw,noatime,errors=continue,barrier=1,data=writeback) for /

Did you change your fstab line for /   :Question: 

I don't know what changes you made so I can't guess at an answer at the moment   :Smile: 

----------

## cwc

 *BillWho wrote:*   

> cwc,
> 
>  *Quote:*   I edited my grub file to update my system rescue 
> 
> Usually ro single is appended to the kernel line for recovery mode. 
> ...

 

I did not change my fstab  .  I'm my / is set to defaults

The only thing I changed was the kernel for my recovery kernel  3.0.1 instead of 2.6.

I do not think that was the issue.  I am not on the internet with my gentoo box so it's kind of tough typing the exact errors.

Presently all I can do is tty.  I think I'll chroot then check read/write.

How about fsck ?

----------

## BillWho

cwc,

 *Quote:*   

> How about fsck ?

 

It can't hurt anything to do an error check   :Exclamation: 

Just make sure the filesystems you're going to check are not mounted   :Smile: 

----------

## cwc

 *BillWho wrote:*   

> cwc,
> 
>  *Quote:*   How about fsck ? 
> 
> It can't hurt anything to do an error check  
> ...

 

! fsck solved the problem? !

I do know my system has some issues.

On boot I get these two errors:

Error 1 > Setting up the Logical Volume Manage .  No Volume Groups . . .  (I've got a basic system)  /boot swap /root  /mnt/uno  /mnt/duo

Error 2 >*WARNING:  rc_sys not defined in  rc.conf  falling back to automatic detection.

Thanks again for the lines!  I'll work on thing tomorrow.

https://forums.gentoo.org/viewtopic-t-851868.html

https://forums.gentoo.org/viewtopic-t-881249.html

----------

