Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UEFI booting linux, initramfs not loaded?
2018-12-05, 23:31
Post: #1
UEFI booting linux, initramfs not loaded?
I've been trying to boot the newer Dell computers with UEFI, given they no longer support the BIOS boot method from hard drive, and you need to boot UEFI to install Ubuntu as UEFI.

I've set up the Ubuntu 16.04 LTS installer, I boot the computer on UEFI and boot iPXE. I select the menu entry for installing Ubuntu 16.04, and the screen shows the kernel downloading and the initrd downloading:
[Image: 7cvgy0Il.jpg]

From there, the kernel boots, and almost immediately shows the error that it cannot open root device "nfs":
[Image: FUDCzCM.jpg]

The ipxe code to do this,
Code:
set nfs_path /home/netboot/images
set nfs_file nfs://${nfs_ip}${nfs_path}
set ubuntu_path ori-xenial
kernel ${nfs_file}/${ubuntu_path}/install/hwe-netboot/ubuntu-installer/amd64/linux-ori
initrd ${nfs_file}/${ubuntu_path}/install/hwe-netboot/ubuntu-installer/amd64/initrd-ori
iseq ${enable-debug} true && set additional-args DEBCONF_DEBUG=developer ||
imgargs linux-ori root=/dev/nfs hostname=netboot-inst url=tftp://${nfs_ip}/${ubuntu_path}/preseed/optimus.seed file=preseed/optimus.seed auto=true boot=casper netboot=nfs nfsrootdebug nfsroot=${nfs_ip}:${nfs_path}/${ubuntu_path} tftppath=${ubuntu_path} ip=dhcp ${additional-args} break=top BOOT_DEBUG=3 debug -- || goto boot_err

... and when I boot this on BIOS boot method, I hit the break at the top of the init script. When I boot this on UEFI, I get that the root device NFS does not exist.

It feels like NIC drivers, so I compiled the e1000e driver into the Ubuntu kernel and tried booting... only to get the same error again. At that point, it still felt like it wasn't loading the initramfs, so I did what any experimental person would do: I compiled the initramfs into the kernel, yielding a 200MB bzimage. I edited the menu,
Code:
kernel ${nfs_file}/${ubuntu_path}/install/hwe-netboot/ubuntu-installer/amd64/linux-allinone
#initrd ...
and booted. I hit the breakpoint at the top of the init script.

It seems like the initramfs as loaded by ipxe isn't being used specifically in UEFI boot mode. Perhaps it's being loaded to an incorrect area. Does anyone have input here?
Find all posts by this user
Quote this message in a reply
2018-12-06, 21:36
Post: #2
RE: UEFI booting linux, initramfs not loaded?
When booting in efi mode you have to tell the kernel what the name of your initrd is.
So on the imgargs line, add initrd=initrd-ori

This is documented in several places, but is specific to what the Linux kernel needs to know which file in efifs that it should load, if any

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2018-12-07, 18:41
Post: #3
RE: UEFI booting linux, initramfs not loaded?
That got it! Specifying the initrd= parameter works for UEFI and doesn't harm the BIOS boot method at all either. Thanks very much :-)

I can't find it actually documented anywhere, though. Some support tickets for unrelated projects. Would it be possible to add a Note in http://ipxe.org/cmd/kernel ? My account doesn't have edit access.
Find all posts by this user
Quote this message in a reply
2019-01-03, 22:42
Post: #4
RE: UEFI booting linux, initramfs not loaded?
Just noticed that we have documented this in our own FAQ, see http://forum.ipxe.org/showthread.php?tid...1#pid19101

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)