View previous topic :: View next topic |
Author |
Message |
TheHermit n00b
Joined: 21 Oct 2004 Posts: 19 Location: Springfield, MA
|
Posted: Tue Jan 22, 2013 12:28 am Post subject: [SOLVED] Read-only filesystem on first boot. |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Tue Jan 22, 2013 6:36 am Post subject: |
|
|
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 |
|
|
TheHermit n00b
Joined: 21 Oct 2004 Posts: 19 Location: Springfield, MA
|
Posted: Tue Jan 22, 2013 7:19 pm Post subject: |
|
|
Kernel config does have all those options set/unset.
Also ran fsck on all partitions and it came back clean. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Jan 23, 2013 2:30 am Post subject: |
|
|
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 |
|
|
TheHermit n00b
Joined: 21 Oct 2004 Posts: 19 Location: Springfield, MA
|
Posted: Wed Jan 23, 2013 3:05 am Post subject: |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Jan 23, 2013 3:09 am Post subject: |
|
|
Quote: | Restarting localmount seems to work. | did it come up rw? _________________ Defund the FCC. |
|
Back to top |
|
|
TheHermit n00b
Joined: 21 Oct 2004 Posts: 19 Location: Springfield, MA
|
Posted: Wed Jan 23, 2013 3:10 am Post subject: |
|
|
Yes they all all rw. |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Jan 23, 2013 3:14 am Post subject: |
|
|
some sort of timing error is preventing localmount or skipping localmount _________________ Defund the FCC. |
|
Back to top |
|
|
TheHermit n00b
Joined: 21 Oct 2004 Posts: 19 Location: Springfield, MA
|
Posted: Wed Jan 23, 2013 4:21 am Post subject: |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Jan 23, 2013 4:59 pm Post subject: |
|
|
try uncommenting #rc_parallel="NO" in /etc/rc.conf and rebooting _________________ Defund the FCC. |
|
Back to top |
|
|
TheHermit n00b
Joined: 21 Oct 2004 Posts: 19 Location: Springfield, MA
|
Posted: Wed Jan 23, 2013 9:09 pm Post subject: |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Jan 23, 2013 11:48 pm Post subject: |
|
|
good work! _________________ Defund the FCC. |
|
Back to top |
|
|
|