Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed Ubuntu onto a USB key using pendrivelinux.com. I need to boot off the pen drive now but the bios doesn't support this. I can still boot into Linux without X support ( broken X is one of the reason I want to boot off the pen drive to reinstall) on the computer directly. Is there some way to boot off a USB key from a running installation of linux or some other way of doing this?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Add (usb support via) plop boot manager in grub menu - Ubuntu 12.04 . (Console Mode)

This answer is based on tutorial from Ubuntu Greek Community

Now , the procedure is easiest from the Desktop Environment but for you, because you have to interfere with console mode, it will be little more difficult. If you pay attention and follow the steps I believe you will succeed.

Download Plop boot manager via wget

Current version is 5.0.14

wget "download.plop.at/files/bootmngr/plpbt-5.0.14.zip" -O ~/Downloads/plpbt-5.0.14.zip

Extract via 7z. If you don't have the package , install p7zip-full via apt-get.

cd Downloads && 7z e plpbt-5.0.14.zip

copy from Linux folder the two files plpbt.bin and plpcfgbt inside /boot.

sudo cp ~/Downloads/plpbt-5.0.14/Linux/plpbt.bin /boot/ 
sudo cp ~/Downloads/plpbt-5.0.14/Linux/plpcfgbt /boot/

Now is the difficult part for you (because you haven't graphical environment and I don't know any other way). You have to note down some lines from the /boot/grub/grub.cfg file. The easiest way (IMO) is a mobile HD photo but if you prefer the traditional way, paper and pencil.

Open the file

sudo nano /boot/grub/grub.cfg

find (scroll down with arrow keys) the Ubuntu entry. It will begin like

menuentry 'Ubuntu, with Linux 3.2.0-XX-generic-.....`

Note the 3 lines

insmod ext2 
set root='(hdX,msdosX)'
search --no-floppy --fs-uuid --set=root XXXXXXXXXXXXXX

replace X with your actual numbers. Close the file with Ctrl+X

Now open another file where you have to input these lines plus another. Root privileges required here

sudo nano /etc/grub.d/40_custom

at the end of this file add the lines you noted down before plus one more important line

important line is linux16 /boot/plpbt.bin and do not forget the brackets.

An example of the contents inside 40_custom

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Plop Bootmanager" {
insmod ext2
set root='(hdX,msdosX)'
search --no-floppy --fs-uuid --set=root XXXXXXXXXXXXXXXXXXXXX

linux16 /boot/plpbt.bin
}

save the file with Ctrl+X then Y(es) then ENTER

Finally run

sudo update-grub

Plug in your usb flash drive, reboot and select plop boot manager from Grub menu , then select USB.

enter image description here

enter image description here

share|improve this answer
    
Thanks! I had to choose "mode 2" from the USB 1.1 options in plop for it to boot the usb key and then it worked perfectly! –  Raphael Dec 2 '12 at 19:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.