U-boot: tftpboot images to RAM - Failed to run /sbin/init as init process - no job control in this shell

Good morning, I have a custom image based on the tdx-reference-minimal-image by adding a few packages like "nano’ and “opencv” in the localconf. Then tried to tftp boot the apalis imx8 using a ixora carrier board though the kernel console (u-boot). The tftp server is working fine and able to upload the files into the board kernel, ramdisk and the fdt address.
The board only boot into shell without mounting the filesystems. The filesystems are there but instead of having a terminal like this: “root@apalis#” — I get a terminal like this: “sh-5.1#”
There is no /init file to start the init process. Sometimes there is an /init file but when do the command “file init” I get init: empty.
Commands such as “ifconfig” gives “ifconfig: /proc/net/dev: No such file or directory”
Basically, the problem comes from these errors:
→ [ 14.278816] Run /bin/sh as init process
→ sh: cannot set terminal process group (-1): Inappropriate ioctl for device
→ sh: no job control in this shell
Please, point me to the right direction to fix these issues.
Attached is the bootLog.
bootLogSept21th2023C (28.8 KB)

Hi @blouisb2,

It looks like you are not specifying a proper root filesystem here. The kernel command line being used is:

consoleblank=0 console=tty1 console=ttyLP1,115200 root=/dev/ram rw ramdisk_size=748000000

and that means you are simply booted into the minimal init ramdisk which will not have much functionality at all.

You probably need to change the PXE files on your server to specify a proper root=blah option to use an NFS-based root filesystem here. This is going to depend heavily on which dhcp server and such you are running on your local network so I cannot provide explicit steps but you can find more general details here: Boot from a TFTP/NFS Server | Toradex Developer Center


Thanks for the reply. I got it to boot. I re-create/rebuild the image then add the following in the kernel console:
setenv tftploadaddr ‘tftpboot ${loadaddr} “myserverIP”:apalis_booting/Image.gz’
setenv tftpfdt ‘tftpboot ${fdt_addr_r} “myserverIP”:apalis_booting/imx8qm-apalis-v1.1-ixora-v1.2-apalis-imx8.dtb’
setenv tftpram ‘tftpboot ${ramdisk_addr_r} “myserverIP”:apalis_booting/Apalis-iMX8_Reference-Minimal-Image.rootfs.ext3.gz.u-boot’

setenv bootargs console=tty1 consoleblank=0 ip=“myboardIP”:: console=${console},${baudrate} root=/dev/ram rw ramdisk_size=748000000
setenv bootargs console=tty1 consoleblank=0 ip=“myboardIP”::“routerIP”: console=${console},${baudrate} root=/dev/ram rw ramdisk_size=832000000

setenv tftpbooti ‘booti ${loadaddr} ${ramdisk_addr_r} ${fdt_addr_r}’

setenv ipaddr “myboardIP”
setenv gatewayip “routerIP”
setenv serverip “myserverIP”
setenv netmask

setenv bootcmd_run 'run tftploadaddr; run tftpfdt; run tftpram; run tftpb
setenv bootcmd ‘run tftploadaddr; run tftpfdt; run tftpram; run tftpbooti;’

Thanks again.