Install linux to USB flash drive - "normal" not "live"

10,278

Solution 1

absolutely. In most cases (depending on your linux of choice) you can simply boot off of a live CD and do a full install directly to your thumb-drive. You will probably be required to format your pen-drive in ext2/3/4 prior to installing, but still should be doable. The trick will be finding out if your bios will support booting from the thumb-drive.

Solution 2

You can - as long as you have a suitably large USB key - with ubuntu, for example, i used a customised build on a 4 gb key, so, you'd need at LEAST that much. I'd also suggest running the clean-up (apt-get autoclean and apt-get autoremove on debian derivatives) function on your package manager often, since many of them keep downloaded packages cached, and that's NOT useful on a small sized system.

Set the system to mount the hard drive at boot by editing fstab.

The home drive is a little trickier - If you want linux to 'share' the drive with another OS to me, the 'sanest' way to do it would be to do a standard install and symlinks - since normally you're expected to mount /home to a partition. Else, simply set the hard drive as /home at install, or edit fstab at a later point.

If you're going to use symlinks, i suggest doing it with the directory that the package manager downloads packages to (see a trend?) as well.

Share:
10,278

Related videos on Youtube

František Žiačik
Author by

František Žiačik

Updated on September 18, 2022

Comments

  • František Žiačik
    František Žiačik over 1 year

    Is it possible to install linux to USB flash drive so that I can

    1. install further software in it? I mean
    2. use my harddrive as /home

    I know ho to create a live-usb, but it leaves me with read-only filesystem which I can't update with new software (or security updates). Also I know I can have a persistent /home storage on the flashdisk, but I'd like to have it on my harddrive as if I booted from it.

    Please comment if I was unclear about my concern.

  • new123456
    new123456 about 13 years
    Another interesting problem is how much a decent journaled filesystem (ext3/xfs/reiser) will use up on a USB drive as well. You could potentialy use FAT32, as most Linuxes I know can read/write FAT.
  • new123456
    new123456 about 13 years
    Hmm... It does appear that Linux only supports DOS bootstrapping from a FAT filesystem, and not actual booting. Good call.