fai-make-nfsroot fails

Wolfgang Walkowiak walkowiak at hep.physik.uni-siegen.de
Wed Feb 6 16:01:31 CET 2013


Hi Michael,

I remmember that there is an issue if you have different kernel versions 
and use dracut.

>From my notes when I came across this:

* The package dracut needs a patch for /usr/lib/dracut/dracut-functions.sh,
   see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685004, otherwise
   all modules are missing if the kernel version in the nfsroot and on
   mucha differ.
* Patch is applied by an nfsroot-hook script named
   /etc/fai/nfsroot-hooks/15-dracut-patch.

See below for the file contents.  It runs when the nfsroot is being 
created.

Also, I did some clean-up in /etc/fai/NFSROOT by commenting out 
conflicting lines.

I hope the info helps,

w.w.

-------- snip -----
#!/bin/bash
#
# 15-dracut-patch
#
# patch dracut's dracut-functions.sh according to debian bug 685004
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685004
#
# author : W. Walkowiak, 2012-11-07
# changed:
#
#==============================================================================
#

[ "$verbose" ] && echo "Running nfsroot-hooks/15-dracut-patch now"


# patch /usr/lib/dracut/dracut-functions.sh
{
cd $NFSROOT/usr/lib/dracut
cat > dracut_patch.tmp <<EOF
--- dracut-functions.sh.orig    2012-11-07 21:10:29.000000000 +0100
+++ dracut-functions.sh 2012-11-07 21:13:27.484503109 +0100
@@ -1182,7 +1182,7 @@
      local _moddirname=${srcmods%%/lib/modules/*}

      if [[ -f "$initdir/.kernelmodseen/lazylist" ]]; then
-        xargs modprobe -a ${_moddirname+-d ${_moddirname}/} 
--ignore-install --show-depends \
+        xargs modprobe -a ${_moddirname+-d ${_moddirname}/} --set-version 
$kernel --ignore-install --show-depends \
              < "$initdir/.kernelmodseen/lazylist" 2>/dev/null \
              | sort -u \
              | while read _cmd _modpath _options; do
EOF
}

# run dpkg-reconfigure
$ROOTCMD dpkg-reconfigure dracut

# copy initrd and vmlinuz to $TFTPROOT
{
cd $TFTPROOT
cp -p $NFSROOT/boot/vmlinu?-*      $TFTPROOT
cp -p $NFSROOT/boot/initrd.img-*   $TFTPROOT
}
------ snip ------


On Wed, 6 Feb 2013, Michael Pfeiffer wrote:

> Hi,
>
> I am trying to set up fai (4.0.5) for Ubuntu 12.04, first of all trying to 
> build the nfsroot... but I'm kind of stuck here. Could someone give me a hint 
> here? I'm trying to build the nfsroot on a virtual machine, also running 
> Ubuntu12.04.
>
> If you need further information, like my NFSROOT or nfsroot.conf or 
> sources.list or anything else, let me know. I copied what I think may be 
> valuable information from the fai-make-nfsroot.log below.
>
> Kind regards,
> Michael
>
>
> The fai-make-nfsroot.log looks ok for the first 1400 lines, but then:
>
> 1403 The following packages have unmet dependencies:
> 1404  console-tools : Conflicts: console-utilities which is a virtual 
> package.
> 1405                  Conflicts: open which is a virtual package.
> 1406  kbd : Conflicts: console-utilities which is a virtual package.
> 1407        Conflicts: open which is a virtual package.
> 1408 The following actions will resolve these dependencies:
> 1409
> 1410      Remove the following packages:
> 1411 1)     console-setup
> 1412 2)     kbd
> 1413 3)     ubuntu-minimal
>
> and then, another 300 lines later:
>
> 1708 dracut: Generating /boot/initramfs-3.2.0-37-generic-pae.img^M
> 1709 E: Directories consolefonts, consoletrans, keymaps, unimaps not found. 
> Please inform us about the issue including your OS name and version.^M
> 1710 E: FATAL: Could not load /lib/modules/3.2.0-37-generic-pae/modules.dep: 
> No such file or directory^M
>
> the last line is repeated some 20 times then, occasionally find jumps in and 
> reports:
>
> 1717 find: `/lib/modules/3.2.0-37-generic-pae/': No such file or directory^M
>
> which is strange, because the directory (as well as the modules.dep file, for 
> that matter) exists (on the host - not inside the nfsroot!)
>
> At the end, I get
>
> 1894 E: FATAL: Could not load /lib/modules/3.2.0-37-generic-pae/modules.dep: 
> No such file or directory
> 1895 E: FATAL: Could not load /lib/modules/3.2.0-37-generic-pae/modules.dep: 
> No such file or directory
> 1896 E: FATAL: Could not load /lib/modules/3.2.0-37-generic-pae/modules.dep: 
> No such file or directory
> 1897 E: FATAL: Could not load /lib/modules/3.2.0-37-generic-pae/modules.dep: 
> No such file or directory
> 1898 E: FATAL: Could not load /lib/modules/3.2.0-37-generic-pae/modules.dep: 
> No such file or directory
> 1899 find: `/lib/modules/3.2.0-37-generic-pae/': No such file or directory
> 1900 find: `/lib/modules/3.2.0-37-generic-pae/': No such file or directory
> 1901 find: `/lib/modules/3.2.0-37-generic-pae/': No such file or directory
> 1902 find: `/lib/modules/3.2.0-37-generic-pae/': No such file or directory
> 1903 E: FATAL: Could not load /lib/modules/3.2.0-37-generic-pae/modules.dep: 
> No such file or directory
> 1904 F: Failed to install wget
> 1905 dpkg: error processing dracut (--configure):
> 1906  subprocess installed post-installation script returned error exit 
> status 1
> 1907 dpkg: dependency problems prevent configuration of dracut-network:
> 1908  dracut-network depends on dracut; however:
> 1909   Package dracut is not configured yet.
> 1910 dpkg: error processing dracut-network (--configure):
> 1911  dependency problems - leaving unconfigured
> 1912 Errors were encountered while processing:
> 1913  dracut
> 1914  dracut-network
> 1915 ERROR: 256 256
> 1916 ERROR: chroot /srv/fai/nfsroot dpkg --configure --pending return code 1
> 1917 install_packages: executing chroot /srv/fai/nfsroot dpkg -C
> 1918 The following packages have been unpacked but not yet configured.
> 1919 They must be configured using dpkg --configure or the configure
> 1920 menu option in dselect for them to work:
> 1921  dracut-network       A new initramfs infrastucture
> 1922
> 1923 The following packages are only half configured, probably due to 
> problems
> 1924 configuring them the first time.  The configuration should be retried 
> using
> 1925 dpkg --configure <package> or the configure menu option in dselect:
> 1926  dracut               A new initramfs infrastructure
> 1927
> 1928 install_packages: executing chroot /srv/fai/nfsroot apt-get clean
> 1929 2 errors during executing of commands
>
>
>
>

==========================================================2013-02-06==15:56==

   Dr. Wolfgang Walkowiak     Phone: +49-271-740-3889
   Fakultaet IV / Physik      Fax  : +49-271-740-3886
   Emmy Noether Campus
   Universitaet Siegen    --> Wolfgang.Walkowiak at hep.physik.uni-siegen.de
   Walter-Flex-Str. 3         Wolfgang.Walkowiak at gmx.net
   57068 Siegen
   Germany

=============================================================================


More information about the linux-fai mailing list