Installing gentoo via knoppix livecd on seth Notes: http://www.gentoo.org/doc/en/altinstall.xml Step 1 Boot knoppix Cheat codes are here: http://www.confederatelinux.com/linux/cheatcodes_for_knoppix.htm boot: knoppix failsafe or boot: knoppix vga=normal screen=640 atapicd Go to Shell and su to root $ su - # usermod -d /root -m root # exit (to pickup usermod change) $ su - # mkdir /mnt/gentoo Start up SSH # /etc/init.d/ssh start Create a user to SSH in as: # passwd knoppix You can now SSH into seth. If you are returning to this install skip to Step 2. Determine available partitions: root@0[root]# fdisk /dev/hda The number of cylinders for this disk is set to 3876. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/hda: 30.0 GB, 30005821440 bytes 240 heads, 63 sectors/track, 3876 cylinders Units = cylinders of 15120 * 512 = 7741440 bytes Device Boot Start End Blocks Id System /dev/hda1 1 1551 11725528+ c W95 FAT32 (LBA) /dev/hda2 * 1552 1585 257040 83 Linux /dev/hda3 1586 1724 1050840 82 Linux swap /dev/hda4 1725 3876 16269120 f W95 Ext'd (LBA) /dev/hda5 1725 3876 16269088+ 83 Linux Command (m for help): q Pick up from here: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=4 Format filesystems: # mke2fs -j /dev/hda5 # mke2fs -j /dev/hda2 Step 2: Set the correct date # date # date MMDDhhmm Turn on swap: # swapon /dev/hda3 Mount filesystems: # mount /dev/hda5 /mnt/gentoo # mkdir /mnt/gentoo/boot # mount /dev/hda2 /mnt/gentoo/boot # mkdir /mnt/gentoo/proc # mount -t proc none /mnt/gentoo/proc # cd /mnt/gentoo If returning to this install skip to the appropriate step below depending on where you last left off. But make sure you perform Step 3 first. Install from Internet: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=5#doc_chap2 Select a mirror: # lynx http://www.gentoo.org/main/en/mirrors.xml or just download the Stage 2 tarball: # wget http://open-systems.ufl.edu/mirrors/gentoo/releases/x86/2004.1/stages/pentium3/stage2-pentium3-2004.1.tar.bz2 Unpack: # tar -xvjpf stage?-*.tar.bz2 Installing Portage: Continue to http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=5#compile_options Edit /mnt/gentoo/etc/make.conf to taste. For seth it should be: CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://gentoo.mirrors.pair.com/ftp://lug.mtu.edu/gentoo/source http://mirror.datapipe.net/gentoo http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" SYNC=rsync://rsync.namerica.gentoo.org/gentoo-portage RSYNC_RETRIES="3" RSYNC_TIMEOUT=180 AUTOCLEAN="yes" CCACHE_SIZE="2G" USE="-gtk -gnome qt kde ssl alsa X" Copy over DNS information # cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf Step 3 (do from console) Chrooting into the new environment # cd /mnt/gentoo # chroot /mnt/gentoo /bin/bash # env-update Regenerating /etc/ld.so.cache... # source /etc/profile Updating Portage # emerge sync (In case you are unable to use rsync, use "emerge-webrsync" which downloads and installs a portage snapshot for you) # emerge-webrsync Progressing from Stage1 to Stage2 http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6#doc_chap3 Downloading the necessary sources # cd /usr/portage # scripts/bootstrap.sh -f After this step disconnect from SSH and continue on from the console. Reestablish the chroot # chroot /mnt/gentoo /bin/bash # env-update Regenerating /etc/ld.so.cache... # source /etc/profile Bootstrapping the System # cd /usr/portage # scripts/bootstrap.sh Now go get some coffee or lunch.. this takes a while! After this is done you can shutdown and reboot knoppix later starting at Step 1. Progressing from Stage2 to Stage3 http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6#doc_chap4 Make sure you stay connected to the Internet during this next step other wise use the command: # emerge --fetchonly system If the connection is broadband and will stay up use: # emerge system This will likely take hours or all night. Configure the kernel http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7 Set the time zone # ln -sf /usr/share/zoneinfo/EST5EDT /etc/localtime Update the Module Tools # emerge module-init-tools Installing the Sources I prefer the vanilla 2.6 kernel source so use # emerge development-sources Check the link # ls -l /usr/src/linux lrwxrwxrwx 1 root root 20 Jun 5 09:10 /usr/src/linux -> /usr/src/linux-2.6.6 Manual kernel configuration: # cd /usr/src/linux # make menuconfig Compile kernel (do from console): # make && make modules_install When the kernel is done compiling, copy over the kernel image to /boot: # cp arch/i386/boot/bzImage /boot/kernel-2.6.6-vanilla # cp System.map /boot/System.map-2.6.6-vanilla Create Initial RAMDisk # emerge mkinitrd # mkinitrd /boot/initrd-2.6.6.img 2.6.6 It is also wise to copy over your kernel configuration file to /boot, just in case :) # cp .config /boot/config-2.6.6-vanilla Checking the created kernel image name and initrd # ls /boot/kernel* /boot/initrd* Configure modules http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7#kernel_modules Build vi (all you get to start with is nano) # emerge vi View all available modules # find /lib/modules/2.6.6/ -type f -iname '*.o' -or -iname '*.ko' Create file /etc/modules.autoload.d/kernel-2.6 with the following: 3c59x Now run modules-update to commit your changes to the /etc/modules.conf file: # modules-update Configuring your System # mv /etc/fstab /etc/fstab.install Create /etc/fstab with the following lines: /dev/hda5 / ext3 defaults 1 1 /dev/hda2 /boot ext3 defaults 1 2 /dev/hda1 /dos/c vfat conv=binary 0 0 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hda3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,user,kudzu,ro 0 0 Create the W98 mount point # mkdir -p /dos/c Mount them all # mount -a Network setup # echo seth > /etc/hostname Create file /etc/conf.d/net with the following line: iface_eth0="dhcp" Automatically Start Networking at Boot # rc-update add net.eth0 default Get PCMCIA Working # USE="-X" emerge pcmcia-cs # rc-update add pcmcia default System Information # cp /etc/rc.conf /etc/rc.conf.install Edit /etc/rc.conf and umcomment out the following lines: KEYMAP="us" CLOCK="LOCAL" EDITOR="/usr/bin/vim" PROTOCOLS="1 2 3" DISPLAYMANAGER="kdm" XSESSION="kde-3.0.2" Configuring the Bootloader http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=9 Build grub # emerge grub Install grub: # grub --no-floppy grub> root (hd0,1) Filesystem type is ext2fs, partition type 0x83 grub> setup (hd0) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 22 sectors are embedded. succeeded Running "install /boot/grub/stage1 (hd0) (hd0)1+22 p (hd0,1)/boot/grub/stage2 /boot/grub/menu.lst" ... succeeded Done. grub> quit Create the file /boot/grub/grub.conf with the following: # Note that you do not have to rerun grub after making changes to this file #boot=/dev/hda # Which listing to boot as default. 0 is the first, 1 the second etc. default 0 # How many seconds to wait before the default listing is booted. timeout 30 # Nice, fat splash-image to spice things up :) # Comment out if you don't have a graphics card installed splashimage=(hd0,1)/grub/splash.xpm.gz title=Gentoo Linux 2.6.6 # Partition where the kernel image (or operating system) is located root (hd0,1) kernel /kernel-2.6.6-vanilla root=/dev/hda5 initrd /initrd-2.6.6.img # The next three lines are only if you dualboot with a Windows system. # In this case, Windows is hosted on /dev/hda6. title=Windows 98 rootnoverify (hd0,0) chainloader +1 Installing system tools: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10 Syslog # emerge syslog-ng # rc-update add syslog-ng default Crontab # emerge vixie-cron # rc-update add vixie-cron default Finalizing your Gentoo Installation http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=11 Install ksh # emerge ksh Before you forget, set the root password # passwd Add my login # useradd kinscoe -m -G users,wheel,audio -s /bin/pdksh # passwd kinscoe Rebooting the system (from console) # exit # cd / # umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo # reboot