In case of emergencies, I used to keep DSLinux on a bootable USB stick. These are my notes for creating such a stick and booting DSL 4.4.10 (kernel 2.4.31) on my Evo N410c laptop.
I stopped using that laptop in early 2009 because of a hard drive crash. Rather than replace the drive, I later purchased an HP Mini 1001 netbook. I hope these notes will still be helpful.
If you're following these notes as a how-to, bad things can happen. Back up your data.
1. Set up the stick partition(s) & boot flag
2. Copy the ISO contents onto the drive
3. Install grub using grub-install
4. Make a menu.lst file for grub
Long version follows!
1. Prepare the USB stick
WARNING: Partitioning destroys all of your data. FOREVER. Don't partition the wrong drive.
For this installation, I gave my USB stick just one big bootable, FAT32 partition. I used Parted (installed via Synaptic), but you can use fdisk or whatever tool you prefer.
I have previously put two partitions on my USB stick (one FAT, one Linux). I tried doing that this time, and it didn't really work out. I've discussed that at the bottom of this page under "User Permissions and USB Partitions."
After runing Parted or fdisk, the kernel may request a reboot. The kernel needs this in order to register the partition changes. You may have to do it, but you can try partprobe if you want to save some time:
No guarantees, but it might save a minute. Thanks to the Ubuntu Forums for this advice.
2. Put the ISO contents onto the USB Stick
In Linux, one can mount an ISO. So, no need to make a CD in order to browse the ISO contents. To mount it, use something like the DSL wiki says:
mount [CURRENTISO] [MOUNTPOINT] -o loop
Then copy the complete contents from MOUNTPOINT to the USB stick:
cp -vR [ISOMOUNTPOINT]/* [USBMOUNTPOINT]/
If you have trouble copying the ISO contents, you may have to set the drive permissions. You can read about User Permissions at the bottom of this page (User Permissions for USB Partitions).
3. Install GRUB
I ran grub-install, the grub installer script. Go read the man page.
Mount the USB stick, then run the installer. I ran something like:
grub-install --no-floppy --root-directory=[DEVICEROOT] /dev/[USBSTICK]
Where DEVICEROOT is the root directory of the stick, and USBSTICK is the device path for your stick. Check that your directory paths are correct, or you can cause serious damage!
4. Set up GRUB menu
The DSL Wiki's guide to making menu.lst didn't work for me. I eventually copied my main hard drive's GRUB menu, and then edited it. To copy it, you'll have to use sudo or be root:
sudo cp /boot/grub/menu.lst / [MOUNTPOINT]/boot/grub/menu.lst
I know that file works, so that was a good place to start. Then I removed all of the Ubuntu startup stanzas (near the bottom of the file). My boot stanza ends up like the wiki says, though. Something like:
title Damn Small Linux
kernel /boot/isolinux/linux24 root=/dev/sdb ro toram
Catch: My original hard drive crashed. The new drive shows up as /dev/sda in Xubuntu 8.04 ... I don't know exactly why - it's the same interface as the old drive. But now my USB drive is sdb. On a stock system, I would expect to use
The Evo N410c BIOS supports both booting from USB, PCMCIA, and other sources. Enter BIOS settings manager by pressing F10 at reboot. Search through the menus and you'll find "multiboot". Enable that and it will find the USB stick on boot. (Thanks to Javier for commenting on how it doesn't explicitly mention USB.)
6. Other matters (quirks, to-do)
boot arguments: toram
If you add the boot argument
toram in menu.lst, then DSL will run completely from RAM. This also frees up the USB slot so that you don't have to leave the stick in. You can read up on other DSL boot arguments.
Once you boot up DSL, visit the Control Panel to set your backup device. I've set mine to my USB stick. It has to be mounted when you shut down, but it's worth it. This will save your configuration files and anything in the home directory.
madwifi - Atheros wireless card drivers
I use an Atheros PCMCIA 802.11g card, and those drivers are not totally FOSS. I expected to face difficulty, but it works out of the box. Visit the Control Panel and run iwconfig. Set the card to ath0, and then set the SID to your wireless network name. After 5-10 seconds, iwconfig will return success or failure.
If you use the Control Panel, it will generate an executable script called myiwconfig. It's stored at ~/. As long as your backup works, then you won't have to set iwconfig again.
Suspend and Hibernate work fine on this hardware until Ubuntu 8.04 and Windows XP Professional SP3. I could swear I've had Suspend working with an older version of DSL, but I must be wrong. DSL 4.4 is based on Linux kernel 2.4. That kernel doesn't support suspend. I'm guess I'm currently looking for a way to suspend/hibernate without the kernel support, but that's not a top priority right now.
User Permissions and USB partitions
I have no trouble creating two or more partitions on my USB stick. Afterwards, however, my Linux partitions (ext2, ext3) only allow root to read/write the drive.
I think this may be because I have to run fdisk and Parted as sudo, or it may be an Ubuntu-specific thing. I think a solution is to change the permissions of the drive after partitioning. I've tried this:
1. Mount the drive to
2. Change the permissions of the drive:
sudo chown [USERNAME] [MOUNTPOINT]
sudo chgrp users [MOUNTPOINT]
sudo chmod ug+rw [MOUNTPOINT]
... but it doesn't quite work [sigh]. The command
users lists the possible users. The command
groups lists the possible groups.
I'll keep digging.
When I prepared this project in Dec 2008, I went to the DSL wiki and edited/reorganized the USB installation guides. Great content - I hope it's a little more read-able now.