grub4dos and Ubuntu 18.04

Using applications, configuring, problems
Message
Author
cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

grub4dos and Ubuntu 18.04

#1 Post by cappyzeb »

grub4dos not wanting to boot ubuntu 18.04 after upgrade. I just upgraded today and now my xubuntu won't boot. It will boot if I use grub2 to boot, but for some reason, it won't boot off the grub4dos menu.lst created by puppy. This only happened today after ubuntu 18.04 updated a new base. I restarted after update and upgrade, and it shows error unsupported action when I tried to boot in with menu.lst created by puppy. So I logged into grub2 and it did boot. But not with the grub4dos menu.lst Does anyone know what's going on here?

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

Re: grub4dos and Ubuntu 18.04

#2 Post by rufwoof »

cappyzeb wrote:This only happened today after ubuntu 18.04 updated a new base.
Suspect that the ubuntu update also updated the bootloader (replacing your grub4dos with grub2). Which would mean having to re-do a grub4dos install (there are options to not create a new menu.lst ... or ensure you backup copy the current menu.lst before installing grub4dos).
[size=75]( ͡° ͜ʖ ͡°) :wq[/size]
[url=http://murga-linux.com/puppy/viewtopic.php?p=1028256#1028256][size=75]Fatdog multi-session usb[/url][/size]
[size=75][url=https://hashbang.sh]echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh[/url][/size]

cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

Re: grub4dos and Ubuntu 18.04

#3 Post by cappyzeb »

rufwoof wrote:
cappyzeb wrote:This only happened today after ubuntu 18.04 updated a new base.
Suspect that the ubuntu update also updated the bootloader (replacing your grub4dos with grub2). Which would mean having to re-do a grub4dos install (there are options to not create a new menu.lst ... or ensure you backup copy the current menu.lst before installing grub4dos).

I wish it were that simple. The grub2 is set to bootload off it's own partition and not the main mbr. So the menu.lst remains intact. The issue is that the updated ubuntu 18.04 is not wanting to boot off the grub4dos menu.lst created by puppy.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#4 Post by fredx181 »

Maybe This has to do with your problem.
This How-To is to address an issue when trying to use Grub4DOS with newer systems with 64-bit Ext4 partitions, typically created when another newer Linux distro is installed.
Fred

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#5 Post by bigpup »

Have you booted into a Puppy version?
Run Grub4dos Config and let it do a normal install and make an updated menu.lst?
First make sure you are trying to use the latest version of Grub4dos Config to setup the boot loader.
Just released a new version with some bug fixes.
http://www.murga-linux.com/puppy/viewtopic.php?t=51697

If this does not fix the problem. Ubuntu has done something to how it boots that Grub4dos does not understand.

Can you post the menu entry that is in Grub4dos menu.lst and what is used for entry in Grub2.
Maybe it will show what is not correct about the Grub4dos menu.lst
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

#6 Post by cappyzeb »

bigpup wrote:Have you booted into a Puppy version?
Run Grub4dos Config and let it do a normal install and make an updated menu.lst?
First make sure you are trying to use the latest version of Grub4dos Config to setup the boot loader.
Just released a new version with some bug fixes.
http://www.murga-linux.com/puppy/viewtopic.php?t=51697

If this does not fix the problem. Ubuntu has done something to how it boots that Grub4dos does not understand.

Can you post the menu entry that is in Grub4dos menu.lst and what is used for entry in Grub2.
Maybe it will show what is not correct about the Grub4dos menu.lst
This is the menu entry created with the latest xenial puppy release:

title notworking(sda5)
uuid 02e098cf-29db-44b8-b51c-f96d466019de
kernel /vmlinuz root=/dev/sda5 ro
initrd /initrd.img

I suspect it might have something to do with the new 18.04 ubuntu release not wanting to work with grub4dos

cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

#7 Post by cappyzeb »

fredx181 wrote:Maybe This has to do with your problem.
This How-To is to address an issue when trying to use Grub4DOS with newer systems with 64-bit Ext4 partitions, typically created when another newer Linux distro is installed.
Fred

This could be, i'm going to look into this

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#8 Post by rcrsn51 »

Code: Select all

title notworking(sda5)
uuid 02e098cf-29db-44b8-b51c-f96d466019de
kernel /vmlinuz root=/dev/sda5 ro
initrd /initrd.img 
Are you saying that you inserted that code into a GRUB2 menu?

That's definitely not going to work.

You would need to convert it to GRUB2 format.

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#9 Post by foxpup »

bigpup wrote:Can you post the menu entry that is in Grub4dos menu.lst and what is used for entry in Grub2.
cappyzeb, could you post the working Grub2 entry for ubuntu as well?

cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

#10 Post by cappyzeb »

foxpup wrote:
bigpup wrote:Can you post the menu entry that is in Grub4dos menu.lst and what is used for entry in Grub2.
cappyzeb, could you post the working Grub2 entry for ubuntu as well?

This is from the /boot/grub/grub.cfg file entry I used to boot in:


### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=1
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-02e098cf-29db-44b8-b51c-f96d466019de' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 02e098cf-29db-44b8-b51c-f96d466019de
else
search --no-floppy --fs-uuid --set=root 02e098cf-29db-44b8-b51c-f96d466019de
fi
linux /boot/vmlinuz-4.15.0-43-generic root=UUID=02e098cf-29db-44b8-b51c-f96d466019de ro
initrd /boot/initrd.img-4.15.0-43-generic
}

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

#11 Post by foxpup »

The 2 lines that intrest us are the kernel (linux) line and the init line. They are at the end. A lot of the lines above are about the graphical interface, not important.
The kernel and init line should translate into this for menu.lst:

Code: Select all

title Ubuntu
find --set-root --ignore-floppies /boot/vmlinuz-4.15.0-43-generic
kernel /boot/vmlinuz-4.15.0-43-generic root=UUID=02e098cf-29db-44b8-b51c-f96d466019de ro
initrd /boot/initrd.img-4.15.0-43-generic 
You need to specify the full path from the root of the partition for the kernel and init.
First you have to find the partition, set the root.
I personally prefer searching a file, the kernel or the init, and not the UUID. In case it does not work, you could try it with the uuid anyway, like in the grub2 menuentry.

Code: Select all

title Ubuntu
uuid 02e098cf-29db-44b8-b51c-f96d466019de
kernel /boot/vmlinuz-4.15.0-43-generic root=UUID=02e098cf-29db-44b8-b51c-f96d466019de ro
initrd /boot/initrd.img-4.15.0-43-generic 
I also wonder whether the root=UUID=.... boot parameter on the kernel line is really necessary. That seems redundant. You could try leaving it out, out of curiosity.

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#12 Post by jafadmin »

version numbers may have changed on vmlinuz and initrd.img

At any rate, unless we can see you menu.lst entry for it, we're just guessing ..

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#13 Post by fredx181 »

cappyzeb wrote:
fredx181 wrote:Maybe This has to do with your problem.
This How-To is to address an issue when trying to use Grub4DOS with newer systems with 64-bit Ext4 partitions, typically created when another newer Linux distro is installed.
Fred

This could be, i'm going to look into this
If the Ubuntu installer did format the partition, I'm almost sure that the problem is because of that "64-bit Ext4' issue, I've experienced that several times, all (most?) newest Linux OS have e2fsprogs version 1.43 which will format ext4 this way, resulting that grub4dos doesn't work.

EDIT: Hmm.. it's not clear to me if you used "Ubuntu installer", you said "upgrade" in first post, so it may be different situation then?

Fred

peterw
Posts: 430
Joined: Wed 19 Jul 2006, 12:12
Location: UK

grub4dos has issues

#14 Post by peterw »

After years of praising grub4dos, I to have run into this issue and gave up on it. In multiboot machines I use grub2. It is best to add your boot script here /etc/grub.d/40_custom. Here is the contents of mine:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.

menuentry "Puppy slacko64 6.9.9.9 (sda1/slacko64)" {
set root=(hd0,1)
linux /slacko64/vmlinuz mem=1950m pmedia=atahd psubdir=slacko64
initrd /slacko64/initrd.gz
}

menuentry "Fatdog64 (sda1/fatdog-720)" {
set root=(hd0,1)
linux /fatdog-720/vmlinuz mem=1950m pmedia=atahd psubdir=fatdog-720
initrd /fatdog-720/initrd
}

menuentry "Puppy LxPupSc 17.09.1 (sda1/lxpup)" {
set root=(hd0,1)
linux /lxpup/vmlinuz pmedia=atahd psubdir=lxpup
initrd /lxpup/initrd.gz
}

menuentry "Puppy slacko 6.3.2 (sda1/slacko)" {
set root=(hd0,1)
linux /slacko/vmlinuz mem=1950m pmedia=atahd psubdir=slacko
initrd /slacko/initrd.gz
}

menuentry "Puppy tahr64 (sda1/tahr)" {
set root=(hd0,1)
linux /tahr/vmlinuz mem=1950m pmedia=atahd psubdir=tahr
initrd /tahr/initrd.gz
}

EOF

Ignore the "mem=1950m" it is only needed on my laptop because quirks of the laptop. This is for frugal installs and you will adjust the above to suit your circumstances.

After that go into Ubuntu and in a terminal type sudo update-grub and after that if Ubuntu updates grub on its own then it will pick up your Puppies.

foxpup
Posts: 1132
Joined: Fri 29 Jul 2016, 21:08

Re: grub4dos and Ubuntu 18.04

#15 Post by foxpup »

cappyzeb wrote:I wish it were that simple. The grub2 is set to bootload off it's own partition and not the main mbr.
I find this intriguing.
I don't know exactly where to begin my questions.
Is this old legacy with mbr or EFI?
Can you boot grub4dos AND grub2? How do you choose?
If EFI, how do you use grub4dos?
If Legacy with mbr, where is the second mbr?
???
:roll:

cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

#16 Post by cappyzeb »

foxpup wrote:The 2 lines that intrest us are the kernel (linux) line and the init line. They are at the end. A lot of the lines above are about the graphical interface, not important.
The kernel and init line should translate into this for menu.lst:

Code: Select all

title Ubuntu
find --set-root --ignore-floppies /boot/vmlinuz-4.15.0-43-generic
kernel /boot/vmlinuz-4.15.0-43-generic root=UUID=02e098cf-29db-44b8-b51c-f96d466019de ro
initrd /boot/initrd.img-4.15.0-43-generic 
You need to specify the full path from the root of the partition for the kernel and init.
First you have to find the partition, set the root.
I personally prefer searching a file, the kernel or the init, and not the UUID. In case it does not work, you could try it with the uuid anyway, like in the grub2 menuentry.

Code: Select all

title Ubuntu
uuid 02e098cf-29db-44b8-b51c-f96d466019de
kernel /boot/vmlinuz-4.15.0-43-generic root=UUID=02e098cf-29db-44b8-b51c-f96d466019de ro
initrd /boot/initrd.img-4.15.0-43-generic 
I also wonder whether the root=UUID=.... boot parameter on the kernel line is really necessary. That seems redundant. You could try leaving it out, out of curiosity.

I tried this : title Ubuntu 18.04 (sda5)
uuid 02e098cf-29db-44b8-b51c-f96d466019de
kernel /boot/vmlinuz-4.15.0-43-generic root=/dev/sda5 ro
initrd /boot/initrd.img-4.15.0-43-generic


but it does the same thing, it says error 13 I think, unsupported format or something like that

cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

#17 Post by cappyzeb »

fredx181 wrote:
cappyzeb wrote:
fredx181 wrote:Maybe This has to do with your problem.
Fred

This could be, i'm going to look into this
If the Ubuntu installer did format the partition, I'm almost sure that the problem is because of that "64-bit Ext4' issue, I've experienced that several times, all (most?) newest Linux OS have e2fsprogs version 1.43 which will format ext4 this way, resulting that grub4dos doesn't work.

EDIT: Hmm.. it's not clear to me if you used "Ubuntu installer", you said "upgrade" in first post, so it may be different situation then?

Fred
What happened is that I upgraded 16.04 to 18.04 last week. It was booting fine, although the upgrade to 18.04 caused many glitches. Such as gsku didn't' work, I couldn't copy the text output from the terminal anymore, and there were other issues too. But a few days ago I got a message from the automatic updater wanting to update the system. It said new updates were available among them, I noticed core base upgrade. So I clicked the upgrade button and let it upgrade the system. After that, it wanted to reboot, so I let it, and then after that the grub4dos doesnt' work anymore. So I'm thinking that there might be something going on with the 18.04 version. They seem to be messing with a lot of features we're used to in the previous versions, such as disabling gsku among many other things. So it wouldn't surprise me if they messed with the grub4dos too. It may be an issue with the 64 bit ext4. I am using 64 bit os. I'm looking into this. I'm trying to see if there is a way to reformat it without loosing the data. Or if this is the problem, a way to fix it.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#18 Post by rcrsn51 »

If your Ubuntu install still has its bootloader on the sda5 partition boot sector, then Grub4dos might be able to launch it with just

Code: Select all

title Ubuntu
rootnoverify (hd0,4)
chainloader +1
This might avoid having to fix the 64bit-ext4 problem.

cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

#19 Post by cappyzeb »

rcrsn51 wrote:If your Ubuntu install still has its bootloader on the sda5 partition boot sector, then Grub4dos might be able to launch it with just

Code: Select all

title Ubuntu
root (hd0,4)
chainloader +1
This might avoid having to fix the 64bit-ext4 problem.
I just tried this. I added
title Ubuntu
root (hd0,4)
chainloader +1

to the menu.lst.

I get the following message:
Filesystem type is ext2fs, partition type 0x83 chainloader +1
Error 13 invalid or unsupported executable format

This looks to me like an issue with the ubuntu 18.04 update reformatting the ex4 with e2fsprogs. If so, then this will explain why grub4dos won't boot. I'm still faced with the problem of how to fix it.

cappyzeb
Posts: 39
Joined: Tue 11 Dec 2018, 11:52

Re: grub4dos and Ubuntu 18.04

#20 Post by cappyzeb »

foxpup wrote:
cappyzeb wrote:I wish it were that simple. The grub2 is set to bootload off it's own partition and not the main mbr.
I find this intriguing.
I don't know exactly where to begin my questions.
Is this old legacy with mbr or EFI?
Can you boot grub4dos AND grub2? How do you choose?
If EFI, how do you use grub4dos?
If Legacy with mbr, where is the second mbr?
???
:roll:
Humm.... I think what you mean is that originally ubuntu 16.04 used grub2 when I installed it. It used to be 14.04 or 13..04 when I installed it, but either way, it was originally grub2. Then I cloned and added partitions and moved to different computers and hard drives many times since around 10 years ago. Some where along the line, I added multiple boots, including my favorite puppy ditros almost always on every hard drive now. I use puppy for os maintenance among other things. But at some point, I started using grub4dos. When I started using puppy, it installed grub4dos for me. This relplaced grub2 on the mbr. So now the mbr uses grb4dos. However, grub2 can still be installed on the individual partitions. For example, I have grub2 installed on sda5 in this case. On sda1 is the boot sector flagged boot, and also have a full puppy and frugal installs on sda1 which also happens to be the main mbr. On this sda1 is installed grub4dos. However, I have ubuntu 16.04 installed on sda5 which I recently upgraded to 18.04. It gives the option to have the grub2 installed and upgraded on sda5. I allow it to do this on partition sda5 only. Whenever I upraded to 18.04 and started having problems with it not booting, I was able to boot into grub2 located on sda5. I did this with the entry in menu.lst :
title Find Grub2\nBoot up grub2 if installed
errorcheck off
find --set-root --ignore-floppies --ignore-cd /boot/grub/i386-pc/core.img
kernel /boot/grub/i386-pc/core.img
find --set-root --ignore-floppies --ignore-cd /boot/grub/core.img
kernel /boot/grub/core.img
errorcheck on

This allows me to boot into grub2 on sda5 by accessing the core.img located at /boot/grub/i386-pc/core.img

Post Reply