[CentOS] USB Stick Install

Aleksandar Milivojevic alex at milivojevic.org
Fri Oct 28 14:05:59 UTC 2005

Quoting Bards1888 <bards1888 at gmail.com>:

> Did you see my post from yesterday (titled 'Minimal Server Install')
> where Johnny Hughes said he managed to get Centos 4 down to 550mb ?
> Also, the tip from Ash Christopher to go here;
> http://www.owlriver.com/tips/tiny-centos/
> is fairly useful.

The "minimal install" issue was already beaten to death several times.  The
above link is usefull, but instead of excluding bunch of individual 
packages by
hand, you can simply do:

%packages --nobase

That will elimiate the base group (which would otherwise be installed 
by default
with all its insane dependencies).  Actually, after you use --nobase option,
you'll find yourself quickly adding packages back, instead of removing 
them ;-)

Some of the packages that are not installed with --nobase option, and that you
might want to reinclude are: crontabs, iptables, logwatch, logrotate, man,
man-pages, ntp, openssh-clients, openssh-server, sendmail, sendmail-cf,
vixie-cron and yum.  Anaconda will complain about 'system-config-mouse' 
at the end of postinstall, however you can safely ignore that (or 
simply add the
package to be installed, if you don't like seeing Anaconda complaining).

See also https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=139364

BTW, if you are installing on USB stick, note that each memory location 
on stick
has limited number of writes (somewhere around 100k, if I remember 
correctly). Running OS with ext2/3 file system on it might burn some of 
them very fast. You would at least want to mount all filesystems with 
noatime option, use ext2
(no journaling, since journal will be written over and over again over same
memory locations whenever there's some file system activity) and reconfigure
syslog to send logs somewhere else (not write them to USB stick).  I think
there was an article in Linux Journal with some usefull recomendations how not
tu burn your USB stick by installing OS onto it (but I can't find it 
right now,
you might want to try searching www.linuxjournal.com).

How to install on USB stick...   Hmmmm...  When you boot into rescue mode (or
from alt-2 console during install) and you execute "list-harddrives", do you
see USB stick reported?

An workaround that might work would be installing on "real" hard drive, then
copying everything to USB stick (create partitions and LVM volumes (if you use
LVM)), remove hard drive, boot into rescue, mount file systems from stick,
chroot into it, make appropriate changes to /etc/fstab, check grub/lilo config
(whichever you use as boot loader), rebuild initrd image(s) in /boot 
install grub or lilo into MBR.  Should work.  Basically, all the stpes if you
were to restore machine from backup onto different hardware than original

This message was sent using IMP, the Internet Messaging Program.

More information about the CentOS mailing list