LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Syslinux (extlinux) as boot loader for triple boot system with Slackware as dominant system. (https://www.linuxquestions.org/questions/slackware-14/syslinux-extlinux-as-boot-loader-for-triple-boot-system-with-slackware-as-dominant-system-4175631834/)

globetrotterdk 06-13-2018 02:32 AM

Syslinux (extlinux) as boot loader for triple boot system with Slackware as dominant system.
 
How do I setup triple booting with a fresh Slackware64 14.2 install (with Studioware) as the default system, using Syslinux? I have dual boot systems (Win7 and Slackware) functioning on a couple of computers and would like to take this to the next level with my tower computer. I am setting my tower computer up with audio creation/production as its core purpose. Due to hardware support and variations in available software and LADSPA and VST plugins available, the idea is for my Slackware64 14.2 install to be the dominant system, while Devuan and Win7 are sort of slave systems. What I mean by this is that everything gets booted through a Slackware64 installed Syslinux (extlinux). This is also an important point, as I have had issues with the motherboard UEFI, both in UEFI and Legacy mode. My conclusion at this point is that the UEFI for my motherboard has a built in fuzzy logic, as there is no "switch" as such between legacy and uefi mode. Which mode is used, depends rather on the partitioning scheme of the Windows system (if there is one), or otherwise by the boot menu where live usb pen drives can be booted in either "usb" or "uefi" mode and then a system installed in that mode. This has the unfortunate side effect that neither Linux descriptors (/dev/sdX) nor PTUUID (when the drive has no partitions) descriptors remain constant when systems are booted from different hard drives or USB pen drives.

Having never tried this, and not having much experience with extlinux, I am posting the contents of my proposed /boot/extlinux/extlinux.conf file. While the Slackware APPEND has been modified to conform for work with audio production, both it and the Windows sections function without problems at this time, I am uncertain how the Devuan section will work, as I have yet to install Devuan. I suspect that the KERNEL parameter may need to be adjusted for the disk or partition that the Devuan system will reside on, but am unsure. As I want the Devuan install to be a "slave" system, I don't believe that I need to install extlinux on the Devuan system hard disk, but again I am unsure. I haven't been able to find any documentation on this specific, multiboot issue, so I am hoping that someone in the forum has experimented with this:

Code:

UI menu.c32
PROMPT 0
MENU TITLE Boot Menu
TIMEOUT 200
DEFAULT huge
        LABEL huge
                MENU LABEL Slackware (-huge)
                KERNEL /boot/vmlinuz-huge
                APPEND root=/dev/sdb1 vga=normal ro threadirqs

        LABEL devuan
                MENU LABEL Devuan
                KERNEL /vmlinuz
                APPEND initrd=/initrd.img ro root=/dev/sdc1

        LABEL windows
                MENU LABEL Windows
                COM32 chain.c32
                APPEND hd1 1


RadicalDreamer 06-13-2018 04:20 AM

I don't know. Have you tried rEFInd? I triple boot 2 systems with it. http://slackbuilds.org/repository/14...?search=refind

Darth Vader 06-13-2018 05:06 AM

@globetrotterdk

Being myself an EXTLINUX user, which I prefer much against LILO, let me to put here some notes.

Unlike LILO, the EXTLINUX installs always in a partition MBR, while the harddrive MBR get just a generic MBR, looking for the active partition. So, the partition where's installed the EXTLINUX should be marked with the "boot" flag.

That's WHY it can read only its own partition, BUT it literally read the filesystem, unlike LILO who memorize absolute disk sectors, then there is no need to update the bootloader when you install a new kernel, even it is recommended to do it, because a new kernel may still live in the filesystem log while rebooting.

The paths specified into "extlinux.conf" are relative to the underlying partition. Then the "/vmlinuz" has the sense for it to look for a file "vmlinuz" right on the root of its own partition.

To boot another Linux OS, installed in another hard disk, it is possible to use only the chainloading, like you do for Windows. That's because the EXTLINUX does not know to look in another partitions, beyond its own one.

So, a valid entry would look probably like:
Code:

        LABEL devuan
                MENU LABEL Debian without SystemD
                COM32 chain.c32
                APPEND hd2 1

OF course, there you should setup the Devuan's own bootloader within its own partition, either EXTLINUX or another one.

globetrotterdk 06-13-2018 05:12 AM

Quote:

Originally Posted by RadicalDreamer (Post 5866914)
I don't know. Have you tried rEFInd? I triple boot 2 systems with it. http://slackbuilds.org/repository/14...?search=refind

Thanks for the reply. I have tried rEFInd before, and while it has saved my bacon more than once, I am not a big fan of it. Not to mention of course, that as far as I am aware, rEFInd can't be used in "legacy" mode, which is what I am using.

globetrotterdk 06-13-2018 06:10 AM

Quote:

Originally Posted by Darth Vader (Post 5866932)
@globetrotterdkThat's WHY it can read only its own partition, BUT it literally read the filesystem, unlike LILO who memorize absolute disk sectors, then there is no need to update the bootloader when you install a new kernel, even it is recommended to do it, because a new kernel may still live in the filesystem log while rebooting.

Yes, I discovered that. Extremely cool. Unfortunately, I have run into a problem on the Devuan side. In the installer, after the install itself is completed, without installing a boot loader, I can bring up an interactive shell. My intention was to try to do the same thing as I did in the Slackware installer:

Code:

# chroot /mnt /bin/bash
# . /etc/profile
# mkdir -p /boot/extlinux
# extlinux --install /boot/extlinux
# dd if=/usr/share/syslinux/mbr.bin of=/dev/sdd

Unfortunately, I get:

Code:

# chroot /mnt /bin/bash
chroot: can't execute '/bin/bash/sh': No such file or directory

Any ideas? Should I have loaded some modules when asked during the start of the install? I didn't notice anything relevant.

Darth Vader 06-13-2018 06:34 AM

Sorry, but I am not a specialist in Devuan.

But, I believe you have to study how to install Devuan with the bootloader within its own partition, treating it as stand-alone OS.

When you end up with this design, you can consider the chainloading from Slackware's EXTLINUX or whatever.

laprjns 06-13-2018 06:17 PM

Quote:

Originally Posted by globetrotterdk (Post 5866935)
Thanks for the reply. I have tried rEFInd before, and while it has saved my bacon more than once, I am not a big fan of it. Not to mention of course, that as far as I am aware, rEFInd can't be used in "legacy" mode, which is what I am using.

While it is true that rEFInd will not run on a non-efi system (i.e legacy systems), it does boot OSs installed on an efi system in legacy mode. It does need to be configure to do so. Here's a snip from the refind.efi file;

Code:

# Which types of boot loaders to search, and in what order to display them:
#  internal      - internal EFI disk-based boot loaders
#  external      - external EFI disk-based boot loaders
#  optical      - EFI optical discs (CD, DVD, etc.)
#  netboot      - EFI network (PXE) boot options
#  hdbios        - BIOS disk-based boot loaders
#  biosexternal  - BIOS external boot loaders (USB, eSATA, etc.)
#  cd            - BIOS optical-disc boot loaders
#  manual        - use stanzas later in this configuration file
# Note that the legacy BIOS options require firmware support, which is
# not present on all computers.
# The netboot option is experimental and relies on the ipxe.efi and
# ipxe_discover.efi program files.
# On UEFI PCs, default is internal,external,optical,manual
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
#
scanfor internal,external,optical,manual,hdbios,biosexternal

# By default, rEFInd relies on the UEFI firmware to detect BIOS-mode boot
# devices. This sometimes doesn't detect all the available devices, though.
# For these cases, uefi_deep_legacy_scan results in a forced scan and
# modification of NVRAM variables on each boot. Adding "0", "off", or
# "false" resets to the default value. This token has no effect on Macs or
# when no BIOS-mode options are set via scanfor.
# Default is unset (or "uefi_deep_legacy_scan false")
#
uefi_deep_legacy_scan

I have several OS loaded on each of my various computers with some having OS installed in legacy mode All use rEFInd to manage the booting system. You should really give it another shot, but remember that rEFInd is a boot manager and does not have boot loading capabilities. I believe your issue is with boot loading which could be a result of some faulty efi firmware. What make and model is your motherboard? What version of efi firmware is it running?

globetrotterdk 06-14-2018 01:45 AM

Quote:

Originally Posted by laprjns (Post 5867265)
I believe your issue is with boot loading which could be a result of some faulty efi firmware. What make and model is your motherboard? What version of efi firmware is it running?

Here is the info:
Code:

# dmidecode  | grep -A4 '^Base Board Information'
Base Board Information
        Manufacturer: ASRock
        Product Name: 970 Pro3 R2.0
        Version:                     
# dmesg | grep DMI:
[    0.000000] DMI: To Be Filled By O.E.M. To Be Filled By O.E.M./970 Pro3 R2.0, BIOS P2.80 05/31/2016


laprjns 06-14-2018 06:52 PM

Seem like a recent version of Uefi firmware. Probable not a issue. Anyway, looks like you solve the problem.

globetrotterdk 06-14-2018 11:33 PM

Quote:

Originally Posted by Darth Vader (Post 5866957)
Sorry, but I am not a specialist in Devuan.

But, I believe you have to study how to install Devuan with the bootloader within its own partition, treating it as stand-alone OS.

When you end up with this design, you can consider the chainloading from Slackware's EXTLINUX or whatever.

OK, I reinstalled and have what I believe is a working system, but am having problems with chain loading the Devuan system. I can't seem to figure out what extlinux expects regarding the entry in the /boot/extlinux/extlinux.conf file on the target OS (Devuan).

I have tried simple:

Code:

KERNEL /vmlinuz
APPEND initrd=/initrd.img ro root=/dev/sdd1

but I get the error:

Code:

No Default or UI configuration directive found!
When I try something more complex, such as:

Code:

UI menu.c32
PROMPT 0
MENU TITLE Boot Menu
TIMEOUT 100
DEFAULT devuan

        LABEL devuan
        MENU LABEL Devuan
        KERNEL /vmlinuz
        APPEND initrd=initrd.img ro roodt=sdd1

I get the error:

Code:

failed to load COM32 file menu.c32
If I try something less complex, but still with a UI, such as:

Code:

UI chain.c32
KERNEL /vmlinuz
APPEND initrd=/initrd.img ro root=/dev/sdd1

I get the error:

Code:

failed to load COM32 file chain.c32
As a reminder, on the Slackware64 14.2 side, my /boot/extlinux/extlinux.conf entry for Devuan has constantly remained:

Code:

        LABEL devuan
        MENU LABEL Devuan
        COM32 chain.c32
        APPEND hd3 1

The documentation seems a bit sparse in this area. Do you have any ideas?

Darth Vader 06-15-2018 03:44 PM

Quote:

Originally Posted by globetrotterdk (Post 5867778)
Do you have any ideas?

You should copy the used COM32 binaries within the directory where your extlinux.conf lives, to be found by bootloader.

You will find the COM32 binaries there: /usr/share/syslinux, at least in the Slackware case.

globetrotterdk 06-15-2018 05:01 PM

Quote:

Originally Posted by Darth Vader (Post 5868087)
You should copy the used COM32 binaries within the directory where your extlinux.conf lives, to be found by bootloader.

You will find the COM32 binaries there: /usr/share/syslinux, at least in the Slackware case.

Thanks for the reply. In both Slackware and Devuan, the binaries/modules are copied to /boot/extlinux. That is where extlinux.conf also resides on both distros. However, I am still getting the errors. Not sure why.

I have just set up a Win7, Devuan dual boot today. Here is my /boot/extlinux/extlinux.conf file:

Code:

UI menu.c32
PROMPT 0
MENU TITLE Boot Menu
TIMEOUT 200
DEFAULT devuan

        LABEL devuan
        MENU LABEL Devuan - Debian without SystemD
        KERNEL /vmlinuz
        APPEND initrd=/initrd.img ro root=/dev/sda3

        LABEL windows
        MENU LABEL Windows 7
        COM32 chain.c32
        APPEND hd0 1

So the chain loader works fine for Windows in both Devuan and Slackware, and the:

Code:

        KERNEL /vmlinuz
        APPEND initrd=/initrd.img ro root=/dev/sda3

work fine for booting Devuan. On my tower computer, it reads:

Code:

root=/dev/sdd1
but it seems to me that there is something missing, regarding how any Linux distro is booted via chain loading. Are you sure a Linux distro can be chain loaded in a dual or triple boot situation with extlinux and the chain loader command?

Code:

COM32 chain.c32
I can't find any documentation on the syntax in such a scenario.

laprjns 06-15-2018 07:10 PM

Maybe this will help https://wiki.archlinux.org/index.php...x#Chainloading

globetrotterdk 06-16-2018 02:14 AM

Quote:

Originally Posted by laprjns (Post 5868126)

Thanks.
I just had a successful boot into the Devuan ASCII install! It may not look pretty and could probably be refined, but here is the solution:

Slackware64 14.2 /boot/extlinux/extlinux.conf entry for Devuan ASCII install:

Code:

        LABEL devuan
                MENU LABEL Devuan - Debian without SystemD
                COM32 chain.c32
                APPEND hd3 1

Devuan ASCII /boot/extlinux/extlinux.conf entry (Devuan ASCII only):

Code:

UI menu.c32
PROMPT 0
MENU TITLE Welcome to Devuan - Debian without SystemD
TIMEOUT 100
DEFAULT devuan

        LABEL devuan
                MENU LABEL Devuan
                KERNEL /vmlinuz
                APPEND initrd=/initrd.img ro root=/dev/sdd1

Basically, what got me into the right mindset to sort this out, was that when chain loading Windows 7, Windows is friendly enough to present a splash screen. As neither Devuan (nor any other Linux distro I am aware of) presents a splash screen like Windows, then the extlinux "menu.c32" could substitute for the splash screen. As all I want to do with the Devuan install is to be able to boot into it, reboot and shutdown, I don't really need a menu, as Slackware is the "master" in this triple boot setup, but extlinux is still expecting something as far as a graphic "splash", "menu", "announcement", whatever you want to call it. So, the menu.c32 does that, but the /boot/extlinux/extlinux.conf still has to be complete, so that extlinux is sure that something graphical is going to happen when booting Devuan.

MisterL 06-17-2018 02:40 PM

This looks pretty enough :)
I've also experimented with putting all initrds on the bootable partition, but as with lilo, I'd need to mount it every time when updating other OSs. So using extlinux on devuan is the right thing, I think, and it works.


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