[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#460549: live-initramfs: Network boot fails to mount filesystems due to incorrect mount location



Hadar <whadar at gmail.com> writes:

> Did you manage to mount this nfs share manually?
> If it works, try in busybox shell again using nfsmount (which you say fails)
> and send logs (dmesg).

The NFS mount works just fine, but it's mounted in the wrong place.
Initial mount (from below):

>     Begin: Trying nfsmount -o nolock -o ro  192.168.1.1:/nfsroot/debian-live /
>     live/image ...
>     Done.

When everything starts failing, it's mounted on /root/live/image
(verified in busybox shell).  Looking at the scripts in scripts/, it's
moved with mount --move from /live/image to /root/live/image.  But,
the other script are expecting /root:

>     Begin: Copying config on real root fs... ...
>     cp: unable to open `/root/etc/live.conf': No such file or
>     directory

The standard fs hierarchy is not present in /root; just /root/live and
one other file (I'll have to check what that is--I don't have access
to the client right now).

/root is the configured location set in /init (export rootmnt=/root).
Changing this to /root/live/image results in a system which boots, but
which fails to start init.  At the very bottom of the script

exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console

fails with an error ("nuking initramfs contents: Directory not
empty").  The klibc source shows there's only one place that error
comes from.  However, I'm not sure if it's supposed to use
/root/live/image, /root or /live/image.  As a result, I'm not sure
exactly which script is at fault.

Currently we're trying to work through the scripts to identify exactly
what's happening, but this is not easy given we need to edit the
scripts to make them output diagnostics.  Is there any easier way to
debug what's going on?


Thanks,
Roger

>
> Hadar
>
>
> On Jan 13, 2008 4:38 PM, Roger Leigh < rleigh at debian.org> wrote:
>
>     Package: live-initramfs
>     Version: 1.110.7-1
>     Severity: normal
>
>     Following generation of a debian-live system with live-helper, following
>     the instructions at
>
>       http://wiki.debian.org/DebianLive/Howto/Creating_a_Netboot_Image
>      http://wiki.debian.org/DebianLive/Howto/Creating_a_Test_environment
>
>     we have set up a server with working
>
>      - DHCP (dhcp3-server, including necessary bootp/PXE bits)
>      - TFTP (tftpd-hpa)
>      - NFS (nfs-kernel-server)
>
>     The DHCP server is working correctly.  The clients are requesting the
>     correct files from the TFTP server, and the pxelinux boot menu appears.
>     pxelinux is getting the correct vmlinuz and initrd images, and
>     successfully booting the kernel.  However, once the root filesystem is
>     mounted, the scripts fail to mount filesystems and copy files within
>     either the real root filesystem or the union overlay (I'm not sure
>     which).  This results in failure to complete startup because /sbin/init
>     can't be found.
>
>     The complete log is shown below, with errors appearing as early as
>     line 13.  Using the busybox initramfs shell, the NFS root was mounted on
>     /root/live/image, with /live/image being completely empty (no mounts on
>     it).  The /scripts/live script has hardcoded mount/umount commands
>     referring to /root, e.g. /root/sys, but the commands fail because there
>     is no filesystem mounted at this location.
>
>     We tried fixing up the script to see if the problem was easily fixable,
>     but could not find where the lh_ commands source the scipts/live script
>     from.  Modifying the copy under /usr/share/initramfs... did not seem to
>     work (either on the host system or in chroot/).
>
>     If you have any suggestions of what might be wrong here, or would like
>     and assistance doing any testing, please let us know.
>
>
>     Thanks,
>     Roger
>
>
>     Begin: Running /scripts/live-premount ...
>     Done.
>     IP-Config: eth0 hardware address 00:01:02:d8:7c:37 mtu 1500 DHCP RARP
>     IP-Config: eth0 complete (from 192.168.1.1):
>      address: 192.168.1.254    broadcast: 192.168.1.255    netmask:
>     255.255.255.0
>      gateway: 192.168.1.1      dns0     : 144.32.128.242   dns1   :
>     144.32.128.243
>      domain : cscipc002.york.ac.uk
>      rootserver: 192.168.1.1 rootpath:
>      filename  : pxelinux.0
>     Begin: Trying netboot from 192.168.1.1:/nfsroot/debian-live ...
>     Begin: Trying nfsmount -o nolock -o ro  192.168.1.1:/nfsroot/debian-live /
>     live/image ...
>     Done.
>     Done.
>     Begin: Running /scripts/live-bottom ...
>     Begin: Copying config on real root fs... ...
>     cp: unable to open `/root/etc/live.conf': No such file or directory
>     Done.
>     Begin: Setting timezone... ...
>     chroot: cannot execute debconf-communicate: No such file or directory
>     cp: /root/usr/share/zoneinfo/UTC: No such file or directory
>     Done.
>     Begin: Moving mount points... ...
>     Done.
>     Begin: Adding live session user... ...
>     chroot: cannot execute debconf-communicate: No such file or directory
>     chroot: cannot execute /usr/bin/env: No such file or directory
>     chroot: cannot execute debconf-communicate: No such file or directory
>     Done.
>     Begin: Configuring fstab... ...
>     /scripts/live-bottom/12fstab: /scripts/live-bottom/12fstab: 36: cannot
>     create /root/etc/fstab: Directory nonexistent
>     Done.
>     Begin: Setting up swap... ...
>     Done.
>     Begin: Setting up locales... ...
>     grep: /root/usr/share/i18n/SUPPORTED: No such file or directory
>     /scripts/live-bottom/14locales: /scripts/live-bottom/14locales: 108:
>     log_warning_message: not found
>     /scripts/live-bottom/14locales: /scripts/live-bottom/14locales: 1: cannot
>     create /root/etc/default/locale: Directory nonexistent
>     /scripts/live-bottom/14locales: /scripts/live-bottom/14locales: 1: cannot
>     create /root/etc/locale.gen: Directory nonexistent
>     chroot: cannot execute /usr/sbin/locale-gen: No such file or directory
>     Done.
>     Begin: Setting up automatic login... ...
>     chroot: cannot execute [: No such file or directory
>     chroot: cannot execute [: No such file or directory
>     Done.
>     Begin: Setting hostname... ...
>     /scripts/live-bottom/18hostname: /scripts/live-bottom/18hostname: 34:
>     cannot create /root/etc/hostname: Directory nonexistent
>     /scripts/live-bottom/18hostname: /scripts/live-bottom/18hostname: 37:
>     cannot create /root/etc/hosts: Directory nonexistent
>     Done.
>     Begin: Setting up console keyboard... ...
>     chroot: cannot execute /usr/sbin/install-keymap: No such file or directory
>     chroot: cannot execute debconf-communicate: No such file or directory
>     chroot: cannot execute debconf-communicate: No such file or directory
>     chroot: cannot execute debconf-communicate: No such file or directory
>     chroot: cannot execute debconf-communicate: No such file or directory
>     Done.
>     Begin: Configuring X... ...
>     mount: Mounting /sys on /root/sys failed: No such file or directory
>     mount: Mounting /proc on /root/proc failed: No such file or directory
>     mount: Mounting /dev on /root/dev failed: No such file or directory
>     chroot: cannot execute debconf-communicate: No such file or directory
>     /bin/live-reconfigure: package 'xserver-xorg' is not installed
>     umount: Couldn't umount /root/sys: No such file or directory
>     umount: Couldn't umount /root/proc: No such file or directory
>     umount: Couldn't umount /root/dev: No such file or directory

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20080114/b191dd3e/attachment-0001.pgp 


Reply to: