Further work on the Intergration of Grub2config in KLV's

Moderator: Forum moderators

Post Reply
User avatar
rockedge
Site Admin
Posts: 6813
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2965 times
Been thanked: 2793 times
Contact:

Further work on the Intergration of Grub2config in KLV's

Post by rockedge »

We do have a working version of Grub2config in KLV-Airedale and KLV-Spectr so it is planned to install the program in KLV-Boxer. There has been some recent work done to the Grub2config script to update the program for Puppy Linux so to stay up-to-date I am looking at including those in the KLV version, which uses just about the same code.

Some small syntax fixes in probedisk seem to have straightened out the few errors generated. I have not integrated Grub2config in the KLV-Boxer PLUG fully yet but have it apparently working on a KLV-Boxer Pseudo Full Install (PFI) type installation.

command to identify WM_Class:

Code: Select all

xprop | grep "WM_CLASS"
WM_CLASS(STRING) =

using probedisk and probedisk2:

Screenshot(11).jpg
Screenshot(11).jpg (70.35 KiB) Viewed 1286 times

Grub2config-2.0.8 running on KLV-Boxer-rc5-PFI

Screenshot(12).jpg
Screenshot(12).jpg (23.84 KiB) Viewed 1286 times
Screenshot(13).jpg
Screenshot(13).jpg (25.61 KiB) Viewed 1286 times

Notice how dark the Rox pinboard desktop is caused by picom. The Conky clock is transparent and working.

User avatar
Sofiya
Posts: 2371
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1617 times

Re: Further work on the Intergration of Grub2config in KLV's

Post by Sofiya »

:thumbup:

Attachments
Screenshot.png
Screenshot.png (149.54 KiB) Viewed 1242 times

KL-Linux
KL LINUX Simple fast free

User avatar
rockedge
Site Admin
Posts: 6813
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2965 times
Been thanked: 2793 times
Contact:

Re: Further work on the Intergration of Grub2config in KLV's

Post by rockedge »

With advice from @Sofiya I have gone with xcompmgr to supply a compositor for KLV-Boxer which seems to work as expected.

There is an error appearing in runs of Grub2config-2.0.8 which seems to involve a missing function call

Code: Select all

/usr/bin/grub2config: line 837: guess_fstype: command not found

around line 837:

Code: Select all

if  [ "$BOOTPART"  ]; then
	TOFS=$(guess_fstype /dev/$BOOTPART) || fatal "Failed to guess_fstype /dev/$BOOTPART"
fi

I can't seem to find any other reference, calls or actual code for guess_fstype

User avatar
Sofiya
Posts: 2371
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1617 times

Re: Further work on the Intergration of Grub2config in KLV's

Post by Sofiya »

rockedge wrote: Tue Sep 03, 2024 12:32 pm

With advice from @Sofiya I have gone with xcompmgr to supply a compositor for KLV-Boxer which seems to work as expected.

There is an error appearing in runs of Grub2config-2.0.8 which seems to involve a missing function call

Code: Select all

/usr/bin/grub2config: line 837: guess_fstype: command not found

around line 837:

Code: Select all

if  [ "$BOOTPART"  ]; then
	TOFS=$(guess_fstype /dev/$BOOTPART) || fatal "Failed to guess_fstype /dev/$BOOTPART"
fi

I can't seem to find any other reference, calls or actual code for guess_fstype

guess_fstype -- command "/bin/busybox"

create a link to ( /bin/busybox ) named ( guess_fstype ) :ugeek: :geek: and everything should be okay

Attachments
2024-09-03_17-27.png
2024-09-03_17-27.png (241.62 KiB) Viewed 1208 times

KL-Linux
KL LINUX Simple fast free

User avatar
rockedge
Site Admin
Posts: 6813
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2965 times
Been thanked: 2793 times
Contact:

Re: Further work on the Intergration of Grub2config in KLV's

Post by rockedge »

@Sofiya Looks like the version of busybox does not have the function!
Currently defined functions:

Code: Select all

acpid, add-shell, addgroup, adduser, adjtimex, ar, arch, arp, arping, ascii, ash, awk, base32, base64, basename, bc, blkdiscard, blkid,
blockdev, bootchartd, brctl, bunzip2, bzcat, bzip2, cal, cat, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear,cmp, comm, conspy, cp, cpio, crc32, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df,dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, dpkg, dpkg-deb, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir,envuidgid, expand, expr, factor, fakeidentd, fallocate, false, fatattr, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs,
flash_eraseall, flash_lock, flash_unlock, flashcp, flock, fold, free, freeramdisk, fsck, fsck.minix, fsfreeze, fstrim, fsync, ftpd, ftpget, ftpput,
fuser, getopt, getty, grep, groups, gunzip, gzip, halt, hd, hdparm, head, hexdump, hexedit, hostid, hostname, httpd, hush, hwclock, i2cdump, i2cget,i2cset, i2ctransfer, id, ifconfig, ifenslave, ifplugd, inetd, init, inotifyd, insmod, install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs,iplink, ipneigh, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last, less, link, linux32, linux64, linuxrc, ln, loadfont,
loadkmap, logger, login, logname, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof, lspci, lsscsi, lsusb, lzcat, lzma, lzop, lzopcat, makedevs,
makemime, man, md5sum, mdev, mesg, microcom, mim, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.reiser, mkfs.vfat, mknod, mkpasswd,	mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mt, mv, nameif, nbd-client, nc, netstat, nice, nl, nmeter, nohup, nologin,nproc, nsenter, nslookup, ntpd, nuke, od, openvt, partprobe, passwd, paste, patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root, pkill,pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate, rdev, readlink, readprofile, realpath,reboot, reformime, remove-shell, renice, reset, resize, resume, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-init, run-parts, runlevel,runsv, runsvdir, rx, script, scriptreplay, sed, sendmail, seq, setarch, setconsole, setfattr, setfont, setkeycodes, setlogcons, setpriv, setserial,setsid, setuidgid, sh, sha1sum, sha256sum, sha3sum, sha512sum, showkey, shred, shuf, slattach, sleep, smemcap, softlimit, sort, split, ssl_client,start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svc, svlogd, svok, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail,tar, taskset, tc, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true, truncate, ts, tty,ttysize, tunctl, tune2fs, ubiattach, ubidetach, ubimkvol, ubirename, ubirmvol, ubirsvol, ubiupdatevol, udhcpc, udhcpc6, udhcpd, udpsvd, uevent,umount, uname, uncompress, unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unshare, unxz, unzip, uptime, users, usleep, uudecode, uuencode,vconfig, vi, vlock, volname, w, wall, watch, watchdog, wc, wget, which, who, whoami, whois, xargs, xxd, xz, xzcat, yes, zcat, zcip

Checking with OctoXBPS shows that busybox is not installed so it appears during the original build the static busybox which does not include the function remains the installed version.

I will test by installing busybox..............might be a disaster but we'll see......

User avatar
Sofiya
Posts: 2371
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1617 times

Re: Further work on the Intergration of Grub2config in KLV's

Post by Sofiya »

rockedge wrote: Tue Sep 03, 2024 3:29 pm

@Sofiya Looks like the version of busybox does not have the function!
Currently defined functions:

Code: Select all

acpid, add-shell, addgroup, adduser, adjtimex, ar, arch, arp, arping, ascii, ash, awk, base32, base64, basename, bc, blkdiscard, blkid,
blockdev, bootchartd, brctl, bunzip2, bzcat, bzip2, cal, cat, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear,cmp, comm, conspy, cp, cpio, crc32, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, devmem, df,dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, dpkg, dpkg-deb, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env, envdir,envuidgid, expand, expr, factor, fakeidentd, fallocate, false, fatattr, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs,
flash_eraseall, flash_lock, flash_unlock, flashcp, flock, fold, free, freeramdisk, fsck, fsck.minix, fsfreeze, fstrim, fsync, ftpd, ftpget, ftpput,
fuser, getopt, getty, grep, groups, gunzip, gzip, halt, hd, hdparm, head, hexdump, hexedit, hostid, hostname, httpd, hush, hwclock, i2cdump, i2cget,i2cset, i2ctransfer, id, ifconfig, ifenslave, ifplugd, inetd, init, inotifyd, insmod, install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs,iplink, ipneigh, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last, less, link, linux32, linux64, linuxrc, ln, loadfont,
loadkmap, logger, login, logname, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof, lspci, lsscsi, lsusb, lzcat, lzma, lzop, lzopcat, makedevs,
makemime, man, md5sum, mdev, mesg, microcom, mim, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix, mkfs.reiser, mkfs.vfat, mknod, mkpasswd,	mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mt, mv, nameif, nbd-client, nc, netstat, nice, nl, nmeter, nohup, nologin,nproc, nsenter, nslookup, ntpd, nuke, od, openvt, partprobe, passwd, paste, patch, pgrep, pidof, ping, ping6, pipe_progress, pivot_root, pkill,pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate, rdev, readlink, readprofile, realpath,reboot, reformime, remove-shell, renice, reset, resize, resume, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-init, run-parts, runlevel,runsv, runsvdir, rx, script, scriptreplay, sed, sendmail, seq, setarch, setconsole, setfattr, setfont, setkeycodes, setlogcons, setpriv, setserial,setsid, setuidgid, sh, sha1sum, sha256sum, sha3sum, sha512sum, showkey, shred, shuf, slattach, sleep, smemcap, softlimit, sort, split, ssl_client,start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svc, svlogd, svok, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail,tar, taskset, tc, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true, truncate, ts, tty,ttysize, tunctl, tune2fs, ubiattach, ubidetach, ubimkvol, ubirename, ubirmvol, ubirsvol, ubiupdatevol, udhcpc, udhcpc6, udhcpd, udpsvd, uevent,umount, uname, uncompress, unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unshare, unxz, unzip, uptime, users, usleep, uudecode, uuencode,vconfig, vi, vlock, volname, w, wall, watch, watchdog, wc, wget, which, who, whoami, whois, xargs, xxd, xz, xzcat, yes, zcat, zcip

Checking with OctoXBPS shows that busybox is not installed so it appears during the original build the static busybox which does not include the function remains the installed version.

I will test by installing busybox..............might be a disaster but we'll see......

it is quite possible because you are trying to install Ubuntu software . I wouldn't be surprised if Void busybox doesn't have this command

KL-Linux
KL LINUX Simple fast free

User avatar
rockedge
Site Admin
Posts: 6813
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2965 times
Been thanked: 2793 times
Contact:

Re: Further work on the Intergration of Grub2config in KLV's

Post by rockedge »

@Sofiya The Void Linux busybox does not have the commands fgconsole or guess_fstype but KLV-Airedale's busybox does ?? How does the Ubuntu busybox appear on any KLV?

I copied the KLV-Airedale busybox and Grub2config works on KLV-Boxer. The KLV-Airedale is an older version.

Something is not right.......

Grub2config is written for Puppy Linux though.....

User avatar
Sofiya
Posts: 2371
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1617 times

Re: Further work on the Intergration of Grub2config in KLV's

Post by Sofiya »

rockedge wrote: Tue Sep 03, 2024 4:19 pm

@Sofiya The Void Linux busybox does not have the commands fgconsole or guess_fstype but KLV-Airedale's busybox does ?? How does the Ubuntu busybox appear on any KLV?

I copied the KLV-Airedale busybox and Grub2config works on KLV-Boxer. The KLV-Airedale is an older version.

Something is not right.......

Grub2config is written for Puppy Linux though.....

Since there is no "guess_fstype" in Void, I could only suggest this
remove the false .false.gz
put it in /usr/bin

Attachments
guess_fstype.falsе.gz
(335 Bytes) Downloaded 58 times
Screenshot (copy 1).png
Screenshot (copy 1).png (302.16 KiB) Viewed 1173 times

KL-Linux
KL LINUX Simple fast free

User avatar
Sofiya
Posts: 2371
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1617 times

Re: Further work on the Intergration of Grub2config in KLV's

Post by Sofiya »

in general, a bootloader is such a specific thing that is individual for each system :ugeek:

Attachments
Screenshot.png
Screenshot.png (344.39 KiB) Viewed 1165 times

KL-Linux
KL LINUX Simple fast free

User avatar
Sofiya
Posts: 2371
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1617 times

Re: Further work on the Intergration of Grub2config in KLV's

Post by Sofiya »

For the sake of interest, I downloaded a full Ubuntu distribution, there is no "guess_fstype" there either. I assume that in Puppy Linux "busybox" is patched :ugeek:

KL-Linux
KL LINUX Simple fast free

User avatar
rockedge
Site Admin
Posts: 6813
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2965 times
Been thanked: 2793 times
Contact:

Re: Further work on the Intergration of Grub2config in KLV's

Post by rockedge »

KLV-Airedale version is BusyBox v1.31.0 it has no guess_fstype
KLV-Spectr version is BusyBox v1.35.0 it has no guess_fstype
Puppy Linux NoblePup64 version is BusyBox v1.36.1 it has guess_fstype

User avatar
rockedge
Site Admin
Posts: 6813
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2965 times
Been thanked: 2793 times
Contact:

Re: Further work on the Intergration of Grub2config in KLV's

Post by rockedge »

@Sofiya You're correct....it is a patch -> https://github.com/puppylinux-woof-CE/w ... 256.sum#L2

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

Re: Further work on the Intergration of Grub2config in KLV's

Post by wiak »

rockedge wrote: Wed Sep 04, 2024 12:04 am

@Sofiya You're correct....it is a patch -> https://github.com/puppylinux-woof-CE/w ... 256.sum#L2

That's typical Puppy for you. Let's write a patch that isn't needed and other distros don't provide and then write utilities that use it so only work in Puppy without manufacturing a workaround equivalent. And referred to here: https://bkhome.org/news/202206/guessfst ... moved.html

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

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

Re: Further work on the Intergration of Grub2config in KLV's

Post by wiak »

I don't know Grub2config requirements. For example if it needs to handle multiple boot devices like that patch allows for. But if it only needs a single shot one boot device check you probably could use a simple "guess_fstype" script - could use or modify/simplify/expand the attached (remove the dummy tar and place in executable PATH somewhere, but watch not to overwrite Puppy-style guess_fstype; I'm assuming you don't have that...). Probably could just use /bin/sh; I just put /bin/bash cos didn't feel like working that out...

But do understand, this is just a simple one-shot quickie that may not be applicable to Grub2config needs. It is not the multi-bootdev params capable patch version though you could always re-write it to provide the same. Better that, it seems to me, than have to have a specially patched busybox (sigh).

Attachments
guess_fstype.tar
(916 Bytes) Downloaded 39 times

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

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

Re: Further work on the Intergration of Grub2config in KLV's

Post by wiak »

But I forgot to say that the guess_fstype script I included was just simple example since I already used such code, but I expect the above BarryK blog one I pointed to is more complete replacement. I haven't tried it, but presumably fits the grub2config needs.

EDIT: I looked at Barry's code now. Yes same basically. Mine is long winded because was for different purpose where I needed to do different things in case statement parts (mount format parameters in FR initrd).

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

User avatar
rockedge
Site Admin
Posts: 6813
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2965 times
Been thanked: 2793 times
Contact:

Re: Further work on the Intergration of Grub2config in KLV's

Post by rockedge »

@wiak exaclty what I did! I used a [c]guess_fstype[/c] script that @Sofiya provided in another post.

It works well and I tested using the Void Linux repo busybox. So using the Puppy Linux version substituted in KLV works but to avoid that these guess_fstype scripts bring Grub2config to successfully install a boot loader.

Only thing now is to add code to identify a KLV and write the those boot stanza's. Right now I just am using Grub2config to install the boot loader and menu then using wd_grubconfig to generate the boot stanza's and I manually insert them.

Mine is long winded because was for different purpose where I needed to do different things in case statement parts (mount format parameters in FR initrd).

This might be the way to integrate Grub2config more into KLV variants!

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

Re: Further work on the Intergration of Grub2config in KLV's

Post by wiak »

I see @shinobar has now updated grub2config such that doesnt need guess_fstype

EDIT: Sofiya reports doesnt work with Void Linux based builds

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

User avatar
Sofiya
Posts: 2371
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1617 times

Re: Further work on the Intergration of Grub2config in KLV's

Post by Sofiya »

wiak wrote: Thu Sep 05, 2024 8:30 am

I see @shinobar has now updated grub2config such that doesnt need guess_fstype

this won't work for Void :ugeek:

KL-Linux
KL LINUX Simple fast free

User avatar
Sofiya
Posts: 2371
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1617 times

Re: Further work on the Intergration of Grub2config in KLV's

Post by Sofiya »

rockedge wrote: Wed Sep 04, 2024 1:58 pm

@wiak exaclty what I did! I used a [c]guess_fstype[/c] script that @Sofiya provided in another post.

It works well and I tested using the Void Linux repo busybox. So using the Puppy Linux version substituted in KLV works but to avoid that these guess_fstype scripts bring Grub2config to successfully install a boot loader.

Only thing now is to add code to identify a KLV and write the those boot stanza's. Right now I just am using Grub2config to install the boot loader and menu then using wd_grubconfig to generate the boot stanza's and I manually insert them.

Mine is long winded because was for different purpose where I needed to do different things in case statement parts (mount format parameters in FR initrd).

This might be the way to integrate Grub2config more into KLV variants!

@rockedge
install xbps-install -Su efibootmgr util-linux -- missing element for grub2 config
in (util-linux) there is an element that we need " blkid "

add " gtk2dialog " to have a nice window

in grub2config and grub4dosconfig

grub2config line 611 ( v2.0.1 ) ------- line 634 ( v2.0.8 )
grub4dosconfig line 563 ( v1.9.4 )

Attachments
Screenshot(2).png
Screenshot(2).png (330.73 KiB) Viewed 983 times
grub2config
grub2config
GRUB2config.png (52.74 KiB) Viewed 983 times
grub4dosconfig
grub4dosconfig
GRUB4dosconfig.png (46.45 KiB) Viewed 983 times

KL-Linux
KL LINUX Simple fast free

Post Reply

Return to “KL-Dev_Work”