Limine Installer, request for help

Moderator: BarryK

Post Reply
User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Limine Installer, request for help

Post 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.

Attachments
find-installations.gz
remove false .gz
(10.2 KiB) Downloaded 60 times
User avatar
Keef
Posts: 244
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 66 times

Re: Limine Installer, request for help

Post 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:

Code: Select all

Found Puppy
Found EasyOS

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

williwaw
Posts: 1495
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 136 times
Been thanked: 262 times

Re: Limine Installer, request for help

Post 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

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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:

Code: Select all

Found Puppy
Found EasyOS

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

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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.

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Limine Installer, request for help

Post 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.

williwaw
Posts: 1495
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 136 times
Been thanked: 262 times

Re: Limine Installer, request for help

Post 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

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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.

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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.

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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.

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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.

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Limine Installer, request for help

Post 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!

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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.

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post by BarryK »

puddlemoon wrote: Wed Jul 06, 2022 2:55 am

In 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.

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Limine Installer, request for help

Post by puddlemoon »

@BarryK
The links are relative with the leading "../"

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post by BarryK »

find-installations has been updated, see first post in this thread.

Ramachandra Iyer
Posts: 139
Joined: Wed Apr 07, 2021 12:11 pm
Has thanked: 84 times
Been thanked: 4 times

Re: Limine Installer, request for help

Post 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

User avatar
puddlemoon
Posts: 189
Joined: Sun Sep 06, 2020 9:26 pm
Location: In between
Has thanked: 89 times
Been thanked: 64 times

Re: Limine Installer, request for help

Post 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?

williwaw
Posts: 1495
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 136 times
Been thanked: 262 times

Re: Limine Installer, request for help

Post by williwaw »

.

Last edited by williwaw on Fri Jul 08, 2022 8:22 pm, edited 2 times in total.
williwaw
Posts: 1495
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 136 times
Been thanked: 262 times

Re: Limine Installer, request for help

Post 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 #

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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.

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post 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.

User avatar
fredx181
Posts: 2436
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 250 times
Been thanked: 923 times
Contact:

Re: Limine Installer, request for help

Post 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.

User avatar
wiak
Posts: 3538
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 55 times
Been thanked: 957 times
Contact:

Re: Limine Installer, request for help

Post by wiak »

I do get that in the list of strings produced when that command run on HP Probook G8 430

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

williwaw
Posts: 1495
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 136 times
Been thanked: 262 times

Re: Limine Installer, request for help

Post 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]

williwaw
Posts: 1495
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 136 times
Been thanked: 262 times

Re: Limine Installer, request for help

Post 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
User avatar
rudyt
Posts: 25
Joined: Tue Sep 21, 2021 1:19 am
Location: Montreal, Canada
Been thanked: 1 time

Re: Limine Installer, request for help

Post 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.

EasyOS - Frugal install on Dell laptop in shared partition

TerryH
Posts: 549
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 75 times
Been thanked: 118 times

Re: Limine Installer, request for help

Post by TerryH »

UEFI is supported is returned on my 2021 ASUS ZenBook laptop

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post by BarryK »

Thanks for the feedback!

There is now a PET:

https://forum.puppylinux.com/viewtopic.php?t=6323

User avatar
BarryK
Posts: 2167
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 93 times
Been thanked: 514 times

Re: Limine Installer, request for help

Post by BarryK »

Attachment for Alfons, as wasn't able to email a tarball with gmail.

Attachments
limine-3.12-amd64-cutdown.tar.gz
(201.72 KiB) Downloaded 33 times
Post Reply

Return to “EasyOS”