Installing to a USB Flash Drive Beta

From DSL Wiki

   This page in other languages: Español, 中文版 (chinese)

Contents

Introduction

It's cool to carry your whole OS in your pocket, so the kids install DSL to a USB Flash Drive for booting from a USB port.

A USB Flash Drive is not the same as a USB Hard Drive. Installing to an external USB Hard Drive does work, but some external enclosure hardware won't like being used as a boot source. Your mileage may vary.

Requirements

If you're going to install to a USB drive, you'll need:

  • A USB drive of 128 MB or larger. 512 MB is preferable, 64 MB will work in a pinch.
  • A working operating system & internet connection (which you probably have if you're reading this...)
  • If you're going to boot the USB drive (not just run it from within another OS), then you need to make sure your BIOS can boot from USB. Check your BIOS setup screen, and pop in a USB stick at the next boot to try it out.

Finally, you're probably going to wipe your USB Drive, so BACK UP YOUR DATA. Enough said.

Tutorials

There are actually lots of how-tos/walkthroughs for installing DSL to a USB Flash Drive. All those tutorials are filed according to the source operating system. Basically, pick your current operating system. You'll probably want to do one of these:

If you have figured out another way of installing DSL to a stick, add your knowledge where you see fit.

Common Post-Install Questions

I installed everything, but my computer keeps booting from my hard drive!

  • Really old computer BIOSes may or may not support boot-from-USB (pre-2000 or so). Read the section on USB Booting, then check your BIOS setup screen. If it does support boot-from-USB, check that your GRUB or Syslinux config files are set up right.

I just about finished installing, but then GRUB wouldn't install. @#%!

  • Some users have mentioned that grub-install whines about the --no-floppy argument. Try going without it, try going with it, try using sudo, try unplugging and replacing your USB stick. If your system auto-mounts the USB stick, try it with the stick both mounted and unmounted. It seems the majority of people have found a way to make it work.

Why is it that DSL installed to USB won't finish booting after conversion from .iso?

  • It appears that the KNOPPIX file is hard-wired to seek for CD-ROM and not USB drive. Use the embedded iso instead.

Why does the from-within-Linux method require FAT16, but the Windows method work with FAT32? Could I just leave and reuse an existing FAT32 USB partition using the Linux syslinux version?

  • Either method should work, but some users have found FAT works more reliably than FAT32. Although the current version of Syslinux should work with FAT32 (3.35+), that was not always the case. If you're using an old version of Syslinux, make sure it supports FAT32.

Why don't my keyboard and/or usb mouse work when I enter X windows?

  • Could be a BIOS problem. Try to enable 'USB device emulation' or 'legacy USB' in your BIOS setup.

Modifications for v 3.2 Embedded

After installation I added autorun.inf penguin.ico /USB /tightvnc

Trying to run the dsl-linux.sh in my distro did not work I had to modify the file (it was setup for a second drive and qemu did not exist in the download)

Here are some configuration settings that I found I had to modify after the installation. I also created an autorun.inf that works flawlessly with this. The autorun.inf file is also configured for use of TightVNC if the folder tightvnc is created at the root of the drive. I also created a context link to the folder USB.

  • autorun.inf
  [autorun]
  icon=penguin.ico
  label=Damn Small Linux
  open=dsl-base.bat
  action=Run Damn Small Linux in qemu
  shell\vncviewer\command=tightvnc\vncviewer.exe
  shell\vncviewer=Run the VNC Viewer Application
  shell\tightvnc\command=tightvnc\tightvnc-1.2.9-setup.exe
  shell\tightvnc=Run the TightVNC Server Installation
  shell\usbfolder\command="explorer.exe USB\"
  shell\usbfolder=Open the USB folder in Windows Explorer


This next file I modified and paired up with the windows equivalent so you do not have to answer the questions every boot. Some people might find the -m 256 beyond and should change as needed.

  • dsl-linux.sh
   qemu/qemu -L qemu/ -no-kqemu -soundhw sb16 -m 256 -localtime \
      -kernel linux24 -initrd minirt24.gz -hda KNOPPIX/KNOPPIX \
      -append "qemu vga=791 quiet noscsi nousb nofirewire atapicd noideraid \
       noacpi acpi=off noapm noagp ide1=noprobe ide2=noprobe nomce frugal"


You must also download qemu and copy these files to the qemu dir on the usb drive.

  • qemu
  • qemu-img
  • qemu-i386

If you wish to use the rest of the context menu I've created, download the TightVNC installer, vncviewer and put them in a \tightvnc.

At this point I made all of the damn small linux files hidden and hid the TightVNC, USB folders. Its a low level of security but works nicely. To use anything you just right click the drive in My Computer. =)

References

This page (Installing to a USB Flash Drive) was written by a bunch of contributors over the years, and it got really big. This page exists to break up that content into manageable/edible bits. The original page and its history is still stored here.

Pendrive Linux

Pendrive Linux - DSL specific instructions