[CentOS] Install on a usb flash drive

Mon Aug 20 13:55:40 UTC 2007
Phil Schaffner <Philip.R.Schaffner at NASA.gov>

On Sat, 2007-08-18 at 13:14 -0500, Scott Moseman wrote:
> An interesting idea.  How would the install work?  If you boot from
> DVD with the USB drive installed, will it see the drive and make it an
> option for the install destination?

Tried this a while back with an earlier release of CentOS4 and couldn't
get the installer to see the media.  Ended up installing a small system
on a comparable-sized partition (actually under VMware, but that is not
required) and "cloning" to to the USB drive with tar, editing /etc/fstab
and /boot/grub/grub.conf, writing grub boot record to the MBR, creating
a new initrd.img after doing chroot, and probably some other kludges I
don't remember, but did get it to boot and run eventually.  Worked OK on
the hardware it was created on but with limited portability.  The "right
way" [TM] to do it would probably be to start with a live distro and get
it to work from USB.  IIRC this is done for some live distros.

A recent thread on this seemed to end with some hope for the future, but
without resolution:

http://lists.centos.org/pipermail/centos/2007-July/084142.html


> On 8/18/07, gjgowey at tmo.blackberry.net <gjgowey at tmo.blackberry.net> wrote:
> >
> > It'll only be a problem if you're planning to use a swap file or do frequent writes
> > (compiling programs, etc).  Solid state devices really aren't great if your going
> > to do heavy writing because they will fry eventually.  Under normal usage this
> > could be years, but with heavy daily use it could be months.

No swap and "noatime" on the mount as suggested elsewhere.  The more you
can minimize writes to the media the longer it should last.

> > Geoff
> >
> >
> > -----Original Message-----
> > From: Jerry Geis <geisj at pagestation.com>
> > Date: Sat, 18 Aug 2007 13:32:29
> > To:CentOS ML <centos at centos.org>
> > Subject: [CentOS] Install on a usb flash drive
> >
> > I all, I was thinking about installing centos on a usb flash drive. Perhaps a
> > 4GIG.  I dont need X or anything on this drive so installing  should fit just fine.
> >
> > Are there boot issues with these flash drives? I'll be using a newer
> > motherboard so the motherboard should be able to boot USB.
> >
> > Does this work? Have others done anything with flash drives? I am
> > wanting this flash drive to be the ONLY drive in the computer.
> > Kind of a dedicated machine running multiple RS232 multiport cards.

Might consider a Live-CD distro with a USB key for customization, but
that would not satisfy your "only drive" constraint.

Phil