User Tools

Site Tools


installing_debian_from_usb_stick

This is an old revision of the document!


Installing Debian from USB stick

Problem: Getting Debian Squeeze installed onto a PC or in my case, an HP T5520 thin client with out an external USB CD/DVD-ROM drive. While you can use one of the many tools around to copy the ISO image to your USB stick and make it bootable, the Debian installer gets hung up on not being able to find a CDROM drive or device to mount.

Solution: Create two partitions on the USB stick, on the first partition use the Windows pendrivelinux installer tool to copy the ISO and make it bootable. Extract a copy of the ISO to the second partition. The Debian installer detects the second partition as an installation source, and mounts it under /cdrom for us and completes the installation with out any extra help.

Here's how:

  1. In this exmaple I used my existing CentOS IRLP node.
  2. Prepare the USB stick with two partitions. My usb stick appears as /dev/sda on my CentOS node. The output from dmesg will show you, make sure you identify the right device, otherwise you could hose something :-P
  3. Using Linux fdisk to delete all partitions on the USB stick and create two new primary partitions, type b (WIN95 FAT32).
  4. Next we need to format the second partition. CentOS doesnt have dosfstools, to install them yum install dosfstools
  5. To format the second partition, mkfs.vfat /dev/sda2
  6. Next copy the IRLP ISO to the Linux using WinSCP or tool of your choice.
  7. Mount the second partition and the IRLP ISO so we can copy the contents of it to the second partition:
    • mkdir sda2
    • mount /dev/sda2 sda2
    • mkdir iso
    • mount -o loop IRLP_CD_9.01.iso iso/
    • cp -R iso/ sda2/
    • It'll complain about “cannot create symbolic link” with some files in doc/ I ignored this..
    • sync - this flushes the disk cache.
    • umount sda2/
  8. Put the usb stick in-to a Windows box, use the Windows format tool to do a quick format of the first partition with FAT32. Note: Windows will only see the first partition.
  9. Use the pendrivelinux Windows tool to put the IRLP 9.01 ISO onto the first partition. http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/
  10. I used the bottom option - Try Unlisted Linux ISO, the rest is self explanatory.
  11. Boot the thin client from USB, this time it did not get hung up on no CDROM drive.
  12. The install process completed with out error and rebooted ok.
installing_debian_from_usb_stick.1359498709.txt.gz · Last modified: 2013/01/29 22:31 by lonney