Discussion:
preseed.cfg, remastered ISOs and checksum issues
(too old to reply)
Adam Baxter
2024-09-27 05:30:01 UTC
Permalink
Hi,
I'm sure I'm doing something wrong here but I'm seeing errors I've never seen before.

I'm rebuilding https://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/cdrom/mini.iso using something along the lines of

sed -i '1s/^/timeout=1\n/' boot/grub/grub.cfg
sed -i '1s/^/default=0\n/' boot/grub/grub.cfg
sed -i "s/--- quiet/auto file=\/cdrom\/preseed.cfg DEBCONF_DEBUG=5 language=en country=AU locale=en_AU.UTF-8 keymap=us/" boot/grub/grub.cfg

xorriso -indev mini.iso -outdev mini.mod.iso -map boot /boot -map preseed.cfg /preseed.cfg -boot_image any efi_path='/boot/grub/efi.img

So the boot parameters are:
vga=788 auto file=/cdrom/preseed.cfg DEBCONF_DEBUG=5 language=en country=AU locale=en_AU.UTF-8 keymap=us

This results in the following error:
The file needed for preconfiguration could not be retreived from file:///cdrom/preseed.cfg. The installation will proceed in non-automated mode

If I change it to file=preseed.cfg I get
The checksum of the file retrieved from <preseed.cfg> fails to match the expected value of "". The file may be corrupt, or the provided checksums may be out of date

Note that https://www.debian.org/releases/stable/amd64/apbs02.en.html says that the checksum is *optional*

The other issue I can see is that if I get into a shell, preseed.cfg is not at /, or /cdrom or /media

I'll try adding it to the initrd as a workaround but I thought remastering the ISO was supposed to be an option, too.

Thanks,
Adam
Adam Baxter
2024-09-27 08:50:01 UTC
Permalink
First mystery solved, /cdrom/ isn't mounted when using mini.iso.
I still think there's a bug here, if not in the documentation, then in preseed.sh - the error message should be about not being able to find preseed.cfg, not about the checksum.

--Adam
Daniel Leidert
2024-09-27 13:30:01 UTC
Permalink
Post by Adam Baxter
Hi,
I'm sure I'm doing something wrong here but I'm seeing errors I've never seen before.
I'm rebuilding
https://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/cdrom/mini.iso
 using something along the lines of
sed -i '1s/^/timeout=1\n/' boot/grub/grub.cfg
sed -i '1s/^/default=0\n/' boot/grub/grub.cfg
sed -i "s/--- quiet/auto file=\/cdrom\/preseed.cfg DEBCONF_DEBUG=5
language=en country=AU locale=en_AU.UTF-8 keymap=us/"
boot/grub/grub.cfg
[..]
Post by Adam Baxter
vga=788 auto file=/cdrom/preseed.cfg DEBCONF_DEBUG=5 language=en
country=AU locale=en_AU.UTF-8 keymap=us
The file needed for preconfiguration could not be retreived from
file:///cdrom/preseed.cfg. The installation will proceed in non-
automated mode
[..]
Post by Adam Baxter
I'll try adding it to the initrd as a workaround but I thought
remastering the ISO was supposed to be an option, too.
As you have already found, there is no /cdrom with mini.iso. The
solution I use is to put the preseed-file (and all other additional
files) into a _separate_ initrd called preseed.gz, put that initrd onto
the disk, and use

vga=788 [kernel options] file=/preseed.cfg [preseed options] initrd=initrd.gz,preseed.gz

for txt.cfg and adtxt.cfg and in boot.cfg use something like

[..] /initrd.gz /preseed.gz [..]

Personally, I found this to be the cleanest solution, and one doesn't
have to change the original initrd.

Regards, Daniel
Adam Baxter
2024-09-27 13:50:01 UTC
Permalink
Post by Daniel Leidert
As you have already found, there is no /cdrom with mini.iso. The
solution I use is to put the preseed-file (and all other additional
files) into a _separate_ initrd called preseed.gz, put that initrd onto
the disk, and use
vga=788 [kernel options] file=/preseed.cfg [preseed options]
initrd=initrd.gz,preseed.gz
Many thanks for that, I didn't even know that was supported - this should be documented.

I haven't been able to get any more info out of preseed.sh, I still think there's a bug there and improvements to be made in both the error handling and error messages.

Regards,
Adam
Adam Baxter
2024-09-28 08:50:01 UTC
Permalink
For the sake of completeness, the URL in my original email should have been https://deb.debian.org/debian/dists/stable/main/installer-amd64/current/images/netboot/mini.iso.
Loading...