[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: hard disk installation method fails



On Fri 17 Feb 2023 at 22:26:56 (-0700), Charles Curley wrote:
> On Sat, 18 Feb 2023 12:05:11 +0800
> lsg <loushanguan2015@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.

Ah, that explains the (wrong) advice given earlier. Your method is
completely different from the one in the OP. The latter is the
method documented in the Installation Guide, typically at § 4.4 and
§ 5.1, and dating back at least to lenny (when I stopped buying media).

You have to choose one method or the other, and not mix them.

BTW, in my post, I should have pointed out that the 11.6 hd-media and
ISOs are based on linux-image-5.10.0-20-amd64_5.10.158-2_amd64,
whereas it's likely that linux-image-5.10.0-21-amd64_5.10.162-1_amd64
is installed on most systems.

Cheers,
David.

Reply to: