Author Topic: [solved] how to boot plpbt from grub2  (Read 11478 times)

pipou

  • Newbie
  • *
  • Posts: 3
[solved] how to boot plpbt from grub2
« 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
« Last Edit: November 24, 2009, 15:44:43 PM by pipou »

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: how to boot plpbt from grub2
« Reply #1 on: November 23, 2009, 14:52:13 PM »
can you post the grub config file

Icecube

  • Newbie
  • *
  • Posts: 47
Re: how to boot plpbt from grub2
« Reply #2 on: November 23, 2009, 18:55:09 PM »
Try:
Code: [Select]
linux16 plpbt.bingrub2 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

  • Jr. Member
  • **
  • Posts: 61
Re: how to boot plpbt from grub2
« Reply #3 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

Code: [Select]
#!/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/
« Last Edit: November 24, 2009, 15:40:43 PM by walterav »

pipou

  • Newbie
  • *
  • Posts: 3
Re: how to boot plpbt from grub2
« Reply #4 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

pipou

  • Newbie
  • *
  • Posts: 3
Re: [solved] how to boot plpbt from grub2
« Reply #5 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

Elmar

  • Administrator
  • Hero Member
  • *****
  • Posts: 2448
  • a command shell is enough to do amazing things
Re: [solved] how to boot plpbt from grub2
« Reply #6 on: December 22, 2009, 18:06:07 PM »
you are right, i added it now

regards
elmar