Page 1 of 1

grub2 issue with FP64 after installing Ubuntu 20.02

Posted: Fri Dec 04, 2020 6:47 pm
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.


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Sat Dec 05, 2020 1:13 am
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!


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Sat Dec 05, 2020 1:31 am
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


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Sat Dec 05, 2020 1:42 am
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.


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Sat Dec 05, 2020 6:13 pm
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...


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Sun Dec 06, 2020 8:52 am
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 :)


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Mon Dec 07, 2020 6:40 am
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

}


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Mon Dec 07, 2020 5:08 pm
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 995 times

Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Mon Dec 07, 2020 10:05 pm
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

}


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Tue Dec 08, 2020 9:06 am
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

Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Tue Dec 08, 2020 5:23 pm
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

Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Wed Dec 09, 2020 5:44 am
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.


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Wed Dec 09, 2020 4:06 pm
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.


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Wed Dec 09, 2020 4:46 pm
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.


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Wed Dec 09, 2020 5:15 pm
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.


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Wed Dec 09, 2020 5:22 pm
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 :)


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Thu Dec 10, 2020 2:52 am
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


Re: grub2 issue with FP64/Ubuntu 20.02

Posted: Thu Dec 10, 2020 4:43 am
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 :)


Re: grub2 issue with FP64 after installing Ubuntu 20.02

Posted: Thu Dec 10, 2020 8:37 pm
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.