Recently I wanted to use Puppy 4.0 together with the openoffice suite on my new Thinkpad x61s. This laptop doesn't have a cd drive so I needed to install puppy on a usb flash drive. However, among the different option found in the universal installer my BIOS would only recognize the comboformat option. This option creates one small 124MB partition and one larger with the remaining space. The problem was, that the approx. 200MB openoffice.sfs file would not fit on the 124MB partition and resizing the two partitions with gparted did not help either. The solution that worked for me was to first make the usb bootable with grub, then add the necessary puppy and sfs files and finally instruct grub how to boot puppy.
So this how to is meant to help people who need to use and have already used the comboformat option but want the additional functionality of extra sfs files.
I wrote this how to summarizing in fact this threat and this blog entry on how to create a bootable usb flash drive.
1. Prerequisite
You will need a USB flash drive (I used a 1GB drive), a computer running linux with grub and some knowledge of the Linux command line. The technique is not considered for complete "newbies" since the tools used are not without risk for other partitions and OSes that you may have on your PC if you are not understanding what you are doing.
Therefore be careful, be sure you understand what you're doing, and use at your own risk.
2. Using the ComboFoarmat option of the Universal Installer and resizing with gparted
If you have already used the comboformat option the df -h command will give you this output:
Code: Select all
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 816M 840K 816M 1% /media/disk
/dev/sdb4 125M 117M 8.0M 94% /media/disk-1
Code: Select all
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb2 197M 432K 196M 1% /media/disk-1
/dev/sdb4 125M 117M 8.0M 94% /media/disk
To do this you need a computer running linux with GRUB. I guess the same could be achieved with the older boot manager lilo but I have never used lilo so don't know very much about it.
First we must find how the USB drive is identified. So, right after plugging the drive in a linux computer I run "dmesg".
Code: Select all
dmesg | tail
[ 5251.002101] sdb: sdb2 sdb4
[ 5251.032106] sd 4:0:0:0: [sdb] Attached SCSI removable disk
Code: Select all
fdisk /dev/sdb
The following commands were used:
Code: Select all
p (to see the the 2 partitions and partition numbers)
d (to delete one partition)
2 (to delete partition /dev/sdb2)
d (to delete the other partition)
n (to create a new partition)
p (to create a primary partition)
1 (to be the first partition)
enter (for default first cylinder value)
enter (for default last cylinder value)
t (to change partition id)
6 (to make it a FAT16)
w (to write the new changes to disk)
p (to see the new partition just created)
Code: Select all
Device Boot Start End Blocks Id System
/dev/sdb1 1 954 976880 6 FAT16
Code: Select all
mkfs.vfat /dev/sdb1
Code: Select all
grub-install /dev/sdb
Code: Select all
grub-install --recheck /dev/sdb
Code: Select all
(hd0) /dev/sda
(hd1) /dev/sdb
After installing grub we need to copy some files. I created a /media/usb directory, mounted the drive, created a boot directory (named /boot) in the drive and copied over the necessary grub files.
Code: Select all
mkdir /media/usb/
mount /dev/sdb1 /media/usb/
mkdir -p /media/usb/boot/
cp -r /boot/grub/ /media/usb/boot/
Code: Select all
grub
grub>root (hd1,0)
grub>setup (hd1)
quit
4. Install puppy on the drive
All you need is to copy the files included in the iso to the flash drive. I downloaded the puppy iso file and mounted it under /mnt/iso/:
Code: Select all
mount -o loop puppy-4.1.2-k2.6.25.16-seamonkey.iso /mnt/iso/
Code: Select all
cp -r /mnt/iso/* /media/usb/boot/
Code: Select all
cp openoffice-2.4.1_400.sfs /media/usb/
Last step was to edit the menu.lst file which is found in the /boot/grub directory of the flash drive.
I made it look like this:
Code: Select all
default 0
timeout 5
color cyan/blue white/blue
title Puppy Linux 400, kernel 2.6.21.7
root (hd0,0)
kernel /boot/vmlinuz root=(hd0,0) ro quiet
initrd /boot/initrd.gz
6. Troubleshooting
I tried the above with two different flash drives. With one of them, after passing the grub screen I was dropped out to a console with the following error:
Code: Select all
pup_400.sfs not found. Dropping out to initial-ramdisk console...
/bin/sh: can't access tty1 job control turned off
Code: Select all
. /init