Bug#782641: initramfs-tools: nfs booting requires /usr to be present on the nfs root filesystem
Package: initramfs-tools
Version: 0.120
Severity: normal
Dear Maintainer,
Problem occurs when attempting to do an nfs network boot with no /usr directory
present on the nfs root partition.
At https://www.debian.org/releases/jessie/i386/apcs02.html.en it says that
/etc, /bin, /sbin, /lib & /dev must be present on the root partition in order
to boot.
But in the script /usr/share/initramfs-tools/scripts/nfs there is:
# loop until nfsmount succeeds
nfs_mount_root_impl
nfs_retry_count=0
while [ ${nfs_retry_count} -lt ${delay} ] \
&& ! chroot "${rootmnt}" test -x "${init}" ; do
[ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount"
/bin/sleep 1
nfs_mount_root_impl
nfs_retry_count=$(( ${nfs_retry_count} + 1 ))
[ "$quiet" != "y" ] && log_end_msg
done
which attempts to execute /usr/bin/test immediately after mounting the root
partition and before mounting any of the filesystems in /etc/fstab. This fails
if your are trying to mount /usr from another filesystem by using an entry in
/etc/fstab. The script could be modified to use the shell built-in "test"
command by changing the line
&& ! chroot "${rootmnt}" test -x "${init}" ; do
to
&& ! chroot "${rootmnt}" sh -c "[ -x \"${init}\" ]" ; do
which enables the system to boot when /usr is not present.
-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 8.6M Nov 15 01:17 /boot/initrd.img-2.6.32-5-686
-rw-r--r-- 1 root root 14M Apr 15 12:38 /boot/initrd.img-3.16.0-4-686-pae
-rw-r--r-- 1 root root 11M Nov 19 15:07 /boot/initrd.img-3.2.0-4-686-pae
-- /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.16.0-4-686-pae root=UUID=704cf8be-047f-406e-903b-677e3dd1e24d ro quiet
-- resume
RESUME=UUID=da7f8ef7-dcc2-4203-b8f3-b2d7673c9768
-- /proc/filesystems
ext3
ext2
ext4
fuseblk
xfs
jfs
msdos
vfat
ntfs
minix
hfs
hfsplus
qnx4
ufs
btrfs
-- lsmod
Module Size Used by
btrfs 850694 0
xor 25716 1 btrfs
raid6_pq 95207 1 btrfs
ufs 72668 0
qnx4 12876 0
hfsplus 91910 0
hfs 48797 0
minix 30809 0
ntfs 197660 0
vfat 16967 0
msdos 16863 0
fat 52647 2 vfat,msdos
jfs 162644 0
xfs 699897 0
crc32c_generic 12576 2
libcrc32c 12394 1 xfs
dm_mod 83002 0
binfmt_misc 12733 1
speedstep_lib 12463 0
cpufreq_powersave 12422 0
cpufreq_userspace 12477 0
cpufreq_stats 12694 0
cpufreq_conservative 13872 0
nfsd 236959 13
auth_rpcgss 45765 1 nfsd
oid_registry 12387 1 auth_rpcgss
nfs_acl 12463 1 nfsd
nfs 168022 0
lockd 73443 2 nfs,nfsd
fscache 44782 1 nfs
sunrpc 211341 19 nfs,nfsd,auth_rpcgss,lockd,nfs_acl
nouveau 1008276 2
snd_ens1371 22679 0
snd_ac97_codec 96151 1 snd_ens1371
snd_pcm_oss 44124 0
mxm_wmi 12467 1 nouveau
snd_mixer_oss 21822 1 snd_pcm_oss
wmi 17147 2 mxm_wmi,nouveau
snd_pcm 78128 3 snd_pcm_oss,snd_ac97_codec,snd_ens1371
video 17763 1 nouveau
ttm 72160 1 nouveau
drm_kms_helper 44450 1 nouveau
drm 203555 5 ttm,drm_kms_helper,nouveau
snd_seq_midi 12744 0
snd_seq_midi_event 13124 1 snd_seq_midi
snd_rawmidi 22284 2 snd_ens1371,snd_seq_midi
i2c_algo_bit 12647 1 nouveau
via686a 17099 0
pcspkr 12531 0
i2c_viapro 12451 0
i2c_core 36838 5 drm,drm_kms_helper,i2c_algo_bit,i2c_viapro,nouveau
evdev 17136 9
snd_seq 51555 2 snd_seq_midi_event,snd_seq_midi
serio_raw 12737 0
shpchp 30673 0
snd_seq_device 12980 3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer 22010 2 snd_pcm,snd_seq
snd 55101 9 snd_pcm_oss,snd_ac97_codec,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_ens1371,snd_seq_device,snd_mixer_oss
soundcore 12890 1 snd
ac97_bus 12462 1 snd_ac97_codec
gameport 13270 1 snd_ens1371
button 12824 1 nouveau
processor 27590 0
thermal_sys 27122 2 video,processor
loop 21987 0
fuse 77496 1
parport_pc 26004 1
ppdev 16686 0
lp 12766 0
parport 35213 3 lp,ppdev,parport_pc
autofs4 34865 2
ext4 438464 2
crc16 12327 1 ext4
mbcache 17027 1 ext4
jbd2 72879 1 ext4
hid_generic 12369 0
usbhid 43759 0
hid 81008 2 hid_generic,usbhid
sg 25573 0
sd_mod 43684 5
crc_t10dif 12399 1 sd_mod
sr_mod 21568 0
cdrom 46828 1 sr_mod
crct10dif_generic 12517 1
crct10dif_common 12340 2 crct10dif_generic,crc_t10dif
ata_generic 12450 0
pata_via 12722 4
uhci_hcd 38948 0
ehci_hcd 64933 0
libata 161865 2 pata_via,ata_generic
e100 35304 0
mii 12595 1 e100
usbcore 170994 3 uhci_hcd,ehci_hcd,usbhid
usb_common 12408 1 usbcore
scsi_mod 164132 4 sg,libata,sd_mod,sr_mod
floppy 56098 0
-- /etc/initramfs-tools/modules
-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no
-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
DEVICE=
NFSROOT=auto
-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no
-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:
/usr/share/initramfs-tools/hooks:
busybox
dmsetup
fsck
fuse
keymap
klibc
kmod
ntfs_3g
resume
thermal
udev
zz-busybox
zz_nvidia-blacklists-nouveau
-- System Information:
Debian Release: 8.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.16.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages initramfs-tools depends on:
ii busybox 1:1.22.0-9+deb8u1
ii cpio 2.11+dfsg-4.1
ii klibc-utils 2.0.4-2
ii kmod 18-3
ii module-init-tools 18-3
ii udev 215-14
Versions of packages initramfs-tools recommends:
ii busybox 1:1.22.0-9+deb8u1
Versions of packages initramfs-tools suggests:
ii bash-completion 1:2.1-4
-- no debconf information
Reply to: