jump to navigation

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.

Advertisements

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.”