Sunday, January 11, 2009

Stupid Linux Tricks : Create Puppy USB Stick without a CD-ROM

These past two days I have been experimenting with Puppy and entertaining the thought of using it as a primary OS for a "kiosk" machine that belongs to a buddy of mine. I downloaded it and went right to work trying to find a way to put the ISO onto a USB stick, but all the instructions I found lead to burning a CD-ROM first. Well I didn't want to do that. For one, I was trying to work off of my eee PC which obviously has no CD-ROM. Secondly, this is a disc I would never use again. And I have a LOT of discs stored away like that.

Not really finding any good answers online, I opted to experiment using an old trick that I have used for various Ubuntu releases.

Step #1 - Download puppy.
It doesn't matter which one. If you want something flashy, try the famed MacPup release. You will end up with an ISO image.

Step #2 - Mount the ISO.
Open up a Terminal and browse to the directory where the ISO file is located. First create a directory for the ISO to mount to: "sudo mkdir /mnt/iso". Then: "sudo mount -o loop nameofisofile.iso /mnt/iso".

Step #3 - Copy everything to the USB stick.
Go ahead and insert your USB stick now. It should be partitioned and formatted as a FAT file system. You should do this in Linux, since there is quite a difference in the way that Linux creates a Windows file system! Also make sure that when you create your partition (probably using fdisk) that you mark it as bootable. Now, simply copy everything from /mnt/iso to /media/disk (or whatever your USB stick is mounted as).

Step #4 - Syslinux your USB stick
Don't have syslinux? Do a: "sudo apt-get install syslinux" if you are running an Ubuntu/Debian release. Or if you are doing this from Windows, you can use the Win32 equivalent. Just do a "syslinux /dev/sdc1" where sdc1 is your USB stick. Make sure you know what your drive name is. Do a "dmesg" in terminal if you are unsure.

Step #5 - Perform magic.
If there is indeed a "trick" to doing all this, here it is. The trick is to go into your USB stick and rename isolinux.cfg to syslinux.cfg. Now it will boot, and you can install Puppy FROM a USB stick.

This will not likely help you install from a USB stick TO a USB stick. It will also probably not help you install from a USB stick to an SD card or similar removable storage. The reason being that grub will have different drive labels from the time you are installing, to the time you try to boot with your new OS. While I have been successful in repairing a broken system that is in this predicament, I would never try to walk someone through the process. If you should end up in that situation, do yourself a favor and find someone who has an external CD/DVD drive. It will save you hours of hair pulling.


  1. Hi Ray
    I'm sure you're aware that the Unetbootin ( utility does all of this for you.
    Nevertheless, your post gives a nice explanation for what exactly is going on behind the scenes.

  2. Hey paul! I actually tried Netbootin for puppy but I had mixed success. While it seemed to work, I couldn't get past the grub loader. I had the same problem with using the "mini" Ubuntu loader (for a minimal non-graphic install). I have used Unetbootin several times with various other distros and it works very well.

  3. Hi Ray
    I actually used Unetbootin to install Puppy Linux on my EeePC 901.
    I installed it to a 1 GB logical partition on the 16 GB drive without any problems.
    However, I had initially tried the version of Puppy that is included by default in Unetbootin which is an earlier version. Although this installed fine, the mouse pointer wouldn't work. So, I downloaded Puppy 4.1.2 and used Unetbootin to create the bootable USB key and this got everything right.
    I had no problem with getting Puppy to boot using the Xandros Grub that's in the MBR. Here's the Puppy stanza in the Xandros /boot/grub/menu.lst hat I used:
    title Puppy Linux 4.1.2
    root (0x80,0)
    kernel /boot/puppy/vmlinuz root=/dev/sdb6

  4. Can it really happen.... I will try to do this.

  5. A great report for this certain topic.
    The removal of files almost always directs a user to a a feeling of discontent.
    A variety of file recovery computer programs are already developed by the professionals, with the intention that a person might effortlessly regain his / her missing data.
    In case of data deletion scenario, a user must have a preliminary understanding of appropriate data files restoration application.
    recover deleted emails outlook 2007