grub2 issue with FP64 after installing Ubuntu 20.02

Moderators: 666philb, Forum moderators

Post Reply
User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

grub2 issue with FP64 after installing Ubuntu 20.02

Post by gychang »

I have installed FP64 in one partition (sda2), ubuntu 20.02 in another (sda3), both on efi laptop. FP64 is installed frugal and worked well but with ubuntu installed on reboot missing the boot menu for FP64. sda1 is the boot for efi, in win32 format.
Following instructions here: https://www.bleepingcomputer.com/forums ... ootloader/ , I get an error below when I type in sudo update-grub.
--
apa@apa-SVE14125CXP:~$ sudo update-grub
[sudo] password for apa:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.8.0-31-generic
Found initrd image: /boot/initrd.img-5.8.0-31-generic
Found linux image: /boot/vmlinuz-5.8.0-25-generic
Found initrd image: /boot/initrd.img-5.8.0-25-generic
Adding boot menu entry for UEFI Firmware Settings
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 274
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
--
Using FP64 menu for frugal/efi tool, I do not get a menu for ubuntu.

Help will be appreciated.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
bigpup
Moderator
Posts: 6372
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 751 times
Been thanked: 1319 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by bigpup »

The boot loaders Puppy can install do not make entries to boot Ubuntu.

When Ubuntu installs. It installs it's own boot loader and it only has entries to boot Ubuntu.

The problem is the Grub2 boot loader that Ubuntu installs knows nothing about adding an entry for Puppy Linux.
The Ubuntu installing process only sets the computer up for booting Ubuntu.
It installs Grub2 boot loader for booting Ubuntu only.
That is the boot loader being used to boot the computer.

After you do a Puppy frugal install on the computer.
You will have to manually put a entry to boot Puppy in the menu config file that is used by Grub2.

That link you posted tells you how to do it.
Go back and carefully follow it.

Normally to get Ubuntu to get along with having Puppy installed.
Install Ubuntu using it's installer.
Install Puppy.
Modify the Ubuntu Grub2 boot loader menu and manually put a entry in it to boot Puppy.

We are Puppy!
Resistance is futile!
You do not need Ubuntu!
You only need Puppy Linux!

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Clarity
Posts: 3328
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1371 times
Been thanked: 442 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Clarity »

Ubuntu installs its own boot-loader which is a combined UEFI-EFI combination. Same as all of the WoofCE PUPs.

It will acknowledge Windows in its config. There are 2 folders to consider in an effort to update and I, personally, would look to the FossaPup64 for example as it works. The stanza found there will work, directly, in Ubuntu's stanza (see grub.cfg AND loopback.cfg in its /boot/grub folder). Review, copy, add and wa-la.

Hope this is helpful

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Grey »

The information contained in your link is a little out of date. New Ubuntu/Mint may not have the "40_custom" file, instead there is the "40_custom_proxy" file in the /etc/grub.d/ folder.

Code: Select all

#!/bin/sh
#THIS IS A GRUB PROXY SCRIPT
'/etc/grub.d/proxifiedScripts/custom' | /etc/grub.d/bin/grubcfg_proxy "+*
+#text
+'fossapup64'~be60a539c3bc2b2d571146b34ada192d~
+'bionicpup64'~1a5a9ccb3f70b2177039df281bb663b1~
"

This means that the lines for loading Puppy must be added to the /etc/grub.d/proxifiedScripts/custom file.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by gychang »

bigpup wrote: Sat Dec 05, 2020 1:13 am

Normally to get Ubuntu to get along with having Puppy installed.
Install Ubuntu using it's installer.
Install Puppy.
Modify the Ubuntu Grub2 boot loader menu and manually put a entry in it to boot Puppy.

We are Puppy!
Resistance is futile!
You do not need Ubuntu!
You only need Puppy Linux!

thanks!, this was what I was afraid of...

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Grey »

thanks!, this was what I was afraid of...

Don't be afraid. By the word normally, bigpup meant typically, but we are all unusual here and it does not matter at all in what order to install the systems. After all, install is a very conventional designation for Puppy :)

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

Geek3579
Posts: 248
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 62 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Geek3579 »

To use custom_40 one must update GRUB to make the entries seen by GRUB at bootup. This is a nuisance if a number of changes to GRUB are required.

A better way to go, IMHO, is to add a custom.cfg file in the same directory as the grub.cfg file . No GRUB update is required and GRUB seems to pick up the contents of the custom.cfg file OK and adds the menu items on the end of the others.

Just open a new text file with Geany, add the Puppy GRUB2 boot script, save as a .txt and rename/edit the extension to .cfg.

FYI, the typical GRUB2 code I use for a frugal puppy install is as follows, using the UUID of the USB or SSD where the frugal files are stored:

menuentry " DPUP_MATE_0820_64_8.0.0 " {
search --no-floppy --fs-uuid --set 5077dd62-647a-4f2a-92a4-4ea4751720f3
linux /DPUP_MATE_0820/vmlinuz pmedia=ataflash psubdir=DPUP_MATE_0820 nousbwait=5
initrd /DPUP_MATE_0820/initrd.gz

}

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Grey »

Geek3579 wrote: Mon Dec 07, 2020 6:40 am

A better way to go, IMHO, is to add a custom.cfg file in the same directory as the grub.cfg file

Yes, we can do it this way. If at the end of the grub.cfg file there are lines like...

Code: Select all

if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi

...then we can use custom.cfg
In fresh Ubuntu/Mint the template for these lines is contained in "41_custom" file, changing which we can put custom.cfg in any folder, not only in the one where grub.cfg is.

I add --class to the line with menuentry:
menuentry "fossapup64" --class fossapup { and menuentry "bionicpup64" --class bionicpup {
Thanks to this, we can use our icons in grub menu, for example, together with the Primitivistical theme for grub.
P.S. Sorry for the picture quality, this is a curved monitor :)

grub_scr.png
grub_scr.png (497.85 KiB) Viewed 729 times

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by gychang »

thank everyone for giving me ideas. I installed ubuntu 20.10 and works well (sda3). Fossapup64(FP)(sda2) is frugally installed. I configured the 2 files as suggested after verifying uuid as shown below. Both files in /sda1/efi/ubuntu.

In grub.cfg below, mainly to recall custom.cfg
--
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
--

On custom.cfg
--
menuentry " FP " {
search --no-floppy --fs-uuid --set 5129dc7b-9fae-4743-87fe-ca290738af81
linux /FP/vmlinuz pmedia=atahd psubdir=FP
initrd /FP/initrd.gz
}

search.fs_uuid d883f9b0-ca10-4d98-9e71-90c99d4080fa root hd0,gpt3
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
--

After saving and rebooting, it just starts ubuntu, there is NO menu to start FP. Any suggestions on what I am doing wrong?

thanks,

Geek3579 wrote: Mon Dec 07, 2020 6:40 am

A better way to go, IMHO, is to add a custom.cfg file in the same directory as the grub.cfg file .

FYI, the typical GRUB2 code I use for a frugal puppy install is as follows, using the UUID of the USB or SSD where the frugal files are stored:

menuentry " DPUP_MATE_0820_64_8.0.0 " {
search --no-floppy --fs-uuid --set 5077dd62-647a-4f2a-92a4-4ea4751720f3
linux /DPUP_MATE_0820/vmlinuz pmedia=ataflash psubdir=DPUP_MATE_0820 nousbwait=5
initrd /DPUP_MATE_0820/initrd.gz

}

Attachments
custom.cfg.png
custom.cfg.png (58.89 KiB) Viewed 719 times
grub.cfg.png
grub.cfg.png (38.46 KiB) Viewed 719 times

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Grey »

gychang wrote: Mon Dec 07, 2020 10:05 pm

ubuntu 20.10 and works well (sda3). Fossapup64(FP)(sda2) is frugally installed. I configured the 2 files as suggested after verifying uuid as shown below. Both files in /sda1/efi/ubuntu.

Well, now it's clear why it doesn't work.
1. custom.cfg & grub.cfg should not be on the EFI partition. They should be in the same place as Ubuntu, in your case it is /sda3/boot/grub (unless of course you have created a separate partition for grub when installing Ubuntu). Remove your grub.cfg from sda1 and don't touch grub.cfg on sda3 for now. Move custom.cfg from sda1 to /sda3/boot/grub and delete everything that starts after the sixth (6) line in it.
2. Ubuntu loves only itself and so much that it DOES NOT SHOW menu for selecting systems to boot (it doesn't care about the ones added manually). So go to the /sda3/etc/default folder and open the "grub" file in that folder. We look at the top in this file and find the lines:

Code: Select all

GRUB_DEFAULT=
GRUB_TIMEOUT_STYLE=
GRUB_TIMEOUT=

We make the second line like this (now proud and domineering Ubuntu will let us choose other types of Linux):

Code: Select all

GRUB_TIMEOUT_STYLE="menu"

The third line is responsible for how many seconds the boot menu will be displayed on the screen (after that the default system will start). Personally, ten seconds are enough for me to make a decision:

Code: Select all

GRUB_TIMEOUT=10

Well, in the first line, you can write the name of the system that will be highlighted and launched by default. You have this name " FP " in menuentry, but better rename it to something without spaces, for example, do not reinvent the wheel, but make menuentry "fossapup64" {
Then the first line would be:

Code: Select all

GRUB_DEFAULT="fossapup64"

After that, you will have to run the command in the Ubuntu terminal, but only once:

Code: Select all

update-grub

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by gychang »

If I remove /sda1/EFI/ubuntu/grub.cfg, it does not boot, I get <grub>... error message. If I remove /sda1/grub.cfg, then it just boots into ubuntu.
Once I boot into ubuntu and run sudo update-grub I get an error message (attached).

Detailed instructions were very helpful...

Grey wrote: Tue Dec 08, 2020 9:06 am
gychang wrote: Mon Dec 07, 2020 10:05 pm

I configured the 2 files as suggested after verifying uuid as shown below. Both files in /sda1/efi/ubuntu.

1. Remove your grub.cfg from sda1 and don't touch grub.cfg on sda3 for now. Move custom.cfg from sda1 to /sda3/boot/grub and delete everything that starts after the sixth (6) line in it.

After that, you will have to run the command in the Ubuntu terminal, but only once:

Code: Select all

update-grub
Attachments
Screenshot from 2020-12-08 09-40-14.png
Screenshot from 2020-12-08 09-40-14.png (303.98 KiB) Viewed 513 times

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Grey »

Good. Let's check it one more time.
/sda1/EFI/ubuntu folder should contain grub.cfg with the following content (and nothing else):

Code: Select all

search.fs_uuid d883f9b0-ca10-4d98-9e71-90c99d4080fa root hd0,gpt3
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

/sda3/boot/grub should contain second grub.cfg and we do not touch its contents.

custom.cfg lies in the /sda3/boot/grub folder along with the second grub.cfg and custom.cfg contains (and nothing else):

Code: Select all

menuentry "fossapup64" {
search --no-floppy --fs-uuid --set 5129dc7b-9fae-4743-87fe-ca290738af81
linux /FP/vmlinuz pmedia=atahd psubdir=FP
initrd /FP/initrd.gz
}

After that check the actions from the second paragraph of my previous post.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by gychang »

thanks again for a detailed suggestions. I double checked (everything seems to be correct) and when I run "sudo update-grub" from ubuntu, I get the same syntax error message as before....

Grey wrote: Wed Dec 09, 2020 5:44 am

Good. Let's check it one more time.
/sda1/EFI/ubuntu folder should contain grub.cfg with the following content (and nothing else):

Code: Select all

search.fs_uuid d883f9b0-ca10-4d98-9e71-90c99d4080fa root hd0,gpt3
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg

/sda3/boot/grub should contain second grub.cfg and we do not touch its contents.

custom.cfg lies in the /sda3/boot/grub folder along with the second grub.cfg and custom.cfg contains (and nothing else):

Code: Select all

menuentry "fossapup64" {
search --no-floppy --fs-uuid --set 5129dc7b-9fae-4743-87fe-ca290738af81
linux /FP/vmlinuz pmedia=atahd psubdir=FP
initrd /FP/initrd.gz
}

After that check the actions from the second paragraph of my previous post.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Grey »

This is how it works for me. Well, here either the UUID is incorrectly specified or something or someone has changed the configuration files of Grub. The third variant is that you have some kind of sophisticated version of UEFI.

Go to UEFI (F2 or DEL or whatever you have) and see what is selected in the UEFI boot settings. I have something like this:
Settings>>Boot>>UEFI Boot Drive BBS
What is selected there? I have this options: ubuntu, UEFI OS, UEFI Built-in EFI Shell
Try to load with different options.

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

User avatar
gychang
Posts: 554
Joined: Fri Aug 28, 2020 4:51 pm
Location: San Diego, CA
Has thanked: 195 times
Been thanked: 51 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by gychang »

thanks Grey for helping out. Although not able to dual boot, I am able to boot FP with USB stick with Sav file on HD partition, appreciate it.

======

Puppy Bytes, utube videos
https://www.youtube.com/channel/UCg-DUU ... u62_iqR-MA

======

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Grey »

gychang wrote: Wed Dec 09, 2020 5:15 pm

I am able to boot FP with USB stick with Sav file on HD partition, appreciate it.

Well, as an option, it will do for now. Yet the goal was not the same :)

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

Clarity
Posts: 3328
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1371 times
Been thanked: 442 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Clarity »

I have followed this thread and understand what is asked and where it has achieved. You have exposed one issue that I hope the WoofCE developers address in 2021: GRUB2 needs to be fully installed with its utilities. Had they been built-in to the PUP, you "may" not have agonized the problem you surfaced...at least not in the same way.

I want to offer an idea and ask if either will test and report. I ask this as I am curious if what you are seeing is h/w (namely firmware) related or if its something else.

Again, I realize that what I share here DOES NOT address the particular method this thread started upon or ended prior to this post.

My experience
I have "elected" since the beginning of this year when WoofCE made some changes that affords the generation of 2020 PUPs to boot in UEFI PCs in very much the same way that Ubuntu does.

Today, all of my 2020 PUPs are booted in the same way as my Ubuntus do: via their ISOs with persistence saved to local media. I DO NOT install nor expand ISOs to media. From my viewpoint the base system remain untamperable and secure allowing me to start anew at any time, while negating the additional storage a full/frugal install requires. Thus the ONLY additional storage is my persistence needs and it affords me the same advantages in system operations that WoofCE PUPs and Ubuntus give. Booting directly from distro's ISO, I get No loss of functionality, No loss of performance, No loss ...

My Request
OK, I have been using a boot-helper, 1st described in the old-forum by @ETP and re-dressed several time in this forum after WoofCE developers improved PUP boots. It is SuperGrub2 (SG2D).

  1. Download it (15mb), and expand its ISO to media (USB/DVD/CD).

  2. Write ALL PUPs-other ISOs to a /boot-isos folder. DO NOT tamper with the ISO files

  3. At boot time, SG2D will list all of your PUPs, Ubuntus, Clonezilla, etc in that folder

  4. You, the user, choose your ISO and boot to desktop in EXACTLY the same manner as you would any installed distro

If you choose to test, please report back your results.

Thanks

User avatar
Grey
Posts: 2003
Joined: Wed Jul 22, 2020 12:33 am
Location: Russia
Has thanked: 75 times
Been thanked: 365 times

Re: grub2 issue with FP64/Ubuntu 20.02

Post by Grey »

Hi, Clarity. In general, you said correctly. You have already correctly noticed that the task was to use the ready-made Grub, which many already have. But here everything is more complicated and there are at least three snags :)

First, some users do not trust direct launch from ISO. The reason is obvious - so far this is NOT the method recommended by the authors of the official versions.

Secondly, in theory, the launch should be slightly slower. Yes, maybe not by sight, but slower. Especially on older machines. Puppy positions himself as a universal system, but there are many users of slow computers.

Thirdly, some experienced users simply do not accept this launch method ... well, how can I tell you ... well, there is some kind of internal resistance :)

Fossapup OS, Ryzen 5 3600 CPU, 64 GB RAM, GeForce GTX 1050 Ti 4 GB, Sound Blaster Audigy Rx with amplifier + Yamaha speakers for loud sound, USB Sound Blaster X-Fi Surround 5.1 Pro V3 + headphones for quiet sound.

Clarity
Posts: 3328
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1371 times
Been thanked: 442 times

Re: grub2 issue with FP64 after installing Ubuntu 20.02

Post by Clarity »

Thanks @Grey for your comments.

Your 1st & 3rd, I agree!!!

But the 2nd, I am not so sure. Test and you will see. I have older PCs. So, if you try the methods, and time it versus Frugal, you might be surprised what you find....on older PCs.

Thanks for what you currently have share and done, here.

P.S. (Edit) I have a SG2D USB which also has an added Frugal folder on its partition #1 along with the folder of ISOs (/boot-isos). I have booted using the FossaPUP ISO AND I have booted the same FossaPUP distro, Frugal. From my "timing" findings, it validates, YOU will be surprised at what you will find. ... try it and see for yourself. Your Xeon PC should fly thru this.

Oh, and please report your findings, please.

Post Reply

Return to “Fossapup64”