system was not booting up properly with a nilfs2 root filesystem. initially passno for / was set to 1, it was complaining about not finding fsck.nilfs2. when I switched passno to 0, the root filesystem was not being remounted R/W and a lot of things were going horribly wrong. symlinking /sbin/fsck.nilfs2 to /bin/true and reverting passno back to 1 didn't fix the issue yet, but changing checkroot to remount / R/W upon successful fsck did the trick. Not sure if this is the cleanest solution, or a horrible hack, but it works for me and I'll stick to it for the time being. Reproducible: Always Steps to Reproduce: 1. create a nilfs2 filesystem 2. edit your /etc/fstab to use the nilfs2 filesystem as /, with either passno 1 or 0 3. reboot... and see what happens... thanks!
$ emerge --info Portage 2.1.9.5 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.34.1-dvaos x86_64) ================================================================= System uname: Linux-2.6.34.1-dvaos-x86_64-Intel-R-_Core-TM-_i5_CPU_M_520_@_2.40GHz-with-gentoo-1.12.13 Timestamp of tree: Tue, 14 Sep 2010 01:45:01 +0000 app-shells/bash: 4.0_p37 dev-lang/python: 2.6.5-r3, 3.1.2-r4 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.65 sys-devel/automake: 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.1, 4.4.2, 4.4.3-r2, 4.5.1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.30-r1 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests buildpkg distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl amd64 berkdb bzip2 cli cracklib crypt cscope cups cxx dri gdbm gpm iconv ipv6 lto mmx modules mudflap multilib multislot multitarget multiuser ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session sse sse2 ssl sysfs tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
please also refer to 337579 and 321423.
This bug fucusses on the aspect that: - when fstab states "0 0" , fsck should not be called at all, and mount should be tried - when fsck failes, or is not found, a clear explicit error message should be printed - the nilfs-utils package should provide a fake fsck to make checkfs/checkroot/checkall (depending on baselayout version) happy.
declaring anything other than 0 in your fstab means your fstab is wrong. i'd punt this to nilfs upstream to see if they want to do anything about it. but there is no requirement whatsoever that baselayout/openrc needs/wants a fake nilfs fsck program.
The problem lies in the following lines of the checkroot script: # Should we mount root rw ? the touch check is to see if the / is # already mounted rw in which case there's nothing for us to do if mount -vf -o remount / 2> /dev/null | \ awk '{ if ($6 ~ /rw/) exit 0; else exit 1; }' && \ ! touch -c / >& /dev/null then to be precise in the 'mount -vf -o remount /' part. Normaly 'mount -vf -o remount' should return something like: /dev/sda3 on / type ext3 (rw,noatime) but when using mount.nilfs2 the output (stdout) not only depends on circumstances, but also includes some additional lines. When issued on a 'rw' mounted system it returns something like: mount.nilfs2: kill cleanerd (pid=3728) on /dev/sda2 mount.nilfs2: cleanerd (pid=3728) stopped mount.nilfs2: started nilfs_cleanerd /dev/sda2 on / type nilfs2 (rw,noatime,gcpid=3734) (and it is all in stdout - stderr has been passed to /dev/null) As for 'ro' mounted systems the output is a single line: nilfs_cleanerd not started My solution is to change the script like this: # Should we mount root rw ? the touch check is to see if the / is # already mounted rw in which case there's nothing for us to do # if mount -vf -o remount / 2> /dev/null | \ # awk '{ if ($6 ~ /rw/) exit 0; else exit 1; }' && \ if \ ! touch -c / >& /dev/null then I'm not sure if I could call it a good solution, but it seems like one, especially that '! touch -c / >& /dev/null' should be enough to check if the filesystem is mounted readonly.
*** This bug has been marked as a duplicate of bug 313785 ***