0

Background

I made an Ubuntu 20.04 "customized" img via dd command from a USB disk drive. I use Serva as PXE server following Serva tutorial.

The official Ubuntu 20.04.4 ISO PXE boots successfully. When I PXE boot my "customized" image it properly downloads vmlinuz and initrd but initrd triggers a kernel panic.

Question

Is it correct adding a Linux asset to Serva's repository by copying all the files from an image file (root partition folder) to NWA_PXE/{my customized image name}?

If this method is correct could it be the initrd triggers the kernel panic because it lacked some kernel module like SMB or CIFS on boot?

This is inspired by this article: Boot custom Linux image using PXE


The error code is:

[ 1.437739]  ---[ end Kernel panic - not syncing: Attempted to kill init! exit code=0x00000200 ]---

The ServaAsset.inf setting is:

[PXESERVA_MENU_ENTRY]
asset    = customized img beta
platform = amd64

kernel_bios    = /NWA_PXE/$HEAD_DIR$/casper/vmlinuz
append_bios    = showmounts toram root=/dev/cifs initrd=/NWA_PXE/$HEAD_DIR$/casper/initrd boot=casper netboot=cifs nfsroot=//$IP_BSRV$/NWA_PXE_SHARE/$HEAD_DIR$ NFSOPTS=-ouser=serva,pass=avres,sec=ntlmv2,vers=2.0,ro ip=dhcp ro ipv6.disable=1

kernel_efi64   = /NWA_PXE/$HEAD_DIR$/boot/vmlinuz-5.11.0-40-generic
append_efi64   = showmounts toram root=/dev/cifs initrd=/NWA_PXE/$HEAD_DIR$/boot/initrd.img-5.11.0-40-generic boot=casper netboot=cifs nfsroot=//$IP_BSRV$/NWA_PXE_SHARE/$HEAD_DIR$ NFSOPTS=-ouser=serva,pass=avres,sec=ntlm,vers=1.0,ro ip=dhcp ro ipv6.disable=1



1 Answer 1

0

Linux distros that are able to PXE boot provide INITRDs with special code within theirinit script that allows them to deal with PXE boot related stuff like getting an IP, setting the DNS client, mounting CIFS or NFS, if the distro is a Live version mounting the squashfs file etc. If this code is not there the init will end without properly "chrooting" to the corresponding booted image butinit is a script that should never return control to the command interpreter (ash) and that's why you get:

[ end Kernel panic - not syncing: Attempted to kill init! exit code=0x00000200 ]---

In your case if you want PXE boot capabilities it is always better to start with a distro with PXE capabilities and then add your specific functionality. e.g. use a live distro and add the needed functionality to the included squashfs image.

Please bear in mind Serva many times creates complementary INITRDs fixing certain distros PXE errors or just lack of support of required protocols (i.e. CIFS support at booting INITRD level) etc.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.