# [SOLVED] Boots into Read-Only mode, Used fsck and ...

## jlpoole

My laptop runs 3.3.8-gentoo (x86_64) and when I shut it down earlier today, it did not go through the customary sequence, it just turned off.  When I try to start up again, I'm booted into a read-only mode shell.

Suspecting a corrupted disk, I then launched from a Live Install CD and ran:

```
 fsck -fpv -t ext3 /dev/sda2

...

fsck -fpv -t ext3 /dev/sda1

...
```

When I ran fsck for the first time, I did not force and it came back with a result that suggests everything was okay.  So subsequently, I used the "f" parameter to force a check.

The results of the runs seemed normal, no bad sectors or nothing to suggest it found any errors or did any fixes.  Yet, when I then try to reboot, I'm still in read-only mode.  My /etc/fstab looks fine, I can cat it.

I checked /var/log/messages and the shutdown earlier this morning seemed to be abruptly ended.  Of course, since the file system now mounts as read-only, nothing new is contained in the log that sheds light onto the matter.  What also is a problem is that the print out of what's happening during the start up is replaced with the login so I can't see what the last print out was before launching into read-only login is.

What should I do next or what can I provide that would give some insight into the problem?Last edited by jlpoole on Wed Oct 17, 2012 1:15 am; edited 1 time in total

----------

## Jaglover

Have you tried remounting it rw and doing a normal shutdown?

----------

## DONAHUE

as in 

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

----------

## jlpoole

 *Jaglover wrote:*   

> Have you tried remounting it rw and doing a normal shutdown?

 

I booted up with LiveCD.

```

mkdir /mnt/boot

mount /dev/sda1 /mnt/boot

mount /dev/sda2 /mnt/gentoo

shutdown -h now

```

On startup, I had the same result I've been having.  I did see fleet by something about "determining /root device" and then three lines of output before the screen that were not bold-faced text that could be error messages refreshed with the login prompt that has "(none) login:" suggesting the same read-only condition.

Was your suggestion to mount the drive from within the read-only session?  Or should I chroot from the LiveCD session and the perform a shutdown from there?

----------

## jlpoole

 *DONAHUE wrote:*   

> as in 
> 
> ```
> mount -o remount,rw /
> ```
> ...

 

In a session that was read-only, I logged in as root and I tried the above and then executed:

```
shutdown -h now
```

and then restarted and still ended up with the same read-only shell.

----------

## DONAHUE

boot install, remount, 

```
grep -i tmpfs /usr/src/linux
```

if you don't get *Quote:*   

> CONFIG_DEVTMPFS=y
> 
> CONFIG_DEVTMPFS_MOUNT=y

  edit menuconfig to include  *Quote:*   

> Device Drivers  --->
> 
> Generic Driver Options  --->
> 
>  (/sbin/hotplug) path to uevent helper                                                      
> ...

 recompile and recopy kernel

----------

## jlpoole

My /var/log/messages has the last two lines of: 

 *Quote:*   

> ... init: Switching to runlevel: 0
> 
> ... init: cannot execute "/sbin/rc"
> 
> 

 

I checked the /sbin for rc:

 *Quote:*   

> (none) ~# ls /sbin/rc*
> 
> ls: cannot access /sbin/rc*: No such file or directory
> 
> (none) ~# 

 

----------

## jlpoole

I took a video of the sequence to capture the just-before login prompt.  Here's what I captured:

 *Quote:*   

> INIT: version 2.00 booting
> 
> INIT: cannot execute "/sbin/rc"
> 
> INIT: cannot execute "/sbin/rc"
> ...

 

Also, I followed the recompile suggestion above and I was missing the tmpfs so I did as instructed and booted up in the new kernel... still have the same problem.  

So I'm guessing "rc" on my system has been corrupted.  I tried "eix rc" and several hundred returns were found.  Is this a matter of emerging something to rebuild the rc system?  I've looked at http://www.gentoo.org/doc/en/openrc-migration.xml but am not finding something that bears upon the problem I find myself in.

----------

## DONAHUE

you appear to be unique

suggest

```
emerge openrc
```

if that is not the source of /sbin/rc download a tarball and copy the /sbin/rc from tarball to location

BTW backup of personal files?

my ls /sbin/* is posted at  http://bpaste.net/show/51692/ for reference

----------

## jlpoole

 *DONAHUE wrote:*   

> you appear to be unique
> 
> suggest
> 
> ```
> ...

 

I (connected back to the network with "dhcpcd") and

```
 emerge openrc 
```

and then 

```
shutdown -h now
```

and then started laptop up again and the normal boot sequence commenced.  I did another shutdown just to bring everything into conformity and have started again.

Thank you.  Marking this "SOLVED"

----------

