To all:
Most of the coding credit for this update belongs to the modest @radky. I only started the ball rolling.
Credit is also due to @fr-ke and @muggins for their testing and great feedback during debugging.
Thanks
wizard
Moderator: Forum moderators
To all:
Most of the coding credit for this update belongs to the modest @radky. I only started the ball rolling.
Credit is also due to @fr-ke and @muggins for their testing and great feedback during debugging.
Thanks
wizard
Big pile of OLD computers
@mikeslr
Mike, think you can mark this one as solved.
Thanks
wizard
Big pile of OLD computers
@radky grub2config-2.0.2_Beta1.pet was tested on a Lenovo ThinkPad T580.
GPT device, nvme 500GB, OS: F64CE and BW64_10.0.6
Boot works, everything is fine everything is fine regarding nvme.
One thing though: a partition is offered in the selection window that doesn't exist, sdb, see screenshot3
Selecting this partition terminates the process without further notification.
However, Gparted still recognizes one partition?
same with grub2 config-ver-radky grub2 config
@fr-ke
Your report is very much appreciated.
After launching grub2config, the initial GUI shows drives (not partitions) detected on your system by the probedisk and parted utilities. Drive size and drive description are provided by parted.
In your screenshots, grub2config defines the following drives:
1 - nvme0n1|512GB: WDC PC SN720 SDAQNTW-512G-1001
2 - sdb|?: Generic-SD/MMC(Removable)
If the above information is correct, your sdb drive is defined as SD/MMC but it seems probing by the parted utility finds no detectable size for the SD card (? no contents).
If this is accurate, is it possible your SD card on sdb is damaged and unreadable (perhaps bad sectors or a corrupt file system format) ??
In a terminal, maybe the following would provide more information for your sdb drive:
parted /dev/sdb print
The above code on my Lenovo laptop (with SD card on sdb) shows the following:
Code: Select all
# parted /dev/sdb print
Model: Generic- SD/MMC/MS PRO (scsi)
Disk /dev/sdb: 31.1GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 31.1GB 31.1GB primary fat32
@radky If the SD card slot is empty, the output of parted /dev/sda print is:
Code: Select all
Error: Error opening /dev/sda: No medium found
In /dev there is an entry "sda Blck 0 B rw-,rw-,rw-/---- root disk" after every start,
If other devices are connected, it can also be sdb or sdc etc.
If there is a card in the SD card slot:
Code: Select all
[# parted /dev/sda print
Model: Generic SD/MMC (scsi)
Disk /dev/sda: 31.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk flags:
Number Start End Size Type File system Flags
1 4194kB 31.9GB 31.9GB primary fat32 lba
#/code]
If I understand correctly, you previously installed Puppy via Grub2, then subsequently deleted Puppy and/or the Linux partition containing Puppy. If this is the case, possibly your current "ghost" entries are referenced in residual bootloader files of the (non-deleted) EFI boot partition created by the initial Grub2 installation.
Yes, I had previously installed via Gyrog's FrugalPup installer, but couldn't get it to boot, so started using Limine instead. But last week, in efforts to
play with grub2config, I managed to wipe one of my nvme drives, and the grub ghost entries are gone! However I still can't get it to boot with
error message No such device 159xxxxx, where 159xxxxx is the correct uuid according to blkid.
Finally, after playing around with grub console, and it giving me "unknown file system" errors, it dawned on me that having ext4 partitions was the problem.
( I reread the thread & see Rockedge was also having problems with ext4.)
So I reformatted a drive to exr3 & successfully booted using Grub2Config.
fr-ke wrote: Thu Mar 28, 2024 9:08 amIf the SD card slot is empty, the output of parted /dev/sda print is:
Code: Select all
Error: Error opening /dev/sda: No medium found
In /dev there is an entry "sda Blck 0 B rw-,rw-,rw-/---- root disk" after every start,
If other devices are connected, it can also be sdb or sdc etc.
@fr-ke
A quick internet search returns a few cases similar to your report, where (on some systems) an empty SD card reader is detected as a drive (such as sdb) with 0 byte size.
In a terminal, maybe you could run lsblk
to check how block devices are registered on your system. Specifically, check the status of your SD card reader, both with and without an SD card inserted. If lsblk detects your empty SD card reader as a 0 byte drive, I assume other utilities such as parted might also report this 'phantom' drive.
For example, a recent report describes a similar case of a 'phantom' sdb drive (0 byte size) when the SD card reader is empty. The user provides a screenshot which shows the lsblk report of the sdb drive, first without and then with an SD card in the reader.
@radky
lsblk without SD card inserted:
Code: Select all
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 445.8M 1 loop /initrd/pup_ro2
loop1 7:1 0 15M 1 loop /initrd/pup_k
loop2 7:2 0 109.3M 1 loop /initrd/pup_f
loop3 7:3 0 71.6M 1 loop /initrd/pup_z
loop4 7:4 0 8.2M 1 loop /initrd/pup_b
loop5 7:5 0 272M 1 loop /initrd/pup_y
loop6 7:6 0 27.1M 1 loop /initrd/pup_a
sda 8:0 1 0B 0 disk
zram0 254:0 0 15.1G 0 disk [SWAP]
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 100M 0 part
└─nvme0n1p2 259:2 0 476.8G 0 part /mnt/home
#
GParted doesn't recognize sda
fdisk -l does not show sda
FrugalPup installer does not offer sda1
lsblk with SD card inserted:
Code: Select all
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 445.8M 1 loop /initrd/pup_ro2
loop1 7:1 0 15M 1 loop /initrd/pup_k
loop2 7:2 0 109.3M 1 loop /initrd/pup_f
loop3 7:3 0 71.6M 1 loop /initrd/pup_z
loop4 7:4 0 8.2M 1 loop /initrd/pup_b
loop5 7:5 0 272M 1 loop /initrd/pup_y
loop6 7:6 0 27.1M 1 loop /initrd/pup_a
sda 8:0 1 0B 0 disk
sdb 8:16 0 465.8G 0 disk
└─sdb1 8:17 0 465.8G 0 part
zram0 254:0 0 15.1G 0 disk [SWAP]
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 100M 0 part
└─nvme0n1p2 259:2 0 476.8G 0 part /mnt/home
#
GParted recognizes sda
fdisk -l shows sda
FrugalPup installer offers sda1
@radky
I mistakenly uploaded the result twice without an SD card inserted, please excuse me.
The correct result of lsblk with SD card inserted is:
Code: Select all
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 445.8M 1 loop /initrd/pup_ro2
loop1 7:1 0 15M 1 loop /initrd/pup_k
loop2 7:2 0 109.3M 1 loop /initrd/pup_f
loop3 7:3 0 71.6M 1 loop /initrd/pup_z
loop4 7:4 0 8.2M 1 loop /initrd/pup_b
loop5 7:5 0 272M 1 loop /initrd/pup_y
loop6 7:6 0 27.1M 1 loop /initrd/pup_a
sda 8:0 1 29.7G 0 disk
└─sda1 8:1 1 29.7G 0 part
zram0 254:0 0 15.1G 0 disk [SWAP]
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 100M 0 part
└─nvme0n1p2 259:2 0 476.8G 0 part /mnt/home
#
@fr-ke
Based on your lsblk report, the laptop SD reader (when empty) is recognized as a block device of 0 byte size. In this case, it may appear as a phantom (inaccessisble) device in Grub2config.
To address this scenario, when Grub2config probes available drives we could add a simple test for drive size to exclude devices of 0 or indeterminate size (as defined by the parted utility).
Please insert the following code at line 727 of grub2config-2.0.2_Beta1:
Code: Select all
[ "$DRIVESIZE" ] || continue
so lines 726-728 will look like this:
Code: Select all
DRIVESIZE=$(parted /dev/$DRIVE print| grep -m1 '^Disk'| awk -F' ' '{print $NF}')
[ "$DRIVESIZE" ] || continue
DRIVEINFO="${DRIVESIZE}:_$(echo "$L" | cut -d'|' -f3 )"
@radky
DRIVESIZE=$(parted /dev/$DRIVE print| grep -m1 '^Disk'| awk -F' ' '{print $NF}')
[ "$DRIVESIZE" ] || continue
DRIVEINFO="${DRIVESIZE}:_$(echo "$L" | cut -d'|' -f3 )"
With these changes, grub2config-2.0.2_Beta1 now works with my t580.
@muggins wrote: Finally, after playing around with grub console, and it giving me "unknown file system" errors, it dawned on me that having ext4 partitions was the problem.... So I reformatted a drive to ext3 & successfully booted using Grub2Config.
@fr-ke wrote: With these changes, grub2config-2.0.2_Beta1 now works with my t580
---
Thanks for confirming success with Grub2config.
If there are no additional bug reports, grub2config-2.0.2 (Final) will be released soon.
@radky
Back at home on the desktop, Grub2config-2.0.2 produces a different result than on the laptop.
The menu items will be cut off. (see screenshot)
It was installed on a completely empty boot partition - no artifacts from a pre-installation.
Screen: Eizo FlexScan EV2480
Code: Select all
▶—— Video Summary ——◀
Display Specifications
• Screen Name DP2
• Screen VertRefresh 60.00 times/s
• Screen Resolution 1920x1080 pixels (508x285 millimeters)
• Screen Depth 24 bits (planes)
Xorg Startup Log (/var/log/Xorg.0.log)
• Xorg Driver in use intel
• Loaded Modules dri2 fb glx libinput
• X.Org version 1.21.1.7
OpenGL 2D/3D Rendering
• Direct Rendering Yes
• Vendor Intel
• Renderer Mesa Intel(R) UHD Graphics 630 (CFL GT2)
• Version 4.6 (Compatibility Profile) Mesa 22.3.6
VGA device [0300] Intel Corporation CoffeeLake-S GT2 [UHD Graphics 630] [8086:3e98] (rev 02)
• Kernel Driver i915
• Memory Used by Driver 2984.00 KB
• Path /lib/modules/6.1.76/kernel/drivers/gpu/drm/i915/i915.ko
• Description Intel Graphics
• Video RAM 15804M total, 256M prefetchable
fr-ke wrote: Mon Apr 01, 2024 4:21 pmBack at home on the desktop, Grub2config-2.0.2 produces a different result than on the laptop.
The menu items will be cut off. (see screenshot)
@fr-ke
In Grub2config-2.0.2, the menu width of the default Grub2 boot screen is set to 40% of screen width. Generally, this is sufficient for brief descriptions of the menu item (distro name). However, if you prefer long descriptions that include the partition location of the distro, try the following:
In the root of the grub2 installation go to /theme/puppy/theme.txt (boot_menu section)
and change width = 40% to a higher value such as 50% or 60%. This should increase the maximum menu width to accommodate long distro descriptions.
EDIT:
In the example below, the default menu width is increased to 50% (of screen width):
Code: Select all
# Show the boot menu
+ boot_menu {
left = 30%
top = 20%
width = 50%
height = 60%
fr-ke wrote: Tue Apr 02, 2024 4:06 pmJust a message for optics reasons.
I simply change the menu items manually before saving.
@fr-ke
I'm not sure if your require a modified (default) boot screen, but you might consider the following:
EDIT: test file removed
The new new Grub2config-2.0.2 didn't solve my problem. See post here, https://www.forum.puppylinux.com/viewto ... 31#p115831.
Short version: some Major Linux distros have taken to converting the first partition (i.e., sda1) to a be an extended partition with their system files and their grub2 boot menu on a logical partition formatted linux.
The only possible work-around which occured to me is that (if I recall correctly grub2config no longer requiring a fat32 partition) it be modified to provide a choice of partitions rather than always using sda1.
@radky
For testing, place the file (theme.txt) in the root of your Grub2 installation, as follows:
after some trial and error:
ThinkPad T580:
Grub2menu is nice and clear
videoinfo in the grub console shows "EFI GOP Driver" with resolutions from 640x480 to 1920x1080, Preferred Mode = 1920x1080,
1920x1080 is marked with a "*", this resolution seems to be used
Dell Latitude E7450:
Grub2menu is nice and clear
videoinfo in the grub console shows "EFI GOP Driver" with resolutions from 640x480 to 1366x768, Preferred Mode = 1366x768,
1366x768 is marked with a "*", this resolution seems to be used
Shuttle PC:
Grub2menu is ugly and crude
videoinfo in the grub console shows "EFI GOP Driver" with resolutions from 640x480 to 1920x1080, Preferred Mode = 1920x1080,
800x600 is marked with a "*", this resolution seems to be used
The new theme.txt doesn't change much. Since it provides a reserve for long filenames, I would leave it alone, although the overall picture looks less balanced.
The problem on the desktop computer may be due to the specifications in the BIOS. I haven't found any way to change the apparent default value of 800x600 for the screen settings.
in grub.cfg:
Code: Select all
set gfxmode=1920x1080,1024x768,auto
or any other tried value did not make any change.
It would be ideal if the possible screen resolution could be queried in grub.cfg in order to switch to console output if the resolution is not suitable
@mikeslr
I have just successfully installed and started the bootloader on sda2, 3, 4 with Grub2config-2.0.2.
Attempt 1: GPT device see screenshot 1
Booted successfully on a pure UEFI BIOS
Attempt 2: msdos device
sda1 fat32
sda2 ext4
sda3 ext2
sda4 ext3
Depending on whether sda3 or sda4 had set the boot flag, grub2config-2.0.2 installed the boot loader on the selected boot partition.
On a system with UEFI and LegacyBoot set, I was able to boot without any problems.
fr-ke wrote: Wed Apr 03, 2024 2:16 pm@radky
For testing, place the file (theme.txt) in the root of your Grub2 installation:
... The new theme.txt doesn't change much. Since it provides a reserve for long filenames, I would leave it alone, although the overall picture looks less balanced.
The problem on the desktop computer may be due to the specifications in the BIOS. I haven't found any way to change the apparent default value of 800x600 for the screen settings.
in grub.cfg:
Code: Select all
set gfxmode=1920x1080,1024x768,auto
or any other tried value did not make any change...
@fr-ke
Thanks for testing.
It seems the original theme.txt parameters in Grub2config-2.0.2 will provide a balanced boot screen for most users. If a wider menu is preferred to accommodate long distro names, that is easily adjusted in the theme.txt configuration file as described above.
I'm not sure how to improve the custom grub2 boot screen for your Shuttle PC. However, in such cases you can easily disable boot screen theming and revert to a basic grub screen. Specifically, edit grub.cfg and disable the call to theme.txt, i.e., prepend the 'set theme" parameter with a hash mark.
#set theme=/theme/puppy/theme.txt