I have setup all the bits necessary to boot a diskless system using PXE - dhcp server in the router points to TFTP server on a Tumbleweed system. I can boot the Tumbleweed installer fine. I can also boot small ISOs for stand alone CDs like gparted using memdisk. Here is my pxelinux.cfg/default
default menu.c32
prompt 0
menu title PXE Boot Menu
label localboot
menu label Boot Local Disk
localboot 0
label install
menu label Install openSUSE Tumbleweed
kernel linux64
append initrd=initrd64 splash=silent vga=0x314 showopts install=http://download.opensuse.org/factory/repo/oss/
label gparted
menu label Gparted ISO
Kernel memdisk
append iso initrd=gparted.iso raw
However what I want to be able to do is boot into a live linux session just as I would have as if I had booted from a CD or USB stick. Booting it as an ISO (openSUSE-Tumbleweed-XFCE-Live-x86_64-Current.iso) like I can do for gparted works up to a point and then fails and enters Emergency Mode. It’s also not a nice solution.
Clearly I can extract the kernel and initrd from the ISO but not sure what other parameters are needed on the append line.
kiwi-live needs real block device and syslinux memdisk can only be accessed via BIOS interfaces, which are not available when kernel is loaded.
Looking at kiwi-live dracut module, it apparently supports AOE (ATA Over Ethernet); you would need to export ISO image via ATA, pass additional rd.kiwi.live.pxe option and change [noparse]root=live:CDLABEL:xxx[/noparse] to [noparse]root=live:AOENTERFACE:yyy[/noparse]:
# live images are specified with
# root=live:CDLABEL=label
# root=live:AOEINTERFACE=name
where name in this case is how AOE target is identified under /dev/etherd on initiator.
Indeed that option worked and I got a minimal shell.
/tmp/net.info is:
/lib/kiwi-lib.sh: line 78: ifup: command not found
and this is the code from /lib/kiwi-lib.sh starting at line 70 (again OCRed so may be minor errors):
if getargbool 0 rd.kiwi.live.pxe; then
local bootdev
read -r bootdeu < /tmp/net.bootdeu 2>/dev/null
if -n "${bootdeu}" ] && -e /tmp/net."${bootdeu}".did-setup ]; then
: # already set up
elif ! ifup lano &>/tmp/net.info;then
die "Network setup failed, see tmp/net.info"
fi
modprobe aoe
isodey="${1#live:aoe:}"
else
isodeu="$1"
fi
local isodisk
Not sure if it is the same bug but looks like it is related.
No, it is different. Today there are three networking backends (module) in dracut - network-legacy, nework-wicked and network-networkmanager. Apparently dracut prefers network-wicked if it detects wicked, so initrd in Live image comes with network-wicked backend. The “ifup” command is provided only by network-legacy backend.
So either kiwi-live must be modified to support arbitrary backend or dracut must be modified to offer common tools to request and check for interface configuration.
May be kiwi-live is over engineered; basically just load aoe and check that requested device is available. Leave network configuration to whatever backend is present.
The path you suggested involved ATA Over Ethernet to present a block device to kiwi-live. As we see this fails to bring up the network. Is there a possibility of using NBD instead or is that simply going to substitute a different mechanism for the transport of the block device to then fall over in the same way as using AOE?
Cumulus:~ # ls -al /dev/etherd/total 0
drwxr-xr-x 2 root root 200 May 13 07:54 .
drwxr-xr-x 19 root root 4500 May 13 07:52 ..
c-w--w---- 1 root disk 152, 3 May 13 07:52 discover
brw-rw---- 1 root disk 152, 0 May 13 07:54 e0.1
brw-rw---- 1 root disk 152, 1 May 13 07:54 e0.1p1
brw-rw---- 1 root disk 152, 2 May 13 07:54 e0.1p2
cr--r----- 1 root disk 152, 2 May 13 07:52 err
c-w--w---- 1 root disk 152, 6 May 13 07:52 flush
c-w--w---- 1 root disk 152, 4 May 13 07:52 interfaces
c-w--w---- 1 root disk 152, 5 May 13 07:52 revalidate
However my VM which is set to network boot falls over reporting that it can’t mount the ISO
13.626282] localhost dracut-initqueue[634]: kiwi_type='iso' 13.626282] localhost dracut-initqueue[634]: kiwi_vga=''
13.626282] localhost dracut-initqueue[634]: kiwi_wwid_wait_timeout=''
13.714828] localhost kernel: squashfs: version 4.0 (2009/01/31) Phillip Lougher
13.732216] localhost kernel: aoe: AoE v85 initialised.
13.721042] localhost dracut-initqueue[670]: mount: /run/overlay/live: unknown filesystem type ''.
13.797602] localhost dracut: FATAL: Failed to mount live ISO device
13.799883] localhost dracut: Refusing to continue
13.732249] localhost dracut-initqueue[664]: Warning:
13.753627] localhost systemd[1]: Starting Dracut Emergency Shell...
13.782340] localhost systemd[1]: Received SIGRTMIN+21 from PID 589 (plymouthd).
13.797560] localhost systemd[1]: Received SIGRTMIN+21 from PID 589 (n/a).
When I drop into the maintenance shell I don’t see the drive listed is /dev/etherd on the VM. All I see is:
c-w--w---- 1 root disk 152, 3 May 13 07:31 discover
cr--r----- 1 root disk 152, 2 May 13 07:31 err
c-w--w---- 1 root disk 152, 6 May 13 07:31 flush
c-w--w---- 1 root disk 152, 4 May 13 07:31 interfaces
c-w--w---- 1 root disk 152, 5 May 13 07:31 revalidate
I took the initrd and linux files from \boot\x86_64\loader in your ISO.
Long pause in the boot sequence while it starts wicked services for ipV4 and ipV6 are started. Then drops into the emergency shell again. Network comes up just as the system stops. Then 10 seconds or so later aoe devices become available. All feels like a timing issue with the network initializing and that things are just not ready when the attempt is made to mount the iso.
Later - Scanning the log I noticed lots of lines about the network adapter just before it tried to mount the ISO so took a punt and simply changed the Virtualized Network card in VirtualBox (VirtualBox 6.1.2 running on a Win10 host) from “Intel PRO/1000 MT Desktop (82540EM)” to “PCnet-PCI II (Am79C970A)” and it boots into a full GUI!