Author Topic: How to install Plop Boot Manager 5 on Linux  (Read 2879 times)

jcalbinana

  • Newbie
  • *
  • Posts: 1
How to install Plop Boot Manager 5 on Linux
« on: November 03, 2021, 18:03:45 PM »
I would like to install the Plop Boot Manager 5 on a very old computer  without USB BIOS compatibility.

The computer has a linux installed but I do not understandt how to install it

« Last Edit: November 03, 2021, 21:42:06 PM by jcalbinana »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: How to install Plop Boot Manager 5 on Linux
« Reply #1 on: November 04, 2021, 18:09:58 PM »
Your Linux is started by a boot manager. Mostly its Grub. You can add the Plop Boot Manager as additional boot option to the boot menu.

https://www.plop.at/en/bootmanager/plpbt.bin.html#rungrub

Note: There is a difference betwee Grub and Grub2.

Grunchy

  • Newbie
  • *
  • Posts: 7
Re: How to install Plop Boot Manager 5 on Linux
« Reply #2 on: December 07, 2021, 01:28:16 AM »
Elmar, hey. I have successfully set up PLoP to boot MS-DOS from primary hda1, Windows 98 from primary hda2, Windows XP from primary hda3... but have not had success getting PLoP to boot Lubuntu from hda4 L1 (hda4 = first extended partition, hda4 L1 is the first logical partition formatted ext4 mount point "/", hda4 L2 is the second logical partition which is used for Linux Swap).

I have installed Lubuntu 16.04 over and over into the extended partition hda4 L1, and made sure the partition definition for hda4 in PLoP is 100% correct, but every single time it comes back with:

Warning:
No valid bootsector signature
Continue boot? [y/n]

Of course y does nothing except put a flashing cursor, n just goes back to PLoP.

My Linux boot profile is

HDA
hda1
hda2
hda3
*80h hda4 L1 (boot to first logical partition of hda4)

HDB, HDC, HDD are all set to "don't touch" because my laptop doesn't have more than 1 hard drive (Toshiba Satellite 2400 circa 2002, 1.6 GHz Pentium 4, 512 MB DDR Ram, 3 x USB1, 160GB Hard Drive at HDA).

If I boot to the Lubuntu live CD and check what's at hda4 L1 there's definitely "boot" flag set and there's /boot/grub stuff there.

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: How to install Plop Boot Manager 5 on Linux
« Reply #3 on: December 09, 2021, 17:08:09 PM »
Hello Grunchy,

I tried your setup. I know what the problem is and I have a solutions for you.

Lubuntu comes with Grub2 and the problem is that Grub2 can not be installed to a boot sector. Maybe its possible and I don't know how.

Instead of Grub2 you can use extlinux (part of syslinux) as Linux loader. The simplest configuration is to create the file /syslinux.cfg
Code: [Select]
prompt 0
timeout 1
default a

label a
kernel /boot/vmlinuz-4.15.0-45-generic
append initrd=/boot/initrd.img-4.15.0-45-generic root=/dev/sda5

Install extlinux to the boot sector of sda5 with "extlinux --install / --device /dev/sda5"

Now, Linux will boot from the Plop Boot Manager with *80h hda4 L1.

Note: You have to do a "sudo apt install extlinux".


« Last Edit: December 09, 2021, 17:21:15 PM by Elmar »

Grunchy

  • Newbie
  • *
  • Posts: 7
Re: How to install Plop Boot Manager 5 on Linux
« Reply #4 on: December 17, 2021, 18:17:21 PM »
Elmar, hey that looks like really good information.

I had installed Lubuntu "/" on /dev/sda5 and "swap" on /dev/sda6.

However I cannot boot into the Lubuntu to try the commands you gave me.

So I booted into the Lubuntu installer CD and called up LXTerminal, did the "sudo apt install extlinux" and then "extlinux --install / --device /dev/sda5"

It came back with:
extlinux: not a fat, ntfs, ext2/3/4, btrfs, xfs orufs1/2 filesystem: /

So then I tried something like this, I dunno:

sudo mkdir /mnt/hdd
sudo mount /dev/sda5 /mnt/hdd
extlinux --install /mnt/hdd --device /dev/sda5

It came back:

/mnt/hdd is device /dev/sda5
extlinux: cannot open device /dev/sda5

So...?
« Last Edit: December 18, 2021, 17:36:56 PM by Grunchy »

Grunchy

  • Newbie
  • *
  • Posts: 7
Re: How to install Plop Boot Manager 5 on Linux
« Reply #5 on: December 19, 2021, 20:38:07 PM »
So I discovered another environment known as "chroot": https://wiki.archlinux.org/title/Chroot

Quote
Changing root is commonly done for performing system maintenance on systems where booting and/or logging in is no longer possible. Common examples are:
  • Reinstalling the bootloader.

Using chroot
First, mount the temporary API filesystems:
Code: [Select]
# sudo mount /dev/sda5 /mnt
# cd /mnt
# mount -t proc /proc proc/
# mount -t sysfs /sys sys/
# mount --rbind /dev dev/
# mount --rbind /run run/

Finally, to change root into /location/of/new/root using a bash shell:
Code: [Select]
# chroot /mnt /bin/bash

Once I was in this Lubuntu 16.04 environment that had been installed on /dev/sda5, I was able to execute:
Quote
Code: [Select]
apt install extlinux
extlinux --install / --device /dev/sda5
vi /syslinux.cfg

Where I typed in:
Code: [Select]
prompt 0
timeout 1
default a

label a
kernel /boot/vmlinuz-4.15.0-45-generic
append initrd=/boot/initrd.img-4.15.0-45-generic root=/dev/sda5

Yet I still get this error:
Warning:
No valid bootsector signature
Continue boot? [y/n]

Then I fired up Gparted and changed /dev/sda5 to have the "boot" flag. No change.

I'm beginning to suspect there is more complexity at play here than was first appreciated...

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: How to install Plop Boot Manager 5 on Linux
« Reply #6 on: December 19, 2021, 20:53:21 PM »
I have no time at the moment to test whats wrong with the chroot, which should work fine.

The easiest is to just reinstall Lubuntu, then do the extlinux stuff, then reinstall the Plop Boot Manager with option 2 (Rewrite loader only) in the Plop Boot manager Installer.

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: How to install Plop Boot Manager 5 on Linux
« Reply #7 on: December 20, 2021, 09:00:01 AM »
I did this with the livecd successfully:

At first I cleared the boot sector of sda5 to make it impossible to boot and getting "No valid bootsector signature".
The syslinux.cfg stayed unchanged in the root of sda5.

Then booting the livecd of Lubuntu
In the terminal:
sudo bash    <- to not always have to write sudo
mount /dev/sda5 /mnt
apt install extlinux
extlinux --install /mnt --device /dev/sda5
reboot

-> Lubuntu booted from the Plop Boot Manager and sda5 without problems.



Grunchy

  • Newbie
  • *
  • Posts: 7
Re: How to install Plop Boot Manager 5 on Linux
« Reply #8 on: December 21, 2021, 16:42:50 PM »
Hi, thanks for doing that.
I’m still getting some kind of error from extlinux, it says:
Code: [Select]
extlinux --install /mnt --device /dev/sda5
/mnt is device /dev/sda5

I took some photos so you can see exactly what is happening 😆
« Last Edit: December 21, 2021, 17:02:28 PM by Grunchy »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: How to install Plop Boot Manager 5 on Linux
« Reply #9 on: December 21, 2021, 17:12:40 PM »
The extlinux message is ok.

Start the livecd. Run as root

dd if=/dev/sda of=sda.bin count=63
dd if=/dev/sda4 of=sda4.bin count=1
dd if=/dev/sda5 of=sda5.bin count=1

And post the 3 files sda.bin, sda4.bin and sda5.bin

Grunchy

  • Newbie
  • *
  • Posts: 7
Re: How to install Plop Boot Manager 5 on Linux
« Reply #10 on: December 21, 2021, 17:43:21 PM »
Hi Elmar, thanks a lot for taking the time to help me out!

Here are those files:

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2491
  • a command shell is enough to do amazing things
Re: How to install Plop Boot Manager 5 on Linux
« Reply #11 on: December 21, 2021, 19:57:35 PM »
I reconstructed your disk layout with the 3 files. How did you partition the hard disk? Here, gparted reports an invalid partition table. The problem is the extended partition. I think there is a problem with the boundaries. From my point of view, its required to remove completely the extended partition and then recreate it.

On your computer, does gparted not report any problems?


Note: I think you created the extended partition because of the swap partition. You can also use a file as swap space. That means, you can use sda4 as primary partition and a custom file on sda4 as swap space. This gives more advantages than using a partition as swap space. But booting works also with the extended partition.

Grunchy

  • Newbie
  • *
  • Posts: 7
Re: How to install Plop Boot Manager 5 on Linux
« Reply #12 on: December 21, 2021, 23:50:09 PM »
Have a look at this information from GParted:

/dev/sda4 starts at sector 281106430 and ends at sector 312580095.
/dev/sda5 starts at sector 281106432 and ends at sector 310482943.
/dev/sda6 starts at sector 310484992 and ends at sector 312580095.

The way I set up all these operating systems was I set up the first 2GB FAT16 partition for DOS, installed that, then installed PLoP with floppy installer and created the hda1 and hda1-hidden partition definitions.

I created the DOS profile HDA: *80h hda1, clear, clear, clear and a Windows 98 profile HDA: hda1-hidden, *80h don't touch, clear, clear.

Then I used the Windows 98 installer to create a new 15GB FAT32 partition, installed it, then re-installed PLoP bootloader from the diskette again. Then I created the hda2 and hda2-hidden partition definitions.

I updated the Windows 98 profile to HDA: *80h hda2, hda1, clear, clear and created a Windows XP profile HDA: hda1-hidden, hda2-hidden, *80h don't touch, clear.

Then I used the Windows XP installer to create the third 117GB NTFS partition. I've found that the Windows XP installation would not work unless I used the partition tool included on the installation CD.

Then again I re-installed PLoP bootloader from the diskette and again created the hda3 partition definition.

I updated the Windows XP profile to HDA: *80h hda3, hda1, hda2, clear and created a Lubuntu profile HDA: hda1, hda2, hda3, *80h don't touch.

For Lubuntu I used the installation CD to create the /dev/sda5 (14GB ext4, mount "/") and /dev/sda6 (linux-swap) partitions. After the installation it seemed there was nothing at boot, just a flashing cursor. I had to again re-install PLoP bootloader from diskette and lastly created the hda4 partition definition.

Finally, I updated the Lubuntu profile to HDA: hda1, hda2, hda3, *80h hda4 L1.

I've tried creating the Lubuntu logical partitions using both GParted and the tool in the installer and neither way seems to make a bootable system !

Oh: and one time I used the GParted tool to set the "boot" flag on /dev/sda5, seemingly to no effect.
« Last Edit: December 21, 2021, 23:58:10 PM by Grunchy »