jump to navigation

USB Linux Challenge 29 December, 2008

Posted by aronzak in Uncategorized.
Tags: ,
3 comments

In all of the advertising frenzy for Christmas something caught my eye. Flash storage has been getting cheaper and cheaper to the point where a 1 gigabyte usb flash drive now costs less than $10. With flash drives so cheap, you could buy a few. This got me thinking. Here’s my idea:

1 Buy a few cheap usb flash drives
2 Put Linux on them
3 Give them out
4. If someone likes what they see, they can have a copy. If not, no harm done.
If you get the drive back, repeat from step 3.

It’s that simple it could just work.

Fundamental Premises:

1. Use cheap hardware . Buy something cheap enough that you don’t care if it is misplaced or broken. Also, don’t put anything personal on the sticks.

2. It will be easier if you are familiar with the tools used to create bootable USB systems. If you feel confident that you will not destroy your own bootloader, it can be faster to use syslinux manually. Once you are happy with one Linux image, copy it to another stick and install syslinux on the stick to make it bootable.

3. Use a distro with more features. If you have sticks that are 1 GB in size, use a large distro. Go for extras like OpenOffice and a nice graphical environment, as well as rescue utilities that will be useful if someone’s computer is broken. Also, maybe stick a some info with a few links on the stick. You’ll need to explain that people need to use a boot menu on a modern computer (usually by pressing F12 at bootup).

4. Make it clear that there’s no hassle. Carry the sticks with you, so that people know that you’re not going to any great effort to give you software. Make it clear that they’re cheap and you don’t mind giving them out.

5. Talking to people is hard, but it’s easy once you get going. If you’ve ever gone doorknocking, you’ll know that after the first few people you talk to, your fear evaporates and you start enjoying yourself in a way. You’re not trying to force anyone to do anything. If they’re not interested, that’s fine.

I’ve sometimes suggested that I could put Linux on other people’s usb sticks. They are understandably reluctant to give away their hardware, that has their data on it that they are afraid to lose. Fear is an emotion, so rational arguments don’t help. By putting your own hardware on the line, it will send a positive message about open source. You believe in it enough to use it on your own hardware. That speaks more powerfully than words.

So, what do you think? Ready to give it a go?

USB Linux Howto: Ttylinux 12 November, 2008

Posted by aronzak in Linux, Live Linux, Live Usb, Syslinux.
Tags: , , , , ,
1 comment so far

I’ve found ttylinux to be quite useful. For a while it was not actively maintained, but now Douglas Jerome has stepped up as the new maintainer. It’s a small, fast text based Linux distribution that is an invaluble part of my usb toolkit. It can mount a usb drive, giving quick access to be able to modify important files.

Nicely, while ttylinux is only ~10 megabytes, it has bash, the most used shell, rather than a smaller alternative. I’ve added in nano, an editor that I prefer to vi.

The default login is “root” password “root” or “guest” “guest”. Ttylinux loads its entire filesystem as an initial ram disk (initrd). The filesystem is easily modified (It’s a loopfile), but the bundled applications are fairly good. You can munt (and then modify) the entire system in an existing Linux install:

mkdir mount
mount -o loop filesys mount

NB. To start up properly, edit etc/rc.d/rc/sysinit and comment out these lines:

echo "Starting fsck for root filesystem."
fsck -T -C /
if [ "$?" -gt 2 ]; then
echo "WARNING: Errors found while checking root filesystem."
echo "You can login as root now, the system will reboot after logout."
sulogin
reboot
elif [ "$?" = "2" ]; then
echo "NOTICE: System needs to be rebooted now."
sleep 1
reboot
else
echo -n "Checking root filesystem: "
check_status

Or else fsck will fail on every boot (modified filesystem) and make you reboot.

The new version 8.0 is maturing. More final versions should be coming out fairly soon.

USB Linux Howto: Adding Another Distribution 7 October, 2008

Posted by aronzak in Backtrack, Linux, Live Disk, Live Linux, Live Usb, Puppy Linux.
Tags: , ,
2 comments

You should already have a bootable USB stick with a Linux distribution. The non destructive method uses a tool called “Syslinux” to boot up. You can modify the settings to boot multiple Linux distributions, and use other tools.

There should be file called “syslinux.cfg” on your USB stick. It will be on the root of the drive or in boot/syslinux. It should have something like this in it:

default vmlinuz initrd=initrd.gz ...

Change this to match this format:

LABEL default
KERNEL vmlinuz
APPEND initrd=initrd.gz ...

Next, copy everything from a Live cd or an extracted .iso file (using winrar or another program that can extract an .iso file) your USB stick. Copy everything inside the file isolinux.cfg and paste it at the bottom of syslinux.cfg. Now, in order to allow you to choose what to boot, add to the top of syslinux.cfg

DEFAULT default
PROMPT 1
TIMEOUT 150

This will give you a choice of what to boot when you boot off your USB stick, and will boot the default after a time of 15 seconds.You’ll need to type the label of each Linux distribution at the prompt. Make sure you set the distributions with obvious labels. It may be helpful to set the labels to numbers. Additionally, you can display information when you boot up off your USB stick. To do so, create a file called Menu.txt saying something like this:

Booting off USB
Choose one of the following:
1 - Puppy Linux (default)
2 - Backtrack
Press Enter to boot the default.

Then edit the top of syslinux.cfg, adding this:

DISPLAY Menu.txt

If you want to move any files, change the information in syslinux.cfg to reflect this.

Back to USB Linux Howto

USB Linux Howto: Puppy Universal Installer 7 October, 2008

Posted by aronzak in Linux, Live Disk, Live Linux, Live Usb, Puppy Linux.
Tags: , , ,
5 comments

This will guide you through installing Puppy Linux on a USB stick using its graphical installer wizard. You’ll need a version of Puppy on a CD or USB stick. If you already have one, skip down. If you don’t follow this:

1. Download the latest version of Puppy Linux. Download a CD disk image (.iso file).

Then, either use a CD or use virtualisation software.

Using a live CD:

2. Burn the .iso to a blank CD
(Note: You need to burn the contents of the .iso to a disk, don’t just put the iso on the disk as a file. You’ll need to play around with your cd burning software to get this to work. Try not to waste a disk.) Software like nero or alcohol120% or even a Windows CD burning wizard (part of the file manager in XP) should be able to do this properly.)

3. Reboot. Either alter your bios settings (usually press delete at boot) to set booting off the CD above booting off your hard disk, or use a boot menu (usually press F12 at boot. Then, select CD from a list) You should see a menu with colours, and after five seconds Puppy should boot up.

Using QEMU:

2. Install QEMU for your computer. Packages for Windows are available here.

3. Run QEMU with the option -cdrom puppy-whatever.iso and the location of your USB stick. More here.

qemu -k en-gb -m 512 -localtime -boot d -cdrom puppy-3.01-seamonkey.iso /dev/sdb1

Now follow this guide to use Puppy Universal Installer

1. Choose your keyboard settings, and then ‘xorg’ and the correct screen resolution.
Puppy should boot up, and you should see the following screen:

Puppy's Desktop

Puppy Linux's default Desktop

If you have no luck, you may need to change settings or add boot parameters (such as ‘noacpi’) next time you boot up, that sometimes can make it work properly.

2. Left click on the bottom left menu icon to bring up the menu. Select “puppy universal installer”.

Setup > Puppy universal installer

Setup > Puppy universal installer

3. Choose to install to a usb stick (the first option).

4. Choose your device.

5. Choose the first option. The others are strange and experimental, and sometimes work with old hardware, but it is not recommended.

6. Choose from CD if you are using a live disc.

7. Choose “mbr.bin from the syslinux package.” It seems to work the best, and is what I’ll use in the rest of this guide.

8. You may need to set the usb stick’s partition to have a ‘boot’ flag set using a great tool called gparted. Gparted is quite easy to use, just read what comes up on the purple popup.

9. An orange box should pop up. Press enter to continue.

10. Congratulations; the stick should now boot Puppy. You can use BIOS boot order or a boot menu to boot off USB.

More on USB Linux Howto.

USB Linux Howto: Puppy 4.1 7 October, 2008

Posted by aronzak in Linux, Live Linux, Live Usb, Puppy Linux.
Tags: , , ,
2 comments

Puppy Linux version 4.1, or ‘410’ is now the latest version of Puppy Linux that has many improvements ‘under the hood’, while there are few immediately apparent changes. This is what’s new:

– Bugs fixed
– Newer kernel, newer software. Also, a new kernel compression system.
– Now there is no zdrv.sfs, meaning that there is one less file to deal with.
– New applications, including:
– F-prot virus scanning for Windows drives
– Blog software, which can be used as a personal diary, or exported.
– Voice over IP client using SIP

Here’s how to put Puppy 410 onto a bootable stick, using Ubuntu Intrepid Ibex. If you don’t already have a bootable USB stick, follow this. If you already have a CD or USB stick version, you can use the ‘Puppy universal installer’ method here.

1. Download a cd disk image (.iso) from here. It should be about 95 megabytes.

2. Open the .iso with file-roller (called “Archive manager”)

3. Extract the iso to your usb stick. Here, it is called “CORSAIR”, a Corsair Flash Voyager.

4. Open isolinux.cfg

6. Select text in the middle of the file and copy it to the clipboard.

5. Open syslinux.cfg. This might be in a folder called ‘boot’ and ‘syslinux’

7.  Paste the information at the bottom of syslinux.cfg

8. Change the entry to your needs, and change pmedia=cd to pmedia=usbflash. If you have the file syslinux.cfg in boot/syslinux, you’ll need to add a slash to vmlinuz and initrd.gz

9. Save the file. Safely eject the stick with the eject icon, and then have fun.

Using Unetbootin to install Linux to a USB stick 28 September, 2008

Posted by aronzak in Linux, Live Linux, Live Usb, Syslinux.
Tags: , , , ,
2 comments
Unetbootin

Unetbootin

A new program, Universal Network Bootloader Installer (unetbootin) can be used to set up a USB drive to boot. It can be run on Windows 2000 and above and Linux. It’s very simple to use. First, download and install unetbootin. Then:

– Make sure you have a USB stick with free space. You shouldn’t need to backup your files, but it’s always a good idea.
– Download a disk image (.iso) of the Linux you want to put on the stick.
– Run unetbootin
– Select ‘diskimage’ and select the .iso file
– Make sure you have the right USB device and press ‘OK’

Or, if it is listed in the program, you can just run that.

That should then set up your USB device to boot up.

You can then go on to add more versions of Linux or other tools to the stick.

Back to USB Linux Howto.

USB Linux Howto: Backtrack 31 August, 2008

Posted by aronzak in Backtrack, Linux, Live Usb.
Tags: , ,
1 comment so far
Backtrack's Desktop

Backtrack's Desktop

Name:    Backtrack 3
Website:  http://www.remote-exploit.org/backtrack.html
Wiki:        http://en.wikipedia.org/wiki/BackTrack
Size:       778 MB

Backtrack is an excellent distro. It comes with a nice looking KDE 3 interface, and features a large number of tools. Most of these you would have to learn about first in order to use. It also has a pretty framebuffer interface that makes the shells (shown during startup) look really nice.

Backtrack has working wifi drivers for some atheros cards, and works out of the box on my Asus Eee PC 701. Comes with aircrack-ng and other interesting software. Try not to get caught.

Multiple Linux distros on one usb drive: Ttylinux 31 August, 2008

Posted by aronzak in Linux, Live Linux, Live Usb.
Tags: , , , , ,
2 comments

Name :       Tty Linux
Website:     http://www.minimalinux.org/ttylinux/
Linux Wiki:  http://linux.wikia.com/wiki/Ttylinux
Size:          11M
* Ttylinux is no longer actively maintained, but I think it’s definitely worth a mention.

I’ve been looking for a small, fast text based Linux distribution to add to my usb toolkit, but hadn’t yet found one. There’s a host of small distributions that have been around for a while. Unfortuantely, most of them are consigned to the past, lacking SCSI (and therefore SATA and USB) drivers; meaning that they can’t be started up off usb. Ttylinux works fine.

Ttylinux takes up less than ten megabytes, but has bash, a full featured shell. The default login is “root” password “root” or “guest” “guest”. Ttylinux loads its entire filesystem as an initial ram disk (initrd). The filesystem is easily modified (It’s a loopfile), but the bundled applications are fairly good.

To add it, download the gunzipped disk image (.iso.gz) and extract it to your usb drive (using an iso buster such as winrar or file-roller). Modify syslinux.cfg, adding the entry from isolinux.cfg, changing the directories as required. You should have a working, small bash tool.

To modify the filesysyem, make a backup of the filesystem, then make a directory (we’ll call mount) then mount it there with the loop type:

cd tty(whatever... Should contain a file called "filesystem")
cp filesystem filesystem~
mkdir mount

Then, as root;

mount -o loop isolinux/filesys mount

That should mount the filesystem in a folder. You can then add components as root. You might want to copy over some programs like sl (for old time’s sake). Most programs will need libraries.

NB. To start up properly, edit (mount/)etc/rc.d/rc/sysinit and comment out these lines:

echo "Starting fsck for root filesystem."
fsck -T -C /
if [ "$?" -gt 2 ]; then
echo "WARNING: Errors found while checking root filesystem."
echo "You can login as root now, the system will reboot after logout."
sulogin
reboot
elif [ "$?" = "2" ]; then
echo "NOTICE: System needs to be rebooted now."
sleep 1
reboot
else
echo -n "Checking root filesystem: "
check_status

Or else fsck will fail on every boot (modified filesystem) and make you reboot.

You can create scripts in (mount/)etc/rc.d/start.d. I found it convenient to create this mounting script:

#!/bin/bash

echo "Aronzak's mounting script"

fdisk -l | grep /dev | cut -c 1-21,52-
echo "Enter disk name (Eg. sdb1)"
echo "Press enter to skip"

read mount
# If nothing, exit
[ "$mount" ] || exit 0

mkdir -p /mnt/$mount

echo "Sorry, please enter fs type (Eg. vfat)"

read fs

# If nothing, exit
[ "$mount" ] || exit 0

mkdir -p /mnt/$mount

echo "Please enter fs type (Eg. vfat)"

read fs

# If nothing, exit
[ "$fs" ] || exit 0

mount -t $fs /dev/$mount /mnt/$mount

The filesystem will automatically update. Start up Tty and you should see your changes. “Chop wood, carry water.”

Portable Apps in Linux 2 August, 2008

Posted by aronzak in Linux, Live Usb, Windows.
Tags: , , ,
add a comment

It is possible to run Portable apps in Linux with Wine. But my question is, why should you need to? All of the programs that you can install to a usb drive are open source, and so most of them will come with a Linux distro, or are installable to one. As this is such a useful tool to get open source apps working on a windows box, I am surprised that there is no tool to better integrate portable apps into a Linux desktop. A few ideas:

1 Allow MS links (.lnk) to be opened by wine, which would follow the link as if it was in wondows, guessing the directory that it liks to. in windows, the link is to F:/portableapps/portableappsmenu/portableappsmenu.exe. Surely this could automatically be worked out to be a link to /media/sdxx/portableappsmenu/portableappsmenu.exe.

2 Allow autorun.ini scripts in KDE. There’s already an options dialog when you plug in a device.

3 Allow programs such as thunderbird to automatically synchronise with files of the portable apps version installed to a usb stick.