Page 1 of 1

Boot via NBD fails during init [solved]

Posted: 09 Oct 2016, 06:46
by TheDauthi
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.

Re: Boot via NBD fails during init

Posted: 09 Oct 2016, 07:28
by gernot
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

Re: Boot via NBD fails during init

Posted: 09 Oct 2016, 16:06
by TheDauthi
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

Re: Boot via NBD fails during init

Posted: 21 Oct 2016, 13:02
by cschulzejn
TheDauthi wrote:Solution: I'm an idiot.

LOL :-)
scnr