Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't boot Debian Jessie using preseed (UEFI)
2016-12-28, 15:03
Post: #1
Can't boot Debian Jessie using preseed (UEFI)
Hey, guys!

I've been trying to boot a Debian system using this guide.

Unfortunately, the preseed.cfg file is not added to the initrd, I can't see it on a debian-installer filesystem, and debian-installer does not use preseed (obviously, since it cannot find it).

I am using the latest ipxe.efi executable.

Here is my iPXE script:

Code:
#!ipxe

kernel linux initrd=initrd.gz initrd=preseed.cfg
initrd initrd.gz
initrd preseed.cfg preseed.cfg
boot

I'd be really glad for any help I can get, I've been banging my head against the wall entire day.
Find all posts by this user
Quote this message in a reply
2016-12-28, 20:01
Post: #2
RE: Can't boot Debian Jessie using preseed (UEFI)
Unfortunatly that documentation is not entierly correct
Quote:and we are playing with names to make sure this is easy to understand (well as easy as possible) and to explicitly tell linux which file to use. The way this works is as follows: ipxe loads debian/linux recognises it as efi stores it in memory with the command line, then loads debian/initrd.gz names it one.gz and stores it in memory, loads debian/preseed.cfg names it pressed.cfg and puts it in a cpio archive called two, then boots linux. linux loads one.gz

Note the bold text above, unfortunately it is not true that the CPIO header is added (that is only done in pcbios mode when loading a bzImage, and not yet in efi mode)

For now to fix this in efi we will need to add a cpio header ourselves beforehand to preseed.cfg, todo this we use
Code:
echo preseed.cfg | cpio -H newc -o > preseed.cfg.cpio
The echo is just to tell cpio which filename(s) it should read from.

and then update the ipxe script to use that file instead
Code:
#!ipxe

kernel linux initrd=initrd.gz initrd=preseed.cfg.cpio
initrd initrd.gz
initrd preseed.cfg.cpio
boot

Here we just send in our "precompiled" cpio instead of letting ipxe create it for us, this also works in legacy pcbios mode as long as we don't the second filename to the initrd line which is the trigger for creating ipxe to add the cpio header.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2016-12-29, 06:20
Post: #3
RE: Can't boot Debian Jessie using preseed (UEFI)
Thank you! It worked almost flawlessly, I just had to gzip the cpio archive. Perhaps, it is unnecessary, but I haven't figured out another way.
Find all posts by this user
Quote this message in a reply
2016-12-29, 12:31
Post: #4
RE: Can't boot Debian Jessie using preseed (UEFI)
(2016-12-29 06:20)zuzzas Wrote:  Thank you! It worked almost flawlessly, I just had to gzip the cpio archive. Perhaps, it is unnecessary, but I haven't figured out another way.

That should not be needed since the "cpio-parts" should be detected each on it's own. But glad it worked out for you!

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)