On Sat, 18 Feb 2023 12:05:11 +0800 lsg <loushanguan2...@sina.com> wrote:
> Really? i am afraid vmlinuz and initrd pair in iso file don't include > program that search disk for iso file, as pair in hd-media directory > does > > Debian11.6/main/installer-amd64/current/images/hd-media > > though it's possible to boot iso file with grub, but it's too > complicated > > it seems few users are using hard disk installation method theses days I haven't been entirely clear about what I do. I do boot d-i using grub. The following should make it a bit less opaque. root@dti386:~# cat /etc/grub.d/50_netinst #!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry "Install Debian 12 OS (preseeded)" { set root='hd0,msdos5' set isofile=/firmware-testing-i386-netinst.iso insmod part_msdos insmod loopback loopback loop (hd0,msdos5)$isofile linux (loop)/install.386/vmlinuz auto=true file=/media/preseed.cfg initrd (loop)/install.386/initrd.gz } menuentry "Install Debian 12 OS (Expert)" { set root='hd0,msdos5' set isofile=/firmware-testing-i386-netinst.iso insmod part_msdos insmod loopback loopback loop (hd0,msdos5)$isofile linux (loop)/install.386/vmlinuz rescue/enable=true initrd (loop)/install.386/initrd.gz } root@dti386:~# The key is the loopback module: grub mounts the iso file as a loopback device, pulls what it needs from the iso file, and goes from there. Using the loopback facility eliminates the necessity of a separate initrd and kernel. The iso file is on /dev/[vs]da5, the first extended partition, with a FAT file system. The idea is that the main partitions could get badly mangled, but grub and this partition survive. This gives you a rescue or re-installation capability without CD-ROMs, USB sticks, etc. And, yes, these use Testing/Bookworm's weekly build, not Bullseye's. The same principle applies to Bullseye. -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/