On Mon 28 Oct 2024 at 09:07:42 (-0700), pe...@easthope.ca wrote: > From: David Wright <deb...@lionunicorn.co.uk> > Date: Sun, 27 Oct 2024 22:42:15 -0500 > > Well, it could be because Void apparently isn't a glibc OS. > > Thanks. Haven't thought about that. > > > You could check /usr/lib/os-probes/mounted/90linux-distro > > to see whether the first test would succeed. Or a lazy way: > > type > > set -x > > before you run os-prober and > > set +x > > afterwards, and track what it does. You'd probably want to > > capture the output as it could be voluminous; it looks for > > linux systems just about last. > > You've lost me there. Which first test?
The first test in /usr/lib/os-probes/mounted/90linux-distro, which is: if (ls "$dir"/lib*/ld*.so* && [ -d "$dir/boot" ] || ls "$dir"/usr/lib*/ld*.so*) >/dev/null 2>/dev/null; then The comments preceding it tell you why this test comes about last, and what the difficulties are. I would hazard a guess that Void linux fails this test. > Where is "set"? It's a shell built-in. Greg's method of setting it is better than the above (which sets it one level too high). > > Well, it's presumably not Grub, as you say you can boot Void > > from your handcrafted menuentry once you've booted into the > > correct grub.cfg. > > The handcrafted Void stanza allowed booting 2 or 3 times. In at > least a dozen other instances it failed and Grub returned to the menu. Do you see the echo commands being executed, or do they flash past too instantaneously? If the latter, you could add a sleep 1 line after the ls that you added, so you can read the output before booting succeeds or fails. > > BTW I forgot to mention, your Grub ls command, which you reported > > on earlier, will fail to see the Void OS because there's no > > insmod part_gpt command in the grub.cfg until you press Return > > on the Void menuentry. So that's ok for booting the Void entry, > > but up until that moment, Grub can't read GPT partition tables > > without the part_gpt. So type an insmod part_gpt command first, > > if you need to type ls. > > ls is in the stanza in 40_custom. > ... > nativedisk > echo 'These disks are accessible.' > ls > echo 'Setting root part.' > set root='(usb2,gpt6)' > echo 'Booting Linux.' > linux ... > The grub commands are executed one by one; correct? (usb2,gpt6) > should appear in the output of ls before 'set root ...' is executed. I wasn't aware of those added commands before. Nor was I aware that Grub was running subsequent commands before earlier ones completed. A workaround would be to load modules earlier by putting insmod commands into the header (00). That early placement would load them before the countdown starts. > >> Rather than spend more time investigating, will put the HDD in the > >> target machine and work there. > > I hadn't realised there was one. > > Yes. I brought the disk from the "Void machine" and connected, via > a USB 2.0 adapter, to a Debian system at home. Here, installed > Void and worked on configuration. Soon the "Void disk" will return > to the "Void machine". > > > BTW I assume your second disk, being GPT, has a BIOS Boot partition? > > Correct. > > > Or is this target machine going to boot with UEFI, in which case > > you need an EFI partition. > > The disk also has an EFI partition. I couldn't make EFI boot succeed. > Therefore set the "hidden" flag on the EFI part and fell back to BIOS > boot. > > > I think moving disks between differently > > booting machines can be "fun"; it's why my own disks typically have > > both a BIOS Boot partition and an EFI partition. The former is only > > 3MB and ends at sector 8191; the latter can be borrowed for swap > > in MBR machines. > > Installing and configuring Void at home is convenient. Will soon see what > happens when the disk is in the machine where it belongs. When you run grub-mkconfig/update-grub in that machine, it will see that the disk is GPT, and insert insmod part_gpt in place of where you have insmod part_msdos in the header. That's necessary for Grub to be able to find its own fonts, but it gives insmod an early placement as a side-effect. Cheers, David.