Hago una copia de la configuración del kernel genérico y creo un enlace a la ruta donde se ubican normalmente estos archivos:
cd /usr/src/sys/i386/conf
mkdir /root/kernels
cp GENERIC /root/kernels/BSDBOX
ln -s /root/kernels/BSDBOX
Edito mi copia de configuración del kernel con el objetivo de optimizarlo un poco, eliminando entradas que no vaya a necesitar. En mi caso el contenido final del archivo es el siguiente:
cpu I686_CPU
ident BSDBOX
options SCHED_ULE # ULE scheduler
options PREEMPTION # Enable kernel thread preemption
options INET # InterNETworking
options SCTP # Stream Control Transmission Protocol
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options GEOM_PART_GPT # GUID Partition Tables.
options GEOM_LABEL # Provides labelization
options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!]
options STACK # stack(9) support
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options P1003_1B_SEMAPHORES # POSIX-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extension
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options STOP_NMI # Stop CPUS using NMI instead of IPI
options AUDIT # Security event auditing
# To make an SMP kernel, the next two lines are needed
options SMP # Symmetric MultiProcessor Kernel
device apic # I/O APIC
# CPU frequency control
device cpufreq
# Bus support.
device pci
# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
device atapicd # ATAPI CDROM drives
options ATA_STATIC_ID # Static device numbering
# SCSI peripherals
device scbus
device da
device pass
# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc # AT keyboard controller
device atkbd # AT keyboard
device vga # VGA video card driver
# syscons is the default console driver, resembling an SCO console
device sc
device agp # support several AGP chipsets
# Power management support (see NOTES for more options)
# Add suspend/resume support for the i8254.
device pmtimer
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device miibus # MII bus support
device rl # RealTek 8129/8139
# Pseudo devices.
device loop # Network loopback
device random # Entropy device
device ether # Ethernet support
device pty # Pseudo-ttys (telnet etc)
# USB support
device uhci # UHCI PCI->USB interface
device ohci # OHCI PCI->USB interface
device ehci # EHCI PCI->USB interface (USB 2.0)
device usb # USB Bus (required)
device ugen # Generic
device ukbd # Keyboard
device ulpt # Printer
device umass # Disks/Mass storage - Requires scbus and da
Es importante, siempre que se actualizan los sources, recompilar todo el sistema, tanto el kernel como el resto de binarios.
En primer lugar elimino restos de compilaciones anteriores, aunque en este caso no sería necesario por tratarse de la primera vez:
cd /usr/obj
chflags -R noschg *
rm -rf *
Recompilamos e instalamos todo de nuevo:
cd /usr/src
make buildworld
make buildkernel KERNCONF=BSDBOX
make installkernel KERNCONF=BSDBOX
shutdown now
cd /usr/src
mergemaster -p
make installworld
mergemaster
reboot
He agregado al kernel el dispositivo “pass” para permitirme la utilización de unidades de almacenamiento USB.