Plop Forum

General Category => Boot Managers => Topic started by: pipou on November 23, 2009, 14:25:10 PM

Title: [solved] how to boot plpbt from grub2
Post by: pipou on November 23, 2009, 14:25:10 PM
Hi, i've used plpbt from machine that can't boot from usb. But nowadays, i was on a machine with grub2 and I can't find how to make an entry.

I've tried :
1/ linux plpbt.bin

2/ inmod multiboot
multiboot plpbt.bin

and it doesn't work. maybe the problem is due to the fact that plpbt.bin is on an ext4 partition ?

tnx in advance
Title: Re: how to boot plpbt from grub2
Post by: Elmar on November 23, 2009, 14:52:13 PM
can you post the grub config file
Title: Re: how to boot plpbt from grub2
Post by: Icecube on November 23, 2009, 18:55:09 PM
Try:
linux16 plpbt.bin
grub2 will skip the 16 bit part of a linux kernel and will go directly to the 32/64 bit part.
The "linux" keyword works only with real linux kernels. For fake linux kernels (memdisk, plpbt, memtest, ...), you have to use "linux16".
Title: Re: how to boot plpbt from grub2
Post by: walterav on November 24, 2009, 15:36:43 PM
This works for me add the following 'code' into a new file called /etc/grub.d/20_plop

#!/bin/sh
set -e

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib

# older versions of grub2 do not have this yet (LP: #459080)
if [ ! -e ${libdir}/grub/grub-mkconfig_lib ]; then
    echo "no grub-mkconfig_lib, exiting"
    exit 0
fi

. ${libdir}/grub/grub-mkconfig_lib

# We can't cope with loop-mounted devices here.
case ${GRUB_DEVICE_BOOT} in
  /dev/loop/*|/dev/loop[0-9])
    exit 0
  ;;
esac

if test -e /boot/plpbt.bin ; then
  USBBOOTPATH=$( make_system_path_relative_to_its_root "/boot/plpbt.bin" )
  echo "Found plpbt.bin image: $USBBOOTPATH" >&2
  cat << EOF
menuentry "USB boot (plopbootmanger 5.0.4)" {
linux16 $USBBOOTPATH
}

EOF
fi


#than go to terminal and type.
sudo update-grub

#make sure you copied plpbt.bin from the zip archive to folder /boot/
Title: Re: how to boot plpbt from grub2
Post by: pipou on November 24, 2009, 15:43:59 PM
waouh
many thanks, it work great !
I've tried first with grub command line (adapt X and Y in grub2 notation to your needs) :

set root = (hdX,Y)
linux16 /plpbt.bin

or :
set root = (hdX,Y)
linux16 /boot/plpbt.bin
if you don't have a separate /boot partition

I've also tried on a ntfs partition :

insmod ntfs
set root = (hdX,Y)
linux16 /plpbt.bin
Title: Re: [solved] how to boot plpbt from grub2
Post by: pipou on December 21, 2009, 18:19:19 PM
By the way, it would be great to add an entry in the doc : http://www.plop.at/en/bootmanager.html#rungrub
Title: Re: [solved] how to boot plpbt from grub2
Post by: Elmar on December 22, 2009, 18:06:07 PM
you are right, i added it now

regards
elmar