Kernel Configuration

Default kernel location

AIX:

/unix (a link to /usr/lib/boot)

FreeBSD:

/kernel

HP-UX:

/stand/vmunix

Linux:

/boot/vmlinuz

Solaris:

/kernel/genunix

Kernel build directory

FreeBSD:

/usr/src/sys/arch/conf

HP-UX:

/stand/build

Linux:

/usr/src/linux

Building a custom kernel

We assume here that the kernel sources are installed and that any required patches have been applied.

FreeBSD:

cd /usr/src/sys/arch/confcp GENERIC NAMEchmod +w NAMEEdit NAMEconfig NAMEcd ../../compile/NAMEmake dependmakemv /kernel /kernel.savemake install

HP-UX:

Use SAM.

Linux:

cd /usr/src/linuxcp arch/arch/config.in{,.save}cp .config .config.savemake mrpropermake xconfigmake depmake cleanedit Makefile, modify EXTRAVERSION settingmake bzImagemake installmake modulesmake modules_install

View kernel parameters

AIX:

lsattr -E -H -l sys0

FreeBSD:

sysctl -a

HP-UX:

sysdef

Linux:

cat /proc/sys/kernel/*

Modify kernel parameters

AIX:

chdev -l sys0 -a attribute=value

FreeBSD:

sysctl param=new-value

HP-UX:

Use SAM

Configuring Boot Loaders

FreeBSD boot loader

boot0cfg -B [-m 0xmask] disk

Install the FreeBSD boot loader on the specified disk. mask is a bit mask that includes (1) or excludes (0) each successive partition.

disklabel -B partition

Install the boot program into the specified partition within the FreeBSD slice.

lilo (Linux)

lilo [-C config-file] [-r alternate-root] [-b partition]

By default, lilo installs /etc/lilo.conf into the partition table on the ...

Get Essential System Administration Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.