Debian Wheezy live-boot vs. netboot=nfs
>>>>> Daniel Baumann <daniel.baumann@progress-technologies.net> writes:
>>>>> On 08/15/2012 04:41 PM, Ivan Shmakov wrote:
[…]
>> I vaguely recall that there was a kernel command line option for the
>> “live” initramfs to use live-media-path= as the root directory
>> (subject to aufs, of course), instead of searching for filesystem.*.
> either
> * you boot with 'boot=live' and 'config' only, and your filesystem
> gets automatically found if it's on a device in the form of
> /live/filesystem.{squashfs,dir,$whatever}
> or
> * you boot with 'boot=live', 'config', 'plainroot', and 'live-media='
> (or 'root=', or something else, don't know off hand but man live-boot
> will tell which you need to specify the block device).
That's it! Unfortunately, I see no mention of ‘plainroot’ in
either live-boot(7) or live-config(7), and thus cannot tell
whether it isn't applicable, or just has a bug somewhere.
Long story short, I was able to boot using the following kernel
command line, but not without a couple of tweaks MIME'd. (The
diff is against the versions of the files currently in
Debian Wheezy.)
boot=live \
netboot=nfs nfsroot=XXX:/srv/diskless/nfsv3 \
debug=1 \
config \
live-media-path=/z502bc1
(The image is below /srv/diskless/nfsv3/z502bc1/filesystem.dir.)
I haven't checked the version currently in Git as of yet.
(Neither have I checked that the behavior I've observed is an
occurence of Debian Bug #683240.)
--
FSF associate member #7257 http://sf-day.org/
--- ./lib/live/boot/overlay.sh.~1~ 2012-08-16 04:20:58.135850344 +0700
+++ ./lib/live/boot/overlay.sh 2012-08-16 05:03:20.207543846 +0700
@@ -156,7 +156,16 @@
# tmpfs file systems
touch /etc/fstab
mkdir -p /live
+ ## NB: we're about to shadow /live/image, if any
+ mkdir -p /live-image \
+ && mount -o move /live/image /live-image \
+ || rmdir /live-image
mount -t tmpfs tmpfs /live
+ ## return /live/image back
+ test -d /live-image \
+ && mkdir /live/image \
+ && mount -o move /live-image /live/image \
+ && rmdir /live-image
mkdir -p /live/overlay
# Looking for persistence devices or files
--- ./lib/live/boot/select-eth-device.sh.~1~ 2012-08-16 04:20:58.135850344 +0700
+++ ./lib/live/boot/select-eth-device.sh 2012-08-16 04:29:21.968543891 +0700
@@ -35,7 +35,8 @@
if [ $(echo $l_interfaces | wc -w) -lt 2 ]
then
# only one interface : no choice
- echo "DEVICE=$l_interfaces" >> /conf/param.conf
+ DEVICE="$l_interfaces"
+ echo "DEVICE=${DEVICE}" >> /conf/param.conf
return
fi
@@ -45,7 +46,8 @@
case "${ARGUMENT}" in
live-netdev=*)
NETDEV="${ARGUMENT#live-netdev=}"
- echo "DEVICE=$NETDEV" >> /conf/param.conf
+ DEVICE="$NETDEV"
+ echo "DEVICE=${DEVICE}" >> /conf/param.conf
echo "Found live-netdev parameter in /proc/cmdline. Force to use network device $NETDEV."
return
;;
@@ -84,7 +86,8 @@
done
if [ -n "$found_eth_dev" ]
then
- echo "DEVICE='$found_eth_dev'" >> /conf/param.conf
+ DEVICE="$found_eth_dev"
+ echo "DEVICE='${DEVICE}'" >> /conf/param.conf
return
else
# wait a bit
Reply to: