LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How do I dual boot Slackware 14.2 and Ubuntu 20.4? (https://www.linuxquestions.org/questions/linux-software-2/how-do-i-dual-boot-slackware-14-2-and-ubuntu-20-4-a-4175694327/)

cesarsj 04-26-2021 07:29 PM

How do I dual boot Slackware 14.2 and Ubuntu 20.4?
 
When I was with lilo, I was already going straight to Slackware, but after I switched to Grub, when I click on Ubuntu, it appears: first load kernel.

hazel 04-27-2021 12:08 PM

It looks like your GRUB install went wrong. Can you boot your Slackware system from GRUB? If so, I would do that and reinstall LILO since it was working well for you. Then you can add Ubuntu to the LILO menu. It isn't difficult to do.

I wonder if you have fallen foul of the OS-prober script that comes with GRUB. I discovered some time ago, when I dual-booted Debian and Crux, that it plays up badly if it finds LILO configuration files on other partitions.

colorpurple21859 04-27-2021 06:43 PM

which distro is controlling grub. slackware or ubuntu? which ever one it is post the /boot/grub/grub.cfg

sundialsvcs 04-27-2021 07:57 PM

"It sure would scare me to have two Linux distros alternately in control of ... I presume ... the same underlying system file-structure. What originally prompted you to do this?

hazel 04-28-2021 04:37 AM

Quote:

Originally Posted by sundialsvcs (Post 6245693)
"It sure would scare me to have two Linux distros alternately in control of ... I presume ... the same underlying system file-structure. What originally prompted you to do this?

I'm sure they're on separate partitions. I've been doing that for years and never had any serious problems. The problem is that they both want to control the bootloader.

cesarsj 04-28-2021 07:28 AM

Quote:

Originally Posted by colorpurple21859 (Post 6245676)
which distro is controlling grub. slackware or ubuntu? which ever one it is post the /boot/grub/grub.cfg

Slackware 14.2

cesarsj 04-28-2021 07:33 AM

Quote:

Originally Posted by hazel (Post 6245565)
It looks like your GRUB install went wrong. Can you boot your Slackware system from GRUB? If so, I would do that and reinstall LILO since it was working well for you. Then you can add Ubuntu to the LILO menu. It isn't difficult to do.

I wonder if you have fallen foul of the OS-prober script that comes with GRUB. I discovered some time ago, when I dual-booted Debian and Crux, that it plays up badly if it finds LILO configuration files on other partitions.

When I was Lilo, there was no Ubuntu option, and I went straight to Slackware. With Grub at least Ubuntu appears, however, it doesn't find /boot/vmlinuz-5.x, and Slackware works because it finds /boot/vmlinuz-4.X. But I think the problem involves the EFI partition, and that is an important detail that I forgot to mention. Because in / EFI there are Windows and Slackware, but not Ubuntu, and I don't know how to add Ubuntu there, would anyone know how?

With EFI, for me to load Windows, I have to press F12 at boot and select Windows on a blue screen, if I don't click F12 it goes to Grub (when LILO, I went straight to Slackware)

hazel 04-28-2021 08:46 AM

Aha! So it's an EFI native boot, not MBR. That should mean your LILO is actually ELILO. Now on your EFI partition, you should find a file in the EFI/Slackware directory called elilo.conf. It's a text file and you can edit it as root to add a new stanza for Ubuntu. But unlike GRUB, ELILO cannot read any filesystems except vfat, so it can only load kernels and initrds that are found on the EFI system partition.

What I would do in your position is:
1) Go to root and mount the ESP in its usual position on /boot/efi.
2) Copy over your Ubuntu kernel and initrd to somewhere on /boot/efi/EFI. You can create a Ubuntu folder if you like.
3) You will need an ELILO menu to allow you to choose between Slackware
and Ubuntu. Put elilo.conf into your favorite editor and add the line
Code:

chooser=textmenu
message=textmenu-message.msg

up at the top. Then create a new stanza for Ubuntu using the existing Slackware one as a guide. For example, part of my file has:
Code:

image=/EFI/slack/vmlinuz-generic-5.4.25
        label="slackware"
        initrd=/EFI/slack/initrd.gz
        read-only
        append="root=/dev/sda6 vga=791 fbcon=nodefer  ro quiet"
#
image=/EFI/slack/vmlinuz-generic-5.10.17
        label="Slackware new"
        initrd=/EFI/slack/initrd-5.10.gz
        read-only
        append="root=/dev/sda10 vga=normal ro"
#
image=/EFI/lfs10/vmlinuz-5.8.1-lfs-svn
        label=newlfs
        read-only
        append="root=/dev/sda9 vga=normal ro quiet"

4) If you look in Slackware's /usr/share/doc/elilo.../examples/textmenu_chooser directory, you will see a file called textmenu-message.msg. This is the textmenu that you have asked ELILO to look for. Copy it into EFI/Slackware alongside elilo.conf. Then hopefully when you reboot, you will see Ubuntu alongside Slackware.

cesarsj 04-28-2021 09:08 AM

Quote:

Originally Posted by hazel (Post 6245863)
Aha! So it's an EFI native boot, not MBR. That should mean your LILO is actually ELILO. Now on your EFI partition, you should find a file in the EFI/Slackware directory called elilo.conf. It's a text file and you can edit it as root to add a new stanza for Ubuntu. But unlike GRUB, ELILO cannot read any filesystems except vfat, so it can only load kernels and initrds that are found on the EFI system partition.

What I would do in your position is:
1) Go to root and mount the ESP in its usual position on /boot/efi.
2) Copy over your Ubuntu kernel and initrd to somewhere on /boot/efi/EFI. You can create a Ubuntu folder if you like.
3) You will need an ELILO menu to allow you to choose between Slackware
and Ubuntu. Put elilo.conf into your favorite editor and add the line
Code:

chooser=textmenu
message=textmenu-message.msg

up at the top. Then create a new stanza for Ubuntu using the existing Slackware one as a guide. For example, part of my file has:
Code:

image=/EFI/slack/vmlinuz-generic-5.4.25
        label="slackware"
        initrd=/EFI/slack/initrd.gz
        read-only
        append="root=/dev/sda6 vga=791 fbcon=nodefer  ro quiet"
#
image=/EFI/slack/vmlinuz-generic-5.10.17
        label="Slackware new"
        initrd=/EFI/slack/initrd-5.10.gz
        read-only
        append="root=/dev/sda10 vga=normal ro"
#
image=/EFI/lfs10/vmlinuz-5.8.1-lfs-svn
        label=newlfs
        read-only
        append="root=/dev/sda9 vga=normal ro quiet"

4) If you look in Slackware's /usr/share/doc/elilo.../examples/textmenu_chooser directory, you will see a file called textmenu-message.msg. This is the textmenu that you have asked ELILO to look for. Copy it into EFI/Slackware alongside elilo.conf. Then hopefully when you reboot, you will see Ubuntu alongside Slackware.

I will try your instructions on the weekend, as it is the machine I use for the service, so if I have a problem, I have more time to try to fix it.

But, before trying everything you said, should I go back to lilo? Well now is the grub. If so, how do I get back to lilo?

hazel 04-28-2021 09:32 AM

You'd have to use efibootmgr to make elilo the first choice, not grub. In any case, let's start by establishing which program you were actually using before you installed GRUB because there seems to be some confusion. Was it ELILO in EFI native mode or was it LILO in legacy mode?

colorpurple21859 04-28-2021 09:32 AM

Quote:

it appears: first load kernel.
this would indicate the "set root=(?,?) is wrong for the location of ubuntu kernel. Is ubuntu on a different drive or has a separate boot partition?

cesarsj 04-28-2021 11:24 AM

Quote:

Originally Posted by colorpurple21859 (Post 6245883)
this would indicate the "set root=(?,?) is wrong for the location of ubuntu kernel. Is ubuntu on a different drive or has a separate boot partition?

It has a different partition. I even tried to set it to the partition (hd0, gpt11), where Ubuntu is, but says it doesn't recognize the file system, even though, during Ubuntu installation, I chose ext4, but the grub command line doesn't recognize it.

colorpurple21859 04-28-2021 12:07 PM

Post the output of
lsblk -f

cesarsj 04-28-2021 12:14 PM

Quote:

Originally Posted by colorpurple21859 (Post 6245929)
Post the output of
lsblk -f

NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs EC90204790201B1A
├─sda2 vfat E61D-94F0 /boot/efi
├─sda3
├─sda4 ntfs D6501AD2501AB8E7
├─sda5 swap 880d0fc3-35c0-44a6-8db7-35588573a81d [SWAP]
├─sda6 ext4 c97facbc-9ed5-401c-9dcc-909dbca470f3 /
├─sda7 ext4 efed0885-54e8-48ab-8949-053d6cf6ef77 /home
├─sda8 ext4 3e5f18b1-3d9d-45b4-9f6a-17ca88e319e4 /usr
├─sda9 ext4 94f8b074-2746-459c-be2e-3569e07e0c93
├─sda10 vfat FC57-D059
├─sda11 vfat CCB7-E5F6
└─sda12 ext4 d8151bea-e18a-4ebc-a93d-7f8187e00e03
sr0
mmcblk0
└─mmcblk0p1 vfat 88B4-1905

I'm sorry, in the previous answer I said gpt11, but it is gpt12 where is Ubuntu 20.04 LTS.Still, grub says it doesn't recognize the gpt12 file system.

cesarsj 04-28-2021 12:23 PM

Quote:

Originally Posted by cesarsj (Post 6245930)
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
├─sda1 ntfs EC90204790201B1A
├─sda2 vfat E61D-94F0 /boot/efi
├─sda3
├─sda4 ntfs D6501AD2501AB8E7
├─sda5 swap 880d0fc3-35c0-44a6-8db7-35588573a81d [SWAP]
├─sda6 ext4 c97facbc-9ed5-401c-9dcc-909dbca470f3 /
├─sda7 ext4 efed0885-54e8-48ab-8949-053d6cf6ef77 /home
├─sda8 ext4 3e5f18b1-3d9d-45b4-9f6a-17ca88e319e4 /usr
├─sda9 ext4 94f8b074-2746-459c-be2e-3569e07e0c93
├─sda10 vfat FC57-D059
├─sda11 vfat CCB7-E5F6
└─sda12 ext4 d8151bea-e18a-4ebc-a93d-7f8187e00e03
sr0
mmcblk0
└─mmcblk0p1 vfat 88B4-1905

I'm sorry, in the previous answer I said gpt11, but it is gpt12 where is Ubuntu 20.04 LTS.Still, grub says it doesn't recognize the gpt12 file system.

It looks like this: Partition hd0,gpt12: No Know filesystem detected = Partition start at 449372160 - Total size 645304320 sectors.


All times are GMT -5. The time now is 07:52 AM.