TLLTS Show Notes June 8, 2005 - ep. 87
J!-Ent
Clarification/Error's from last show
- make mrproper should be first step after
extracting/patching/recompiling kernel sources.
Kernel ikconfig Support
- 2.6 and later series supports iconfig
- stores compressed copy of .config file into kernel
- option to also enable /proc/config.gz - gzipped .config file
for that kernel
- Handy way of building using current kernel config to rebuild
current kernel or newer kernel
- of course, if newer should run make oldconfig first
- There is a patch to do this for the 2.2/2.4 kernels: Proconfig Patch and
HowTo
- 2.4.x has the extract_kconfig script but I could not get it to
work.
- extract_kconfig script - Script to extract config file from
bzImaged kernel.
- requires binoffset which is probably not on system
- in kernel sources script subdir
- make binoffset in that directory
- Script must be run from top level of kernel sources
- ./scripts/extract_kconfig path_to_bzImage
- ./scripts/extract_kconfig /boot/debian-2.6.11.10-2
- output to stdout unless redirected
- Can run from any location but must change path to binoffset in
extract_kconfig script
- All information garnered from 2.6.11 kernel sources, unless
otherwise noted above.
Initial Ram Disk - initrd
- Used primarly for kernels that don't have the necessary modules
for booting compiled in.
- fs, scsi drivers, chipset, vesafb, etc
- Generally used
- by distro installers and rescue disks
- live distros
- when a small set of kernels is used across differing hardware
under a specific administrative setting
- Requires:
- RAM Disk Support - CONFIG_BLK_DEV_RAM (drivers -> block
devices) compiled in
- Initial Ram Disk Support - CONFIG_BLK_DEV_INITRD (drivers ->
block devices) compiled in (requires RAM Disk Support compiled in)
- Debian mkinitrd requires cramfs support also
- Compressed Rom File System - CONFIG_CRAMFS (file systems
-> miscellaneous filesystems).
- Initrd must be configured in boot loader - image sections
- initrd = /path_to_initrd - lilo
- initrd /path_to_initrd - grub
- Boot process
- Boot loader loads kernel and /dev/initrd into memory
- Kernel boots and uncompresses and copies /dev/initrd to
/dev/ram0 - fress memory used by /dev/initrd
- /dev/ram0 is mounted rw as temporary root fs
- /dev/ram0 (initrd image) can be normal root fs
- executes /linuxrc on initrd if exists
- regular root fs is then mounted
- if / contain /initrd, /dev/ram0 is moved to /initrd
- otherwise unmounted
- /sbin/init called
- What is initrd?
- mini root file system
- modules, programs, and libraries needed to carry on the boot
process until the main root fs can be loaded.
- mounting and checking out initrd image:
- need to be root - mount as loopback device
- need to know fs (debian cramfs) could be just ramfs or could
be gzipped
- Debian example:
- sudo mount -o loop -t cramfs [path_to]initrd_image [path_to]mount_point
- /linuxrc - Executable script or binary
- can do a number of things but mainly determines what is
needed to mount the real root fs and continue the booting process.
- Resources
Recording Linux Sessions with vnc utilities
Apple Moving to x86 Process