Personal tools
Document Actions

Making a key

How to install Flash Linux 0.3.4 on a USB Flash key

Installing Flash Linux on a USB key

Before you do anything else, you need to prepare the key. It is critical to the remainder of the installation process that you get this bit right and we've deliberately not automated this part of the installation for the moment, partly for this reason.

Getting set up
Boot from the LiveCD
Log in as root (no password)
Start a terminal session (click the screen icon on the top panel)

Identifying the key
Try the following to see what your computer can see

find /proc/scsi/usb-storage -type f -exec cat {} \;

# Example output;

Host scsi2: usb-storage
Vendor: M-Systems
Product: DiskOnKey
Serial Number: 0317A10D2A001B86
Protocol: Transparent SCSI
Transport: Bulk
Quirks:
#
# you could also do;
# find /proc/scsi/usb-storage -ls
# then;
# cat /proc/scsi/usb-storage/<file>
#

Assuming that your key is visible, next we establish what it's "called"
Type in the following;

cd `find /sys/bus/usb/drivers/usb-storage/*/host?/*:* -maxdepth 0`
ls

# Example output;
... block -> ../../../../../../../../block/sdb
... delete
... detach_state
... device_blocked
... generic -> ../../../../../../../../class/scsi_generic/sg1
... max_sectors
... model
... power
... queue_depth
... rescan
... rev
... scsi_level
... state
... timeout
... type
... vendor

# Now try;

cat model type vendor

# Example output;

DiskOnKey
0
M-Sys

# Alternatively, unplug and plug the key and type;
dmesg

The name of the key should be relatively obvious from the messages at the end of the log.

This should (hopefully) be sufficient for you to identify your key
The device name for your key can be read off the block link in the listing
In the above example, the device for the key is sdb

Erasing the key
Most keys come with a pre-made DOS partition
The partition table it uses is not usually compatible with Linux and needs to be removed
To erase the partition table, and then create a new one, type the following;
# BE WARNED: THIS WILL ERASE THE CONTENTS OF YOUR KEY
dd if=/dev/zero of=/dev/device name bs=1k count=100

# using the above example, this would be;
dd if=/dev/zero of=/dev/sdb bs=1k count=100

# now you need to rewrite a "sane" partition table
sfdisk -H9 -S56 /dev/device name
<press return until it asks if you want to save, then press 'y'>

# don't forget to use the right device name!
#
# Please note the choices of "fdisk" and "sfdisk", they are important
#
# now you need to create some approptiate partitions
# Flash Linux needs a boot partition of ~ 4M
# and a root partition of at least 150M
# So; (for example)
fdisk /dev/device name
d (delete partition created by sfdisk)
n (new partition)
p (primary)
1 (use partition #1)
<return> (start at first block)
+4M (make it 4Mb in size)
n (new partition)
p (primary)
2 (use second partition)
<return> (start on next free block)
<return> (use rest of key)
a (mark a partition as active)
1 (choose the boot partition)
w (write changes)
q (quit)
#
# Note: they key will not boot if you for get to do the 'a' operation.
#

Your key should now be partitioned appropriately for FlashLinux
Linux does not always re-read changed partition tables properly
To make sure Linux does this, remove the key, count to 10 and reinsert it

Installing FlashLinux
PLEASE download the latest flash_key.sh into /root on your key!
Download the latest version by clicking HERE
From the command line, type in;

chmod 755 /root/flash_key.sh
/root/flash_key.sh

Please note that this script is new and not too robust
This means that it will work, however it may not cope well with unexpected events
Please read the on-screen instructions properly before proceeding
The procedure should take between 15 and 20 mins
Of the partitions you've created, the 4Mb partition is the BOOT, the other is the ROOT
On a typical computer, the device is /dev/sda, BOOT is /dev/sda1 and ROOT is /dev/sda2


Build A Website
Need a website? Want it to be simple? Use us to build a website that is suited to your every need. Click here today for more information!
ink for printers
Get ink for printers from a specialist. Get ink for printers from us. Call our freephone before 4pm for same day dispatch. Free delivery.
Data Recovery Laptop
All is not lost if your laptop crashed and you lost data. Give it to the data recovery specialists.
IT support
Connect has been providing IT support since 1993. Benefit from our experience and commitment to fixed-priced IT support.
HP Compaq Laptops
Offer rock-solid security, uncompromising reliability and ease of use, HP has got it all covered.
VIDEO PRODUCTION LONDON UK
The video productions produced by Omni Productions are always fresh, exciting and delivered on time and on budget. We have clients in London UK and worldwide.
Mobile Phone
Get a great mobile phone from the top network operators. Visit uSwitch.com to see the latest handsets. uSwitch make it easy to compare great offers.
   
Data recovery services
Professional data recovery services and solutions.
Class 10 clean room for physically damaged hard drives.
No data no fee.
Polls

Would you pay £1.99 for a new version of Flash Linux?

Yes
No