# First, setup your disks to your liking. You can use whatever you want here, # RAID, LVM, etc... Remember your disk configuration because you'll need it # to configure grub, menu.lst and fstab. Using RAID, LVM, or others will require # more configuration than this guide covers. To keep it simple I'm using a # single disk. An example: $ fdisk /dev/sda $ mount /dev/sda3 /target $ mkdir /target/boot $ mount /dev/sda1 /target/boot # Depending on the host OS you're using, you may need to initialize the rpm db # on the host OS $ rpm --initdb # Use the following command to install the packages. I'll be addressing this # command as $rpm. $ rpm --root /target -i # Use your shell's tab completion to complete the package filenames. I # deliberatly left out the versions so these instructions apply to a wide range # of versions # Let's install some basics $rpm setup basesystem filesystem # Install bash first, this is needed for post-install scripts $rpm bash glibc glibc-common termcap libgcc tzdata mktemp libtermcap # Install some dependencies (this is mainly to keep the next command smaller) $rpm grep pcre libstdc++ info ncurses zlib gawk sed ethtool # Install the bulk of the system $rpm coreutils libselinux libacl libattr pam audit-libs cracklib-dicts \ cracklib libsepol mcstrans libcap chkconfig python db4 openssl readline \ bzip2-libs gdbm findutils krb5-libs initscripts util-linux popt udev MAKEDEV \ centos-release shadow-utils keyutils-libs iproute sysfsutils SysVinit \ net-tools module-init-tools e2fsprogs e2fsprogs-libs glib2 mingetty \ device-mapper sysklogd psmisc centos-release-notes procps libsysfs iputils # Install package manager $rpm rpm beecrypt elfutils-libelf rpm-libs sqlite # Install YUM $rpm yum python-elementtree rpm-python yum-metadata-parser python-sqlite \ expat libxml2 python-urlgrabber m2crypto python-iniparse # You may also want to install your favorite editor $rpm nano # This provides /root with some defaults, like color highlighting on `ls` $rpm rootfiles # Right now you have system which you can chroot to, so we can start setting up # the basics # Mount directories for chroot operation $ mount --bind /dev /target/dev $ mount -t proc none /target/proc $ mount -t sysfs none /target/sysfs $ chroot /target # This constructs /etc/shadow $ pwconv # Configure fstab $ nano -w /etc/fstab # Installing the kernel. Do this back outside the chroot in the host OS system $ exit $rpm kernel mkinitrd cpio device-mapper-multipath dmraid gzip kpartx lvm2 nash \ tar less device-mapper-event # Install the bootloader, grub. $rpm grub diffutils redhat-logos # Let's chroot again to configure our bootloader $ chroot /target # We start by configuring the bootloader. Open /boot/grub/menu.lst, and put the # following there <<>> # If this command gives an error, you can safely ignore this because it's not # of importance. What is important is that grub-install copied the right files # to /boot/grub that we need for booting. $ /sbin/grub-install /dev/sda # Manually install grub if the previous step failed. - means type it in the grub # shell $ grub $- root (hd0,0) $- setup (hd0) # Optional packages # You may want to install passwd so you can set passwords ;-) $rpm passwd libuser openldap cyrus-sasl-lib # These are used to set the keyboard language (loadkeys) $rpm kbd usermode # ** Right now you should have a bootable system! Here are some tips to help you # through your 1st boot *** # Most of the system configuration happens in /etc/sysconfig. See /usr/share/doc/initscripts for full documentation. Some quick post-install tips: * Configure your keyboard in /etc/sysconfig/keyboard using the KEYTABLE variable * Configure networking Take a look at /etc/sysconfig/network-scripts. See ifcfg-lo for an example. # This recreates the RPM database. If the host OS you used has a different # version of db, rpm will complain with # rpmdb: unable to lock mutex: Invalid argument $ rpmdb --rebuilddb