Monday, March 8, 2010

Installing Debian Lenny from a USB flash disk

I tried the instructions available at this link and it worked for me. I will just summarize the steps that I followed .  I am assuming that your flash disk is identified as /dev/sdf by your system. (Check dmesg output). If you have a bigger disk, you can create multiple partitions using fdisk. We will use /dev/sdf1 for our discussion.

  1. Create a Fat16 partition using fdisk. Some information about this is available here.

    # umount /dev/sdf1
    # mkdosfs /dev/sdf1


  2. Use syslinux as a boot loader

    # syslinux /dev/sdf1

  3. Download the current Debian hd-media installer images from here.  Download vmlinuz, initrd.gz from this page.

  4. Download the current Debian netinstall cd image from here.  Note that the versions of these two images must match.

  5. Copy necessary files into the disk

    # mount /dev/sdf1 /mnt/usb
    # cp vmlinuz /mnt/usb/
    # cp initrd.gz /mnt/usb/
    # cp debian-504-i386-netinst.iso /mnt/usb


  6. Create 'syslinux.cfg' file inside /mnt/usb/ containing following lines :

    default vmlinuz
    append initrd=initrd.gz


  7. Now unmount the usb disk and fix or create the mbr

    # umount /dev/sdf1
    #install-mbr /dev/sdf


  8. Now plug into the system where you want to install Debian. You need to select USB device as your first boot device.

No comments: