/etc/init.d/checkfs:15 reads: if [[ -f /fastboot ]] || [[ -n ${CDBOOT} ]] ; then rm -f /fastboot ...it should be "&&" rather than "||" because if /fastboot exists, *and* it's not a read-only root (hence CDBOOT contains something), only then it should attempt to remove it. In my case, /fastboot does not exist, but CDBOOT is set, so checkfs bombs out because it can't remove a non-existant file on a read-only filesystem Reproducible: Always Steps to Reproduce: 1. rm /fastboot 2. reboot with a read-only root filesystem Actual Results: checkfs bombs out, offers maintenance mode, or reboots Expected Results: system boots as expected
Please post your `emerge --info' too.
Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.18-xen-r8-domU x86_64) ================================================================= System uname: Linux-2.6.18-xen-r8-domU-x86_64-Intel-R-_Xeon-TM-_CPU_3.40GHz-with-glibc2.0 Timestamp of tree: Fri, 24 Apr 2009 10:45:02 +0000 app-shells/bash: 3.2_p39 dev-java/java-config: 2.1.7 dev-lang/python: 2.5.4-r2 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63 sys-devel/automake: 1.5, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -mtune=pentium4 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-Os -mtune=pentium4 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="buildpkg distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="-Wl,-O1" LINGUAS="en en_US" MAKEOPTS="-j8" PKGDIR="/var/diskless-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" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi alsa bzip2 cli cpudetection cups dri firefox gtk iconv ipv6 isdnlog midi minimal mmx mudflap ncurses nonfsv4 nptl nptlonly nsplugin openmp pcre pppd readline reflection session spl ssl startup-notification sysfs unicode wmp x86 xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="intel radeon r128 vesa" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
no, it should not be &&. the current logic is correct: if fastboot *or* booting from CD, you *dont* want to check any disks.
fair enough, maybe && is wrong...but the code still ain't right...how 'bout: if [[ -f /fastboot ]]; then if [[ -n ${CDBOOT} ]]; then rm -f /fastboot fi else ...
I take that back... this looks better: if [[ -f /fastboot ]] || [[ -n ${CDBOOT} ]]; then rm -f /fastboot || true else ...
sorry for spamming, but I keep thinking of better ways of doing this: if [[ -f /fastboot ]] || [[ -n ${CDBOOT} ]]; then [[ -n ${CDBOOT} ]] && rm -f /fastboot else ...
oops... if [[ -f /fastboot ]] || [[ -n ${CDBOOT} ]]; then [[ -n ${CDBOOT} ]] || rm -f /fastboot else ...
i think this should fix it: http://sources.gentoo.org/baselayout/branches/baselayout-1_12/init.d/checkfs?r1=3148&r2=3149
I've tested this in my environment, and it works for me...thanks.