Bootable flash drive with manual equivalent of UNetbootin

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Bootable flash drive with manual equivalent of UNetbootin

#1 Post by rcrsn51 »

The Linux version of UNetbootin won't run in Puppy because of missing dependencies. But it is sometimes possible to do the manual equivalent of UNetbootin to convert a Linux distro's ISO file into a bootable flash drive. Here are the steps:

1. Mount the flash drive and delete everything on it.

2. Unmount the flash drive but leave it plugged in.

3. Determine the device name of your flash drive. It may be sdb1.

4. Open a terminal and type:

Code: Select all

syslinux /dev/sdXY
where XY is your flash drive. Make sure you get this right!

5. Mount the flash drive. You should see the file ldlinux.sys on it.

6. Click on the distro's ISO file to mount it. Copy everything off the ISO onto the flash drive. There may be some hidden files, so use the ROX eyeball icon to see them.

7. Does the ISO contain a folder named isolinux? It may be inside another folder named boot. If so, copy all the files in the isolinux folder to the root of the flash drive.

8. You should now see a file named isolinux.cfg at the root of the flash drive. Rename it to syslinux.cfg.

9. If you cannot find an isolinux.cfg file anywhere in the ISO, it may be using a different bootloader. In that case, your best bet is to manually create a file named syslinux.cfg with the following line

Code: Select all

default /boot/vmlinuz initrd=/boot/initrd.gz vga=normal
10. Unmount everything and reboot off the flash drive.

If it won't boot, here are some trouble-shooting questions.

Do you know for sure that your machine supports USB bootability? Many older machines (and some newer ones) don't. The best scenario is where the BIOS detects the flash drive as a secondary hard drive.

Have you modified your BIOS boot priority list to enable USB booting?

Have you set the boot flag on the flash drive partition? Check this with Gparted.

Does the MBR of your flash drive contain the standard DOS/WIn boot code? If not, you can manually update the code as follows:

1. Locate the file mbr.bin in the folder /usr/lib/syslinux.

2. Write this file onto the MBR of your flash drive using a command like:

Code: Select all

 dd if=mbr.bin of=/dev/sdb
Note that this command uses sdb and not sdb1.
Last edited by rcrsn51 on Wed 28 Apr 2010, 16:50, edited 1 time in total.

User avatar
jemimah
Posts: 4307
Joined: Wed 26 Aug 2009, 19:56
Location: Tampa, FL
Contact:

#2 Post by jemimah »

You could also use BootFlash to format the drive and install syslinux. Just say no when it asks if you want to install Puppy. Then you can proceed with copying the files from the iso over and copying the isolinux.cfg to syslinux.cfg.

jopervasco
Posts: 571
Joined: Fri 25 Mar 2011, 20:10
Location: France

#3 Post by jopervasco »

Hello,

I tested your procedure and it's OK ! Thanks

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

Glad to help. Many of the new Linux distros are using GRUB2. So the instructions here may be useful.

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

Got "ERROR: Operation not permitted"

#5 Post by johnywhy »

attempting to copy files from debian hybrid live iso to flash drive, many items copied fine, but many items gave "ERROR: Operation not permitted".

any ideas?

many thanks!

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#6 Post by Flash »

What were the names of the files that would not copy?

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#7 Post by johnywhy »

don't recall, but no matter now, i found this method which works. created a debian installer on a flash drive inside puppy. nice!

http://linux.koolsolutions.com/2009/02/ ... usb-drive/

problem, the installer seemed to want to blow away my puppy partition-- not ok. I want to add it to my existing grub4dos. not sure how to proceed :(

Also, this method put a debian installer on the USB-- I want the debian live cd on the USB.

ahoppin
Posts: 172
Joined: Mon 16 May 2011, 04:13

#8 Post by ahoppin »

Thanks! For whatever reason, I have never been able to produce a bootable usb flash drive with the Puppy Universal Installer in Lucid 525. However, this method works.

I did make a couple of changes.

syslinux gave me the error "possibly unsafe /tmp/ permissions" and refused to write to the flash drive. I fixed this by setting the sticky bit on /tmp, so:

# cd /
# chmod +t tmp

I also edited syslinux.cfg to change one line from "pmedia=cd" to "pmedia=usbflash" in the hope that that would instruct Puppy to use its more conservative writing regimen for the flash drive.

LeithR
Posts: 338
Joined: Mon 24 Jan 2011, 12:15
Location: Kemnay, Aberdeenshire/Scotland

#9 Post by LeithR »

rcrsn51,
Just followed your excellent how to and have now got a couple of erstwhile non-functioning laptops back into use. Good days work. Thanks.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#10 Post by rcrsn51 »

This thread is ancient history. The better way is ISObooter.

Post Reply