Boot via NBD fails during init [solved]

Questions related to network booting via PXE
TheDauthi
Posts: 2
Joined: 09 Oct 2016, 06:30

Boot via NBD fails during init [solved]

Postby TheDauthi » 09 Oct 2016, 06:46

During init, I get the following:

Code: Select all

mount: mounting /tftpboot on /newroot/tftpboot failed: No such file or directory
!! Cannot move [/tftpboot] -> [/newroot/tftpboot]
chmod: /newroot/root/.zsh: No such file or directory
/init: line 1785: can't create /newroot/etc/conf.d/net: nonexistent directory
/init: line 1785: can't create /newroot/etc/conf.d/net: nonexistent directory
/init: line 1785: can't create /newroot/etc/conf.d/net: nonexistent directory
Writing network configuration in /newroot/etc/conf.d/net:
------------------------------------------------------------------
/newroot/etc/conf.d/net: No such file or directory
------------------------------------------------------------------
>> Checking /sbin/init can be executed by the current kernel...
readelf: Error: '/newroot/sbin/init': No such file
  /sbin/init on the root filesystem is an   binary
  The current running kernel architecture is x86_64
!! /sbin/init not found on root filesystem
!! Running a mini shell (cannot complete the boot process)
/bin/sh: can't access tty; job control turned off


And it then drops me into busybox.

Taking a look around, the first of those directories in question (/newroot/tftpboot) really doesn't exist. Changing the init script to create it before use, rebuilding initram.igz, and using that gets me a bit further, but fails later due to some missing directories. IE, there's more than one.

The exact same image boots fine over nfs and http, and I think I booted it once over tftp.

gernot
Posts: 1123
Joined: 07 Apr 2010, 16:19

Re: Boot via NBD fails during init

Postby gernot » 09 Oct 2016, 07:28

Which sysrcd version use you.
Check that your NBD export the actual sysrcd.dat

Try to mount the NBD manual from the minishell like init do and check the content.
You can also edit init within the minishell. E.g. insert a shellpromt after mount for further diagnostic.
Rerun init with ". init"
Dont forget to exit a diagnostic shell if you use one because init has to run as pid 1.

Gernot

TheDauthi
Posts: 2
Joined: 09 Oct 2016, 06:30

Re: Boot via NBD fails during init

Postby TheDauthi » 09 Oct 2016, 16:06

Solution: I'm an idiot.

The nbd-server config file was pointing to the wrong image, and the squashfs it was serving up was close enough that it /looked/ like the sysrcd.dat at a quick glance (I think it was originally based on an srcd image, even).
It worked great as soon as I fixed that.

Thanks

cschulzejn
Posts: 46
Joined: 08 Dec 2010, 13:07

Re: Boot via NBD fails during init

Postby cschulzejn » 21 Oct 2016, 13:02

TheDauthi wrote:Solution: I'm an idiot.

LOL :-)
scnr


Return to “Network Boot via PXE”

Who is online

Users browsing this forum: No registered users and 1 guest