Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Read-only filesystem on first boot.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
TheHermit
n00b
n00b


Joined: 21 Oct 2004
Posts: 19
Location: Springfield, MA

PostPosted: Tue Jan 22, 2013 12:28 am    Post subject: [SOLVED] Read-only filesystem on first boot. Reply with quote

It has been a few years since I have done a fresh Gentoo install. I'm using the hardened stage3 as well as hardened-sources on an ESXi VM. I thought I may have tried to do too much configuration during the install and eliminated anything I felt unnecessary. The hardened kernel is the default config with only what is mentioned in the handbook and hardware drivers.

Boot meltdown: https://dl.dropbox.com/u/2175208/boot.jpg

Kernel config: http://pastebin.com/7k6Z6g82

dmesg: http://pastebin.com/ME7fQVLh

emerge --info: http://pastebin.com/tTsKXHLV

fstab:
/dev/sda1      /boot      ext2      noauto      1 2
/dev/sda8      /      ext4      defaults   0 1
/dev/sda5      /var      ext4      defaults   0 2
/dev/sda6      /tmp      ext4      defaults   0 2
/dev/sda7      /home      ext4      defaults   0 2
/tmp         /var/tmp   none      bind      0 0
shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0


grub.conf:
default 0
timeout 10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3.7.0-hardened
root (hd0,0)
kernel /boot/vmlinuz-3.7.0-hardened root=/dev/sda8


Last edited by TheHermit on Wed Jan 23, 2013 9:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Tue Jan 22, 2013 6:36 am    Post subject: Reply with quote

boot cd and fsck the gentoo partitions
temporary work around, boot, login as root, run:
Code:
 mount -o remount,rw /
rc

does your kernel have
Quote:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_HOTPLUG=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_NET=y
CONFIG_PROC_FS=y
CONFIG_SIGNALFD=y
CONFIG_SYSFS=y
CONFIG_SYSFS_DEPRECATED is not set
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_BLK_DEV_BSG=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y

_________________
Defund the FCC.


Last edited by DONAHUE on Wed Jan 23, 2013 2:12 am; edited 2 times in total
Back to top
View user's profile Send private message
TheHermit
n00b
n00b


Joined: 21 Oct 2004
Posts: 19
Location: Springfield, MA

PostPosted: Tue Jan 22, 2013 7:19 pm    Post subject: Reply with quote

Kernel config does have all those options set/unset.

Also ran fsck on all partitions and it came back clean.
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 Jan 23, 2013 2:30 am    Post subject: Reply with quote

In /etc/rc.conf you can set rc_logger="YES" and see if any clues appear in /var/log/rc.log
Code:
/etc/init.d/localmount restart
when booted readonly produces??
_________________
Defund the FCC.
Back to top
View user's profile Send private message
TheHermit
n00b
n00b


Joined: 21 Oct 2004
Posts: 19
Location: Springfield, MA

PostPosted: Wed Jan 23, 2013 3:05 am    Post subject: Reply with quote

Can't check rc.log as it's not writing it.

Restarting localmount seems to work. Warning about restarting a boot service and then gives the OK.
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 Jan 23, 2013 3:09 am    Post subject: Reply with quote

Quote:
Restarting localmount seems to work.
did it come up rw?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
TheHermit
n00b
n00b


Joined: 21 Oct 2004
Posts: 19
Location: Springfield, MA

PostPosted: Wed Jan 23, 2013 3:10 am    Post subject: Reply with quote

Yes they all all rw.
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 Jan 23, 2013 3:14 am    Post subject: Reply with quote

some sort of timing error is preventing localmount or skipping localmount
_________________
Defund the FCC.
Back to top
View user's profile Send private message
TheHermit
n00b
n00b


Joined: 21 Oct 2004
Posts: 19
Location: Springfield, MA

PostPosted: Wed Jan 23, 2013 4:21 am    Post subject: Reply with quote

Looking into it some more I think the problem may be this line:
Code:
[    2.176516] init-early.sh (71) used greatest stack depth: 4136 bytes left

I notice it wasn't in my original dmesg so I'm not sure at this point where it came from. I do remember seeing it before though and didn't think much of it but after some googling I found others with similar issues. Typical solutions seems to be setting CONFIG_DEVTMPFS=y but that cdosn't seem to be it in this case.

I added rw to the kernel boot options and it manages to mount the root fs correctly but doesn't mount anything else.

Code:
gentoo ~ # cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext4 rw,realtime,data=ordered 0 0
devtmpfs /dev devtmpfs rw,realtime,size=3056340k,nr_inodes=764085,mode=755 0 0
proc /proc proc rw,nosuid,nodev,noexec,realtime 0 0
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 Jan 23, 2013 4:59 pm    Post subject: Reply with quote

try uncommenting #rc_parallel="NO" in /etc/rc.conf and rebooting
_________________
Defund the FCC.
Back to top
View user's profile Send private message
TheHermit
n00b
n00b


Joined: 21 Oct 2004
Posts: 19
Location: Springfield, MA

PostPosted: Wed Jan 23, 2013 9:09 pm    Post subject: Reply with quote

OK I got it working. I still need rw in my kernel options. I also needed to changed rc_sys="VSERVER" to rc_sys="".
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 Jan 23, 2013 11:48 pm    Post subject: Reply with quote

good work!
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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