Creating bootable USB flash drive

Booting, installing, newbie
Message
Author
Larry Cotton
Posts: 18
Joined: Mon 12 Apr 2010, 17:28

Creating bootable USB flash drive

#1 Post by Larry Cotton »

Hi

I'm trying to create bootable USB falsh drive - am having a few problems and was wondering if anyone can point me in the direaction of some information that can help.
I have a 4Gb USB flash drive with a single partition formatted with ext2.

The USB pen I have is:
ByteStor 4GB USB High Speed "Dataferry" Flash Drive

The machine I am currently testing this on is as follows:
AMD Duron(tm)
757.38 MHz
128Mb RAM
i686 (32bit)
As well as the 4Gb USB stick I have a 500G external drive connected - this has the puppy start up file on it

What I have done so far:
I went into setup->universal installer and followed the step
This tool seems to be the tool that I need - certianly it seemed to copy the linux files onto the drive and set the boot flag.
This is what eneded up on my USB stick:
extlinux.conf
extlinux.sys
initrd.gz
pup-431.sfs
vmlinuz

fdisk lists the following information for the drive:
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 1018 3913161 83 Linux
(as mentioned file system is ext2)

Currently when I try use this to boot puppy from it does not work.
Doing some googling I see that there are several types of bootable files which determine how the device appears to the BIOS.
Since the machine I'm using isn't particularly new (ok it's old) I'm guessing I need to create type which isn't the defalt (there is no USB-HDD option).

The Boot media options I am given in the BIOS are:
Disabled
IDE 0 - 3
Floppy
LS/ZIP c:
CD ROM
SCSI
NETWORK
USB FDD

I also noticed in the setup options there is a BootFlash install Puppy to USB tool.
I had a look at this, buit shied away from using it because I wan't clear how I could select the drive I wanted (I also couldn't see a USB-FDD option)

Does anyone know (or know where find out):
if it it possible to create a bootable USB using the flash drive I have and the machine I am using ?
Can I use one of the puppy linux tools to create a bootable usb disk for this system ?
If I can which tool should I use - universal installer, BootFlash install - what is the difference between the two?
By using the universal installer what did I created on my USB stick - would it work as a bootable device if I had a machine with an HDD Boot media option?

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

#2 Post by rcrsn51 »

Many older machines won't boot a USB flash drive. But you can do this instead.

Boot off the Live CD with the flash drive plugged in.
At the short initial pause, type

Code: Select all

puppy pmedia=usbflash
This will launch Puppy off the flash drive.

looseSCREWorTWO
Posts: 812
Joined: Thu 04 Feb 2010, 13:16
Location: Australia, 1999 Toshiba laptop, 512mb RAM, no HDD, 431 Retro & 421 Retro

#3 Post by looseSCREWorTWO »

Or boot up from the CD first, then plug the USB stick in and when you exit Puppy, create a save file on the USB Stick.

Thereafter you just boot from CD with that USB stick plugged-in and don't type in anything during Bootup. Puppy should detect the save file on the USB stick, use those settings for your Puppy sessions and save to the USB stick at the end of each session.

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#4 Post by abushcrafter »

rcrsn51 wrote:Many older machines won't boot a USB flash drive. But you can do this instead.

Boot off the Live CD with the flash drive plugged in.
At the short initial pause, type

Code: Select all

puppy pmedia=usbflash
This will launch Puppy off the flash drive.
Thanks.

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

#5 Post by rcrsn51 »

Or you can make your own Puppy boot CD that will automatically launch the flash drive install. If you are interested, I can provide instructions.

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#6 Post by abushcrafter »

rcrsn51 wrote:Or you can make your own Puppy boot CD that will automatically launch the flash drive install. If you are interested, I can provide instructions.
Tempting that would be useful but I currently don't badly need it but if you don't minded then yes please :D!

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

#7 Post by rcrsn51 »

Update: See the improved method here.

------------------------------------

Download and unpack the attached "bootcd.tar.gz" to your home directory. It will create a folder named "bootcd" containing three files.

Copy the two core Puppy files "vmlinuz" and "initrd.gz" into the "bootcd" folder. It should now contain five files.

While inside the bootcd folder, open a terminal and type

Code: Select all

sh makeiso
This will create a "puppy.iso" file one level up. If done correctly, the ISO file should be about 3 MB in size. Burn it.

Put the three core Puppy files on the flash drive (it doesn't actually need all three to launch).

Boot your machine off the CD with the flash drive inserted.
Attachments
bootcd.tar.gz
(9.9 KiB) Downloaded 811 times
Last edited by rcrsn51 on Fri 02 Oct 2015, 13:29, edited 5 times in total.

Larry Cotton
Posts: 18
Joined: Mon 12 Apr 2010, 17:28

#8 Post by Larry Cotton »

Hi

Thanks for the responses to this.

Could I just clarify that what I'd like to do is to create a USB stick that I can boot puppy from directly with the use of a CD.
Ive not done this before, but from what I can gather it means first installing a boot loader and the OS on the stick.

I was wondering if it is possible to do this using one of the puppy linux tools (universal installer, BootFlash install looked like they might do this)
I have done some googling and I'm pretty sure this can be done by other means (using fdisk, installing syslinux or grub), but I think it would be quite painful.

(My immediate use for this is because I have just got a machine which was advertised as having linux installed on it, but it doesn't.
It does not have a CD drive, so I need to be able to boot from usb to do anything with it.)

Larry Cotton
Posts: 18
Joined: Mon 12 Apr 2010, 17:28

#9 Post by Larry Cotton »

In the previous post:
> that I can boot puppy from directly with the use of a CD.
I did of course mean:
> that I can boot puppy from directly without the use of a CD.

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

#10 Post by rcrsn51 »

The Puppy Universal Installer will do exactly what you want, provided that the target computer supports USB bootability.

looseSCREWorTWO
Posts: 812
Joined: Thu 04 Feb 2010, 13:16
Location: Australia, 1999 Toshiba laptop, 512mb RAM, no HDD, 431 Retro & 421 Retro

#11 Post by looseSCREWorTWO »

@LarryCotton
I have seen computer hardware that was capable of booting from a USB Flash Drive, but due to a quirk in the BIOS you needed to have the Flash Drive plugged-in at bootup for it appear as a boot option.

If your PC has a Floppy drive you could download the WakePup2.pet, install it and then create a WakePup2 Floppy which will boot your computer and scan all Hard Drives and USB Drives for Puppy files, then use them to run your Puppy session.

One of your boot options is USB FDD, so if you don't have a inbuilt Floppy you could use a USB Floppy instead. I've seen USB Floppy drives on eBay for $8. I use a inbuilt Floppy to boot my ancient laptop into Puppy, then save to a Flash Drive. It's reliable and I need to use it because the laptop doesn't have a HDD.
Last edited by looseSCREWorTWO on Sat 17 Apr 2010, 06:14, edited 2 times in total.

looseSCREWorTWO
Posts: 812
Joined: Thu 04 Feb 2010, 13:16
Location: Australia, 1999 Toshiba laptop, 512mb RAM, no HDD, 431 Retro & 421 Retro

#12 Post by looseSCREWorTWO »

G'day Larry Cotton,
You did the right thing in your first Post, by listing the contents of your USB Flash Drive after Puppy 431 was supposed to have installed itself there.

I had to go out earlier and I walking around thinking "something wasn't right about that list Larry cotton posted". When I got back I had a go at installing Puppy 421 Retro (the Puppy i use) to an old USB Stick i have lying around. I reformatted it to ext2 and then installed Puppy. This is a list of the files Puppy 421 Retro put on the USB Stick:
boot.msg
extlinux.conf
extlinux.sys
help.msg
initrd.gz
logo.16
pup_421.sfs
vmlinuz
zdrv_421.sfs

This looks completely different to what 431 put on your USB Stick, so I'm going to make a guess that this is another one of the (many) 431 bugs. Puppy 421 and 421 Retro have very few bugs, so I suggest you download both of these ISOs from here and see how you go:
http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux/

If you still have probs, try booting a different computer with your USB Stick and the Puppy CDs. If this shows the problem to be in your computer, then try the External Floppy idea I said in my last Post.

Good luck and let us know how you go with it,

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#13 Post by Sylvander »

@rcrsn51
1. I used your instructions to make the puppy.iso file, and used burniso2cd to burn the file to a CD-RW.

2. Then rebooted with the CD in place and my 1GB USB Flash Drive [holding an installation of Puppy-421] also connected.

3. The CD wouldn't boot; it was ignored [the BIOS is configured to boot floppy/optical/HDD in that order], and HDD booted instead.

4. The puppy.iso file is only 34kB! :?

5. Tried to mount sr0 [within BoxPup using Pmount with disk in place and drawer closed], but got the error = "unable to mount sr0".

6. Any idea what's going wrong? :? :(

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

#14 Post by rcrsn51 »

The puppy.iso file should be about 3200KB, so something went wrong. Instead of just clicking on the icon, open a terminal and type

Code: Select all

sh makeiso
That should show you some error messages.

Sylvander
Posts: 4416
Joined: Mon 15 Dec 2008, 11:06
Location: West Lothian, Scotland, UK

#15 Post by Sylvander »

That worked! :D
The new puppy.iso is 3.1MB, and the CD made using it boots and loads the Puppy on the Flash Drive. 8)

Any idea why using Xfe to right-click on the makeiso file and choosing "Open" didn't make a proper ISO file?
[I'm no Puppy expert!]

Larry Cotton
Posts: 18
Joined: Mon 12 Apr 2010, 17:28

#16 Post by Larry Cotton »

Thank you very much for your informative relies llooseSCREWorTWO. I do have a new computer which I wish to boot lfrom USB, so I'll start by trying to get that going before going on to the old PC.

I have burnt the 421 iso's and tried to create the USB boot drive using the universal installer. When I do this I get an error saying that it can't find zdrv*.sfs. I did a manual search an couldn't find any such files either.

Does anyone know if I need to get these files separately from somewhere ?

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

#17 Post by rcrsn51 »

Zdrvxxx.sfs files were driver files used by older Puppies. IIRC, the Universal Installer in 4.2.1 had a bug wherein it asked for a zdrv file that it didn't need anymore. Your flash drive may actually be bootable.

I notice in your original post that you had done a flash drive install using Puppy 4.3.1 that looked successful, but you were running it on an old machine that probably didn't support USB bootability. Did you try it on your newer machine?

Larry Cotton
Posts: 18
Joined: Mon 12 Apr 2010, 17:28

#18 Post by Larry Cotton »

Hi

Thank you for your reply.
rcrsn51 wrote: I notice in your original post that you had done a flash drive install using Puppy 4.3.1 that looked successful, but you were running it on an old machine that probably didn't support USB bootability. Did you try it on your newer machine?
Yes I've tried it both 4.3.1 and 4.2.1 on my newer machine as well, but I get a error when attempting to boot from it. It looks like there is a real attempt to do something, however, because an attempt to boot from USB when there is no drive present, or when there is a drive with no boot sector results in a load of 9's.

I'm am not at all familiar with how the boot sequence works and how the bios accesses the boot sector, but my initial googling suggests that it's possible the bios has some specific requirements that are not being met. I'll have to do some more research to understand the process and determine if there are any specific requirements for the acer bios.

Do you know if the boot process can be file system dependant (i.e is it possible that I have to use vfat rather than ext2) ?

I did notice that, after creating the bootable usb, fdisk displayed warnings about sectors not being on cylinder boundaries - I don't suppose you know if that could be a problem ?

The universal installer provides a number of options for the type of boot loader, so I will probably start by trying each of those.

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

#19 Post by rcrsn51 »

The conventional filesystem on a flash drive is fat16/fat32, so the standard bootloader is syslinux. However, the Puppy Universal Installer will also recognize an ext filesystem and use extlinux as the bootloader.

I would run Gparted, delete all the existing partitions on the flash drive and create a fresh fat32 partition. Then run the PUI again.

You might also want to try a different flash drive.

looseSCREWorTWO
Posts: 812
Joined: Thu 04 Feb 2010, 13:16
Location: Australia, 1999 Toshiba laptop, 512mb RAM, no HDD, 431 Retro & 421 Retro

#20 Post by looseSCREWorTWO »

My rantings and ravings on this Post was all about Flash Drives and how difficult the blasted little gombeens can be.

http://www.murga-linux.com/puppy/viewtopic.php?t=54462

Post Reply