Page 1 of 1

Further work on the Intergration of Grub2config in KLV's

Posted: Mon Sep 02, 2024 5:18 pm
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 1306 times

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

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

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


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

Posted: Tue Sep 03, 2024 12:05 am
by Sofiya

:thumbup:


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

Posted: Tue Sep 03, 2024 12:32 pm
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


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

Posted: Tue Sep 03, 2024 2:23 pm
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


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

Posted: Tue Sep 03, 2024 3:29 pm
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......


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

Posted: Tue Sep 03, 2024 3:57 pm
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


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

Posted: Tue Sep 03, 2024 4:19 pm
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.....


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

Posted: Tue Sep 03, 2024 6:09 pm
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


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

Posted: Tue Sep 03, 2024 6:29 pm
by Sofiya

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


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

Posted: Tue Sep 03, 2024 9:06 pm
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:


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

Posted: Tue Sep 03, 2024 11:55 pm
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


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

Posted: Wed Sep 04, 2024 12:04 am
by rockedge

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


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

Posted: Wed Sep 04, 2024 11:17 am
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


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

Posted: Wed Sep 04, 2024 12:21 pm
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).


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

Posted: Wed Sep 04, 2024 1:42 pm
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).


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

Posted: Wed Sep 04, 2024 1:58 pm
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!


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

Posted: Thu Sep 05, 2024 8:30 am
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


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

Posted: Thu Sep 05, 2024 10:28 am
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:


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

Posted: Thu Sep 05, 2024 10:58 am
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 )