How to boot Debian installer from PureBoot?

I checked in the #debian-live IRC channel, they said that there was no way to launch the normal installer once booted into the live shell.

If you can manage to boot into Debian live, couldn’t you then use debootstrap (or cdebootstrap) to install Debian with whatever custom setup you want?

I’m sure anything is possible once one is booted into debian live. I just don’t know how to do that, nor have the time to figure it out.

1 Like

It could also be that I just chose the wrong boot option from the drive, will test that out some more later.

EDIT: I think I’m just having a really hard time reading the boot entries from the PureBoot menu, I think this is the correct boot option.

menuentry "Debian Installer" {
  linux  /d-i/vmlinuz  "${loopback}"
  initrd /d-i/initrd.gz
}

I could also edit the grub.cfg on the ISO to make it easier to choose the right boot option.

Also I looked up how to install from debootstrap, it actually doesn’t look too hard. The tricky part would be just doing your partitions and creating an LVM manually, but there’s tons of documentation out there for that. Thanks for the tip @mat8913!

https://www.debian.org/releases/stable/i386/apds03.en.html

After flashing the mini with purism’s coreboot/seabios (no heads) I can start the normal debian installer. Once I’m satisfied that I don’t need to reinstall the OS I can flash pureboot again.

1 Like

Well, I poked around a bit. As it turns out, when kexec passes the display parameters to the kernel, it needs to supply a parameter called “orig_video_isVGA”. I don’t know why it’s called that, or what all the possible values mean, but at least for x86, this field should seemingly be set to either VIDEO_TYPE_EFI (0x70) or VIDEO_TYPE_VLFB (0x23). kexec tries to automatically detect the correct value, but that automatic detection doesn’t work in PureBoot.

If you apply the following patch to kexec:

--- a/kexec/arch/i386/x86-linux-setup.c
+++ b/kexec/arch/i386/x86-linux-setup.c
@@ -138,7 +138,8 @@
 		goto out;
 	if (-1 == ioctl(fd, FBIOGET_VSCREENINFO, &var))
 		goto out;
-	if (0 == strcmp(fix.id, "VESA VGA")) {
+	if (0 == strcmp(fix.id, "VESA VGA")
+	    || 0 == strcmp(fix.id, "inteldrmfb")) {
 		/* VIDEO_TYPE_VLFB */
 		real_mode->orig_video_isVGA = 0x23;
 	} else if (0 == strcmp(fix.id, "EFI VGA")) {

Then, build a static kexec binary (by running “./configure CC=‘gcc -static’ && make”) and copy it to somewhere accessible to PureBoot, you should then be able to boot the Debian installer by running:

/boot/misc/kexec -l /media/install.amd/vmlinuz --initrd /media/install.amd/initrd.gz
/boot/misc/kexec -e

I don’t know if the above patch is the best solution in general, but hopefully this should make it work correctly for Librem users at least.

7 Likes

@floppus Awesome!

I found kexec source code here: https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git

1 Like

I’ll add this patch to the next PureBoot release as it looks reasonably sane

edit: built and tested, fixed booting with Debian 10

4 Likes

Which release is this fixed in?

My Librem Mini v2 is running PureBoot-Release-17 and I can’t boot into debian-10.9.0 or debian-live-10.9.0 from USB. It scribbles some unreadable blue lines at the top of the screen and then I think the installer menu but super tiny and repeated all along the top of the screen. Connected to a 1080p monitor over HDMI.

1 Like

I think this was fixed in PureBoot beta 13, though I’m not sure now. I’m using beta 15.1 now and it’s not working for me either.

It’d be better for this issue to be addressed by the upstream kexec / kernel developers.

Hi everyone first time poster but long time viewer.

I’m aware I’m slightly digging up this thread, but I have the same issue, we’ll kind of, I had this exact same issue, until I upgraded to the latest 18.1 pureboot install 10 mins ago, due to the security announcement this morning.

I treated myself for the optional extra Qubes USB, but after a week of faffing about I decided it wasn’t for me. I’m in the process of trying to install the latest 64 bit version of Kali Linux but get the same issues as above poster.

When I use the graphical and text install I get the following screen:

I created the USB by using Rufus, with the standard default settings. The USB stick works on other devices and boots so I know that works.

I’m not sure what other information would be helpful to you, but please let me know what would be useful resolve this issue.

Thanks

1 Like

I tried with the Live USB but unfortunately whilst I was able to get the live instance to work, I wasn’t able to use Calamari or anything like that to install to the disc.

Any help on this would be amazing…! Looks like this might be one for the support desk.

it’s a problem of how debian kernel and initrd is being build.
it simply not initialise i915_drm so it’s not able to find graphics card.
i am trying to find hack how to force ity to load.

Hey, thanks Ninex if you get anywhere let me know.

I have exhausted my knowledge and expertise on this one and planning to contact Suport on Monday.

Who said privacy and security were easy right…

it’s not so simple.
looks like we will have to wait for next pureboot release
or you can just as MRChromebox to share his build , or fetch pureboot sources add kexec patch and build it on your own.

that’s wierd , because we had this patch in tree already…
it’s not being somehow applied?

download live+nonfree image
it boots on 18.1 without trouble
patrch metioned above is in 18.1 already
from that image you will able boot without troubles.

EDIT
debian-live-11.0.0-amd64-gnome+nonfree.iso
adn use graphical isntaller.
somehow console passtrough not works after kexec, but xorg will start fine and you will get desktop, and then you can run isntaller from it

Thank you for responding, but specifically I am looking to install Kali Linux 64bit ISO.

As that is Debian based also, I’m not sure how many more changes would be required.

actually taht statement will aslo not work.
if you add before this line printf("%s",fix.id);
you will get: i915drmfb
as i915drmfb != inteldrmfb this if statement will not apply

NineX your Linux expertise seems to have eclipsed mine, thanks for this.

As i’m new here Is there anyone I should be @mentioning or forwarding this bug too?

I’m really keen to get kali working on pureboot. It would be amazing If I can get this working before I head off away with work on Wednesday.