ever since i installed 1.39, i notice at boot the ext3 check always reports: "Superblock last mount time in the future: FIXED" --emerge --info pre4-r3 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 i686) ================================================================= System uname: 2.6.17-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.6.15 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo" CXXFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distcc distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo http://mirror.datapipe.net/gentoo http://gentoo.chem.wisc.edu/gentoo/" LANG="en_US.utf8" LC_ALL="en_US.utf8" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="x86 X aalib alsa apm avi bitmap-fonts cdr cli crypt cups dlloader dri dvd dvdr eds elibc_glibc emboss encode fbcon foomaticdb gif gpm gstreamer gtk gtk2 imlib input_devices_evdev input_devices_keyboard input_devices_mouse isdnlog jpeg kernel_linux libg++ libwww mad mikmod mmx mp3 mpeg ncurses nls nptl ogg opengl oss pcre pdflib perl png pppd python qt3 qt4 quicktime readline reflection sdl session slang spell spl sse sse2 ssl tcpd truetype truetype-fonts type1-fonts udev unicode userland_GNU video_cards_nv vorbis xml xml2 xorg xv xvid zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
what ext3 check ? post the output from boot (use RC_BOOTLOG in /etc/conf.d/rc)
um, i already downgraded to 1.38. i was referring to the /etc/init.d/checkfs script from baselayout. that script runs fsck on each of the filesystems prior to mounting them. fsck activates fsck.ext3 (a symlink to e2fsck) if the fs to be checked is ext3.
works for me: root@vapier 0 ~ # mount /dev/hda4 && umount /mnt/space && e2fsck /dev/hda4 e2fsck 1.39 (29-May-2006) /dev/hda4: clean, 1700978/18284544 files, 36280592/36555907 blocks do you have your hwclock set to UTC or something ?
my hw clock is set to local time, not utc. /etc/conf.d/clock CLOCK="local" # hwclock --show Sun 06 Aug 2006 01:17:40 AM EDT -0.784401 seconds apparently using local time for hwclock and will yield the error, whereas with utc it's ok. can you reproduce it now? http://forums.gentoo.org/viewtopic-p-3492690.html#3492690
no, because i'm using CLOCK='local' ;) i'll try rebooting in a bit
lol, i should have kept my mouth shut. ok, i reinstalled e2fsprogs 1.39, then set RC_BOOTLOG to yes, then emerged showconsole, then took another 15 mins to figure out you must disable the bootsplash parts of the kernel line in grub.conf for anything to be written to /var/log/boot.msg and HERE IT FINALLY IS: You can plainly see the superblock errors. go back to 1.38 and they disappear. my clock="local" as mentioned above. hope you can reproduce it now. $ cat /var/log/boot.msg * Activating (possible) swap ... [ ok ] * Checking root filesystem ... /dev/hda3: Superblock last write time is in the future. FIXED. /dev/hda3: clean, 348799/1251712 files, 954501/2500092 blocks (check after next mount) [ ok ] * Remounting root filesystem read/write ... [ ok ] * Setting hostname to porthos ... [ ok ] * Calculating module dependencies ... [ ok ] * Using /etc/modules.autoload.d/kernel-2.6 as config: * Loading module ide_cd ... [ ok ] * Loading module ide_scsi ... [ ok ] * Loading module sg ... [ ok ] * Loading module psmouse ... [ ok ] * Loading module evdev ... [ ok ] * Loading module lp ... [ ok ] * Loading module fuse ... [ ok ] * Autoloaded 7 module(s) * Checking all filesystems ... /dev/hda1: Superblock last write time is in the future. FIXED. /dev/hda1: clean, 43/62656 files, 7737/62614 blocks /dev/hda5: clean, 32299/250368 files, 125549/500086 blocks /dev/hda6: Superblock last write time is in the future. FIXED. /dev/hda6: clean, 977/250368 files, 39343/500086 blocks /dev/hda7: Superblock last write time is in the future. FIXED. /dev/hda7: clean, 334/375360 files, 28920/750070 blocks /dev/hda8: Superblock last write time is in the future. FIXED. /dev/hda8: clean, 41869/625248 files, 123116/1250164 blocks (check in 5 mounts) Reiserfs super block in block 16 on 0x309 of format 3.6 with standard journal Blocks (total/free): 8590672/7322827 by 4096 bytes Filesystem is clean Replaying journal.. Reiserfs journal '/dev/hda9' in blocks [18..8211]: 0 transactions replayed Checking internal tree..finished [ ok ] * Mounting local filesystems ... [ ok ] * Mounting USB device filesystem (usbfs) ... [ ok ] * Activating (possibly) more swap ... [ ok ] * Setting system clock using the hardware clock [Local Time] ... [ ok ] * Configuring kernel parameters ... [ ok ] * Updating environment ... [ ok ] * Cleaning /var/lock, /var/run ... [ ok ] * Cleaning /tmp directory ... [ ok ] * Coldplugging input devices ... [ ok ] * Coldplugging pci devices ...
The same problem appeared on my machine after emerging sys-fs/e2fsprogs-1.39. "hwclock --debug" generated: hwclock from util-linux-2.12r Using /dev/rtc interface to clock. Last drift adjustment done at 1154842399 seconds after 1969 Last calibration done at 1154842399 seconds after 1969 Hardware clock is on local time Assuming hardware clock is kept in local time. Waiting for clock tick... ...got clock tick Time read from Hardware Clock: 2006/08/06 01:37:12 Hw clock time : 2006/08/06 01:37:12 = 1154842632 seconds since 1969 Sun Aug 6 01:37:12 2006 -0.201467 seconds The relevant part of boot.msg is: * Checking all filesystems ... /boot: Superblock last write time is in the future. FIXED. /boot: clean, 52/24192 files, 24784/96390 blocks /: Superblock last write time is in the future. FIXED. /: clean, 79131/1151904 files, 976252/2303311 blocks /dev/sda5: Superblock last write time is in the future. FIXED. /dev/sda5: clean, 14/1281696 files, 48526/2558343 blocks /dev/sdb2: Superblock last write time is in the future. FIXED. /dev/sdb2: clean, 21/2562240 files, 89062/5118710 blocks /dev/sdb7: Superblock last write time is in the future. FIXED. /dev/sdb7: clean, 216/5636096 files, 5943466/11251516 blocks [ ok ] "emerge --info" is: Portage 2.1.1_pre4-r3 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.3.6-r4, 2.6.16-gentoo-r13 i686) ================================================================= System uname: 2.6.16-gentoo-r13 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.6.15 app-admin/eselect-compiler: [Not Present] dev-lang/python: 2.2.3-r1, 2.3.5-r2, 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r3 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=pentium4 -fprefetch-loop-arrays -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O3 -march=pentium4 -fprefetch-loop-arrays -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="ftp://gentoo.mirrors.pair.com/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --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="x86 X alsa apache2 apm avi berkdb bitmap-fonts cli crypt cups dlloader doc dri dvb dvd eds elibc_glibc emboss encode esd foomatic foomaticdb gdbm gif gpm gstreamer gtk gtk2 imlib input_devices_evdev input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg kde kernel_linux libg++ libwww mad mikmod mmx motif mozilla mp3 mpeg ncurses nls nptl nsplugin ogg opengl oss pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection scanner sdl session spell spl sqlite sse ssl tcltk tcpd truetype truetype-fonts type1-fonts udev usb userland_GNU video_cards_fglrx video_cards_radeon video_cards_vesa vorbis xml xmms xorg xv zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
this doesnt happen with older e2fsprogs because they didnt contain the time sanity check i'm pretty sure the issue isnt with e2fsprogs, but i'll have to test some more on my machine
I have been investigating. Something has been setting "Last write time" on my computer to a time 4 hour earlier than local time. (Note that UTC time is 4 hours later in Virginia.) Here is the results of a series of commands. The /dev/sda5 partition happens to be almost empty on my computer but does generate the bug during boot. It is in fstab and mounts during booting. [cmd] is a command that I entered. "...." means that some results are snipped. (After booting) [cmd] date: Sun Aug 6 18:12:01 EDT 2006 [cmd] debugfs /dev/sda5 debugfs 1.39 (29-May-2006) debugfs: [cmd] show_super_stats .... Inode blocks per group: 507 Filesystem created: Wed Jan 7 16:11:57 2004 Last mount time: Sun Aug 6 12:11:31 2006 Last write time: Sun Aug 6 12:11:31 2006 Mount count: 35 .... [cmd] umount /dev/sda5 [cmd] debugfs /dev/sda5 debugfs 1.39 (29-May-2006) debugfs: [cmd] show_super_stats debugfs: .... Inode blocks per group: 507 Filesystem created: Wed Jan 7 16:11:57 2004 Last mount time: Sun Aug 6 12:11:31 2006 Last write time: Sun Aug 6 18:15:10 2006 Mount count: 35 .... [cmd] mount -t auto /dev/sda5 /home2 [cmd] debugfs /dev/sda5 debugfs 1.39 (29-May-2006) debugfs: [cmd] show_super_stats .... Inode blocks per group: 507 Filesystem created: Wed Jan 7 16:11:57 2004 Last mount time: Sun Aug 6 18:18:58 2006 Last write time: Sun Aug 6 18:18:58 2006 Mount count: 36 .... [cmd] umount /dev/sda5 (Rebooting) [cmd] debugfs /dev/sda5 debugfs 1.39 (29-May-2006) debugfs: [cmd] show_super_stats .... Inode blocks per group: 507 Filesystem created: Wed Jan 7 16:11:57 2004 Last mount time: Sun Aug 6 14:25:08 2006 Last write time: Sun Aug 6 14:25:08 2006 Mount count: 1 .... [cmd] date --utc Sun Aug 6 22:28:50 UTC 2006 As far as I can tell, both the system clock and the hardware clock are set to local time. The BIOS shows local time. I haven't investigated further as yet.
More information: The problem occurs when "/etc/init.d/checkfs" is executed during boot-up. Unfortunately, "/etc/init.d/clock," which sets the system clock, executes after "checkfs." Further, "clock" depends on "localmount" which, in turn, depends on "checkfs" (or, at least, that is what the current software requires). Something appears to be setting an initial "pseudo-system" clock on my machine early in the boot process to the hardware clock minus four hours. That is, it looks like some software assumes that the hardware clock is set to UTC (it isn't) and, then, tries to correct this initial "pseudo-system" clock to local time (which is four hours earlier than UTC in my case.) Hence, this initial clock is four hours earlier than is desirable. (I use "date" to see the clock times.) If I set CLOCK in /etc/conf.d/clock to UTC, the early "pseudo-system" time is the same as the final system time, the problem described by this bug goes away, the BIOS clock advances four hours (because, when I shut down, the software resets the hardware clock to UTC), and, unfortunately, the clock in my Microsoft XP partition is four hours off.
I've probed further. Tracing the handling of "time" during booting is tricky and I am not confident that I completely understand what is going on. But, here is what I think is happening. Linux assumes that the internal "system clock" is set to UTC. When time is displayed or used to update file parameters, etc., this system time is converted to local time. When linux is booted, the kernel starts the system clock using the time in the hardware clock, which is assumed to be set to UTC. If the hardware clock is not set to UTC, e.g., because a Microsoft operating system, which assumes that system time is local time, is booted on the same computer, then both UTC and local times will initially be in error in Gentoo. However, when when /sbin/rc runs /etc/init.d/clock early in the boot process, this error is corrected and both system and local times are then set properly. The problem described in this bug occurs, not because the mount and last write times in the superblock have somehow been set in the future, but, rather, because "local time" is running initially in the past. If system time is set to local time, then the "local time" derived from that erroneous system time will be in the past. In my case, if the true UTC is midnight and the true local time is 8 PM, then, when I boot, the system time is initially set to 8 PM and the apparent local time is 4 PM. When Gentoo reports that it has FIXED a superblock time that was set in the future, actually, it hasn't. Rather, it "broke" the times that were in the superblock, setting accurate times to false ones. This may not be important but the error messages are still annoying. The /etc/init.d/checkfs startup script generates the "FIXED" error messages and, as Gentoo Linux is currently configured, it runs before /etc/init.d/clock. A solution is to run /etc/init.d/clock before /etc/init.d/checkfs. The order that these scripts run in is controlled by the "CRITICAL_SERVICES" list in /sbin/rc. (According to the Gentoo Handbook, initscripts in /etc/init.d are supposed to run in alphabetical order as modified by "before" and "after" dependencies but, on my system, this doesn't seem to work.) Hence, CRITICAL_SERVICES="checkroot modules checkfs localmount clock bootmisc" needs to be changed to CRITICAL_SERVICES="checkroot modules clock checkfs localmount bootmisc". The current startup scripts indicate that "clock" needs "localmount" and that "localmount" needs "checkfs." While the latter dependency seems reasonable, the former does not. "Clock" corrects the system time and this does not obviously depend on file system checks or on mounting the files in /etc/fstab. (Root is already mounted.)
Gentoo is not outputting those messages, fsck from e2fsprogs is clock used to be run right after checkroot, but this breaks when modules need to be loaded (the modules init.d script) or when /etc/localtime is a symlink to a file in /usr and is a sep partition (localmount) of course, we are telling people to copy /etc/localtime rather than symlink ...
The messages are generated because, when the kernel starts the system clock, it sets that clock to the wrong time (at least, on Gentoo systems that have CLOCK set to "local" in /etc/conf.d/clock). This may be "mostly harmless" but it seems imprudent to rely on this as software evolves. Hence, it seems desirable for the Gentoo software to reset the system clock to the correct time as early as possible. And, unnecessary and misleading error messages do not give users confidence in the Gentoo system. Currently, on my system, "clock" is the first of the CRITICAL_SERVICES to be executed, even before checkroot. I don't get any error messages. It is not obvious to me why loading any module should "break" things. This suggests that some modules load properly if the system time is incorrect but fail to load properly if the system time is correct. If I delete /etc/localtime, nothing breaks. Rather, all times, e.g., those generated by "date," are UTC. While the Gentoo documentation tells people "to copy /etc/localtime rather than symlink ...," lots of other linux sources (including "gentoo-wiki.com") tell people to create a soft link. Perhaps, a message should be added to /etc/init.d/clock advising people "to copy /etc/localtime..." in the event that that /etc/init.d/clock detects that /etc/localtime has no content. There was a discussion on the Gentoo forum about this bug: http://forums.gentoo.org/viewtopic-t-487097-highlight-superblock+future.html
I confirm the existence of the bug and I completely agree with Ivar Ylvisaker. Setting the clock to the correct time should not break anything - if it does, then there is a bug in those modules/services. The bug is also present in baselayout 1.12.5 and it is even harder to work it around (see forum discussion mentioned above). If I have more time, I'll send a patch. (First I should learn how to do that.)
Created attachment 97719 [details, diff] Makes "clock" the first critical service to start in /sbin/rc OK, I guess I've figured out how to create a patch. Let me know if I did something incorrectly.
This is an issue with my system as well. It became more serious when updating to kernel version >= 2.6.18. The non-zero value for "pass" in fstab will trigger fsck at boot. fsck.ext3 barfs because mount date is in future. This didn't happen with a kernel < 2.6.18. kernel 2.6.17 has the "mounted in future" error error msg with 2.6.18 kernel ====================================================== *Checking root file system... fsck.ext3: No such file or directory while trying to open /dev/md2 /dev/md2: The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock e2fsck -b 8193 * Filesystem couldn't be fixed :( ================================================== Changing the fstab pass value to 0 allowed the system to boot with a 2.6.18 kernel, albeit with the wrong mount time Applying the patch to /sbin/rc as suggested and restoring the pass values in fstab (non-zero values) resulted in a successful boot with correct mount times. I don't know if the patch or editing the "depends()" in the init scripts is the correct way to go, but something definitley needs to be done here. # emerge --info Portage 2.1.1-r1 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.18-ck1-r2 x86_64) ================================================================= System uname: 2.6.18-ck1-r2 x86_64 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.12.6 Last Sync: Fri, 17 Nov 2006 11:50:01 +0000 app-admin/eselect-compiler: [Not Present] dev-java/java-config: 1.3.7, 2.0.30 dev-lang/python: 2.3.5-r2, 2.4.3-r4 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.60 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r3 sys-devel/gcc-config: 1.3.13-r4 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.chem.wisc.edu/gentoo/" LANG="en_US" LC_ALL="en_US" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="amd64 X alsa apache2 berkdb bitmap-fonts bzip2 cairo cdparanoia cdr cli cracklib crypt cups dga dlloader dri eds elibc_glibc emboss encode esd evo fam ffmpeg flac foomaticdb fortran frontendonly gd gdbm gif glut gmp gnome gpm gstreamer gtk gtk2 gtkhtml iconv idn imap imlib input_devices_keyboard input_devices_mouse irda irmc isdnlog ithreads java jpeg kde kernel_linux lcms ldap libg++ logrotate lzw mad mbox mikmod mng mp3 mpeg mysql mythtv ncurses nls nptl nptlonly nsplugin nvidia oav offensive ogg oggvorbis opengl oss pam pcre pda pdf perl png posix ppds pppd pthreads python qt3 qt4 quicktime readline reflection samba sdl session slang spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts udev unsupported_8bit usb userland_GNU video_cards_nvidia vorbis xine xml xorg xpm xv xvmc zlib" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Hi all, I'm running baselayout 1.12.6 and I've still got the problem and I applied the patch and even modified /sbin/rc so that clock comes earlier as was suggested in the forums. What's going on and what am I not doing correctly if anything? Alex
(In reply to comment #17) > I'm running baselayout 1.12.6 and I've still got the problem and I applied the > patch and even modified /sbin/rc so that clock comes earlier as was suggested > in the forums. What's going on and what am I not doing correctly if anything? I don't know. I am running with gentoo-sources 2.6.18.r3 and with baselayout 1.12.6 and have no problems. However, I stopped editing /sbin/rc and now set the list of critical services in /etc/runlevels/boot/.critical See http://forums.gentoo.org/viewtopic-p-3518895-highlight-critical.html#3518895 Perhaps, the /var/log/boot.msg file can tell you something. Emerge "showconsole" if you don't have this file. And you may have to set RC_BOOTLOG="yes" in /etc/conf.d/rc. (Note that I have done nothing with these things for several months and may have some details wrong.) You can edit /etc/init.d/clock and other files by adding lines like: echo Testing at /etc/init.d/clock position 1: `date` `date +%s` at various positions in the file to find out what the clock is set to while executing these files in the booting process. Use a different position number for each insertion. The results appear in /var/log/boot.msg. Ivar
Sorry to say, but adding a .critical file with the critical boot services listed therein did no good. Could you post yours to this or the thread in the forums? As you can well imagine, this is frustrating.
Kevin: your error has nothing to do with this bug report
(In reply to comment #20) > Kevin: your error has nothing to do with this bug report > Spanky: I politely disagree. The incorrect clock setting yields two different errors for me when I use two different kernels: ================================================================= #1 e2fsprogs-1.39 AND 2.6.17 kernel (same as original poster) ================================================================= * Checking root file system... /dev/md2: Superblock last write time is in the future. FIXED. ================================================================= #2 e2fsprogs-1.39 AND 2.6.18 kernel (my error msg in Comment #16) ================================================================= * Checking root file system... fsck.ext3: No such file or directory while trying to open /dev/md2 /dev/md2: The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock e2fsck -b 8193 * Filesystem couldn't be fixed :( The 2.6.18 error is incorrect. The filesystem is fine. Only the dates are incorrect due to wrong times produce by the clock error. Im using local time for system and HW clock Both issues are solved with one fix as suggested by the patch supplied in Comment #15 ================================================== change line 440 in /sbin/rc from: for x in checkroot modules ; do to: for x in clock checkroot modules ; do Perhaps the problem is magnified by raid on a 2.6.18 kernel?
your inability to have the raid device setup properly has nothing to do with superblock timestamps
Hi, I'm still having the same problem. Nothing special is listed in my boot.log file, so I don't know what to say. I'm really frustrated by this, especially as it seems like something that should have been caught. Best, Alex
(In reply to comment #23) > I'm still having the same problem. Nothing special is listed in my boot.log > file, so I don't know what to say. > > I'm really frustrated by this, especially as it seems like something that > should have been caught. I responded to your comment #19 above in http://forums.gentoo.org/viewtopic-t-489643-highlight-.html You can add echo commands to /etc/init.d/clock, /etc/init.d/checkroot, /etc/init.d/modules, and so on to verify that they are executed in the correct order and to find the time that `date` reports when they are executed. The results show up in /var/log/boot.msg. Ivar
(In reply to comment #22) > your inability to have the raid device setup properly has nothing to do with > superblock timestamps > lol, raid is fine. Its a udev issue. My root partion node, /dev/md/2 is created about 3 seconds after nearly all other device nodes with ck-sources-2.6.18_p1-r2. /etc/init.d/checkroot is run before /dev/md/2 is created, which causes the error. Starting clock before checkroot gave udev sufficient time to create md2 before checkroot ran. Thanks for the response though. Sorry to bother ya.
I notice my installed version of e2fsprogs (1.38) has long since been removed from portage, so I want to review the semi-official workaround for baselayout stable (1.12.6). I need to create a /etc/runlevels/boot/.critical file and reorder the default startup order from: checkroot modules checkfs localmount clock bootmisc to clock checkroot modules checkfs localmount bootmisc This is the way to go for now? Thanks. Phil
This problem also seems to occur if ones system hardware clock is slightly behind the precise "real" time and one runs ntp-client (ntpdate) to set a precise system clock. So shutting down the system puts a "future" date relative to the system hardware clock into the file system superblocks. It looks like /etc/init.d/checkfs needs "ntp-client" as a dependency or ntp-client should be in the critical list of boot scripts. One could perhaps argue that ntp-client should be run even before checkroot as the network connection can be accessed before one needs to check the root filesystem.
Do yourself a favor and a) switch to clock="UTC" *if at all possible*; b) uninstall net-misc/ntpd and use net-misc/openntpd instead: rc-update add ntpd default It will periodically sync your local clock. It does *not* listen on any interface by default, although it can. See its /etc/ntpd.conf config file. It's so much better than the one-shot time sync that ntp-client gives you with the net-misc/ntpd package: from my metalog files: ... Apr 22 13:43:48 [ntpd] adjusting local clock by -0.538193s ... Apr 22 13:48:00 [ntpd] adjusting local clock by -0.378070s --- I also use the /etc/conf.d/clock setting CLOCK_SYSTOHC="yes" to sync my hardware clock at shutdown. I made these changes and have had no problems vis-a-vis this bug ever since.
I have my hardware clock set to local time to support my Microsoft XP partition. To get around the bug described here, I now modify my linux kernel software to set the system time to UTC time immediately after the hardware clock is read. Specifically, I add the following line: retval = retval + 14400; to the get_cmos_time function in /usr/src/linux/arch/i386/kernel/time.c. The function is then: unsigned long get_cmos_time(void) { unsigned long retval; unsigned long flags; spin_lock_irqsave(&rtc_lock, flags); retval = get_wallclock(); /* Ivar added */ retval = retval + 14400; spin_unlock_irqrestore(&rtc_lock, flags); return retval; } EXPORT_SYMBOL(get_cmos_time); I live in the US Eastern time zone and day-light saving time is in effect; hence, UTC is currently four hours or 14400 seconds ahead of my local time. If someone wants to do what I do, he or she may have to adjust this number. Also, he or she may have to change i386 to some other architecture. The advantage of this approach is that the system time is always UTC, which is what linux expects. The disadvantages are that I have to add the line every time I upgrade to a new kernel and that I have to adjust the line twice a year and recompile the kernel when day-light saving time starts and stops. Ivar
use buggy_init_scripts in /etc/e2fsck.conf
*** Bug 284481 has been marked as a duplicate of this bug. ***
Probably the e2fsprogs ebuild should install /etc/e2fsck.conf if /etc/conf.d/clock specifies CLOCK="local".
sounds reasonable to me
i hit this on a system that had a UTC hwclock, so i've enabled it for everyone by default. it's a normal config file, so if people don't like it, they can certainly change it themselves. http://sources.gentoo.org/sys-fs/e2fsprogs/e2fsprogs-1.41.9.ebuild?r1=1.1&r2=1.2 http://sources.gentoo.org/sys-fs/e2fsprogs/files/e2fsck.conf?rev=1.1
I've got a little request, may i please to always bump version if any file (patch/conf/etc) is added/removed/changed? Now I could tell i've got e2fsprogs in current version and bug still exists and it's not fixed. How do I know I should reemerge e2fsprogs to fix bug #142850 ? Regards.
That config file doesn't seem to actually work; it only started working for me after I added the [options] header.
*** Bug 285248 has been marked as a duplicate of this bug. ***
(In reply to comment #36) > That config file doesn't seem to actually work; it only started working for me > after I added the [options] header. > Could you please explain what "[options] header" means? The config file doesn't seem to fix the issue for me either.
added the stanza, thanks http://sources.gentoo.org/sys-fs/e2fsprogs/files/e2fsck.conf?r1=1.1&r2=1.2
Hi, ALL, I'm still see this bug after every reboot Gentoo->XP->Gentoo. I'm running e2fsprogs-1.41.9: IgorsGentooOnNetwork igor # emerge -pv e2fsprogs These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-fs/e2fsprogs-1.41.9 USE="nls" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB My emerge --info is: IgorsGentooOnNetwork igor # emerge --info Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r6 i686) ================================================================= System uname: Linux-2.6.30-gentoo-r6-i686-Genuine_Intel-R-_CPU_T1350_@_1.86GHz-with-gentoo-1.12.11.1 Timestamp of tree: Wed, 09 Sep 2009 19:15:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p39 dev-lang/python: 2.4.4-r9, 2.5.4-r3, 2.6.2-r1 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.27-r2 ACCEPT_KEYWORDS="x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-Os -march=prescott -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-Os -march=prescott -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://gentoo.osuosl.org/ " LDFLAGS="-Wl,-O1" 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.namerica.gentoo.org/gentoo-portage" USE="X a52 acl acpi alsa apm berkdb bzip2 cdr clamav cli cracklib crypt dri dvd dvdr freetds gdbm gnome gpm gtk gtk2 hal iconv ipv6 isdnlog lm_sensors mplayer mssql mudflap ncurses nls nptl nptlonly odbc opengl openmp pam pcre pmu pppd python readline reflection session spl ssl sybase sybase-ct symlink sysfs tcpd theora truetype unicode usb wifi wxwindows x86 xine xorg 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="evdev mouse keyboard synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY And I don't have the file "e2fsck.conf" on my system: IgorsGentooOnNetwork igor # find / -name e2fsck.conf IgorsGentooOnNetwork igor # Should I create this file myself? If yes what do I put in there? Thank you.
create the file yourself or re-install e2fsprogs
Igor, see comment 39. And as a note, reinstalling e2fsprogs did not work for me. Create the file /etc/e2fsck.conf and add the following [options] # allow fsck to run sanely at any point in time #142850 buggy_init_scripts = yes
Hi, Jake, (In reply to comment #42) > Igor, see comment 39. And as a note, reinstalling e2fsprogs did not work for > me. > > > Create the file /etc/e2fsck.conf and add the following > > > > [options] > > # allow fsck to run sanely at any point in time #142850 > buggy_init_scripts = yes > OK, so just this one line, right? Also, shouldn't this file be provided by default? Thank you.
Technically its 3 lines... but you don't need the comment (line starting with #). So you only really need the TWO lines. A line with "[options]" and a separate line with "buggy_init_scripts = yes".
But shouldn't it be provided along with e2fsprogs? Thank you.
it is already
Hi, (In reply to comment #46) > it is already > If it was provided by the "make install", I shouldn't be doing the creation of this file.... Thank you.
you're mixing stable/unstable, thus it's your problem
I certainly have no issue with doing the fix manually. However, I was unaware that mixing stable/unstable in Gentoo was users own "problem" and hence, unsupported. I generally run stable except for certain packages (like firefox, nvidia-drivers, etc). I'm not sure what package had a dependency on a unstable version of e2fsprogs, but it seems to me that (at least in principle/theory) Igor is correct. Shouldn't the e2fsprogs package determine whither this patch is needed and if so, apply it (or something along those lines that don't require users looking up bug reports)? At the very least, maybe the e2fsprogs should print out information when it finishes installing that if you see this issue, review bug 142850 (like other packages do). Or maybe I missed the root cause altogether (if so, please forgive my ignorance)? Thanks SpanKY
the root cause is that the ebuild wasnt bumped when the .conf file was added. saying "i re-emerged and got no conf file" is not a report any developer can work with. it is working for other people, so you need to include real info to show why it isnt working for you. that means posting things like a full build log as an attachment.
Hi, ALL, I added the file /etc/e2fsck.conf: IgorsGentooOnNetwork igor # ls -la /etc/e2fs* -rw-r--r-- 1 root root 94 Oct 20 19:10 /etc/e2fsck.conf IgorsGentooOnNetwork igor # cat /etc/e2fsck.conf [options] # allow fsck to run sanely at any point in time bug #142850 buggy_init_script = yes but I still receives the error message when re-booting from Windows. Maybe there is something wrong with the permissions? Thank you.
(In reply to comment #51) Igor, I see a difference between your file and the one pre-installed by the ebuild: # diff -u /etc/e2fsck.conf /tmp/e2fsck.conf --- /etc/e2fsck.conf 2009-11-03 15:58:16.000000000 +0100 +++ /tmp/e2fsck.conf 2009-11-03 15:43:59.000000000 +0100 @@ -1,6 +1,4 @@ -# See the e2fsck.conf man page for more info - [options] +# allow fsck to run sanely at any point in time bug #142850 +buggy_init_script = yes -# allow fsck to run sanely at any point in time #142850 -buggy_init_scripts = yes
Created attachment 212465 [details, diff] Workaround to make /etc/init.d/clock run before /etc/init.d/checkroot This is a revised workaround to ensure that the system clock is set correctly before the root fs check takes place (and complains about futuristic mount times) The previous patch for this was incorrect and caused /etc/init.d/clock to be executed twice during bootup.
First I want to thank Shentino for your patch. It works fantastic!!! I've been dealing with the "Superblock last mount time in the future: FIXED" fsck problem for ages. I found this bug report while scanning for answers in the forum about 6 months ago. I used the original patch by Csaba Biro (which should now be deprecated) to at least stop the error msgs and constant fscks at boot-up. The old patch would worked but caused "clock" to be run twice during start-up. I lived with that because it was better than fscking my partitions. Since I run Gentoo on my laptop I need to reboot often, and like the many Gentoo users, I also run Windows (I have a couple of important apps for work) so my hardware clock is set to my local time. The e2fsprogs patch stops the machine from fscking but the generated error msgs are annoying and don't endear my friends to Gentoo when they see them splashing across the screen. This new patch needs to be incorporated into the stable tree ASAP!!! Please developers this is needed. I know you folks are spending much time trying to stabilize baselayout2, but most of us are still using baselayout1 and as I previously mentioned many are also dual-booting Windows. This patch will save many headaches. Thanks in advance to all.
(In reply to comment #54) > First I want to thank Shentino for your patch. It works fantastic!!! > > I've been dealing with the "Superblock last mount time in the future: FIXED" > fsck problem for ages. I found this bug report while scanning for answers in > the forum about 6 months ago. I used the original patch by Csaba Biro (which > should now be deprecated) to at least stop the error msgs and constant fscks at > boot-up. The old patch would worked but caused "clock" to be run twice during > start-up. I lived with that because it was better than fscking my partitions. > > Since I run Gentoo on my laptop I need to reboot often, and like the many > Gentoo users, I also run Windows (I have a couple of important apps for work) > so my hardware clock is set to my local time. > > The e2fsprogs patch stops the machine from fscking but the generated error msgs > are annoying and don't endear my friends to Gentoo when they see them splashing > across the screen. > > This new patch needs to be incorporated into the stable tree ASAP!!! > > Please developers this is needed. I know you folks are spending much time > trying to stabilize baselayout2, but most of us are still using baselayout1 and > as I previously mentioned many are also dual-booting Windows. This patch will > save many headaches. > > Thanks in advance to all. > I second this, it's been an issue in my system for at least 2 years.