Page 1 of 1
Limine Installer, request for help
Posted: Tue Jul 05, 2022 6:08 pm
by BarryK
For those who haven't been following recent Limine discussion on the forum, Limine is a very simple bootloader, for both legacy-BIOS and UEFI computers. With either msdos partition table or gpt boot drive.
Its simplicity and capability make it an attractive alternative to others such as grub2.
I have started work on a "Limine Installer".
This is intended, eventually, to be an installer for the Limine bootloader, when installed to present a menu for booting any Linux installation, including Puppy, Puppy derivatives, EasyOS, Fatdog, etc., and Windows.
To get started, I have knocked together a script that detects what is installed on the computer. I welcome anyone with some shell scripting ability to test the script 'find-installations' and see if it detects all Linux and Windows installations on your computer, and if not, edit the script so that it does detect everything.
Run it from a terminal, it outputs some progress. The results that it finds are in folder /tmp/limine-installer
Script attached, with a false ".gz", and of course you will have to set its executable flags.
EDIT JULY 7:
The script is updated, see attached.
It requires 'lsblk' utility, in the 'util-linux' package.
Re: Limine Installer, request for help
Posted: Tue Jul 05, 2022 8:30 pm
by Keef
I was on FatDog when I saw this. so tried it there first. I have Win 7 on the first partition and EasyOS, FatDog, FossaPup, studio1337, and ClearOS (frugal install using wiak's weedogit.sh method) on the next partition.
After running the script I just get:
On EasyOS (just did the update to 4.2.3) I get:
Code: Select all
# ./find-installations
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
Found Puppy
Found EasyOS
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
The tmp files are accurate for the EasyOS and Fossapup installations, and show the NTFS partition has been detected, but not W7.
I see the script just looks for bootmgfw.efi but this is not present. Not sure what the best marker for W7 would be.
EDIT Found this: https://superuser.com/questions/363018/ ... filesystem
Re: Limine Installer, request for help
Posted: Tue Jul 05, 2022 10:48 pm
by williwaw
Code: Select all
0 /files/downloads # ./f*
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
Found Puppy
Found EasyOS
0 /files/downloads #
mounted
sda1 with no frugals vfat
sda2 containing both voidpup and easy frugals
sdb1 with no frugals vfat
sdb3 containing both voidpup and easy frugals
sdb4 with no frugals
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 12:57 am
by BarryK
Keef wrote: Tue Jul 05, 2022 8:30 pm
I was on FatDog when I saw this. so tried it there first. I have Win 7 on the first partition and EasyOS, FatDog, FossaPup, studio1337, and ClearOS (frugal install using wiak's weedogit.sh method) on the next partition.
After running the script I just get:
On EasyOS (just did the update to 4.2.3) I get:
Code: Select all
# ./find-installations
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
Found Puppy
Found EasyOS
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
Oh, that's an awkward situation on Fatdog. It has the busybox 'blkid' utility, which does not report PARTUUID -- the full 'blkid' from 'util-linux' is required.
The script detects that you only have the busybox 'blkid', so falls back to reading /dev/disk/by-partuuid. However, it seems that the Fatdog kernel is not configured to display that information. On most Linux distributions, the kernel is configured to display that info -- I don't recall what config settings are required.
@jamesbond
Looks like need to contact the Fatdog devs and ask them to either use the full 'blkid' or change the kernel config, or come up with some other way to read the gpt partition-uuid.
James,
If you read this, notice in the script, I left the fatdog-specific detection empty.
Keef,
I seem to recall, you also do some Fatdog development?
EDIT:
I just remembered, it is not a kernel config, /dev/disk is populated by udev rules
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 1:01 am
by BarryK
williwaw wrote: Tue Jul 05, 2022 10:48 pm
Code: Select all
0 /files/downloads # ./f*
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
Found Puppy
Found EasyOS
0 /files/downloads #
mounted
sda1 with no frugals vfat
sda2 containing both voidpup and easy frugals
sdb1 with no frugals vfat
sdb3 containing both voidpup and easy frugals
sdb4 with no frugals
Voidpup is a frugal install?
Does it have 'initrd.gz' and 'puppy*.sfs'?
How deep are the easy frugals installed?
The script only searches 2-deep, that is, for example, /easyos/dunfell
I could change it to search 3-deep.
EDIT:
Also, only finds Easy frugal with everything in the working partition, working dir.
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 2:55 am
by puddlemoon
Running the script from debian dog bullseye..
Code: Select all
root@live:~/Downloads# ./find-installations
Found Windows
Found Puppy
Found Puppy
Found Puppy
This is partly correct however it does not count the dog i`m booting from which has vmlinuz1 and initrd1.xz in /bullseye/live in the same partition with the other puppies. I have 3 puppiues and d-dog in there. /etc/os-release is a symlink to /usr/lib/os-release.
It also missed two linux installs. One (debian) has initrd.img-5.9.1-rt20avl1 and vmlinuz-5.9.1-rt20avl1. The other (manjaro) has initramfs-5.18-rt-x86_64.img and vmlinuz-5.18-rt-x86_64. In both cases /etc/os-release is also a symlink to /usr/lib/os-release.
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 5:06 am
by williwaw
Code: Select all
0 /files/downloads # ./f*
0 /files/downloads # ./f*
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
ls: cannot access '/dev/disk/by-partuuid/*': No such file or directory
0 /files/downloads #
sda (onboard ssd)
sda1 no installs
sda2 there is a frugal voidpup 1 level down. yes,'initrd.gz' and 'puppy*.sfs' there are no easy frugals, in / or one or two levels down
if I also tether a ssd on a usb cable, and mount sdb2, I show the same results as above.
sdb3 has, at one level down in individual subfolders for each frugal,
2 voidpup
3 easy
1 vanilla
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 9:15 am
by BarryK
puddlemoon wrote: Wed Jul 06, 2022 2:55 am
This is partly correct however it does not count the dog i`m booting from which has vmlinuz1 and initrd1.xz in /bullseye/live in the same partition with the other puppies. I have 3 puppiues and d-dog in there. /etc/os-release is a symlink to /usr/lib/os-release.
It also missed two linux installs. One (debian) has initrd.img-5.9.1-rt20avl1 and vmlinuz-5.9.1-rt20avl1. The other (manjaro) has initramfs-5.18-rt-x86_64.img and vmlinuz-5.18-rt-x86_64. In both cases /etc/os-release is also a symlink to /usr/lib/os-release.
Do the *dogs all have that naming, 'vmlinuz1' and 'initrd1.xz'?
if so, why the "1"? Is it to distinguish from Puppy installs?
For the debian and manjaro installs, are those initrd* and vmlinuz* files in /boot folder in the installation partition?
That is my understanding, that /boot is the standard place for those files.
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 9:18 am
by BarryK
Alfons discovered a bug. The Windows recovery partition has a label with a space character, which breaks the line that parses output of 'blkid'. Fixed. Will update the script soon.
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 9:23 am
by BarryK
williwaw wrote: Wed Jul 06, 2022 5:06 am
if I also tether a ssd on a usb cable, and mount sdb2, I show the same results as above.
sdb3 has, at one level down in individual subfolders for each frugal,
2 voidpup
3 easy
1 vanilla
Note that the script ignores usb drives.
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 10:16 am
by BarryK
There is a post above about failure to find the PARTUUID of a partition.
Tricky situation with pups that only have the busybox 'blkid' and don't have /dev/disk populated.
I have implemented a fallback, to use the 'gdisk' utility:
Code: Select all
#get f.s., label, uuid, and partuuid...
LABEL=''; UUID=''; TYPE=''; PARTUUID=''
#20220706 there is a Microsoft label with a space...
#aBLKID="$(blkid /dev/${aDEV} | tr ' ' '\n'| grep -E '^LABEL=|^UUID=|^TYPE=|^PARTUUID=')"
aBLKID="$(blkid /dev/${aDEV} | sed -e 's%LABEL%\nLABEL%' -e 's%UUID%\nUUID%' -e 's%TYPE%\nTYPE%' -e 's%PARTUUID%\nPARTUUID%' | sed '/^\//d')"
blkid -V | grep -q 'util\-linux'
if [ $? -ne 0 ];then
#the full blkid from util-linux pkg displays the partuuid, busybox blkid doesn't...
if [ -e /dev/disk/by-partuuid ];then
#/dev/disk is populated by udev rules.
PARTUUID="$(ls -l /dev/disk/by-partuuid/* 2>/dev/null | grep "/${aDEV}$" | grep -o 'by\-partuuid/[^ ]*' | cut -f 2 -d '/')"
else
#getting desparate. some pups don't have /dev/disk
if which gdisk >/dev/null ;then
aNUM="${aDEV##*[a-z]}" #extract partition number.
GPARTINFO="$(echo -e "i\n${aNUM}\nq\n" | gdisk /dev/${aDRV} 2>/dev/null)"
PARTUUID="$(echo "$GPARTINFO" | grep '^Partition unique GUID' | rev | cut -f 1 -d ' ' | rev | tr '[A-Z]' '[a-z]')"
fi
fi
fi
If a pup doesn't have 'gdisk', that is unfortunate. But then, you should be running a reasonably modern pup when run the Limine Installer, and it should have gdisk. Maybe not builtin though.
Re: Limine Installer, request for help
Posted: Wed Jul 06, 2022 7:41 pm
by puddlemoon
BarryK wrote: Wed Jul 06, 2022 9:15 am
Do the *dogs all have that naming, 'vmlinuz1' and 'initrd1.xz'?
if so, why the "1"? Is it to distinguish from Puppy installs?
For the debian and manjaro installs, are those initrd* and vmlinuz* files in /boot folder in the installation partition?
That is my understanding, that /boot is the standard place for those files.
I have mostly used bullseye but I checked on another machine a buster-dog which has the same naming as bullseye and an unbuntu-dog install and found the "1" on the initrd but not the vmlinuz. Seems consistent but I can't comment on the reasoning..
Yes, both linux installs have the init* and vmlinuz* files in /boot of their respective partitions.
On this other laptop the script returns to prompt, without errors or output. This machine has 2 dogs, fatdog and puppy in one partition and Arch in another.
Thanks so much for your work on this!
Re: Limine Installer, request for help
Posted: Thu Jul 07, 2022 2:39 am
by BarryK
I have almost completely rewritten the script, using 'lsblk', which is in the 'util-linux' package.
No longer need fdisk, blkid, nor gdisk.
Will upload the new script soon.
Re: Limine Installer, request for help
Posted: Thu Jul 07, 2022 2:50 am
by BarryK
puddlemoon wrote: Wed Jul 06, 2022 2:55 amIn both cases /etc/os-release is also a symlink to /usr/lib/os-release.
@puddlemoon
Thanks very much for the info.
Can you tell me, is /etc/os-release a relative link, or an absolute-path link to /usr/lib/os-release
In Puppy|Easy, with ROX, you mouse-over /etc/os-release, and if it shows link starting with "../" then it is relative.
Re: Limine Installer, request for help
Posted: Thu Jul 07, 2022 9:40 am
by puddlemoon
@BarryK
The links are relative with the leading "../"
Re: Limine Installer, request for help
Posted: Thu Jul 07, 2022 11:09 am
by BarryK
find-installations has been updated, see first post in this thread.
Re: Limine Installer, request for help
Posted: Thu Jul 07, 2022 1:36 pm
by Ramachandra Iyer
./find-installations
Found Windows
Found efi boot partition
Found Easy Dunfell64 4.2.3
Found Puppy vanillaupup 22.04.39
umount: can't unmount /mnt/nvme0n1p6: Resource busy
Found Linux Debian GNU/Linux 11
iNAME='Easy Dunfell64'
iVERSION='4.2.3'
iVMLINUZ='/easyos/vmlinuz'
iINITRD='/easyos/initrd'
iKNAME="nvme0n1p6"
iFSTYPE="ext4"
iPARTFLAGS=""
iTYPE="part"
iUUID="8f0dc1a3-ef22-48b1-97d7-80cf42195846"
iPARTUUID="7eef90f7-8243-42cb-98ea-f6736db46568"
iLABEL="200322a"
iMOUNTPOINT=""
iPTTYPE="gpt"
iHOTPLUG="0"
iROTA="0"
iDRIVE='nvme0n1'
iPATH='/easyos'
NAME='Puppy Linux vanillaupup'
iVERSION='22.04.39'
iVMLINUZ='/.Trash-0/files/vmlinuz'
iINITRD='/.Trash-0/files/initrd.gz'
iKNAME="nvme0n1p6"
iFSTYPE="ext4"
iPARTFLAGS=""
iTYPE="part"
iUUID="8f0dc1a3-ef22-48b1-97d7-80cf42195846"
iPARTUUID="7eef90f7-8243-42cb-98ea-f6736db46568"
iLABEL="200322a"
iMOUNTPOINT=""
iPTTYPE="gpt"
iHOTPLUG="0"
iROTA="0"
iDRIVE='nvme0n1'
iPATH='/.Trash-0/files
NB. How to make use of above output in lamine.cfg
Re: Limine Installer, request for help
Posted: Thu Jul 07, 2022 7:15 pm
by puddlemoon
Super!
Code: Select all
root# ./find-installations
Found Puppy jackalpup-0.0 jackalpup-0.0
Found Puppy jackalpup-0.0 jackalpup-0.0
Found Puppy jackalpup-0.0 jackalpup-0.0
Found Dog
Found Dog
Found Dog
Found Fatdog
Found Linux Arch Linux
Found efi boot partition
I have only one install of jackalpup but I have a puppylivecdbuild still populated in /mnt/home so I'm guessing it found that. I also have a studio 1337 frugal but the main sfs has been renamed to exclude "puppy" (for business purposes I'm guessing). So not being a puppy*.sfs perhaps took on the nearest?
Re: Limine Installer, request for help
Posted: Thu Jul 07, 2022 10:55 pm
by williwaw
Re: Limine Installer, request for help
Posted: Fri Jul 08, 2022 8:20 pm
by williwaw
Edit: script correctly found both installs 2 levels down
0 /mnt/sda2/files/downloads # ./f*
Found Puppy vanilladpup 9.2.4
Found Puppy vpup64 22.02
0 /mnt/sda2/files/downloads #
Re: Limine Installer, request for help
Posted: Sat Jul 09, 2022 10:13 am
by BarryK
The limine-installer PET will have /usr/local/limine-installer folder, with scripts inside. So far:
depend-checks
find-installations
generate-menu-entry
limine-installer
What it is doing so far, is 'limine-installer' calls 'find-installations', then brings up a gui with checkboxes, so you choose which of the found OSs you want to create Limine menu entries for, then calls 'generate-menu-entry' for the ticked checkboxes, then brings up the result in a text editor.
So, no actual install, hope to get onto that sometime. Anyway, the current status, having the entries created, that you can just insert into 'limine.cfg' is quite useful.
I have set aside a PC just for installing different Linux distros, so I can see exactly what their layout is. Have started with Debian, downloaded the "netinstall" iso from here:
https://cdimage.debian.org/cdimage/unof ... 64/iso-cd/
...in retrospect, should have just downloaded a full CD/DVD iso, as this thing has been downloading packages for the last hour, and the progress bar hasn't even reached halfway.
Re: Limine Installer, request for help
Posted: Sat Jul 09, 2022 10:37 am
by BarryK
I have another request. I want to detect whether the computer has UEFI-BIOS or legacy-BIOS firmware.
I found that running this:
Code: Select all
# dmidecode --type bios
...
UEFI is supported
But, do all UEFI-BIOS firmware return that string?
Would you mind running that command on your PC with UEFI-firmware to confirm?
Note, all x86 computers manufactured from 2012 have UEFI-firmware.
Re: Limine Installer, request for help
Posted: Sat Jul 09, 2022 11:06 am
by fredx181
BarryK wrote:Would you mind running that command on your PC with UEFI-firmware to confirm?
For me it does return that string on a Asus SonicMaster laptop.
Re: Limine Installer, request for help
Posted: Sat Jul 09, 2022 1:09 pm
by wiak
I do get that in the list of strings produced when that command run on HP Probook G8 430
Re: Limine Installer, request for help
Posted: Sat Jul 09, 2022 5:44 pm
by williwaw
lenovo X-250 includes the string
lenovo T-420 does not in spite of both the following settings in bios setup chosen ...
UEFI/Legacy Boot [ BOTH]
UEFI/Legacy Boot Priority [UEFI First]
Re: Limine Installer, request for help
Posted: Sat Jul 09, 2022 5:46 pm
by williwaw
Code: Select all
# dmidecode --type bios
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.6 present.
Handle 0x0010, DMI type 0, 24 bytes
BIOS Information
Vendor: LENOVO
Version: 83ET66WW (1.36 )
Release Date: 10/31/2011
Address: 0xE0000
Runtime Size: 128 kB
ROM Size: 8192 kB
Characteristics:
PCI is supported
PNP is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
EDD is supported
3.5"/720 kB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
CGA/mono video services are supported (int 10h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
BIOS Revision: 1.36
Firmware Revision: 1.17
Handle 0x002E, DMI type 13, 22 bytes
BIOS Language Information
Language Description Format: Abbreviated
Installable Languages: 1
en-US
Currently Installed Language: en-US
Re: Limine Installer, request for help
Posted: Sun Jul 10, 2022 1:08 pm
by rudyt
BarryK wrote: Sat Jul 09, 2022 10:37 am
I have another request. I want to detect whether the computer has UEFI-BIOS or legacy-BIOS firmware.
I found that running this:
Code: Select all
# dmidecode --type bios
...
UEFI is supported
But, do all UEFI-BIOS firmware return that string?
Would you mind running that command on your PC with UEFI-firmware to confirm?
Note, all x86 computers manufactured from 2012 have UEFI-firmware.
CONFIRMED for Dell Latitude E7250 with BIOS dated 2020. As i boot up some of my lesser used computers, I'll report back my findings.
Re: Limine Installer, request for help
Posted: Sun Jul 10, 2022 5:13 pm
by TerryH
UEFI is supported is returned on my 2021 ASUS ZenBook laptop
Re: Limine Installer, request for help
Posted: Mon Jul 11, 2022 5:51 am
by BarryK
Re: Limine Installer, request for help
Posted: Sat Jul 16, 2022 2:46 am
by BarryK
Attachment for Alfons, as wasn't able to email a tarball with gmail.