Page 1 of 7

Grub2config replaces Grub4Dos

Posted: Fri Jul 02, 2021 1:42 pm
by shinobar

EDIT:- "Stickied" - 23/10/2023 - mikewalsh

Grub4Dos does not support GPT/UEFI system, which is new standard of the recent PC's. Grub2Config is a script installs the grub2 boot loader and makes the menu automatically probing intalled systems same way as the old Grub4DosConfig, enabling multiboot with Windows, Ubuntu and etc.. It supports both legacy MBR system and new GPT/UEFI. Also supports UEFI Secure boot thanks to the Gyrog's MOK manager.
Grub2config runs on XenialPup 7.5 and later. See the document/( Japanese).

Only one case the Grub2config does not support:
When you clean install Ubuntu Linux and/or derivatives on a legacy BIOS PC, the partition sda1 is ext4 formatted. See viewtopic.php?f=155&t=3931

DOWNLOAD grub2config-2.0.1
from http://shinobar.server-on.net/puppy/opt/

Update:
grub2config-2.0.2
This is a newer version fixing a few bugs and tweaking it.
Information and download is provided in this post:
viewtopic.php?p=115435#p115435

Grub2config installs only the boot loader. You can install Puppies manually or using some tool like Frugalinstaller.
frugalinstaller-2.2 is available at the same place.


Re: Grub2Config

Posted: Fri Jul 02, 2021 3:28 pm
by bigpup

Very much needed improvement for Puppy Linux.

Thanks for offering this!


Grub2Config preview1.1

Posted: Sat Jul 03, 2021 12:58 am
by shinobar

Very sorry, grub2config-1.9.9-pre1 always installs MBR.
Please try grub2config-1.9.9-pre1.1 from http://shinobar.server-on.net/puppy/opt/test/


Re: Grub2Config

Posted: Sat Jul 03, 2021 3:00 pm
by shinobar

Grub2config pre1.1 assumes the boot partition ia at the top of the drive and fat32 file system with a flag 'boot'(MBR) or 'esp'(GPT).
In other case, wait next preview release. --- Grub2config pre2 supports this


Re: Grub2Config

Posted: Sat Jul 03, 2021 11:46 pm
by josejp2424
shinobar wrote: Sat Jul 03, 2021 3:00 pm

Grub2config pre1.1 assumes the boot partition ia at the top of the drive and fat32 file system with a flag 'boot'(MBR) or 'esp'(GPT).
In other case, wait next preview release.

thank you very much shinobar .
I am very grateful for this. :D :thumbup2:


Re: Grub2Config replaces Grub4Dos

Posted: Sun Jul 04, 2021 5:01 pm
by bigpup

Having the boot loader on a small first partition, formatted fat32, with correct boot flag, is a standard of UEFI firmware and how it finds and boots a boot loader.
For very new computers, with the newest UEFI.
I have no trouble setting up a working Grub2 boot loader, on any storage device.
With the storage device having a small first partition, formatted fat32, proper boot flag, and any number of other partitions formatted whatever.
The boot loader goes on the small first partition.
Puppy frugal installs on the other partition(s).


Grub2config preview 2

Posted: Wed Jul 07, 2021 7:06 am
by shinobar

#v1.9.9-pre2: support esp isn't at top partition, fix was missing f2fs search, shape up code

The Windows10 of some epoch has the ESP not at the first but the second partition(sda2). Grub2config preview 2 supports this.

Windows on legacy BIOS may have the boot partition at the first partition(sda1) with NTFS file system. Grub2config tries to install MBR boot, but it must fail. Never use Grub2config in this case.

DOWNLOAD grub2config-1.9.9-pre2 from http://shinobar.server-on.net/puppy/opt/test/


Re: Grub2Config replaces Grub4Dos

Posted: Wed Jul 07, 2021 12:44 pm
by bigpup

That is because Windows 10 uses this setup for partitions.
Partition 1: Recovery partition, 450MB - (WinRE)
Partition 2: EFI System, 100MB. (boot loader)
Partition 3: Microsoft reserved partition, 16MB (not visible in Windows Disk Management)
Partition 4: Windows (size depends on drive)

But this should be specifically for installing Puppy Linux and booting it on computers.
Well, I guess if you are gong to keep Windows 10.
You will need to keep it's partition setup.
So Grub2config would need to go on partition 2.
Is it going to have free space for it?


Re: Grub2Config replaces Grub4Dos

Posted: Wed Jul 07, 2021 12:57 pm
by bigpup

Windows on legacy BIOS may have the boot partition at the first partition(sda1) with NTFS file system. Grub2config tries to install MBR boot, but it must fail. Never use Grub2config in this case.

Sure about this.
If computer is old and using legacy bios, it does not have UEFI bios.
The internal drive is most likely setup using the msdos partition table that does use mbr, and an area setup for mbr.
Seems to me it would just replace the mbr that was used in the original setup.

you may want to look at how Frugalpup Installer installs the Grub2 boot loader.
viewtopic.php?f=105&t=337
It can do a legacy bios, UEFI, or both, boot loader setup.
It also provides a Puppy security key, for UEFI secure boot, and ability to install the key, on the computer.

Also how Lick Installer does it.


Grub2config preview 2.1

Posted: Wed Jul 07, 2021 2:59 pm
by shinobar

preview 2 fails uefi boot from internal hdd. Fixed at preview 2.1
DOWNLOAD grub2config-1.9.9-pre2.1 from http://shinobar.server-on.net/puppy/opt/test/

The Windows10 of some epoch has the ESP not at the first but the second partition(sda2). Grub2config preview 2 supports this.

Windows on legacy BIOS may have the boot partition at the first partition(sda1) with NTFS file system. Grub2config does not support this case at this point of time.


Grub2config preview 3

Posted: Sat Jul 10, 2021 12:42 am
by shinobar

DOWNLOAD grub2config-1.9.9-pre3 from http://shinobar.server-on.net/puppy/opt/test/

Windows on legacy BIOS may have the boot partition at the first partition(sda1) with NTFS file system. This preview 3 supports this case using Grub4Dos instead of Grub2.


Re: Grub2config replaces Grub4Dos

Posted: Sat Jul 10, 2021 12:54 am
by +Me

G'day Shinobar, Bigpup & All, I'm Looking 4 a Grub2 pet or other BootLoader that Can Recognize Btrfs that's the Default File System in x32-bit Quickpup 21.04 which only has Grub4Dos, But Btrfs Appears 2 be invisible, Pardon the Pun. it's been suggested that Grub2 should work. I Tried your grub2config-1.9.9-pre2.1.pet But Unfortunately it like Grub4Dos can't recognize Btrfs. the Only way I've been able 2 install Quickpup iz 2 Partition & Format w/ GParted Live from another Live eNvironment which iz of course an inconvenience.

Edit I've also Tested Preview 3 & it Still can't see Btrfs I Hope this can be Fixed!

But I Really want 2 Use Btrfs because I'm Persuaded having Researched the matter that it's the Future of Desktops & Laptops ( including KromeBooks & NetBooks ) Linux w/ SSDs w/ Ltd Storage because of Copy on wRite & Compression & Snapshots, etc among its' Many other Features.

The Subject Specimens of which I've got 14 of, Old 2014 intel Acer C720 KromeBooks that aRe Beyond Google updates & Will Otherwize Certainly be Destined 4 the Landfill!... Anyway I've Updated the Firmware w/ MrChromeBox Firmware. Obviously Puppy iz the ideal OS 4 such Hardware that's Handicapped by 2Gb of RAMemory & 16Gb SSD.

Of course I've already Requested Help from Mistfire the Developer of Quickpup, But I'm having Trouble understanding the Necessary Processes 2 install Grub2 on to Btrfs subvolumes, so I'm Hoping there's a more User Friendly Script or bat File that'll make the Process id10T-Proof Automatic. & that this Grub2Config iz just what the Dr Ordered.

Please Help me & Thanx!

;-)K


Re: Grub2config replaces Grub4Dos

Posted: Sat Jul 10, 2021 3:52 am
by Clarity

@shinobar: Could this utility afford booting a PUP ISO file directly?

If so, would you consider adding the ISO files boot ability of GRUB2 to this effort, please.

grub2configSS3.jpg
grub2configSS3.jpg (56.89 KiB) Viewed 17025 times

Also, is this screen utility capable of growing in size based upon what it finds to present to users of this utility? Or is it fixed in its screen size?


Grub2config preview 4

Posted: Mon Jul 12, 2021 2:00 pm
by shinobar

Changed the user interface to choose drives to search.
See the document.

Almost a release candidate. Please test and report.
DOWNLOAD grub2config-1.9.9-pre4 from http://shinobar.server-on.net/puppy/opt/test/
The file size is larger than ever because it contains grub2 stuff from the FurugalPup.


Re: Grub2config replaces Grub4Dos

Posted: Mon Jul 12, 2021 7:32 pm
by +Me

Thanx Shinobar 4 that Update, Progress, But we're not there yet... I Hope the ScreenShot Helps, Let me me know if yoU need any more info

Thanx again!

;-)K


Re: Grub2config preview 4

Posted: Mon Jul 12, 2021 10:46 pm
by Clarity

Hi @shinobar. I reviewed your document

shinobar wrote: Mon Jul 12, 2021 2:00 pm

... See the document.

One IMPORTANT feature of @gyrog work in this area is the contribution he made last year with the SAVESPEC feature. It has been an important feature for finding and booting ISO files and frugals directly. This also has the probability to extend to booting IMG files directly as well.

I am looking forward to your ISO file boot feature of this utility. GRUB2 does NOT have a contiguous disk ISO file layout requirement that past boot managers had, insuring boots.

FYI!

@Shinobar, a PM is sent.


Re: btrfs

Posted: Tue Jul 13, 2021 12:35 pm
by shinobar

@+Me Thank you for testing. Sorry but I have no plan to support 'brtfs'.
My GParted does not support btrfs.


Re: Grub2config replaces Grub4Dos

Posted: Tue Jul 13, 2021 10:14 pm
by fredx181
shinobar wrote:

My GParted does not support btrfs.

Probably (depends maybe on how new) it does after installing 'btrfs-tools'.


Re: btrfs support

Posted: Wed Jul 14, 2021 1:29 am
by shinobar

tnx @fredx181

btrfs can be supported under next condition.
1) The 1st partition(>=100MB) is fat32 formatted and boot flagged.
2) Modify the script /usr/sbin/grub3config(pre4) line 646:
[ $COMPAT_MENU -eq 2 ] && SUPPORT_FSS="$SUPPORT_FSS|f2fs"
to↓
[ $COMPAT_MENU -eq 2 ] && SUPPORT_FSS="$SUPPORT_FSS|f2fs|btrfs"


64bit partition

Posted: Sat Jul 17, 2021 10:53 am
by shinobar

Puppy's GParted makes ext4 partition without 64bit option. But some Linux like Ubuntu makes ext4 partition with 64bit option.
Grub2 supports 64bit partitions, but the Grub4Dos not.

Only if the boot partition is ntfs format, such case of legacy Windows preinstalled, Grub2config uses Grub4Dos instead of Grub2.
In such case, operating systems on the 64bit ext4 partition are detected but boot up fails.


Re: 64bit partition

Posted: Mon Jul 19, 2021 5:06 pm
by shinobar
shinobar wrote: Sat Jul 17, 2021 10:53 am

Only if the boot partition is ntfs format, such case of legacy Windows preinstalled, Grub2config uses Grub4Dos instead of Grub2.
In such case, operating systems on the 64bit ext4 partition are detected but boot up fails.

I got it!
Next release of Grub2config will install Grub2 even on ntfs and resolves the 64bit partition problem.
Wait a while if your boot partition is ntfs formatted.

The Grub2 cannot install on the ntfs partitions because of the core.img from the FrugalPup does not have the ntfs module internally.
We can make special core.img supports ntfs in native.
Install recent grub2.
Mount a USB stick formatted with any of ext/vfat/ntfs on /mnt/sdb1, and type:

Code: Select all

 grub-install --no-floppy --modules="ext2 fat ntfs part_msdos part_gpt" --root-directory=/mnt/sdb1 --target=i386-pc /dev/sdb

Created core.img at /mnt/sdb1/boot/grub/i386-pc/core.img supports ntfs in native.
See the Japanese forum or grub2-ntfs-install.sh.


Re: Grub2config replaces Grub4Dos

Posted: Mon Jul 19, 2021 5:33 pm
by Clarity

Hello @shinobar

GRUB2 V2.06 has been available for awhile. If done in conjunction with your current work, you wont have to upgrade for year or more while getting all the benefits of latest filesystems built-in to its modular base.

Also, V2.06 should remove any need for GRUB4DOS maintenance in your work.


Grub2config preview 5

Posted: Tue Jul 20, 2021 4:45 pm
by shinobar

Windows on legacy BIOS, such as Windows7, may have the boot partition at the first partition(sda1) with NTFS file system.
Grub2config pre5 supports this case using special grub2 core.img, but UEFI boot is not supported.

DOWNLOAD grub2config-1.9.9-pre5 from http://shinobar.server-on.net/puppy/opt/test/
The preview 5 is almost a release candidate. Welcome your test and report.

Windows have /Boot directory at the boot partition. whereas Grub default prefix=/boot/grub.
The grldr invokes core.img. The grldr searches under /Boot because it recognizes the path case insensitive. The grldr fails search /boot/grub/i386-pc/core.img, as the result.the boot process fails.
Grub2config pre5 copies the file /boot/grub/i386-pc/core.img to /Boot/grub/i386-pc/core.img to get lid of this.


Re: Grub2config replaces Grub4Dos

Posted: Tue Jul 20, 2021 7:00 pm
by oui
shinobar wrote: Fri Jul 02, 2021 1:42 pm

Grub4Dos does not support GPT/UEFI system, which is new standard of the recent PC's. Grub2Config is a script installs the grub2 boot loader and makes the menu automatically probing intalled systems same way as the old Grub4DosConfig, enabling multiboot with Windows, Ubuntu and etc.. It supports both legacy MBR system and new GPT/UEFI. Also supports UEFI Secure boot thanks to the Gyrog's MOK manager.
See the document.

DOWNLOAD grub2config-1.9.9-pre5 from http://shinobar.server-on.net/puppy/opt/test/

The preview 5 is almost a release candidate. Welcome your test and report.

Hello Shinobar

Thank you for this performance.

Can grub2config also help on old Apple Mac laptop to start

- Puppy
- the actual Apple Mac OS

:?:

If not, how to do that?


Re: Grub2config preview 5

Posted: Wed Jul 21, 2021 3:54 pm
by josejp2424
shinobar wrote: Tue Jul 20, 2021 4:45 pm

Windows on legacy BIOS, such as Windows7, may have the boot partition at the first partition(sda1) with NTFS file system.
Grub2config pre5 supports this case using special grub2 core.img, but UEFI boot is not supported.

DOWNLOAD grub2config-1.9.9-pre5 from http://shinobar.server-on.net/puppy/opt/test/
The preview 5 is almost a release candidate. Welcome your test and report.

Windows have /Boot directory at the boot partition. whereas Grub default prefix=/boot/grub.
The grldr invokes core.img. The grldr searches under /Boot because it recognizes the path case insensitive. The grldr fails search /boot/grub/i386-pc/core.img, as the result.the boot process fails.
Grub2config pre5 copies the file /boot/grub/i386-pc/core.img to /Boot/grub/i386-pc/core.img to get lid of this.

hi @shinobar .
I report an error I found.
I installed the grub from another distribution (Debian).
I installed it on sda1 vfat.
But I create a folder BOOT so in capital letters.
Then I installed from puppy Grub2config.
but it gives me an error, because it wants to create a boot folder, and gives that it already exists. but the one that exists is in uppercase, and the one it creates is in lowercase.
but in the end it does not create it because it says that it exists, and that gives error and does not install the grub.
I hope you understand me.

delete the BOOT folder.
Then if the grub installation with grub2config worked.

locale es grub2config

MoManager-es_grub2config.tar.bz2
locale es grub2config
(2.38 KiB) Downloaded 57 times

Re: Upper case BOOT

Posted: Thu Jul 22, 2021 3:57 pm
by shinobar

@josejp2424 thank you for the locale. Please update when the official release.

josejp2424 wrote: Wed Jul 21, 2021 3:54 pm

I installed the grub from another distribution (Debian).
I installed it on sda1 vfat.
But I create a folder BOOT so in capital letters.
Then I installed from puppy Grub2config.
but it gives me an error, because it wants to create a boot folder, and gives that it already exists. but the one that exists is in uppercase, and the one it creates is in lowercase.
but in the end it does not create it because it says that it exists, and that gives error and does not install the grub.

I cannot reproduce your error.
Tested on VirtualBix both MBR/BIOS and GPT/UEFI.
Installed BionicPup64 and made a directory /BOOT in upper case on the sda1(fat32).
Ran Grub2config-pre5.
The grub stuff is expanded in the /BOOT directory with no error. Reboot successfully.
The Puppy shows 'BOOT', but the grub2 at boot recognizes it as 'boot' in the fat32 partition.


Grub2config preview 6

Posted: Tue Jul 27, 2021 12:10 am
by shinobar

DOWNLOAD grub2config-1.9.9-pre6 from http://shinobar.server-on.net/puppy/opt/test/
Almost a release candidate. Welcome your test and report.

Supported File System
Windows on legacy BIOS may have the boot partition at the first partition(sda1) with NTFS file system. In this case, UEFI boot is not supported..

Puppy and other Linux can be installed, besides the boot partition, on any drives, partitions with supported file systems listed here:
vfat(fat32), ntfs, ext2, ext3, ext4(with/no 64bit option), reiserfs, btrfs, hfs, hfs+.

See the document.


Re: Grub2config replaces Grub4Dos

Posted: Tue Jul 27, 2021 8:02 am
by +Me

G'day Shinobar again, I've Tested your Latest Grub2Config which I'm Pleased that yoU've Reconsidered Btrfs Support. I Hope this Screenshot Attachment Helps your Pet Project Development.

The Old Hardware iz 2014 intel Acer C720 KromeBook ( Updated w/ MrChromeBox.tech Firmware ) 2 Gb SOC RAMemory w/ 16 Gb SSD Partitioned w/ 99 Mb Fat32 sda1 w/ boot & esp Flags, the Remainder of the SSD being Btrfs. Frugal install of Quickpup 21.04. Btw I've Searched 4 zram-config.pet, that I Swear I've Previously seen, it's Not in the PPM or the Forum or the iNet.

Let me know if yoU need any more info.

;-)K


Re: Grub2config replaces Grub4Dos

Posted: Tue Jul 27, 2021 3:59 pm
by shinobar

@+Me, Grub2config requires efibootmgr, recent puppies XenialPup 7.5 and later have.
If you want to try without GPT/UEFI support, remove '--fatal' at the line 639 in /usr/sbin/grub2config.

Code: Select all

if !(which efibootmgr &>/dev/null) ; then
	error_missing --fatal "efibootmgr\n$_NoEFI"
fi

to

Code: Select all

if !(which efibootmgr &>/dev/null) ; then
	error_missing "efibootmgr\n$_NoEFI"
fi

Re: Grub2config replaces Grub4Dos

Posted: Wed Jul 28, 2021 2:04 am
by +Me

Thanx Shinobar 4 Helping me, I think Grub2Config ran properly after Deleting --fatal az per your instructions. But After Rebooting, it just doesn't Boot. it's Stuck on Booting from Hard Disk...

After Booting from USB I noticed that there's a Boot Directory in sda2 ( ie. the Btrfs Partition ( w/ a Grub Dir inside that ) ) iz that az it should be? I'd thought that the Boot Dir should be in sda1, the 1st Fat32 Partition ( But I'm Still Very Alien 2 this New Fangled GPT /UEFi ) & az I've Previously said I want 2 Stick w/ the Old Skool MS DOS / MBR Booting because of the Age of these 2014 Acer KromeBooks & that they're Ltd w/ a 16 Gb SSD & 2GB SOC RAMemory, Basically I'm wanting the Simplest Solution! Thanx 4 your Help.

;-)K