Gentoo round 4 (and Sorcerer's continued)
Matthew Carpenter
matt
Mon Dec 27 23:50:40 PST 2004
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Over the weekend I found I had burned the Gentoo Install CD instead of
Debian (oops) so I decided to give it another go (I know, famous last
words, particularly for something so time-consuming). I know a lot of
Genoo's install-time is in download/compile-time. I found a good 13GB
open partition on a system I won't have long. I was going to install
Debian Woody or Sid and check it out (now that I've dabbled in Ubuntu
and MEPIS a little and have started getting to know and like APT).
Installation starts out booting the Live-CD (if you choose that route),
which boots to a command prompt (with an assortment of tools used to
install and recover Linux). This version of the install disc has an
improved "motd" from last time, explaining everything needed to start
the installation. Most notably using "links
/mnt/cdrom/docs/html/index.html" to view the installation documentation
(whereas this can also be viewed online on another system if you like
colors :) (available at
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1 )
The documentation hadn't changed much, with a few minor exceptive
improvements, so I dug right in.
First on the path to a working system: Partitioning the drive. Since I
already had a workinst partitioning scheme and didn't need to change it,
I happily skipped onto step two:
Second step was to create the appropriate filesystems (EXT3 and SWAP in
my case). No problem. mkfs.ext3 /dev/hdc7 ....
Setting up the network is simple enough, since the LiveCD identified the
NIC easily enough (in a Knoppix-like fashion):
# dhcpcd -n eth0
ok, I could have used the included Gentoo tool net-setup. It asks some
nice questions and helps me set up my network if I don't know how. If I
needed too, the docs show how to use the included rp-pppoe for broadband
authentication...
Next, we choose the appropriate install stage. Gentoo is stratified
into three stages:
* stage1: KILL ME HARD
* stage2: Bring it on...
* stage3: <wimper>
Since time is limited and the "Gentoo-gods" have proven my ineptitude in
the past, I decided to put pride aside and choose stage3. The last line
configures the quickest mirrors to grab source from.
# mount /dev/hdc7 /mnt/gentoo
# mount none -t proc /proc
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
# tar -xvjpf /mnt/cdrom/images/stage3*bz2 -C /mnt/gentoo/
# mirrorselect -a -s4 -o |grep 'GENTOO_MIRRORS=' >>
/mnt/gentoo/etc/make.conf
Next I chroot to the new root directory. I've always loved chroot.
The idea of potentially running a "new" system using the existing
kernel/etc... is quite amazing. This is bootstrapping at its best:
# chroot /mnt/gentoo
# env-update.sh
# source /etc/profile
Now that I am now "living" in my new system, the first thing I do is
synchronize my package manager (Portage) with the current versions using
the ever-present "emerge" tool. This is the core of your package
management with Gentoo:
# emerge --sync
Next step involves dorking with the "USE" variable. I (perhaps
ignorantly) blame much of my past-problems with Gentoo on my dorking
around with "USE". I skip this step and figure I'll get a working
system and then mold it to my designs...
Of course, what kind of Linux system would it be if we didn't have a
Kernel? So the next step is to download and configure/compile the
kernel of choice. I choose "gentoo-dev-sources" because I want a 2.6
kernel. Besides, the LiveCD kernel is working well. Since I'm wimping
out (failure is less painful) I choose to use genkernel to automate the
process (I've already configured too many kernels from scratch in the
past 2 weeks):
# emerge gentoo-dev-sources
# ln -s /usr/src/linux* /usr/src/linux/
# cd /usr/src/linux/
# emerge genkernel
# genkernel all
Now I add in any modules I want loaded at boot (not many):
# echo "b44" >> /etc/modules.autoload.d/kernel-2.6
# modules-update
Editing /etc/fstab to mirror what the system looks like (this is clearly
defined in the documentation so I'm going to skip this here)...
Name the box:
# echo "toto" >/etc/hostname
# echo "eisgr.com" > /etc/dnsdomainname
# rc-update add domainname default
Edit /etc/conf.d/net to set up DHCP for eth0 and eth1
Then add in boot script for eth0:
# rc-update add net.eth0 default
Setup root password:
# passwd
Checking out /etc/rc.conf, but not changing anything in particular:
# nano /etc/rc.conf
I'm used to sysklogd, but since it seems like the docs recommend
syslog-ng, let's try that one. Then we'll try vixie-cron since I don't
really care. Then a few other important tools:
# emerge syslog-ng
# rc-update add syslog-ng default
# emerge vixie-cron
# rc-update add vixie-cron default
# emerge slocate
# emerge dhcpcd
# USE "-X" emerge rp-pppoe
Next I set up GRUB according to foreknowledge and the documentation
# emerge grub
# nano -w /boot/grub/menu.lst
# grub
| root (hd0,6)
| setup (hd0)
| quit
Bounce the box and finish up:
# exit
# halt <power off then back up>
Here we didn't do too well, but more on that later. I got back in after
copying the kernel and /lib/modules/ from the CD and editing GRUB...
After logging in as "root", adding a regular user:
# useradd -m -G users,wheel,audio -s /bin/bash matt
# passwd matt
Then, I emerged a couple more programs before following their
recommendation of rebuilding everything from scratch:
# emerge -u system
On the Sorcerer's side, I still have the VMware image installing KDE.
So at the moment I have two systems engrossed in compiling software.
Right now I feel like I am computing the answer to the world, the
universe and everything. Any day I'm certain one of these machines is
going to spit out "42". Unfortunately, I am not certain I will be alive
to figure out the question.
On the serious side, I did experience issues booting my newly
GenKernelled kernel. I was relatively shocked, since it was supposedly
the kernel that came on the LiveCD. I will end up reconfiguring and
trying again, but this was rather disheartening.
My boot screen turns the characters green, the text thin, and I end up
with a Kernel Oops. I'll give more details tomorrow (since she's
pluggin along right now).
Next is "emerge kde" so my Gentoo system can chunk along some more, just
like my Sorcerer's system is. The Gentoo system has an advantage,
though. It is running full-bore on a 2.8GHz system. The Sorcerer's is
in a VM on a 2.4GHz system.
Good evening to you all. Hope you enjoyed the trip down Gentoo-lane.
It is definitely worth the experience... but don't rush through the
documentation. It is worth reading, and adds to the experience.
Perhaps you are a kernel developer, perhaps a tanning-booth technician.
~ Either way, these docs will enhance your knowledge of the Linux OS
bundle.
Good luck.
- --
Matthew Carpenter
matt at eisgr.com http://www.eisgr.com/
Enterprise Information Systems
* Network Server Appliances
* Security Consulting, Incident Handling & Forensics
* Network Consulting, Integration & Support
* Web Integration and E-Business
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFB0Oacso9lqh4MragRAmOCAKCJym5PioIPP0llTMUjC6UKI6e61wCfQ6wl
JSADk3XdqVGWoUCqdVZ++TI=
=+ufG
-----END PGP SIGNATURE-----
More information about the Linux-users
mailing list