Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Boots into Read-Only mode, Used fsck and ...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 490
Location: Salem, OR

PostPosted: Tue Oct 16, 2012 11:09 pm    Post subject: [SOLVED] Boots into Read-Only mode, Used fsck and ... Reply with quote

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:
Code:
 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
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Tue Oct 16, 2012 11:49 pm    Post subject: Reply with quote

Have you tried remounting it rw and doing a normal shutdown?
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Wed Oct 17, 2012 12:05 am    Post subject: Reply with quote

as in
Code:
mount -o remount,rw /

_________________
Defund the FCC.
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 490
Location: Salem, OR

PostPosted: Wed Oct 17, 2012 12:07 am    Post subject: Reply with quote

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

I booted up with LiveCD.
Code:

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?
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 490
Location: Salem, OR

PostPosted: Wed Oct 17, 2012 12:12 am    Post subject: Reply with quote

DONAHUE wrote:
as in
Code:
mount -o remount,rw /


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

and then restarted and still ended up with the same read-only shell.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Wed Oct 17, 2012 12:22 am    Post subject: Reply with quote

boot install, remount,
Code:
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
[*] Maintain a devtmpfs filesystem to mount at /dev
[*] Automount devtmpfs at /dev, after the kernel mounted the rootfs
recompile and recopy kernel
_________________
Defund the FCC.
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 490
Location: Salem, OR

PostPosted: Wed Oct 17, 2012 12:23 am    Post subject: Reply with quote

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) ~#
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 490
Location: Salem, OR

PostPosted: Wed Oct 17, 2012 1:01 am    Post subject: Reply with quote

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"
INIT: entering runlevel: 3
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.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Wed Oct 17, 2012 1:05 am    Post subject: Reply with quote

you appear to be unique
suggest
Code:
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
_________________
Defund the FCC.
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 490
Location: Salem, OR

PostPosted: Wed Oct 17, 2012 1:14 am    Post subject: Reply with quote

DONAHUE wrote:
you appear to be unique
suggest
Code:
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


I (connected back to the network with "dhcpcd") and
Code:
 emerge openrc

and then
Code:
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"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum