[solved] how to boot plpbt from grub2

Started by pipou, November 23, 2009, 14:25:10 PM

Previous topic - Next topic

pipou

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

Elmar


Icecube

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".

walterav

#3
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/

pipou

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

pipou


Elmar

you are right, i added it now

regards
elmar