You are not logged in.

#1 2019-01-09 03:03:25

Bearded_Blunder
Member
From: /home/bedroom/computer/uk
Registered: 2015-09-29
Posts: 446

Install Bunsen Helium to non-pae VM or hardware with the i386 DVD

Background - you can skip this wrote:
Why would you want to do this, or find yourself trying?

1. You might, as I do, have VirtualBox installed on a host with no virtualization extensions, and be installing to a VM where you had Jessie/Hydrogen installed and the "Expose PAE/NX" checkmark active under "Processor", Jessie runs fine this way with the pae kernel, but owing to VB not supporting NX on such hosts, the Stretch & Buster kernels won't boot even with noexec32=off as a kernel parameter, even though they ought to, the VB release notes say NX isn't supported in these cases, not that PAE isn't (no idea if this is a kernel or VirtualBox bug, or just poor documentation).

1a. If something similar happens with VMWare on such a host (not yet tested).

2. You might have an old laptop with a Pentium M (some versions like my Thinkpad has), which while pae capable (everything P2-MMX onwards is), doesn't include pae in the cpu flags, and you get a pre-boot error from the live-dvd about using forcepae as a kernel parameter,  On such an old machine you won't have sufficient RAM to need pae, so why incur the processing overhead?  Besides the kernel devs say there may be some risk using this flag, something about unusual code paths, so while they provide it, they don't actually recommend it.

3. You don't want the huge update in bl-welcome to install the standard set of software after using the CD install, could matter on metered connections, especially for multiple installs.

4. You've managed to install with the pae DVD on a non-pae system some other way, consequently can't boot, and need to recover. Easy to do if you didn't boot the live session and just installed.  See part 2 for recovery.

Install the system

Bunsen installs just fine as, unlike the live session, the installer boots a generic non-pae non-smp kernel, just boot to the installer,  and follow the prompts as usual until you reach the step where it wants to install GRUB

Now go <back> and pick Execute a shell from the menu.
All the mounting & binding has already been done by the installer for its chroot and we're now in that environment as root, so...

chroot /target /bin/sh

Use mount here to check you have /boot mounted if it's separate, mount it if not. It should be already as the installer had to mount it to install the "wrong" kernel & initramfs.

apt update
apt install linux-image-686
apt remove linux-image-*-686-pae
exit
exit 

(Yes twice.. once from chroot, once from shell.)
Now continue with install grub & finish installlation

And that's all there is to it smile

Obviously do not let bl-welcome "upgrade" your kernel to pae, after all pae just broke your install in the VB case, and as soon as you shut down UNcheck that "Expose PAE/NX" box in the VM config if that's why you were doing this!


If you need to recover, because you completed the install, and now have a non booting pae kernel on incapable hardware, see part 2.

Question to devs wrote:

Why not supply both kernels in the DVD live session, selectable at boot (2 menu entries) for the live session, and either let the installer pick the kernel as the standard Debian installer does, or use preseed to check & execute the switch to plain linux-image-686 where pae isn't supported?  Wouldn't help with the VirtualBox config I had, but would avoid issues with Pentium M laptops and correctly configured virtual machines on hosts without hardware virtualization extensions.

The .iso is easily tested in VirtualBox by simply disabling & enabling the "Expose PAE/NX" checkbox in the VM processor config, then seeing which kernel you get.  I assume you devs have posh VT enabled processors, so you can do PAE/NX enabled installs that work (or 64 bit guests), not some aincient lower spec Core2Quad without limiting me to 32 bit non pae/nx VMs like my main machine has.

The DVD isn't size constrained the way the (too big for the first 650MB CDRW I grabbed) CD is, ought to be room to ship it enabled for both pae and not.

I tried just about every combination of parameters I could track down to feed the installer preseeds on the command line instead of chrooting, and they work on a Debian installer disk but not the Bunsen (live install) one, so kernel swap in a chroot is what's left, at least it's a point>click or tab>enter pre-built one.
Even "d-i preseed/late_command string in-target" stuff got ignored.  I think the "Live" installer is posessed compared to the standard one, plus it didn't pass kernel params it's booted with to the installed system the way the standard installer does either when I tried forcepae on the Pentuim M.


Part 2:  Recovery if you installed and can't boot because of a pae kernel on non-pae hardware.

Boot the DVD again, this time pick "Advanced options" > "Rescue mode" (text or gui).
Follow the prompts to select language, region, and keyboard.
Configure the network, you will need networking as there's no installable non-pae kernel available on the DVD regardless that D-I boots one, I just hit enter to accept the defaults.
Pick /dev/sd<wherever you installed to> as / to be mounted as the root file system (in my case /dev/sda1)
Pick "Execute a shell in /dev/sd??" from the menu
You'll get a message about mounting other file systems yourself
That's going to apply to you if you have /boot on its own partition or configured a VM to be EFI rather than BIOS based, (You won't run into this issue on EFI hardware - too new) in the basic case I have (BIOS/MBR and all files in one partition) there's no need.
If you did exotic stuff like LVM, LUKS or RAID, hopefully you know enough to get the rescue shell going & /boot mounted in your configuration I'm not HoaS so I can't tell you how without trying and figuring it out, and you can do that too :-D

At the prompt that appears:

apt update
apt install linux-image-686
apt remove linux-image-*-686-pae

You'll see the usual progress messages with some errors about /dev/pts & logging go by the errors don't appear to matter and one about skipping installing irqbalance, but checking post reboot that's installed and current.. so can't see it matters either.
I guess you could tell apt to reinstall it if you're worried once you've booted up.
"update-grub" seems to get triggered automatically.
Leave the chroot shell.

exit

Eject the DVD (or release the .iso from the VM, the VM software will bitch, I just clicked force, it's easier than trying to halt mid reboot to release it, and you shouldn't be corrupting anything since you're running from RAM not the DVD/.iso)
Pick reboot system from the menu.

Done!

Note: This rescue option is also very useful for other system repairs, will chroot you in without having to remember all the mounts binds etc. you have to do if you use the live session, and has a tool for assembling RAID. Downside is, it's just a shell, in the live session you have access to Browser > Search-Engine, rather than just wget.  Which tends to recommend this post.

Last edited by Bearded_Blunder (2019-01-09 03:10:33)


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Online

Board footer

Powered by FluxBB