Monday, April 8, 2019

boot - 18.04.2 load initrd into ramdisk

I am trying to create a PXE boot kernel for CloneDeploy. I have a NIC that needs some drivers that do not work out of the box, but work fine on an Ubuntu install, so I thought's I'd simply PXE boot using the kernel and initrd that i boot my Ubuntu from (being not very Linux-savvy I can't think of a much better way to do things, attempts to build my own kernel have failed to yield a working NIC).



I am running an up-to-date 18.04.2 install. So I copied the files:
vmlinuz-4.18.0-20-generic and initrd.img-4.18.0-20-generic
to the right places of my PXE system, and try to boot from them.



This is the (ipxe) boot command line (with locations of images shortened to keep things legible):




kernel http://.../IpxeBoot?filename=vmlinuz-4.18.0-20-generic&type=kernel initrd=initrd.img-4.18.0-20-generic root=/dev/ram0 rw ramdisk_size=1560000  web=http://.../ USER_TOKEN= task=debug consoleblank=0 
imgfetch --name initrd.img-4.18.0-20-generic http://.../IpxeBoot?filename=initrd.img-4.18.0-20-generic&type=bootimage
boot


When booting, a bunch of relevant devices get initialized (including my NIC!) but then I run into the following error:



gave up waiting for root file system device
ALERT! /dev/ram0 does not exist. Dropping to a shell!



I have found this question, which suggests i need to do an extra step during boot somewhere to get the brd module to load and get the initrd to be turned into an actual usable ram disk. It was suggested to add "brd rd_size=16777216" to /etc/initramfs/modules, but when i unpack the initrd.img-4.18.0-20-generic file (using unmkinitramfs), there is no /etc/initramfs. (I also note i should probably use rd_nr=1 rd_size=1048576 to only have ram0 created instead of ram0 through ram15).



How do i get past the boot error. And if that involves loading brd, how do i do that for this kernel version?

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...