2009-09-24

Host Environment for Pen Drive Development

Initial State / Pre-Conditions:  The Pen Drive is plugged in to the USB port of a host system - a discless workstation - running Damn Small Linux (DSL). Neither of the Pen Drive partitions are mounted.

  1. from the KNOPPIX Bash prompt, open a root shell
    dsl@box:~$ sudo su
    
  2. Dump the file system table (fstab) to the console
    [/home/dsl]# cat /etc/fstab
    /proc      /proc       proc   defaults            0 0
    /sys       /sys        sysfs  noauto              0 0
    /dev/pts   /dev/pts    devpts mode=0622           0 0
    /dev/fd0   /mnt/auto/floppy auto   user,noauto,exec,umask=000    0 0
    /dev/cdrom /mnt/auto/cdrom  auto   user,noauto,exec,ro 0 0
    /dev/cdrom1 /mnt/auto/cdrom1  auto   users,noauto,exec,ro 0 0
    # Added by KNOPPIX
    /dev/sda1 /mnt/sda1 vfat noauto,users,exec,umask=000,uid=1001,gid=50 0 0
    # Added by KNOPPIX
    /dev/sda2 /mnt/sda2 ext2 noauto,users,exec 0 0
    
  3. Dump the list of currently mounted file systems
    [/home/dsl]# mount
    /dev/root on / type ext2 (rw)
    /dev/scd1 on /cdrom type iso9660 (ro)
    /dev/cloop on /KNOPPIX type iso9660 (ro)
    /ramdisk on /ramdisk type tmpfs (rw,size=147296k,size=145084k)
    /proc/bus/usb on /proc/bus/usb type usbdevfs (rw,devmode=0666)
    unionfs on /KNOPPIX/bin type unionfs (rw,dirs=/ramdisk/bin=rw:/bin=ro)
    unionfs on /dev type unionfs (rw,dirs=/ramdisk/dev=rw:/dev=ro)
    

Using the host system described by the system parameters shown above, perform the following steps:

  1. mount the /dev/sdx1 & /dev/sdx2 partitions
        # mount /dev/sda1
        # mount /dev/sda2
    
    This mounts the pendrive partions on /mnt/sda1 & /mnt/sda2, respectively.

    Note that – following this operation – /mnt/sda1 is the DOS FAT16 format (750M) partition, and /mnt/sda2 is the Linux ext3 formatted partition (3.25G).

  2. copy the /KNOPPIX & /boot/isolinux/* directory trees from the CD ISO image to the pendrive DOS partition (/dev/sdx1).
        # cp -rf KNOPPIX boot/isolinux/* /mnt/sda1
    
  3. rename the isolinux.cfg file in on the sdx1 to be syslinux.cfg
        # cd /mnt/sda1
        # mv isolinux.cfg syslinux.cfg
    
  4. unmount the DOS FAT 16 partition (/dev/sdx1).
        # cd
        # umount /dev/sda1
    
  5. Install the SYSLINUX DOS filesystem bootloader to the FAT16 pendrive partition
        #syslinux -sf /dev/sdx1