[Pkg-sysvinit-devel] Bug#510367: Bug#510367: initscripts: checkfs.sh runs before /etc/modules processed
Arthur Marsh
arthur.marsh at internode.on.net
Thu Jan 1 10:20:45 UTC 2009
Petter Reinholdtsen wrote, on 2009-01-01 18:42:
> [Arthur Marsh]
>> When the system boots, checkfs.sh runs before module eata loads, and so
>> fsck is not performed on the filesystems on the SCSI disk.
>>
>> /etc/modules is then processed and the SCSI disk is accessible.
>
> Which script is processing /etc/modules on your machine? Can you
> provide the output from 'ls /etc/rcS.d/'?
>
> On my machine, it is done by module-init-tools in the
> module-init-tools package, and it is started before checkfs.sh.
>
> Happy hacking,
victoria:/etc# ls rcS.d > /tmp/tmp.tmp
victoria:/etc# cat /tmp/tmp.tmp
README
S01glibc.sh
S02hostname.sh
S02mountkernfs.sh
S03udev
S04mountdevsubfs.sh
S05bootlogd
S05initrd-tools.sh
S05keymap.sh
S06keyboard-setup
S07hdparm
S08hwclockfirst.sh
S10checkroot.sh
S11hwclock.sh
S12mtab.sh
S18ifupdown-clean
S20module-init-tools
S20modutils
S25libdevmapper1.02
S25mdadm-raid
S28checkfs-loop
S30checkfs.sh
S30etc-setserial
S30procps
S34fuse
S35mountall.sh
S36mountall-bootclean.sh
S36udev-mtab
S37mountoverflowtmp
S38pppd-dns
S39dns-clean
S39ifupdown
S40networking
S43portmap
S45mountnfs.sh
S46mountnfs-bootclean.sh
S46setserial
S47lm-sensors
S48console-screen.sh
S49console-setup
S50alsa-utils
S51soundfont
S55bootmisc.sh
S55urandom
S70nviboot
S70x11-common
S71xserver-xorg
S75sudo
S80microcode.ctl
S99stop-bootlogd-single
but see also the logs "boot" and "messages.0" that the check of all file
systems takes place *before* module eata loads and the SCSI disk is
detected:
# cat boot
Thu Jan 1 07:25:15 2009: .
Thu Jan 1 07:25:15 2009: Setting preliminary keymap...done.
Thu Jan 1 07:25:15 2009: Setting parameters of disc: /dev/hda.
Thu Jan 1 07:25:15 2009: /dev/hdb ^[[31mfailed!^[[39;49m
Thu Jan 1 07:25:15 2009: (none).
Thu Jan 1 07:25:15 2009: Setting the system clock.
Thu Jan 1 07:25:15 2009: System Clock set to: Thu Jan 1 07:25:15 CST 2009.
Thu Jan 1 07:25:15 2009: Activating swap:swapon on /dev/hda6
Thu Jan 1 07:25:15 2009: .
Thu Jan 1 07:25:15 2009: Will now check root file system:fsck 1.41.3
(12-Oct-2008)
Thu Jan 1 07:25:15 2009: [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a -C0
/dev/hda5
Thu Jan 1 07:25:15 2009: /dev/hda5: clean, 441086/1528064 files,
2657469/3068407 blocks (check in 5 mounts)
Thu Jan 1 07:25:15 2009: .
Thu Jan 1 07:25:15 2009: Setting the system clock.
Thu Jan 1 07:25:17 2009: System Clock set to: Thu Jan 1 07:25:17 CST 2009.
Thu Jan 1 07:25:17 2009: Cleaning up ifupdown....
Thu Jan 1 07:25:17 2009: Loading kernel module eata.
Thu Jan 1 07:25:18 2009: Loading device-mapper support.
Thu Jan 1 07:25:19 2009: Assembling MD array md0...^[[31mfailed (no
devices found).^[[39;49m
Thu Jan 1 07:25:19 2009: Generating udev events for MD arrays...done.
Thu Jan 1 07:25:19 2009: Will now check all file systems.
Thu Jan 1 07:25:19 2009: fsck 1.41.3 (12-Oct-2008)
Thu Jan 1 07:25:19 2009: Checking all file systems.
Thu Jan 1 07:25:19 2009: [/sbin/fsck.ext3 (1) -- /mirror3] fsck.ext3 -a
-C0 /dev/hda3
Thu Jan 1 07:25:19 2009: /dev/hda3: recovering journal
Thu Jan 1 07:25:20 2009: /dev/hda3: clean, 1148/412896 files,
1666743/1666743 blocks
Thu Jan 1 07:25:20 2009: [/sbin/fsck.vfat (1) -- /victoriac] fsck.vfat
-a /dev/hda1
Thu Jan 1 07:25:20 2009: [/sbin/fsck.vfat (2) -- /scsic] fsck.vfat -a
/dev/sda1
Thu Jan 1 07:25:20 2009: open /dev/sda1:No such file or directory
Thu Jan 1 07:25:20 2009: dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN
Thu Jan 1 07:25:20 2009: [/sbin/fsck.vfat (2) -- /scsid] fsck.vfat -a
/dev/sda5
Thu Jan 1 07:25:20 2009: open /dev/sda5:No such file or directory
Thu Jan 1 07:25:20 2009: dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN
Thu Jan 1 07:25:49 2009: dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN
Thu Jan 1 07:25:49 2009: /dev/hda1: 59315 files, 3388425/3577496 clusters
Thu Jan 1 07:25:49 2009: [/sbin/fsck.vfat (1) -- /victoriad] fsck.vfat
-a /dev/hda7
Thu Jan 1 07:25:53 2009: dosfsck 3.0.1, 23 Nov 2008, FAT32, LFN
Thu Jan 1 07:25:53 2009: /dev/hda7: 5061 files, 1171537/1226561 clusters
Thu Jan 1 07:25:53 2009: fsck died with exit status 1
Thu Jan 1 07:25:53 2009: Done checking file systems. A log is being
saved in /var/log/fsck/checkfs if that location is writable..
Thu Jan 1 07:25:53 2009: Setting kernel variables
(/etc/sysctl.conf)...done.
Thu Jan 1 07:25:53 2009: Starting filesystem in userspace: fuse.
Thu Jan 1 07:25:54 2009: Will now mount local filesystems:.
Thu Jan 1 07:25:55 2009: Will now activate swapfile swap:done.
Thu Jan 1 07:25:55 2009: Cleaning /tmp...done.
Thu Jan 1 07:25:55 2009: Cleaning /var/run...done.
Thu Jan 1 07:25:56 2009: Cleaning /var/lock...done.
Thu Jan 1 07:25:56 2009: Checking minimum space in /tmp...done.
Thu Jan 1 07:25:56 2009: Running 0dns-down to make sure resolv.conf is
ok...done.
and messages:
messages.0:Jan 1 07:26:34 victoria kernel: [ 60.854840] sd 0:0:6:0:
[sda] 8466688 512-byte hardware sectors: (4.33 GB/4.03 GiB)
messages.0:Jan 1 07:26:34 victoria kernel: [ 60.893917] sd 0:0:6:0:
[sda] Write Protect is off
messages.0:Jan 1 07:26:34 victoria kernel: [ 60.925907] sd 0:0:6:0:
[sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
messages.0:Jan 1 07:26:34 victoria kernel: [ 60.929562] sd 0:0:6:0:
[sda] 8466688 512-byte hardware sectors: (4.33 GB/4.03 GiB)
messages.0:Jan 1 07:26:34 victoria kernel: [ 60.938388] sd 0:0:6:0:
[sda] Write Protect is off
messages.0:Jan 1 07:26:34 victoria kernel: [ 60.959243] sd 0:0:6:0:
[sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
messages.0:Jan 1 07:26:34 victoria kernel: [ 60.959464] sda: sda1
sda2 < sda5 >
messages.0:Jan 1 07:26:34 victoria kernel: [ 60.997915] sd 0:0:6:0:
[sda] Attached SCSI disk
After manually observing a reboot, it appears that although module eata
is successfully loaded before filesystems are checked, the device files
for the SCSI disk are created asynchronously, in my case after the
filesystem check script has attempted to check the filesystems on the
SCSI disk.
Arthur.
More information about the Pkg-sysvinit-devel
mailing list