Fractoon's dedicated build - part 1
From Gentoo Linux Wiki
This article is long, so it's been split up into three pages:
- livecd install & kernel configuration
- system applications excl. X11
- desktop environment and to do list
[edit] Introduction
This is my second time round the Linux world. I gave it a whirl about one and a half years ago, but came away very frustrated and eventually headed back to MS Windows with my tail between my legs.
I bought a Dell Inspiron 9100 recently and as there was no pressure on getting a working machine in a hurry, thought it the ideal time to try Linux again. The one thing I learnt the first time around was that when you are new to Linux (and any form of Unix) everything takes a lot longer than you expect.
This time around I've already devoted about 120-150 hours of effort to learn and install Linux on this machine and it is only now that I am feeling like I have a system I can use.
I chose Gentoo after trying out SuSE (or however they are writing it now) and flirting with Linux From Scratch. I felt SuSE was as bloated as MS Windows and being completely in the dark as to the inner workings of Linux toyed with the idea of going for LFS. It looked very daunting till I discovered Gentoo, a prefect compromise between building from scratch and having to just accept whatever a Distro decided was best.
The journey has been thoroughly enjoyable and I've learnt so very much. Thank you very much to the whole Gentoo community that helped me whenever I became stuck!
I don't think that there is anything particularly new in this article (more like a book), but if it saves anyone some time then it will be worth documenting my journey.
Regards
PS. I've also cross-linked this article to this thread on the gentoo forums
[edit] What did I want to achieve with this build?
In the ideal world I would be able to scrap MS Windows completely, but seeing as I earn a living from it I needed to be able to still use it on the machine. It took me a while to decide between dual boot or VMware. Eventually I picked VMware. VMware has lots of benefits that a dual boot wouldn't have and providing the hardware is powerful enough the performance of 'guesting' MS Windows wouldn't be too bad. Luckily for me this turned out to be the case.
This meant that I wanted a small Linux installation, with a small desktop environment. I'd also read much about the benefits of Unicode, UDEV and NPTL so I thought those would be kinda nice features to have as well. The last key requirement was power management. With the machine being a laptop I felt it was important to have some semblance of battery life.
So to summarise, the key things I wanted was:
- Linux 2.6 kernel
- UDEV & NPTL
- Unicode
- Power Management
- Light 'desktop'. I chose XFce4
- VMWare
- All hardware seen and available for usage
[edit] The Inspiron 9100 hardware specification
In hindsight the Dell Inspiron 9100 wasn't the greatest machine to attempt to install Linux on. The wireless card isn't supported by Linux and the video card is so new it doesn't have 3D (DRI) drivers available.
Here is the hardware specification:
| Processor | 3.00 GHz Intel Pentium 4 with HT Technology |
| Chipset | Intel 865PE chipset |
| Memory | 1 GB DDR SDRAM 400 MHz |
| Screen | 15.4" Ultrasharp WUXGA (1920x1200) |
| Graphics | 128MB ATI Radeon Mobility 9700 |
| Storage | 60GB ATA100 7200rpm |
| Media Bay | DVD+RW - Nec (ND-6100A) |
| Ethernet | Broadcom BM4401 100 Base-T (RJ-45 connector) |
| Wireless | Broadcom BM4306 802.11b/g |
| Modem | Intel Corp 82801 AC'97 Modem (RJ-11 connector) |
| Sound | Intel Corp 82801 AC'97 Audio (Sigmatel?) |
| ACPI | Version 2.0 compatible |
Miscellaneous:
| USB | 4x 2.0 ports |
| IEEE1394 | 4-pin serial |
| TV-Out (S-Video-Out) | 7-pin mini-DIN connector |
| Infrared | sensor compatible with IrDA Standard 1.1 (fast) and 1.0 (Slow) |
| Video | 15-pin monitor connector |
| Video | DVI monitor connector |
[edit] Network environment
Most of the documentation around networking appears to be centered around 'proper' networks (rightly so, of course).
Unfortunately for me my 'network' consists of the Inspiron, i.e. it is networked, but hardly constitutes a network. The situation does get a little more complicated when you introduce VMware-workstation, but I'll ignore it for now.
The laptop usually lives behind an all-in-one adsl-router, firewall, wireless access point providing dhcp as well. Strictly speaking I suppose no second firewall needed, but I did implement a minimal iptables firewall though.
This means that the majority of the time the laptop will not be network enabled. I intend to write custom start/stop scripts for both wireless & ethernet connectivity at some stage. I currently have it configured to fire up wireless at boot-time.
[edit] Livecd installation
[edit] Introduction
Unfortunately the 2004.3 livecd doesn't provide wireless support for the Broadcom wireless card, so I had to use the ethernet card for the majority of the initial build phase. This wasn't too much of a burden as I could move the laptop to the access point whenever I needed, but it was a nuisance.
I chose the "gentoo" option when requested by the boot cd
This installation was heavily influenced by a gentoo forums thread that details how to go about bootstrapping straight to 2.6 kernel headers and "using" UDEV and NPTL. I used this article along with the gentoo handbook to build the system
This section only contains specifics to my build and may be of interest to others looking for information about partition, filesystem, make.conf settings etc. It is not a howto, use the gentoo handbook for that and your mileage my vary using anything listed here.
[edit] Hardware detection record
Need to capture the hardware as detected by the livecd so that I could verify everything was fine once booting to my own compiled kernel.
| Code: List PCI devices |
lspci Output: 00:00.0 Host Bridge: Intel Corp 82865G/PE/P Proc to IO Controller 00:01.0 PCI Bridge: Intel Corp 82865G/PE/P Proc to AGP Controller 00:1d.0 USB Controller: Intel Corp 82801EB USB #1 00:1d.1 USB Controller: Intel Corp 82801EB USB #2 00:1d.2 USB Controller: Intel Corp 82801EB USB #3 00:1d.3 USB Controller: Intel Corp 82801EB USB #4 00:1d.7 USB Controller: Intel Corp 82801EB USB2 Controller 00:1e.0 PCI Bridge: Intel Corp 82801BA/DB/EB PCI Bridge 00:1f.0 ISA Bridge: Intel Corp 82801 LPC Bridge 00:1f.1 IDE Interface: Intel Corp 82801EB Ultra ATA 100 Storage Cont 00:1f.5 Multimedia audio controller: Intel Corp 82801EB AC'97 - 00:1f.6 IDE Interface: Intel Corp 82801 AC'97 Modem Controller 01:00.0 VGA Compatible Controller : ATI Tech Inc: unknown device 4e50 02:00.0 Ethernet Controller: Broadcom BCM4401 100Base-T 02:01.0 Cardbus Bridge: Texas Inst. PCI 4510 PC Card cardbus Cont 02:01.1 Firewire (IEEE 1394): Texas Inst. PCI 4510 IEEE-1394 Cont 02:03.0 Network Controller: Broadcom BCM94306 802.11g |
I've commented the Modem Controller as I disabled it in the BIOS
It is also handy to make a note of all the modules the livecd loaded so that the list can be checked later on.
| Code: List loaded modules |
lsmod Outputs: Module Size Used by yenta_socket 13664 0 pcmcia_core 40708 1 yenta_socket evdev 6464 0 b44 14916 0 mii 2304 1 b44 parport_pc 27072 0 parport 22728 1 parport_pc sbp2 16744 0 ohci1394 24836 0 ieee1394 62008 2 sbp2,ohci1394 ohci_hcd 15044 0 uhci_hcd 23252 0 usb_storage 46208 0 ehci_hcd 21028 0 |
[edit] Hdparm tuning
Man hdparm provides a wealth of information about disk drive tuning options.
As udma5 had aleady been activited, hdparm didn't really provide any performance improvements with hdparm -tT /dev/hda returning about 2050 MB.sec for cached reads and about 33 MB/sec for bufferred disk reads.
Please see Power Management - Overview for a much more in-depth look at how I used hdparm.
[edit] Partitions
I've only implemented 3 partitions. However, I will probably change this to accomodate /home and /var having separate and dedicated partitions.
The approximate partition sizes (60GB disk) are:
- boot - 32MB (cylinders 1-4)
- swap - 1.5GB (cylinders 5-192, Guesstimate as to suspend to disk reqs?)
- root - remainder of disk
[edit] Filesystems
I selected ext2 for the boot partition, because I had difficulties using reiserfs on such a small partition and decided that it was probably the best option.
The main partition is running on reiserfs 3.6, seemingly the most reliable and fastest of the journalled filesystems
[edit] Make file
There is much information regarding all the parameters outlined below so I can't really add anything apart from the comments made in this file output.
| File: /etc/make.conf |
CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" # -march provides -mtune MAKEOPTS="-j3" # running a SMP kernel with '2' psuedo processors means that 3 works well USE="-kde -qt -apm nptl nptlonly alsa truetype gtk gtk2 gnome acpi xml xml2 unicode" # flags set for 'gnome' environment, NPTL and udev? ACCEPT_KEYWORDS="~x86" SYNC="rsync://rsync.gentoo.org/gentoo-portage" RSYNC_RETRIES="3" RSYNC_TIMEOUT=180 AUTOCLEAN="yes" FEATURES="sandbox ccache" CCACHE_SIZE="2G" |
[edit] User locales
Setting the user locales before bootstrapping apparently reduces the compilation time as 'unneccessary' locales aren't compiled.
This is done as follows:
| Code: Setting user locales |
echo "sys-libs/glibc userlocales" >> /etc/portage/package.use nano -w /etc/locales.build # chose en_GB/ISO-8859-1 & en_GB.UTF-8/UTF-8 |
[edit] Magic bootstrap command
A very specific build/bootstrap process per http://forums.gentoo.org/viewtopic.php?t=189250, i.e. don't use 2.4 at all.
| Code: Magic bootstrap |
env-update &&
source /etc/profile &&
emerge -C linux-headers &&
USE="-* build bootstrap" emerge linux26-headers &&
cd /usr/portage &&
scripts/bootstrap.sh &&
emerge system &&
emerge syslog-ng xinetd grub pciutils hotplug coldplug vixie-cron \
reiserfsprogs reiserfs4progs e2fsprogs udev dhcpcd \
wireless-tools &&
emerge --nodeps acpid ntp &&
rc-update add syslog-ng default &&
rc-update add net.eth0 default &&
rc-update add vixiecron default &&
rc-update add hotplug default &&
rc-update add coldplug default &&
rc-update add acpid default |
The above magic compile command bombed during emerge system (gettext had a libperl dependency), which was fixed by emerge libperl & then starting from emerge system again.
[edit] The importance of accurate time
There are two clocks on any system, the hardware clock and the system clock (OS). From the perspective of a source compilation distribution it is pretty important to have accurate time as not having it can serious mess around with portage, I assume.
| Code: Set up ntp |
rc-update add ntp-client default && ntpupdate -b -u pool.ntp.org |
[edit] Kernel selection & configuration
I chose gentoo-sources as I wanted a 2.6.9 kernel. I chose it in preference to vanilla-sources (or any of the more exotic mm, ac, nitro etc.) kernel as I assumed it would be the most stable patchset. That is, I assumed it would have all the critical patches that the vanilla 2.6.9 kernel doesn't have (trying to use all the hard work the gentoo developers have done).
Setting the correct timezone:
| Code: Check time zones available |
ls /usr/share/zoneinfo |
| Code: Set the desired timezone |
rm /etc/localtime && ln -s /usr/share/zoneinfo/ /etc/locatime |
Move to udev is only achieved by adding hotplug firmware loading to kernel and removing devfs filesystem support from kernel:
| Code: Install udev and req. filesystem support |
emerge udev sysfsutils |
| Code: Set udev parameters |
nano -w /etc/conf.d/rc Set: RC_DEVICES="udev" RC_DEVICE_TARBALL="no" |
The RC_DEVICES & RC_DEVICE_TARBALL setting selected assumes a pure UDEV installation, i.e. no devfs.
In general it is probably best to err on the side of caution with selections as it is definitely better to have a working kernel at this stage than an optimised but broken one.
Other parts of the journey that contain key kernel configuration information and are useful checking out are:
- Kernel - 2.6.9 configuration
- Firewall - A minimal IPTables 'firewall'
- Wireless - Installing the Broadcom BCM4306
- Bootsplash - Framebuffer & bootsplash settings
- UDEV - Kernel & configuration
- Power Management - Overview and howto
[edit] Fstab settings
Current fstab file
| File: /etc/fstab |
/dev/hda1 /boot reiserfs noauto,noatime 1 1 /dev/hda3 / reiserfs noatime 0 1 /dev/hda2 none swap sw 0 0 /dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 # could use "nodev,nosuid,noexec" above none /proc/bus/usb usbfs defaults 0 0 # haven't included usb stuff yet, but |
[edit] Grub configuration
Current grub configuration follows. Please refer to Bootsplash - Framebuffer & bootsplash settings for more info.
| File: /boot/grub/grub.conf |
# Boot automatically after 10 secs. timeout 10 # By default, boot the first entry. default 1 # Fallback to the second entry. fallback 0 # Grub splash splashimage=(hd0,0)/grub/gentoo.xpm.gz # first entry ... no 'extras', fallback title Plain ol' Linux kernel (hd0,0)/kernel-2.6.9-gentoo-r4 root=/dev/hda3 # 2nd and working kernel command line title Supped up, go faster pretty Linux kernel (hd0,0)/kernel-2.6.9-gentoo-r4 root=/dev/hda3 video=radeonfb:1024x768-32 splash=verbose,theme:emergence initrd=(hd0,0)/grub/fbsplash-emergence-1024x768.xpm.gz |
[edit] Pre-reboot checks
After compiling the kernel it is useful to give all the major files and settings a once over. By making doubly sure now you will avoid having to fix the system later by going through the whole livecd cycle again.
Just check the following to make sure:
- Have you copied the new kernel to /boot?
- Have you installed all the required modules?
- Have you checked where you have installed grub?
- Have you checked your grub configuration?
- Have you checked /etc/fstab, again?
This is just paranoia, but I've messed each of these up at some stage whilst learning. I'm also pretty sure there are loads of other things that could be missed!
[edit] Post-reboot checks
Post-reboot checks consists of checking the devices found and checking the logs for errors, providing, of course, the machine boots up.
| Code: Check PCI bus devices |
lspci -v lspci -n lspci -vvv |
All these command provide a wealth of data about the devices and it should match with the hardware details captured previously.
| Code: Check messages and logs |
dmesg | more cat /var/log/messages |
Providing everything matches up and there are no errors you are ready to proceed with further installation and configuration.
[edit] Kernel - 2.6.9
[edit] Introduction
This article contains all the configuration options I chose along with some key commands (sequences) used whilst tuning my kernel.
There are numerous sections of this overall article that have kernel components. I've provided links from those to this section as it lists all the kernel configuration options I've chosen while building my Gentoo box.
Lastly, this is all based on a 2.6.9 kernel
[edit] Make menuconfig - options selected
Here is a complete listing of all the kernel options chosen. It is based on the 2.6.9-gentoo-r9 kernel and I've only recorded the changes from the 'default' options selected.
I've also tried to annotate any 'strange' decisions
| Linux Kernel Configuration: Fractoon's 2.6.9-gentoo-r9 |
Code maturity level options --->
no changes made
General setup --->
[ ] Auditing support
[ ] Enable system-call auditing support (from *)
not currently using SELinux
[*] Support for hot-plugable devices (from *)
udev requirement?
[ ] Kernel config support
[*] Configure standard kernel features (for small systems) --->
no need to load unused code into memory
[ ] Load all symbols for debugging/kksymopps
don't need debugging info?
[*] Enable futex support
need this for a 'normal' system
[*] Enable eventpoll support
need this for a 'normal' system
[ ] No-op I/O scheduler (new) --->
when don't need schedule
[ ] Anticipatory I/O scheduler (new) --->
default, most complicated and for general use
[ ] Deadline I/O scheduler (new) --->
for database 'server'
[*] CFQ I/O scheduler (new) --->
Supposedly good for desktop usage?
[ ] Optimise for size (new)
cuts size by about 200k, but what impact performance?
[*] Use full shmem filesystem
Not selecting results in ramdisk
Loadable module support --->
[*] Module unloading
this is the default, but need to check it
Processor type and features --->
[*] HPET Timer Support
(2) Maximum number of CPUs (2-255) (Down from the default 8)
High memory support (off) ---> (*) 4GB (off changes to 4GB on exit)
Documentation is a little off as only 896MB ram
seen without this option?
Power Management options (ACPI, APM) --->
See Power Management - Overview and howto for more info,
especially regarding swsusp2 which isn't included in the
mainline kernel and may never be?
[ ] Software Suspend (Experimental)
Software Suspend 2 --->
<*> Software Suspend 2
<*> Swap writer
<*> LFZ image compression
<*> Text mode console support
(/dev/hda2) Default resume device name
[*] Compile in debugging output
<*> Compile checksum support
ACPI (Advanced Configuration and Power Interface) support --->
[*] ACPI Support
[*] Sleep States (Experimental)
<*> AC Adapter
<*> Battery
<*> Button
<*> Fan
<*> Processor
<*> Thermal Zone
[ ] Power Management Timer Support
CPU Frequency scaling --->
[*] CPU Frequency scaling
Default CPUFreq govenor (performance) ---> change to userspace
Control from userspace
<*> 'performance' governor
<*> 'powersave' govenor
<*> CPU frequency table helpers (new)
<*> Intel Pentium 4 clock modulation (new)
Need to evaluate if these should be loaded as modules or not. I
believe they need to be in the kernel to work effectively.
Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
PCI access mode (any) --->
Selecting MMConfig resulted in Kernel Oops
[ ] Legacy /proc/pci interface
[ ] ISA support
Both these options 'replaced' by lspci (pciutils)
PCMCIA/Cardbus support ---> (can't switch off in BIOS )
< > PCMCIA/Cardbus support
(Left as is - Need to check if use i82092 or yenta support?
gentoo live-cd installs yenta module...)
Executable file formats --->
<*> Kernel support for ELF binaries
Must select as is current default
< > Kernel support for a.out and ECOFF binaries
Compiling from scratch so should be okay to ignore
<*> Kernel support for MISC binaries
Need this for the broadcom driver file?
Device Drivers --->
Parallel Port Support --->
<M> Parallel port support (Don't have device, but needed by vmware)
Block devices --->
< > Normal floppy disk support (Don't have device)
<*> RAM disk support
(4096) Default RAM disk size (kbytes)
[*] Initial RAM disk (initrd) support)
see Bootsplash - Framebuffer & bootsplash settings
[ ] Support for Large Block Devices (Don't have device)
ATA/ATAPI/MFM/RLL support --->
Select only the following - not as modules as includes harddrive etc.
<*> ATA/ATAPI/MFM/RLL support
<*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
<*> Include IDE/ATA-2 DISK support
<*> Include IDE/ATAPI CDROM support
[*] IDE Taskfile IO (Experimental)
<*> generic/default IDE chipset support
[*] PCI IDE Chipset Support
[*] Generic PCI IDE Chipset Support
[*] Generic PCI bus-master DMA support
[*] Use PCI DMA by default when available
<*> Intel PIIXn chipset support
SCSI device support ---> deselect all
<M> SCSI device support (can't clear this?)
IEEE1394 (Firewire) support --->
The following were all defaulted to *, rest were not selected at all
<M> IEEE1394 (Firewire) support
<M> OHCI - 1394 support
<M> OHCI-DV I/O support
<M> Raw IEEE1394 I/O support
<M> IEC61883-1 Plug support
<M> IEC61883-6 (Audio transmission) support
Networking support --->
[*] Networking support
Networking options --->
Select only ...
<*> Packet socket (needed by dhcpcd)
<*> Unix domain sockets (needed by X)
[*] TCP/IP networking (no comment!)
[ ] IP: multicasting (not needed on home lan)
[*] Network packet filtering (replaces ipchains) --->
See Firewall - A minimal IPTables 'firewall'
IP: Netfilter configuration --->
Select only ...
<*> Connection tracking (required for masq/NAT)
< > Userspace queueing via NETLINK
<*> IP tables support (required for filtering/masq/NAT)
<*> Connection state match support
<*> Packet filtering
<*> REJECT target support
<*> LOG target support
Have a very simple 'firewall'!
[M] IrDA (infrared) subsystem support --->
Infrared-port device drivers --->
<M> Toshiba Type-O IR port
Guessing, have no clue really?
[*] Network device support
<M> Dummy net driver support
Ethernet (10 or 100Mbit) --->
select only
[*] Ethernet (10 or 100Mbit)
<M> Generic Media Independent Interface devicer support
[*] EISA, VLB, PCI and on board controllers
<M> Broadcom 4400 ethernet support (EXPERIMENTAL)
Wireless LAN (non-hamradio) --->
[*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
Input device support --->
Disable everything bar
<*> Mouse interface
<*> i8042 PC Keyboard controller
[*] Keyboards
<*> AT keyboard support
[*] Mice
<*> PS/2 mouse
[*] Misc
<*> PC Speaker support
Character devices --->
[*] Virtual terminal
[*] Support for console on virtual terminal
[*] Inotify file change notificaion support
[ ] Non-standard serial port support
Serial drivers --->
<M> 8250/16650 and compatible serial support
[ ] 8250/16550 device discovery via ACPI namespace
(4) Maximum number of non-legacy 8250/16550 serial ports
[ ] Extended 8250/16550 serial driver options
[*] Unix98 PTY support
[ ] Legacy (BSD) PTY support
<M> Enhanced Real Time Clock Support
<*> /dev/agpgart (AGP Support)
Uncheck all then ...
<*> Intel i865 chipset support
[ ] Direct Rendering Manager (XFree86 4.1.0 > support -disable!)
Graphics support --->
See Bootsplash - Framebuffer & bootsplash settings
[*] Support for frame buffer devices
[ ] VESA VGA graphics support (using radeonfb only)
<*> ATI Radeon display support
Console display driver support --->
[*] VGA text console
[*] Video mode selection support
<*> Framebuffer Console Support
[ ] Select compiled-in fonts
Logo configuration --->
deselect everything
[*] Support for the framebuffer splash
Sound --->
See ALSA - Configuration
[M] Sound card support
Advanced Linux Sound Architecture --->
<M> Advanced Linux Sound Archtecture
<M> Sequencer support
< > Sequencer dummy client
<M> OSS Mixer API
<M> OSS PCM (digital audio) API
<M> OSS Sequencer API
<M> RTC Timer support
[ ] Verbose printk
[ ] Debug
Generic devices ---> Deselect everything
PCI devices --->
<M> Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio...
ALSA USB devices ---> Deselect everything
USB support --->
<M> Support for host-side USB
[*] USB device filesystem
<M> EHCI HCD (USB 2.0) support
[M] Root Hub Transaction Translators (EXPERIMENTAL)
Apparently removes need for UHCI extension module?
do not 'load' other host controllers at present?
Also no other Device class drivers except USB mass storage
<M> USB Mass Storage support
deselect all 'devices?'
<M> USB Human Interface Device (HID)
deselect all 'devices?'
<M> Wacom Intuos/Graphire tablet support
generally deselect everything else?
Really must investigate this (USB) further...
File systems --->
<*> Second extended fs support
< > EXT3 Journalling file system support
<*> Reiserfs support
[*] ReiserFS extended attributes
[*] ReiserFS POSIX Access Control Lists
[*] ReiserFS Security Labels
[*] Quota support
<M> Old quota format support
<*> Quota format v2 support
[*] Dnotify support
< > Kernel automounter version 4 support (also supports v3)
CD-ROM/DVD Filesystem --->
<M> ISO 9660 CDROM file system support
[*] Microsoft Joliet CDROM extensions
[*] Transparent decompression extension
<M> UDF file system support
DOS/FAT/NT filesystems --->
<M> everything but NTFS which stays blank
(850) Default codepage for FAT
Pseudo filesystems --->
Select everything as included except
[ ] /dev file system support (OBSOLETE)
[ ] HugeTLB file system support
Network filesystems --->
<M> NFS file system support
< > NFS server support
Native language support --->
<*> Base native language support
(iso8859-1) Default NLS Option
This needs to change to UTF-8 at some stage, but not
sure about impact so leaving it for now
< > Codepage 437 (United States, Canada)
<*> Codepage 850 (Europe)
<*> NLS ISO 8859-1 (Latin 1: Western European Languages)
<*> NLS UTF8
Profiling support --->
deslect all options
Kernel hacking --->
[ ] Early printk
|
[edit] Useful kernel compilation commands
Again, there are no new commands here. It is merely a collection of sequences of commands that appear to crop up regularly. There is much here I didn't know and it is all out there on the web, but this could save some searching time.
| Code: menu driven kernel configuration |
make menuconfig |
| Code: Extensive cleanup of all compiled code |
make mrproper |
Is usually used in the following sequence:
| Code: Using make mrproper |
mv .config ~.config make mrproper mv ~.config .config make menuconfig |
| Code: Load the current .config file |
make oldconfig |
| Code: Resets all the menuconfig options to defaults |
make defconfig |
| Code: Rebuild the lot |
make && make modules_install |
[edit] Using the vanilla www.kernel.org source code
Here are some commands and steps I used to install a vanilla kernel
| Code: Install a vanilla kernel |
Move to the correct folder cd /usr/src Browse to full version of 2.6.9 kernel and download elinks http://www.kernel.org Can also use wget if you know the URL Remove symbolic link to current gentoo codetree rm linux Rename original gentoo codetree mv linux-2.6.9/ linux-2.6.9-gentoo/ Extract the 'new' kernel codetree tar -xvjpf linux-2.6.9.tar.bz2 Rename vanilla kernel folder just created to host specific name mv linux-2.6.9/ linux-2.6.9-(hostname) Create symbolic linux link to new kernel codetree ln -s linux-2.6.9-(hostname)/ linux Creat appropriately unique name for kernel nano -w linux/Makefile set extraversion = -(hostname)-r(number) |
[edit] Using a newly compiled kernel
This is in the Gentoo Handbook, but I'm repeating it for completeness here.
| Code: Using a newly minted kernel |
Copy the newly minted kernel cp arch/i386/boot/bzimage /boot/kernel-2.6.9-(extraversion) Copy the System.map for reference cp System.map /boot/System-2.6.9-(extraversion) Copy the kernel .config file for reference cp .config /boot/config-2.6.9-(extraversion) Check 'new' modules etc find /lib/modules/2.6.9/ -type f -iname '*.o' -or -iname '*.ko' update all the modules modules-update edit grub to 'activate' new kernel nano -w /boot/grub/grub.conf |
