How to add puppylinux to grub2 on 32bit BIOS system on GPT partition table alongside other systems?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
Xanegon
Posts: 5
Joined: Wed Jul 20, 2022 5:14 pm

How to add puppylinux to grub2 on 32bit BIOS system on GPT partition table alongside other systems?

Post by Xanegon »

Summary:
I want to install puppylinux alongsinde other operating systems on separate partition on GPT formatted drive on a 32bit laptop which supports only BIOS mode (this device don't supprorts UEFI). The question is how to add puppyulinux to already existing grub2 menu?

Longer explanation:
I installed Viod linux on a GPT formatted drive on a 32bit (32 bit probably doesn't matter) device that supports only BIOS mode of booting(this device don't supprorts UEFI).
This means that I have 5 MiB sized partition at the beginning of a drive (https://docs.voidlinux.org/installation ... stem-notes) which in "gparted" shows flag "bios_grub" and the filesystem is shown as "grub2 core.img".
Next partition which I have is swap, and then I have 3 partitions that I wanted to dedicate to 3 separate system.
- On first one is of course 32bit Void linux; gparted shows flag "legacy_boot"; (filesystem is ext4).
- On second one I installed via installer openSUSE Tumbleweed (GUI seems to not wor but i guess that it is opensuse tumbleweed 32bit bug) which automaticly detected partitioning and created partition (with brtfs filesystem) between the Void linux partition and the last partition (I left free space on drive between these two); grub doesn't show any flags on this partition.
- On third (and the last) one I wanted to install one (or maybe more) puppylinux. So I downloaded VoidPup32-22.02+6 and tried to install this puppylinux on this last partition, but it looks like puppylinux do not have tool that would install grub2 or add to grub2 this puppylinux on GPT formatted drives on BIOS systems (It would be also cool if official tools that were made to install puppylinuxes would support that).

User avatar
mikeslr
Posts: 2915
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 175 times
Been thanked: 893 times

Re: How to add puppylinux to grub2 on 32bit BIOS system on GPT partition table alongside other systems?

Post by mikeslr »

For future reference, if you're going to use a swap partition (swapfile doesn't work?) when possible place the swap partition last. When you boot any Linux it will automatically use the Swap partition, mounting it and preventing gparted from modifying it or following partition until you turn it off. Don't recall, of hand, how to turn it off; but there is a way.

Have you tried grub2config, viewtopic.php?p=29703#p29703. Should pick up Void, Tumbleweed and any other OS. But to be safe, try first installing it to a USB-Key. That way, if there's a problem you haven't over-written whatever boot-loader you're now using.
grub2config DOES Work with computers which are NOT UEFI. Shinobar created it to replace grub4dos which can't be used with UEFI computers or gpt partitioning.

From you post we don't know (a) what operating system installed grub; (b) if that operating system is still present and (c) the current text of grub.cfg. But rustypup's recipe should work. See, viewtopic.php?p=33437#p33437

If whichever OS controls the current bootloader can run blkid from a terminal, blkid will provide a read-out of all partitions UUIDs. The partition on which Void is located can then be specified in a grub stanza like the following:

menuentry 'Voidpup64 22.02'{
search --no-floppy --set=root --fs-uuid 39ff128d-806e-45a0-9c0c-4013859ec05d
linux /vpup64b/vmlinuz psubdir=/vpup64b pmedia=ataflash pfix=fsck
initrd /vpup64b/initrd.gz
}
Blue for emphasis only.

Xanegon
Posts: 5
Joined: Wed Jul 20, 2022 5:14 pm

Re: How to add puppylinux to grub2 on 32bit BIOS system on GPT partition table alongside other systems?

Post by Xanegon »

0.
Thanks for reply. Sorry for very late reply. I solved my problem using this method using file named "40_custom" (I edited it in openSUSE because as it turned out openSUSE probably overwritten my grub2) but instead of creating "menuentry" manually I just used puppy installer to create grub2 on temporary fat32 partition and copied this autogenerated "menuentry" to "40_custom" file and I ran "update-grub" on operating system that were controlling grub2 (actually in openSUSE before "updating grub" you need to type "su" and the "update-grub" command is different) (I described it in more detail in "4.")

1.

mikeslr wrote: Mon Jul 25, 2022 5:40 pm

For future reference, if you're going to use a swap partition (swapfile doesn't work?) when possible place the swap partition last. When you boot any Linux it will automatically use the Swap partition, mounting it and preventing gparted from modifying it or following partition until you turn it off. Don't recall, of hand, how to turn it off; but there is a way.

I do not understand what do you mean there. I created swap pratition as a second partition on my drive (first partition is for bios since I do not have UEFI and I have gpt partitioned disk at the same time) so every installed distro can use the same swap (I guess i can instead swapfile but then I guess I would need to mount this file on every distro?). Most of linux distros are automaticly detecting my swap partition. What is the difference between having the swap partition at the end of the disc and having swap partition anywhere else on the disk?

2.

mikeslr wrote: Mon Jul 25, 2022 5:40 pm

Have you tried grub2config, https://www.forum.puppylinux.com/viewto ... 703#p29703. Should pick up Void, Tumbleweed and any other OS. But to be safe, try first installing it to a USB-Key. That way, if there's a problem you haven't over-written whatever boot-loader you're now using.
grub2config DOES Work with computers which are NOT UEFI. Shinobar created it to replace grub4dos which can't be used with UEFI computers or gpt partitioning.

As I said: I have already installed grub2 so I would rather add distro to current grub2.I have non-UEFI computer, but at the same time I also have gpt partitioning so as you said I can not use grub2config i guess.

3.

mikeslr wrote: Mon Jul 25, 2022 5:40 pm

From you post we don't know (a) what operating system installed grub; (b) if that operating system is still present and (c) the current text of grub.cfg.

Void (I mean voidlinux - not voidpup) installed grub, and void is still present but as Is turned out openSUSE probably overwritten my grub2.

4.

mikeslr wrote: Mon Jul 25, 2022 5:40 pm

But rustypup's recipe should work. See, https://www.forum.puppylinux.com/viewto ... 437#p33437

If whichever OS controls the current bootloader can run blkid from a terminal, blkid will provide a read-out of all partitions UUIDs. The partition on which Void is located can then be specified in a grub stanza like the following:

menuentry 'Voidpup64 22.02'{
search --no-floppy --set=root --fs-uuid 39ff128d-806e-45a0-9c0c-4013859ec05d
linux /vpup64b/vmlinuz psubdir=/vpup64b pmedia=ataflash pfix=fsck
initrd /vpup64b/initrd.gz
}
Blue for emphasis only.

I did not used this method (although similar):
-(1) I opened "Puppy installer"; -> Clicked "Frugalpup - install/manage installs"; -> Clicked "Puppy" button and then I did the installation (after installation "FrugalPup window is showed agin);
-(2) I clicked "Boot" button and then (after a few steps that this installer shows) in step named "Boot partition" (It starts witch "This script updates the selected boot partition (...)" ) I have choosen some temporary fat32 partition which I created using gparted before starting (It could be even external pendrive. Maybe it could be even this same partition on which I installed voidpup (or other puppylinux) if this partition would be formatted as fat32 but I do not know that); -> In step named "Boot type" i have choosen "both" option but i think it does not matter (maybe except "append" option); -> I finished the installation and left "FrugalPup" and turned off system;
-(3) I started the operating system that controlls grub2; -> Opened file "grub.cfg" on temporary partition; -> Copied only the voidpup "menuentry" to colipboard ( "menuentry "Puppy vpup32 22.02" { (... here's about 17 lines of code ...) }" ); -> Opened "/etc/grub.d/40_custom", pasted clipboard at the end of file, and saved file; -> Then I ran command "sudo update-grub" (I don't know if it's important but I also have "os-prober" unlocked for this command); -> After that voidpup was added to grub2.

Last edited by Xanegon on Mon Aug 22, 2022 5:32 pm, edited 3 times in total.
Xanegon
Posts: 5
Joined: Wed Jul 20, 2022 5:14 pm

Re: How to add puppylinux to grub2 on 32bit BIOS system on GPT partition table alongside other systems?

Post by Xanegon »

Btw. I also added debiandog to grub2 thanks to this: viewtopic.php?t=3843 (https://forum.puppylinux.com/viewtopic.php?t=3843) and "Examples-boot-codes.txt" inside iso.

Clarity
Posts: 3653
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1537 times
Been thanked: 489 times

Re: How to add puppylinux to grub2 on 32bit BIOS system on GPT partition table alongside other systems?

Post by Clarity »

How to Add a new entry to an existing WoofCE PUP

Xanegon wrote: Mon Aug 22, 2022 5:11 pm

... ON,... the operating system that controlls grub2; -> Opened file "grub.cfg" on temporary partition; -> Copied only the voidpup "menuentry" to colipboard ( "menuentry "Puppy vpup32 22.02" { (... here's about 17 lines of code ...) }" ); -> Opened "/etc/grub.d/40_custom", pasted clipboard at the end of file, and saved file; -> Then I ran command "sudo update-grub" (I don't know if it's important but I also have "os-prober" unlocked for this command); -> After that voidpup was added to grub2.

This detail is helpful and could be polished into a HowTo as it shows a complete solution example that can be easily replicated.

Excellent :!:

Post Reply

Return to “Users”