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

Strange behavior of the debian livecd versus the netinstaller



Hi

I've been having trouble with the debian installer for stretch. I've figured out how to fix it, but I don't exactly know why
it works like it does.

I wanted an easy-to-maintain usb stick that could be used to install several different linux distributions (see https://wiki.archlinux.org/index.php/Multiboot_USB_drive). What it does is that it stores the isos on the usb stick, and mounts them on loopback and boots from the iso. Then to add a new linux installer, I simply add an iso to the usb stick and add a new grub entry for the iso.

However, I was having a lot of trouble with the debian-cdThe problem was that my usb stick was running off 
an efi grub. It had two partitions, one efi containing the grub shim, and one ext4. I have a bunch of different linux isos with different distributions distributions loaded in the ext4 partition, and one single `/boot/grub/grub.cfg` file that loads the installers from these isos.

The debian net-installer was the only one giving me trouble. It turned out that the debian installer needed an extra grub needed a module called `efi_gop` to be loaded. I don't know what it does, and would appreciate any information.

The following grub2 entry boots the debian net installer. I'd copied the hd-image initrd and vmlinuz on to the ext4 partition as stated in the debian install guide.

menuentry 'debian stretch 9.1 netinst' {
    insmod efi_gop
    search --no-floppy --set=root --fs-uuid e84f9c3d-3021-45b0-b2c6-da7852c3c151 --hint hd0,gpt2
    linux /vmlinuz vga=788 --- quiet
    initrd /initrd.gz
}

Once the installer loaded the kernel, it searched for isos on the usb stick and loaded the packages it needed from there.

In fact, it is not necessary to get the initrd and kernel from the hd-image folder *at all*, and the following menuentry works just as well. This was what I was going for.

menuentry '[loopback]debian stretch 9.1 xfce-cd config' {
        insmod efi_gop
        # this is the path to the ext4 partition on the usb drive
        set imgdevpath="/dev/disk/by-uuid/e84f9c3d-3021-45b0-b2c6-da7852c3c151"
        set isofile='/boot/iso/debian-9.1.0-amd64-xfce-CD-1.iso'
        loopback loop $isofile 
        linux (loop)/install.amd/gtk/vmlinuz desktop=xfce fromiso=${imgdevpath}/${isofile}
        initrd (loop)/install.amd/gtk/initrd.gz
}

Notice here that grub2 is loading the ramdisk and linux kernel that reside on the iso. If I removed the `insmod efi_gop` statement from either of these, the installer would fail to boot.

Fine, it makes sense that grub would need efi_gop to boot the debian installer. However, this module wasn't needed for the ubuntu installer,
and nor was it needed to boot the debian live-cd. So I was wondering why this particular module was needed in one case, but not the other.

Arjun

Reply to: