Hi, On Wed, Apr 15, 2015 at 03:01:44PM +0100, fc3452-00 wrote: > 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.
Untested: One other option might be to move the validate_init() wrapper from init to scripts/functions and use that from there as well in scripts/nfs. Regards, Salvatore