issue with modloop start/stop when PXEboot
Hi,
when using PXE to boot AL in ram mode, there is an issue with modloop at
boot time and another one at shutdown.
boot
At boot time, the modloop squashfs doesn’t load nor from the NFS share nor from the http offering because the /etc/init.d/modloop script is looking after /dev/nfs but the right path to look after is /dev/alpine. This means no modules available…
This patch fix this issue
localhost:~# diff /etc/init.d/modloop modloop.new
--- /etc/init.d/modloop
+++ modloop.new
@@ -32,7 +32,7 @@
local search_dev="$1" fstab="$2"
local dev mnt fs mntopts chk
case "$search_dev" in
- UUID=*|LABEL=*|/dev/*);;
+ UUID=*|LABEL=*|/dev/*|nfs);;
*) search_dev=/dev/$search_dev;;
esac
local search_real_dev=$(resolve_dev $search_dev)
@@ -49,6 +49,10 @@
fi
done
done
+ if [ "$fs" = "$search_dev" ]; then
+ echo "$mnt"
+ return
+ fi
done < $fstab 2>/dev/null
}
For the time being, a quick hack is to add the modified /etc/init.d/modloop script in some apkovl to be served as default one trough http.
shutdown
At shutdown time (poweroff or reboot), the system just hangs (but not always) because it is trying to unmount the nfs share (from /etc/init.d/modloop script) but the network is already down.
1750 root 0:00 /sbin/rc shutdown
2131 root 0:00 {mdev} /sbin/runscript /etc/init.d/mdev --lockfd 20 stop
2132 root 0:00 {modloop} /sbin/runscript /etc/init.d/modloop --lockfd 3 stop
2133 root 0:00 {runscript.sh} /bin/sh /lib/rc/sh/runscript.sh /etc/init.d/modloop stop
2161 root 0:00 mountinfo --quiet /media/alpine
The fix is to manually kill the hanging mountinfo process when hanging or to manually issue “/etc/init.d/modloop stop” before issuing the poweroff (or reboot). Then the shutdown sequence completes properly.
(from redmine: issue id 4015, created on 2015-03-22, closed on 2015-05-14)
- Changesets:
- Revision d211f6a5 by Natanael Copa on 2015-04-23T07:32:27Z:
openrc: modloop: fix finding nfs in /proc/mounts
Also fix finding UUID=... in fstab while at it
ref #4015
- Revision 858ecc1f by Natanael Copa on 2015-04-23T08:34:55Z:
openrc: modloop: fix finding nfs in /proc/mounts
Also fix finding UUID=... in fstab while at it
fixes #4015
(cherry picked from commit d211f6a58f8a130b0ab7aefbf0ae9317c480d200)