Topic: Boot error using GpartedLive over PXE
I apologise if this has been answered elsewhere: I have looked to no avail. Also pardon my ignorance on matters of *nix/PXE. Still learning.
I have a PXE server set up, and I can successfully serve up images such as Memtest. I am trying to get GParted added to my library of utils, but I'm running into strange problems. The initial image (initrd.img?) transfers successfully, but during boot I get a boot error.
Unable to find a live file system on the network
modprobe: module i8042 not found in modules.dep
modprobe: module atkbd not found in modules.dep
The fault screen indicates /live.log file, which shows my NIC successfully assigning an IP address, followed by this:
Begin: Trying tftp -g -b 10240 -r /image/gparted/filesystem.squashfs -l /live/image/live/filesystem.squashfs 192.168.4.11 … tftp: read error
The only reason this command fails is because the directory /live/image/live does not exist. If I set the local directory elsewhere I can download this file.
So the question is: why is that directory not being created. I've found the /scripts/live script, and by searching for tftp I found the relevant section where it attempts to transfer the file. A few lines prior to that (line 810 in my version) the /live/image/live directory should be created. But this is as far as I can go. I'm no expert on PXE images, or *nix scripting, so I can't work out why it's failing.
Now, my setup. Here's the entry from my pxelinux.cfg/default file:
label gparted
menu label GParted Live
kernel images/gparted/vmlinuz
append initrd=images/gparted/initrd.img boot=live config union=aufs noswap noprompt vga=788 fetch=tftp://192.168.4.11/images/gparted/filesystem.squashfs
The directory names/capitalisation are all correct. As I said above, even after the boot process had crashed out, the tftp command could successfully download the filesystem.squashfs file by simply changing the destination (local) directory.
I managed to add the debug flag to enrich the /live.log file:
+ tailpid=168
+ . /scripts/live-functions
+ . /scripts/functions
+ . /live.vars
+ Arguments
+ PRESEEDS=
+ LOCATIONS=
+ cat /proc/cmdline
+ tail -f live.log
+ UNIONTYPE=aufs
+ export UNIONTYPE
+ FETCH=tftp://192.168.4.11/images/gparted/filesystem.squashfs
+ export FETCH
+ DEBUG=Yes
+ export DEBUG
+ set -x
+ [ -z ]
+ [ = /dev/nfs ]
+ [ = /dev/cifs ]
+ [ -z ]
+ MODULE=filesystem
+ export MODULE
+ [ -z aufs ]
+ maybe_break live-premount
+ [ = live-premount ]
+ log_begin_msg Running /scripts/live-premount
+ _log_msg Begin: Running /scripts/live-premount ...
+ [ n = y ]
+ printf Begin: Running /scripts/live-premount ...
Begin: Running /scripts/live-premount ... + run_scripts /scripts/live-premount
+ initdir=/scripts/live-premount
+ [ ! -d /scripts/live-premount ]
+ [ -f /scripts/live-premount/ORDER ]
+ . /scripts/live-premount/ORDER
+ /scripts/live-premount/select_eth_device
Waiting for ethernet card(s) up... If this fails, maybe the ethernet card is not supported by the kernel 3.1.0-1-486?
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ DEVICE=eth0
+ /scripts/live-premount/readonly
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ DEVICE=eth0
+ /scripts/live-premount/modules
+ [ -e /conf/param.conf ]
+ . /conf/param.conf
+ DEVICE=eth0
+ log_end_msg
+ _log_msg done.\n
+ [ n = y ]
+ printf done.\n
done.
+ [ ! -z ]
+ [ ! -z tftp://192.168.4.11/images/gparted/filesystem.squashfs ]
+ do_netmount
+ do_netsetup
+ modprobe -q af_packet
+ udevadm trigger
+ udevadm settle
+ [ -z ]
+ [ -z tftp://192.168.4.11/images/gparted/filesystem.squashfs ]
+ wc -w
+ echo eth0
+ [ 1 -ge 2 ]
+ ethdev_timeout_opt=
+ tee /netboot-eth0.config
+ ipconfig eth0
IP-Config: eth0 hardware address 00:1c:42:9c:22:2f mtu 1500 DHCP RARP
IP-Config: eth0 complete (from 192.168.4.1):
address: 192.168.4.109 broadcast: 192.168.4.255 netmask: 255.255.255.0
gateway: 192.168.4.1 dns0 : 192.168.4.1 dns1 : 0.0.0.0
rootserver: 192.168.4.11 rootpath:
filename : pxelinux.0
+ [ -e /tmp/net-eth0.conf ]
+ . /tmp/net-eth0.conf
+ DEVICE=eth0
+ IPV4ADDR=192.168.4.109
+ IPV4BROADCAST=192.168.4.255
+ IPV4NETMASK=255.255.255.0
+ IPV4GATEWAY=192.168.4.1
+ IPV4DNS0=192.168.4.1
+ IPV4DNS1=0.0.0.0
+ HOSTNAME=
+ DNSDOMAIN=
+ NISDOMAIN=
+ ROOTSERVER=192.168.4.11
+ ROOTPATH=
+ filename=pxelinux.0
+ [ 192.168.4.109 != 0.0.0.0 ]
+ break
+ OLDHOSTNAME=
+ [ -e /tmp/net-eth0.conf ]
+ . /tmp/net-eth0.conf
+ DEVICE=eth0
+ IPV4ADDR=192.168.4.109
+ IPV4BROADCAST=192.168.4.255
+ IPV4NETMASK=255.255.255.0
+ IPV4GATEWAY=192.168.4.1
+ IPV4DNS0=192.168.4.1
+ IPV4DNS1=0.0.0.0
+ HOSTNAME=
+ DNSDOMAIN=
+ NISDOMAIN=
+ ROOTSERVER=192.168.4.11
+ ROOTPATH=
+ filename=pxelinux.0
+ [ -z ]
+ HOSTNAME=
+ export HOSTNAME
+ [ -n eth0 ]
+ cat /sys/class/net/eth0/address
+ HWADDR=00:1c:42:9c:22:2f
+ [ ! -e /etc/resolv.conf ]
+ echo Creating /etc/resolv.conf
Creating /etc/resolv.conf
+ [ -n ]
+ echo nameserver 192.168.4.1
+ echo nameserver 0.0.0.0
+ echo nameserver 0.0.0.0
+ ls /sys/class/net/eth0
+ [ auto = auto ]
+ NFSROOT=192.168.4.11:
+ rc=1
+ [ -n tftp://192.168.4.11/images/gparted/filesystem.squashfs ]
+ do_httpmount
+ rc=1
+ eval echo "${HTTPFS}"
+ echo
+ local url=
+ sed s/\(.*\)\.\(.*\)/\2/
+ echo
+ local extension=
+ [ -n ]
+ eval echo "${FTPFS}"
+ echo
+ local url=
+ sed s/\(.*\)\.\(.*\)/\2/
+ echo
+ local extension=
+ [ -n ]
+ eval echo "${FETCH}"
+ echo tftp://192.168.4.11/images/gparted/filesystem.squashfs
+ local url=tftp://192.168.4.11/images/gparted/filesystem.squashfs
+ sed s/\(.*\)\.\(.*\)/\2/
+ echo tftp://192.168.4.11/images/gparted/filesystem.squashfs
+ local extension=squashfs
+ [ -n tftp://192.168.4.11/images/gparted/filesystem.squashfs ]
+ [ squashfs = iso ]
+ local dest=/live/image/live
+ mount -t ramfs ram /live/image
+ mkdir -p /live/image/live
+ [ FETCH = FETCH ]
+ sed -e s|tftp://||g -e s|/.*$||g
+ dirname tftp://192.168.4.11/images/gparted/filesystem.squashfs
+ ip=192.168.4.11
+ sed -e s|tftp://192.168.4.11||g
+ echo tftp://192.168.4.11/images/gparted/filesystem.squashfs
+ rfile=/images/gparted/filesystem.squashfs
+ basename tftp://192.168.4.11/images/gparted/filesystem.squashfs
+ lfile=filesystem.squashfs
+ log_begin_msg Trying tftp -g -b 10240 -r /images/gparted/filesystem.squashfs -l /live/image/live/filesystem.squashfs 192.168.4.11
+ _log_msg Begin: Trying tftp -g -b 10240 -r /images/gparted/filesystem.squashfs -l /live/image/live/filesystem.squashfs 192.168.4.11 ...
+ [ n = y ]
+ printf Begin: Trying tftp -g -b 10240 -r /images/gparted/filesystem.squashfs -l /live/image/live/filesystem.squashfs 192.168.4.11 ...
Begin: Trying tftp -g -b 10240 -r /images/gparted/filesystem.squashfs -l /live/image/live/filesystem.squashfs 192.168.4.11 ... + tftp -g -b 10240 -r /images/gparted/filesystem.squashfs -l /live/image/live/filesystem.squashfs 192.168.4.11
tftp: read error
+ [ 1 -eq 0 ]
+ [ squashfs = tgz ]
+ [ squashfs = iso ]
+ break
+ [ 1 != 0 ]
+ [ -d /media ]
+ umount /live/image
+ return 1
+ return 1
+ panic Unable to find a live file system on the network
+ DEB_1=\033[1;31m .''`. \033[0m
+ DEB_2=\033[1;31m: :' : \033[0m
+ DEB_3=\033[1;31m`. `'` \033[0m
+ DEB_4=\033[1;31m `- \033[0m
+ LIVELOG=\033[1;37m/live.log\033[0m
+ DEBUG=\033[1;37mdebug\033[0m
+ exec
+ exec
We can see a few steps above the tftp get command it looks like it creates the /live/image/live directory. But it doesn't. However if I type that command in manually, it does create this structure.
I downloaded gparted-live-0.11.0-10.
Sorry for the length of this post, just trying to preempt questions for more info
Thanks,
Ian