diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-10-28 14:49:35 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-10-28 14:49:35 -0700 |
commit | 3939e96a8830755228bd2bbedb50db6808d36f80 (patch) | |
tree | 6c55ccb42447ad90946ee6157dab49e573ec92d2 | |
download | initramfs-tools-3939e96a8830755228bd2bbedb50db6808d36f80.tar.gz initramfs-tools-3939e96a8830755228bd2bbedb50db6808d36f80.zip |
initramfs-tools-0.92j from mirrrors.kernel.orgdebian/0.92j
52 files changed, 7071 insertions, 0 deletions
@@ -0,0 +1,18 @@ +> I am not sure how to modify mkinitramfs to do this automatically, maybe you know? + +I need to document this more clearly, but the initramfs-tools have a collection of hooks that will solve your problem. While there's no way that Breezy could do this in the install, we could certainly include the scripts in the package (Especially if you're willing to test them to make sure they work! *g*) + +There are two phases that need to be accounted for. The first is the install phase for generating the initramfs, the second is run-time phase for actually doing the needed magic. + +To install the components you need, look at the scripts in /usr/share/initramfs-tools/hooks. evms and acpid are good choices. You can see a bunch of header stuff at the top that basically guarantees that things are run in the right order if they need to be. Two functions that will interest you: + +copy_exec copies a binary and any libraries it depends on +manual_add_modules takes bareword module names (like fan, thermal, etc) and installs those modules and any of their dependancies into the initramfs. + +The runtime phase is handled by scripts in /usr/share/initramfs-tools/scripts/ you probably want to start up at about the same point as lvm, md, and evms do, so local-top is a good directory to look in. +You can see the same sort of magic at the top of the script, although lvm and evms each require that md run first. + +I hope this helps. I'll paste this text into a HACKING file on the hopes that someone will see fit to improve it. That person will probably be me, mind you... =) + +Tks, +Jeff Bailey diff --git a/conf/initramfs.conf b/conf/initramfs.conf new file mode 100644 index 0000000..4a89a89 --- /dev/null +++ b/conf/initramfs.conf @@ -0,0 +1,67 @@ +# +# initramfs.conf +# Configuration file for mkinitramfs(8). See initramfs.conf(5). +# +# Note that configuration options from this file can be overriden +# by config files in the /etc/initramfs-tools/conf.d directory. +# In particular, Debian installer may set MODULES in the file +# /etc/initramfs-tools/conf.d/driver-policy. + +# +# MODULES: [ most | netboot | dep | list ] +# +# most - Add all framebuffer, acpi, filesystem, and harddrive drivers. +# +# dep - Try and guess which modules to load. +# +# netboot - Add the base modules, network modules, but skip block devices. +# +# list - Only include modules from the 'additional modules' list +# + +MODULES=most + +# +# BUSYBOX: [ y | n ] +# +# Use busybox if available. +# + +BUSYBOX=y + +# +# KEYMAP: [ y | n ] +# +# Load a keymap during the initramfs stage. +# + +KEYMAP=n + +# +# NFS Section of the config. +# + +# +# BOOT: [ local | nfs ] +# +# local - Boot off of local media (harddrive, USB stick). +# +# nfs - Boot using an NFS drive as the root of the drive. +# + +BOOT=local + +# +# DEVICE: ... +# +# Specify the network interface, like eth0 +# + +DEVICE=eth0 + +# +# NFSROOT: [ auto | HOST:MOUNT ] +# + +NFSROOT=auto + diff --git a/conf/modules b/conf/modules new file mode 100644 index 0000000..9aa4646 --- /dev/null +++ b/conf/modules @@ -0,0 +1,10 @@ +# List of modules that you want to include in your initramfs. +# +# Syntax: module_name [args ...] +# +# You must run update-initramfs(8) to effect this change. +# +# Examples: +# +# raid1 +# sd_mod diff --git a/conf/update-initramfs.conf b/conf/update-initramfs.conf new file mode 100644 index 0000000..c08c6ed --- /dev/null +++ b/conf/update-initramfs.conf @@ -0,0 +1,20 @@ +# +# Configuration file for update-initramfs(8) +# + +# +# update_initramfs [ yes | all | no ] +# +# Default is yes +# If set to all update-initramfs will update all initramfs +# If set to no disables any update to initramfs beside kernel upgrade + +update_initramfs=yes + +# +# backup_initramfs [ yes | no ] +# +# Default is yes +# If set to no leaves no .bak backup files. + +backup_initramfs=yes diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..9ac39f5 --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,39 @@ +initramfs-tools (0.76) unstable; urgency=low + + * This release features nfs auto detection in the initramfs. + The boot paramaters are parsed according to the linux source + Documentation/kernel-parameters.txt and more specifically + Documentation/nfsroot.txt. + + The initramfs-tools(8) manpage documents the parsed boot parameter. + Note that the undocumented and non compliant nfsoption bootarg got + dropped. + + -- maximilian attems <maks@sternwelten.at> Wed, 23 Aug 2006 08:47:26 +0200 + +initramfs-tools (0.61) unstable; urgency=low + + * This release moves the initramfs-tools confdir from /etc/mkinitramfs to + /etc/initramfs-tools. Packages are encouraged to ship files as scripts + under /usr/share/initramfs-tools. + + Local tests behaved fine, but be warned that this could potentially + cause boot troubles on upgrade. + + -- maximilian attems <maks@sternwelten.at> Wed, 21 Jun 2006 09:16:01 +0200 + +initramfs-tools (0.10) breezy; urgency=low + + * This release includes hardware auto detection in the initramfs. + This means two things in particular that are important: + + 1) the resulting initramfs will be huge. Like 10 megs huge. + I will shrink it down once it's correct. If you're on an + arch that doesn't like >4mb initramfs', then this won't boot. + + 2) Your network drivers are loaded in the initramfs, so hotplug + won't see a network event, so ifup won't be run. This will + be fixed shortly in hotplug. + + -- Jeff Bailey <jbailey@ubuntu.com> Fri, 17 Jun 2005 15:17:06 +0000 + diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..dc85c9b --- /dev/null +++ b/debian/README @@ -0,0 +1,12 @@ +initramfs-tools +=============== + +This package is a work in progress towards the replacement of the initrd +system with an initramfs system. + +The goals include using klibc for all earlyspace tools, an integrated udev +and an integrated hotplug. + +See the TODO file for a current status. + +Jeff Bailey - 2005-04-24 diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 0000000..f62656f --- /dev/null +++ b/debian/TODO @@ -0,0 +1,10 @@ +TODO +==== + + o Grep for TODO and FIXME and do those. =) + + o Eliminate ?udev?, ?klibc?, busybox (-> glibc). + + o Default to dep for PPC - Possibly to detect newworld? + + o udevsettle timeouts handling diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..1ab7e6e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,2829 @@ +initramfs-tools (0.92j) unstable; urgency=high + + [ Gerfried Fuchs ] + * initramfs-tools.8: Nuke useless bold spaces. + * initramfs-tools.8: Fix manpage-has-errors-from-man. + + [ maximilian attems ] + * Readd zfcp to auto_add_modules. (closes: #498698) + * Add dasd_diag_mod to auto_add_modules block section + Thanks Bastian Blank <waldi@debian.org>. + + [ Martin Michlmayr ] + * initramfs.conf: Mention possible value overriding by d-i for + example. (closes: #498712) + + -- maximilian attems <maks@debian.org> Sat, 13 Sep 2008 12:12:02 +0200 + +initramfs-tools (0.92i) unstable; urgency=high + + * MODULES=dep fix for root lvm on md. (closes: #498237) + Thanks Rod Whitby <rod@whitby.id.au> for report and test. + + -- maximilian attems <maks@debian.org> Mon, 08 Sep 2008 16:13:24 +0200 + +initramfs-tools (0.92g) unstable; urgency=high + + [ maximilian attems ] + * wait_for_udev: s/udevsettle/udevadm/ for upgrades after Lenny. + * auto_add_modules: Add ext4 and ext4dev. (closes: #494922) + + [ Andres Salomon ] + * Fix parse_numeric() to ignore non hex root string prefixes aka + root=mtd0 on OLPC. see #497133 + + -- maximilian attems <maks@debian.org> Tue, 02 Sep 2008 17:50:32 +0200 + +initramfs-tools (0.92f) unstable; urgency=medium + + [ maximilian attems ] + * mkinitramfs: only lvm2 initramfs has busybox dep. (closes: #490875) + * mkinitramfs: Fix usage and man outfile arg is not optional. + (closes: #493238) + * preinst fix vol_id path. (closes: #494433) + * update-initramfs: run_bootloader() invoke flash-kernel and glantank- + update-kernel in order to have latest initramfs flashed on triggered + update. Thanks to Joey Hess <joeyh@debian.org>. + * debian/control: Newer standards version without changes. + + [ Chris Lamb ] + * make log_begin_msg not emit trailing newline (closes: #494257) + + [ Martin Michlmayr ] + * MODULES=dep boot fix for Orion. (closes: #494027) + + -- maximilian attems <maks@debian.org> Tue, 12 Aug 2008 11:09:11 +0200 + +initramfs-tools (0.92e) unstable; urgency=medium + + * udevhelper hook: drop ide.agent. + + -- maximilian attems <maks@debian.org> Mon, 07 Jul 2008 13:52:54 +0200 + +initramfs-tools (0.92d) unstable; urgency=low + + * Ubuntu merge + - More meaningful text for no root device panic from Ubuntu. + - Add virtio_pci, udf for MODULES=most root device support. + - usplash pulsates: drop code to increment a progress bar after + each message. + - initramfs-tools.preinst: Try to use UUID for resume device. + - add boot script loading ide-generic on all_generic_ide cmdline. + Thanks Frans Pop <elendil@planet.nl> for report. (closes: #485786) + * init: add possible mountroot break (closes: #488963) + * initramfs-tools.8: document UUID usage for root and all_generic_ide. + (closes: #489186) + * debian/initramfs-tools.preinst: try with different vol_id pathes. + + -- maximilian attems <maks@debian.org> Sat, 05 Jul 2008 02:36:10 +0200 + +initramfs-tools (0.92c) unstable; urgency=low + + [ maximilian attems ] + * doc: fix date string of manual pages. + * MODULES=most add mmc host and card drivers for OLPC. (closes: #483431) + * update-initramfs.conf.5: document backup_initramfs variable. + (closes: #475430) + * initramfs-tools.8: Document "break" and "panic" behaviour. + (closes: #481196) + * wait_for_udev(): simplify, no need for logging. + + [ martin f. krafft ] + * Wait for udevsettle after -top scripts ran + * init: Remove extra ellipses + + -- maximilian attems <maks@debian.org> Sat, 05 Jul 2008 00:31:06 +0200 + +initramfs-tools (0.92b) unstable; urgency=low + + [ maximilian attems ] + * update-initramfs: mbr_check() fix for /dev/md/X naming. (closes: #469312) + Thanks to Axel Beckert <beckert@phys.ethz.ch> for report. + * hook-functions: MODULES=dep fix error message. + + [ Glennie Vignarajah ] + * initramfs-tools: Fix UUID rootfs detection with 'MODULES=dep'. + (closes: #483082) + + -- maximilian attems <maks@debian.org> Fri, 30 May 2008 16:31:42 +0200 + +initramfs-tools (0.92a) unstable; urgency=high + + * ps3: Add ps3_sys_manager to MODULES=dep ps3 modules. + * initramfs-tools.8: Document resume_offset bootparam. + * Documentation typo fixes and additions. + * init: Fix hardcoded ROOT bootcase. (closes: #478236) + Thanks Kevin Price <kp@kevin-price.de> for report and + Martin Michlmayr <tbm@cyrius.com> for debugging. + + -- maximilian attems <maks@debian.org> Tue, 29 Apr 2008 21:18:55 +0200 + +initramfs-tools (0.92) unstable; urgency=low + + Release "Ogni contrada è patria del ribelle" + + [ maximilian attems ] + * init: export ROOTFLAGS + ROOTFSTYPE. + * debian/control: s/XS-Vcs/Vcs/ + * mkinitramfs: Drop gzip -9 option. (closes: #470869) + Thanks Tollef Fog Heen <tfheen@err.no>. + * Ignore lintian warnings about empty directories. + * framebuffer: Let udev create fb devices. + * framebuffer: Leave tty devices for udev too. + * manpages: fix hyphen-used-as-minus-sign + * init: fix mkdir usage. + * init: Set proper permissions of /dev/console mknod fallback. + * scripts/function: Use mknod directly. + * debian/control: Depend on latest klibc for mknod usage. + * scripts/functions: fix configure_networking() for multiple interfaces. + (closes: #467078) Thanks Michal Sojka <sojkam1@fel.cvut.cz>. + * ps3 nuke useless hardcoded initramfs script. (closes: #468113) + * resume: Add support for resume_offset swap file suspend to disk. + (closes: #474691) Thanks Alan Jenkins <alan-jenkins@tuffmail.co.uk>. + * update-initramfs: Rename function according to reliability fix. + * hook-functions: Add atl1, cxgb3, e1000e, igb, ipg, niu, sky2 to + net section of initramfs modules. (closes: #463607) + * hook-functions: MODULES=dep fix ps3 support. + * initramfs-tools.8: Small documentation fixes. (closes: #467627) + + [ debian@x.ray.net ] + * configure_network(): do nothing if device already configured. + (closes: #465901) + + [ Joey Hess ] + * update-initramfs: use dpkg-trigger. (closes: #447611) + + [ Luke Yelavich ] + * update-initramfs: Initramfs generation reliability fixes. + (closes: #468112) + + [ Fabio M. Di Nitto ] + * hook-functions: Add support for sunvnet and sunvdc. + + -- maximilian attems <maks@debian.org> Wed, 09 Apr 2008 10:42:49 +0200 + +initramfs-tools (0.91e) unstable; urgency=medium + + [ Daniel Reichelt ] + * update-initramfs: fix ro-mounted /boot check (closes: #458772) + + -- maximilian attems <maks@debian.org> Tue, 12 Feb 2008 18:23:34 +0100 + +initramfs-tools (0.91d) unstable; urgency=low + + * MODULES=dep fix for new /dev/md/X naming scheme (closes: #440694). + * debian/control: Add versioned depends on findutils (closes: #450888). + * Update to newer standards version without changes. + * local-premount/resume: coding style fixes. + + -- maximilian attems <maks@debian.org> Wed, 26 Dec 2007 00:53:48 +0100 + +initramfs-tools (0.91c) unstable; urgency=low + + * update-initramfs: Fix ro /boot partition check (closes: #451151) + * init: Don't overwrite boot cmdline arg (closes: #453294) + + -- maximilian attems <maks@debian.org> Wed, 28 Nov 2007 19:49:41 +0100 + +initramfs-tools (0.91b) unstable; urgency=low + + * hooks/udevhelper: Adding all /lib/udev on initramfs if missing. Due to + overly strict errexit usage by udev hook functionality might be missing. + This is an potential Etch Lenny upgrade issue on UUID and LABEL roots. + Thanks Michael Prokop <mika@grml.org> for report. (closes: 431291) + + -- maximilian attems <maks@debian.org> Thu, 04 Oct 2007 12:00:33 +0200 + +initramfs-tools (0.91a) unstable; urgency=low + + * init: Fix resuming with hardcoded uppercase RESUME variable. + Thanks Raphael Hertzog <hertzog@debian.org> for the report. + + -- maximilian attems <maks@debian.org> Wed, 12 Sep 2007 19:06:19 +0200 + +initramfs-tools (0.91) unstable; urgency=low + + * udev_helper: Axe the modprobe ide-generic should no longer be needed + for kernel since Etch. + * debian/control: Tighten dep on latest klibc for BUSYBOX=n usage. + Add XS-Vcs-* fields. Mv busybox from Depends to Recommends. + * mkinitramfs: Cope when no busybox is around warn on md/lvm root. + * mkinitramfs: Kill kinit.shared too. + * scripts/local: Quote readonly variable. (LP: #115807) + * mkinitramfs, scripts/keymap: Add trailing slash on cp destination for dir. + * init: Call panic for debug sh if run-init fails. + * init-top/framebuffer: Check that fb minor is below 32. + * init: Export noresume if set. uswsusp and kdump need it. + * init: Try harder to find a valid init on rootmnt. Fixes bootfailure on + bogus init bootarg too. + * scripts/{functions,nfs}: Split networking code in separate function. + Thanks Vagrant Cascadian <vagrant+debianbugs@freegeek.org> for the patch. + (closes: #439397) + * update-initramfs: Don't check for ro /boot inside of a chroot. + * debian/script: Fix syntax of MODULES=dep block. + * hook-functions: Add rootfs detection for the "auto" mount output. + Thanks martin f krafft <madduck@debian.org> for report. (closes: #441211) + * init: Disable quiet on debug bootarg. Fix new init error message. + Thanks Michael Prokop <mika@grml.org> for the patches. + * hook-functions: MODULES=dep fix I2O detection. Add sys_walk_modalias() + to catch old style IDE. + * mkinitramfs: Export MODULES, allows hook scripts to act accordingly. + (closes: #421658) Add /usr/share/initramfs-tools/conf-hooks.d for hooks + options on mkinitramfs run. Do not land in initramfs. + + -- maximilian attems <maks@debian.org> Sun, 09 Sep 2007 12:26:16 +0200 + +initramfs-tools (0.90a) unstable; urgency=high + + * scripts/functions: simplify panic() + * mkinitramfs: Kick empty dir modules. + * hook-functions: Factor sys_walk_mod_add() out of dep_add_modules(). + * init: Fix mount options invocation for klibc mount. + * hook-functions: Add the new firewire modules. + + -- maximilian attems <maks@debian.org> Thu, 23 Aug 2007 14:37:51 +0200 + +initramfs-tools (0.90) unstable; urgency=low + + Release "J'aim' pas le fataliste Je n'ai ni foi ni loi" + + [ maximilian attems ] + * hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754) + Thanks Marco Nenciarini <mnencia@debian.org> for patch. + * debian/control: Bump dep on klibc-utils from etch. (closes: 435031) + * scripts/functions: Implement non-zero panic bootarg. Style fix for + maybe_break(). + * hook-functions: dep_add_modules() fix for md, lv, luks root. + (closes: #426917, #429237, #426446) + * debian/scripts: Add /etc/crypttab to reportbug script. Add /sys/block + list for MODULES=dep to reportbug script. + * scripts/functions: Add error message on verbose mode about ignored files + in boot/hooks dir. Thanks Kornilios Kourtis <kkourt@cslab.ece.ntua.gr> + for the initial patch. Fixes a double set_initlist call too. Ignore empty + dirs earlier too. (closes: #428729, #433459) + * mkinitramfs.8: Document verbose mode. + * debian/initramfs-tools.preinst: Inhibit /etc/initramfs-tools/conf.d/resume + creation in chroot for debian-live and other. (closes: #433190) + Thanks Kel Modderman <kel@otaku42.de> for the patch. + * update-initramfs: Improve "altered" error message. (closes: #436752) + * update-initramfs, update-initramfs.conf: update_initramfs config variable + is tristate. Set to 'all' to update any initramfs: $(update-initramfs -u). + Allows specific admin setting. (closes: #425050) + + [ David Härdeman ] + * hook-functions: Protect all variable with local, plus coding style fixes. + + -- maximilian attems <maks@debian.org> Thu, 09 Aug 2007 21:30:29 +0200 + +initramfs-tools (0.89) unstable; urgency=low + + Release "L'\xE9lecteur c'est notoire N'a pas tout' sa raison" + + [ Joey Hess ] + * mkinitramfs: Include libgcc_s.so.1 on arm since glibc always tries to load + it for the SJLJ exception handling on that architecture. (closes: #426395) + Thanks to Aurelien Jarno for ack and review. + + [ maximilian attems ] + * initramfs.conf.5: Document ROOT hardcoding. + * scripts/local: Use simpler fstype invocation. + * initramfs-tools.8, initramfs.conf.5: Fix typos. (closes: #427837, #427838) + Thanks "A. Costa" <agcosta@gis.net> for the patch. + * scripts/local: Try to warn for renamed root dev. (closes: #374611) + * minitramfs: Fall back to bootable default MODULES=most if unsupported + MODULES setting is passed. Thanks Henning Sprang <henning_sprang@gmx.de> + for report. (closes: #429144) + * hook-functions: Fix variable typo. Thanks Emanuele Rocca <ema@debian.org>. + * scripts/local: Revert change to use udev vol_id before fstype, + there are too many "wrongly" formated fs out there. fstype supports less, + but is more robust. + + -- maximilian attems <maks@debian.org> Wed, 04 Jul 2007 00:28:34 +0200 + +initramfs-tools (0.88) unstable; urgency=low + + [ maximilian attems ] + * debian/changelog: Fix missing colons in closes. + * hook-functions: Add a proper /sys walking dep_add_modules() for a minimal + initramfs on MODULES=dep. (closes: #395526) + * mkinitramfs.8: Add examples section, plus improve description of the + low-level tool and how it fits with update-initramfs. + * init: Ignore non-numerical panic and rootdelay bootarg. + * scripts/init-premount/ps3: Fix typo. (closes: #423469) + * scripts/nfs: Fix when root-path includes server-ip. (closes: #387808) + Thanks Vagrant Cascadian <vagrant+debianbugs@freegeek.org> for patch. + + [ David Härdeman ] + * init: Remove cryptopts parsing, not official bootparam. cryptsetup scripts + parse /proc/cmdline themselves (even in the Etch version). + * hook-functions: Change copy_exec to use the same source and + destination path if only one argument is given. + * hook-functions: Document how copy_exec determines the target path. + * hook-functions: Add firmware loading support to manual_add_modules(). + (closes: #355881) + * scripts/local: Ubuntu merge + - As well as waiting for the existance of the root device node, also check + to see whether we have a filesystem of some kind on it. Some devices + nodes (devmapper/LVM/EVMS, mdadm) will exist before they can be safely + used. Patch by Scott James Remnant <scott@ubuntu.com>. Changed to + support both fstype and vol_id. + * hook-functions: make version check in check_minkver more robust. + + -- maximilian attems <maks@debian.org> Sun, 27 May 2007 00:52:38 +0200 + +initramfs-tools (0.87b) unstable; urgency=low + + * scripts/init-top/framebuffer: Remove vga16fb loading on splash bootarg. + Newer usplash > 0.4 no longer needs that. + + * hooks/legacymdadm: remove only needed for partial upgrades from sarge. + + * hooks/legacylvm: Source relevant functions. (closes: 419667) + + -- maximilian attems <maks@debian.org> Tue, 17 Apr 2007 11:56:58 +0200 + +initramfs-tools (0.87) unstable; urgency=low + + [ maximilian attems ] + * scripts/functions: reduce_satisfied() needs to ignore the same set as + set_initlist() otherwise an script having a prereqs on a non-executable + boot script may cause circular panic. (closes: 418509) + * Add blacklist boot param, disabling the load of specific modules inside + the initramfs. Still needs to be passed via tmpfs to the rootfs. + * mkinitramfs, scripts/functions: Fix regexes to always use posix character + classes. Based on a patch by Meelis Roos <mroos@linux.ee>. + (closes: 419062) + + [ David Härdeman ] + * Add support for loading keymaps. (closes: 337663) + * Move legacy code from mkinitramfs to separate hooks. + * Ubuntu merge + - Add PS3 module loading functionality without grep usage. + * debian/copyright: Update authors info. + * Bump standards version, no changes necessary. + * debian/scripts: Print settings from initramfs.conf in reportbug script. + + -- maximilian attems <maks@debian.org> Mon, 16 Apr 2007 20:21:30 +0200 + +initramfs-tools (0.86) unstable; urgency=low + + * update-initramfs: Bound the mode and version variable. (closes: 403905) + + * init: Set once the MODPROBE_OPTIONS environment variable and export it. + Don't forget to set -b to have the modprobe.d blacklists respected. + Thus remove everywhere the -q modprobe switch. + Thanks Ben Collins <bcollins@ubuntu.com> for the suggestion. + + * small trailing whitespace cleanup, display full path of kernel-img.conf + in bug script. + + * debian/control: Add busybox-initramfs as Ubuntu busybox alternative + to depends. Drop the sarge busybox-cvs-static entry. + + * scripts/local-top/mdrun: Drop, existed for partial upgrades from sarge. + + * scripts/local: Improve panic message and printed order. (closes: 414640) + Thanks Vincent.McIntyre@csiro.au for patch. + + * scripts/functions: Check if panic is set before using it. (closes: 406107) + Thanks martin f krafft <madduck@debian.org> for report. + + * hook-functions: Copy all kernel/drivers/{block,ide,scsi} subdir modules + instead of hardcoding the list of "supported" drivers. As consequence + the initramfs might be larger, but none of those should be missed! + As bonus syncs with Ubuntu. + + * init: Mount /sys and /proc nodev, noexec, nosuid - Ubuntu sync. + + * update-initramfs: If update-initramfs fails, restore the backup. + Useful if a MINKVER set is not fulfilled. (LP: #101844) + Thanks Soren Hansen <sh@linux2go.dk> for patch. + + * initramfs-tools.preinst: Test if $RESUME is nonzero, not if it exists, + fixes issue of UUID resume dev. (LP: #67932) While there remove the + conffile mv handling of 0.61. + + * scripts/functions: set_initlist() needs to add only script names with + alphabetics, numerics and underscores - skip any other. Bad enough + backup scripts get added, but they shouldn't lead to a panic. Also skip + directories that might lay around. (closes: 398347) (LP: #76131) + + * initramfs-tools.8: Document valid script names. + + * mkinitramfs: Don't add backup scripts to initramfs. (closes: 378682) + (LP: #78348) + + * scripts/functions: run_scripts() return immediately if passed dir + does not exist. Empty dirs without boot script aren't created anymore. + + * debian/copyright: Update my email, add Ben Collins, update years, + alphabetic authors sort + add new git tree location. + + * mkinitramfs: Set PATH with /sbin to allow non-root user usage. + Thanks Bob Montgomery <bob.montgomery@hp.com> for the suggestion. + (closes: 409995) + + -- maximilian attems <maks@debian.org> Tue, 10 Apr 2007 21:45:36 +0200 + +initramfs-tools (0.85g) unstable; urgency=high + + * SECURITY scripts/functions: Set permission of created root dev in + parse_numeric() to 600. This bug only affects lilo boots. Thanks + Fabian Pietsch <fabian@canvon.dyndns.org> and Goswin von Brederlow + <brederlo@informatik.uni-tuebingen.de> for patch input. (closes: 417995) + + * debian/control: Change Uploaders email. + + -- maximilian attems <maks@debian.org> Fri, 6 Apr 2007 09:19:13 +0200 + +initramfs-tools (0.85f) unstable; urgency=high + + Release "Au lieu d'aller voter Casse leur la margoulette" + + * update-initramfs: Grub _doesn't_ clear LILO string in mbr, but the inverse + is done. Fix mbr_check() to first check for GRUB. Fixes accidental lilo + call in the case that Grub is the used bootloader. (closes: 409820) + Thanks Michael Prokop <mika@grml.org> for bringing up the case. + + * initramfs.conf.5, mkinitramfs.5: Fix typos. Document version. + (closes: 405157, 405190, 405194) + + * update-initramfs: Be more screamy about lilo error, people seem to + overlook recent lilo failures. + + * scripts/init-top/framebuffer: Remove unused variables. + + * init: Export ROOTDELAY to let udev boot script handle eventual rootdelay. + downgrades 401916 + + -- maximilian attems <maks@sternwelten.at> Wed, 7 Mar 2007 23:34:17 +0100 + +initramfs-tools (0.85e) unstable; urgency=high + + Release "Qu'ils soient rouges, bleus ou blancs Il faudrait mieux les pendre" + + * initramfs-tools.8: Correct copy_exec() example. (closes: 403122) + Add a better dir to copy_modules_dir() example. + + * mkinitramfs: Revert the sed magic busybox hardlinking for size reduction. + Go for functionality. The klibc binaries are better tested and superior + in some cases like sleep. Fixes several boot troubles. Thanks + Benjamí Villoslada <benjami@bitassa.cat> for the report. (closes: 403224) + Thanks Jurij Smakov <jurij@debian.org> for pinpointing the trouble. + + * hook-functions: Add all drivers/ata drivers to initramfs that exist for + uname >= 2.6.19 (closes: 403309) urgency high. + + * scripts/init-top/framebuffer: Fix syntax by closing the brackets. Handle + options of the form key:value, map kernel bootarg to module name for + matroxfb. Thanks Rob Walker <rob@tenfoot.org.uk> for the patches + (closes: 403667, 403669). Use posix regexes according to review by + Jurij Smakov <jurij@debian.org>. Also protect all variables. + + -- maximilian attems <maks@sternwelten.at> Wed, 20 Dec 2006 22:29:51 +0100 + +initramfs-tools (0.85d) unstable; urgency=high + + Release "Le gros ventre qu'engraisse L'suffrage universel" + + * update-initramfs: run_lilo() needs to show errors of lilo -t on failure + and exit with failure message. Thanks David Anselmi <anselmi@anselmi.us> + for report. (closes: 401331) Updated according to review by + Jurij Smakov <jurij@debian.org>. + + * hook-functions: Add hppa zalon scsi module. (closes: 401229) urgency high + + * update-initramfs: Add warning for missing initramfs on update mode without + takeover arg. Restructure altered_check, don't delete sha1sum on failure. + Thanks Jurij Smakov <jurij@debian.org> for noticing. + + * mkinitramfs: Reduce size of initramfs by keeping 1 busybox copy. + Thanks for the patch input to Russell Coker <russell@coker.com.au>. + Thanks for the sed rework to Klaus Ita <deb.ian@worstofall.com>. + (closes: 338405) + + -- maximilian attems <maks@sternwelten.at> Thu, 14 Dec 2006 16:10:06 +0100 + +initramfs-tools (0.85c) unstable; urgency=medium + + Release "Pour être heureux vraiment Faut plus d'gouvernement" + + * hook-funcions: Show on verbose mode the added binaries and libraries. + + * update-initramfs: Don't silently fail, user won't be able to reboot. + Thanks Mario Aeby for his blog entry. + + * debian/copyright: Moved to bzr.d.o repo location. + + * hook-functions: Merge 0.69ubuntu22 copy_module_dir fixes, we'll use it + too postetch. Fix the bashism. Thanks to Jurij Smakov <jurij@debian.org> + + * scripts/init-premount/thermal: Load blindly a bunch of thermal modules + on powerpc as they are not hotpluggable. Might be ugly, but is a safe bet. + Kernel plattform fix is scheduled for 2.6.20. Push with medium urgency. + (closes: 401269) + + -- maximilian attems <maks@sternwelten.at> Sat, 2 Dec 2006 18:06:34 +0100 + +initramfs-tools (0.85b) unstable; urgency=medium + + * mkinitramfs: Test for ${outfile} before touching anything. (closes: 381677) + + * update-initramfs.conf, update-initramfs: Allow to disable backup strategy. + While we are it fix logic of backup_booted_initramfs(). (closes: 397787) + urgency medium. + + * scripts/init-top/framebuffer: Fix regression of /dev/fb0 creation, + modprobe fb before creating device. Thanks to Otavio Salvador + <otavio@debian.org> for patch. + + -- maximilian attems <maks@sternwelten.at> Tue, 14 Nov 2006 08:06:40 +0100 + +initramfs-tools (0.85a) unstable; urgency=high + + * On first time run backup_booted_initramfs() has nothing to back up. + + -- maximilian attems <maks@sternwelten.at> Fri, 3 Nov 2006 09:03:46 +0100 + +initramfs-tools (0.85) unstable; urgency=high + + Release "Nichts ist getan, wenn noch etwas zu tun übrig ist." + + * update-initramfs: Fix ro /boot check to not trigger on other mounts + having a /boot string. (closes: 393906) Thanks for the patch + Olli Helenius <olli@starnet.fi> + + * init-top/framebuffer: Fix duplicate fbno0 device creation. Merge the + 0.69ubuntu10 solution. Thanks Benjamin Leipold <rabbit171@web.de> + for the report. (closes: 393890) + + * update-initramfs: Fix mbr_check() for installed lilo and used grub. Thanks + for the patch by Michel Casabona <michel.casabona@free.fr>. Also be + stricter about do_bootloader match, use negative info and add check for + grub on mbr before throwing error. (closes: 394559) urgency high. + + * hook-functions: Add sata_sil24 to scsi modules. (closes: 395907) + Thanks Vadim S. Solomi" <vadic@vadic.nnov.ru> for the patch. + + * update-initramfs: Fix lilo detection in mbr_check() for rootraid. + Based on a patch by Michael Prokop <mika@grml.org>. Suppress lilo warning + messages on test run. + + -- maximilian attems <maks@sternwelten.at> Mon, 30 Oct 2006 10:12:58 +0100 + +initramfs-tools (0.84) unstable; urgency=high + + Release "A-t-on pris à Saint-Périne, Tous ces dictateurs impotents ?" + + * hook-functions: Use modprobe --ignore-install arg to put all listed + modules on initramfs. Thanks Mario Izquierdo <mariodebian@gmail.com> + for report. (closes: 384043) + + * update-initramfs: If elilo is around run it on initramfs update, add + zipl run. + + * scripts/local: Use vol_id too if around to set FSTYPE. Thanks for the + patch to "Alex Owen" <r.alex.owen@gmail.com> (closes: 380004) + + * hooks/thermal: Add many of the windfarm modules for powerpc boxes. + + * initramfs-tools.preinst: merge bits of 0.69ubuntu16. (closes: 393773) + urgency high as fixes upgrade from sarge - thanks Federico Grau + <donfede@casagrau.org>. + + * scripts/init-top/framebuffer: Fix mknod call. (closes: 393543) + Thanks for the patch Kiro Zimmer <debian@kironet.de>. + + * mkinitramfs: Create modulesdir even on monolithic linux. (closes: 393688) + Thanks for the patch Ian Campbell <ijc@hellion.org.uk>. + + -- maximilian attems <maks@sternwelten.at> Wed, 18 Oct 2006 11:04:50 +0200 + +initramfs-tools (0.83) unstable; urgency=high + + Release "Ois was du verzapfst is a koida Kaffee" + + * update-initramfs: Keep an initramfs backup while we are running. Do also + keep the booted initramfs as .bak in /boot. First helps on power cut. + Second is a good conservative approach and demanded feature. + Thanks Thiemo Nagel <thiemonagel@gmx.de> for report. (closes: 387780) + + * init: When debug is invoked with an additional arg, write output to + console. Thanks Christian Aichinger <Greek0@gmx.net> for the idea. + Should ease remote debugging. + + * initramfs-tools.8: Document new debug=<whatever> feature. + + * initramfs-tools.preinstall: Check for right arg. (closes: 391619) + + * update-initramfs: Try to guess harder if lilo might need to be run + if grub is also around. On old installs we get _zero_ information from + /etc/kernel.img. Parse mbr for lilo signature. (closes: 385949) + Thanks to Michael Prokop <mika@grml.org> for finetuning. + + * scripts/init-top/framebuffer: Parse video bootarg and refactor script. + This add support for custom framebuffer modules. (closes: 386441) + Thanks for the patch by David Härdeman <david@2gen.com>. + + * update.conf: Allow to make "update-initramfs -u" an noop. Useful for + conservative settings of a remote server. (closes: 362064) urgency high. + Thanks Manoj Srivastava <srivasta@debian.org> for the tough testing. + + * update-initramfs.conf.5: Document the new update_initramfs variable. + + * update-initramfs: Kope with stupid mv of grub to /usr/sbin. + + * manpages: Get a banana and mark myself as author. + + * update-initramfs: version_exists needs not only to check for existing + sha1sum, but also initramfs. (closes: 382472) + + -- maximilian attems <maks@sternwelten.at> Fri, 13 Oct 2006 09:38:27 +0200 + +initramfs-tools (0.82) unstable; urgency=high + + * Merge 0.69ubuntu15, plus 0.69ubuntu14 and 0.69ubuntu11 changelog entries + as not affected or already fixed. + + * hook-initramfs: Add qla4xxx support, thus urgency high. + + -- maximilian attems <maks@sternwelten.at> Thu, 5 Oct 2006 16:12:06 +0200 + +initramfs-tools (0.81) unstable; urgency=low + + Release quick and happy spin j = l + s + + * update-initramfs: Really check for mounted /proc on use. (closes: 388241) + Thanks Alex Owen <r.alex.owen@gmail.com>. While beeing in this business, + check for mounted proc in initramfs-tools.preinst too. + + * hook-functions: Add new scsi drivers aic94xx and stex. Add new net drivers + ehea, ep93xx_eth and qla3xxx. Thus urgency high. + + * update-initramfs: Use set ``--'' to change positional paramaters. Thanks + Jörg Sommer <joerg@alea.gnuu.de>. (closes: 389726) + + * scripts/nfs: Revert to previous handling of dhcp server passing server-ip. + (closes: 387808) + + * debian/initramfs-tools.preinst: Fix comment typo, thanks + shaulka@012.net.il for the patch. (closes: 389486) + + * mkinitramfs: Allow an hook script to set an paranoid umask, considered + useful for shipping gpg keys inside of initramfs. Thanks Max Vozeler + <max@nusquama.org> and Lionel Elie Mamane <lionel@mamane.lu> for the + patch. (closes: 381677) + + -- maximilian attems <maks@sternwelten.at> Wed, 27 Sep 2006 15:56:46 +0200 + +initramfs-tools (0.80) unstable; urgency=high + + Release "O partigiano, portami via, che mi sento di morir." + + * update-initramfs: Test for lilo executable earlier otherwise an warning + would be issued with grub installed and left over lilo config. + + * hook-functions: Add lasi700 to the scsi modules. (closes: 387909) Thanks + Nagilum <nagilum@nagilum.org>. Thus urgency high. + + * scripts/nfs: Fix typo in ipconfig protocol handling, fix dhcp server + passing ser-ip as part of root-path, retry every second to not hammer + an FAI'ed nfs initramfs network. Thanks for input and patches + Vagrant Cascadian <vagrant+bugs@freegeek.org>. While we are there refactor + the loop. (closes: 387841, 387808, 387809) + + * update-initramfs: Check if /proc is mounted for ro_boot_check. + + -- maximilian attems <maks@sternwelten.at> Tue, 19 Sep 2006 07:56:47 +0200 + +initramfs-tools (0.79) unstable; urgency=high + + * update-initramfs: Allow create and delete to work on "all" kernelversions. + Fixes bug on update to pass all the specified optional args. + Thanks to Osamu Aoki <osamu@debian.org> for the patch. (closes: 360281) + Improve it to parse args once and also highlight 'all' on usage. + + * update-initramfs.8: Document usage of "all" + add example section. + + * update-initramfs: On update check if /boot is ro, warn and exit. + Thanks to Alexander Wirt <formorer@debian.org> to improve the awk snippet. + + * update-initramfs: run_lilo don't return 1 if no lilo executable is there. + Thanks "Peter D. St. Onge" <pete.stonge@utoronto.ca> for the report. + (closes: 386999) + + -- maximilian attems <maks@sternwelten.at> Mon, 11 Sep 2006 22:11:54 +0200 + +initramfs-tools (0.78) unstable; urgency=medium + + * update-initramfs: Check in call_lilo() if /sbin/lilo is executable, + when /etc/lilo.conf exists (closes: 384967) - thus urgency medium. + + * init: Guard all dirs against creation. (closes: 385281) + + * debian/scripts: Add /etc/kernel-img.conf section, as update-initramfs + needs to act according to it. + + * scripts/nfs: Fix parsing of etherboot ip options. Based on a patch by + to Vagrant Cascadian <vagrant+bugs@freegeek.org>. (closes: 385252) + + * scripts/nfs: No need to duplicate work of ntfsmount. Thanks for the patch + to Vagrant Cascadian <vagrant+bugs@freegeek.org>. (closes: 385226) + + * scripts/nfs: Add an sleep 0.1 in the retry loop to slow down retry + attempts. Only log "Retrying .." after first run. Use init variable. + (closes: 385624) + + * init: Reorder the early mknod after tmpfs mount. (closes: 385641) + + * initramfs.conf.5, mkinitramfs, scripts/local, scripts/local-top/mdrun, + scripts/nfs, update-initramfs.8, debian/changelog: Whitespace policy. + + -- maximilian attems <maks@sternwelten.at> Mon, 4 Sep 2006 17:38:13 +0200 + +initramfs-tools (0.77b) unstable; urgency=high + + * mkinitramfs: Fix destination of mdrun.conf. Thanks for the report to + Scott Glenn <s103@webmasters.com>. Urgency high as broken in testing + too and needed for partial mdadm upgrades. (closes: 385406) + + -- maximilian attems <maks@sternwelten.at> Thu, 31 Aug 2006 13:20:51 +0200 + +initramfs-tools (0.77) unstable; urgency=medium + + * mkinitramfs, scripts/local-top/mdrun: Use mdrun.conf as config file. + Ship mdrun unconditionally if around, should help in recovery situations. + + * debian/initramfs-tools.postinst, hook-functions, mkinitramfs, + scripts/local, update-initramfs: Cleanup the "-a" and "-o" bashism. + + * scripts/nfs: Retry to mount NFS on eventual failure. (closes: 377643) + Based on a patch by Vagrant Cascadian <vagrant+bugs@freegeek.org>. + + * init: Make sure there is an /dev and /root. Usually passed by the kernel. + Also /dev/null or /dev/console might already be shipped. + Based on a patch by David Härdeman <david@2gen.com>. (closes: 340494) + + * scripts/local-top/lvm: Fix prereqs s/mdraid/mdrun, thus urgency medium. + Thanks Rainer Gauweiler <debian@moppl.inka.de> for the notice. + + -- maximilian attems <maks@sternwelten.at> Fri, 25 Aug 2006 16:55:56 +0200 + +initramfs-tools (0.76) unstable; urgency=medium + + * debian/control: Tighten klibc to 1.4.19-2 for fixed nuke. (closes: 383730) + + * mkinitramfs: Only hard code root when root arg got passed. + + * init: Parse /proc/cmdline for rootfstype, initrd-tools did it too. + + * init: Parse /proc/cmdline for rootdelay. + + * scripts/local: Use eventual rootfstype and rootdelay info. + + * initramfs-tools.8: Add more docs about boot args, s/2.6.15/2.6.17/. + + * scripts/functions: Simplify parse_numeric() by arithmetic calculation, + instead of working on it's representation. Thanks to tarski. + (launchpad.net/21759) Much more elegant than the 0.58 version fix. + + * mkinitramfs: Parse rootraid for sarge compatibility and pass the info + to the initramfs if etch mdadm is not yet installed. + + * scripts/local-top/mdrun: Assemble the root raid first before mdrun. + Thanks martin f krafft <madduck@debian.org>. (closes: 383908, 384063) + + * update-initramfs: Check if /etc/kernel-img.conf is readable, + before attempting to parse also check for the right field. + + * init: Check for root=/dev/nfs. Parse ip kernel command line for nfsroot. + Drop undocumented and not compliant nfsopts. + + * scripts/nfs: Add ip parsing conforming to Documentation/nfsroot.txt. + Use the nfsroot bootparam in combination with eventual ip provided + device or server-ip. Do minor code cleanups. Both items based on patches + by Vagrant Cascadian <vagrant+bugs@freegeek.org>. (closes: 380649) + + * Set urgency medium due to large number of serious bug fixes. + + -- maximilian attems <maks@sternwelten.at> Wed, 23 Aug 2006 08:17:51 +0200 + +initramfs-tools (0.75) unstable; urgency=high + + * hook-functions: Add megaraid_sas to the scsi list. Thanks Kenshi Muto + <kmuto@debian.org>. + + * init: Parse for "panic=<timeout>" bootarg. + + * hook-functions: Immediately call reboot in the panic function if panic=0 + to disallow any console access for secured boxes. (closes: 378455) + + * debian/TODO: Update to current state + + * update-initramfs: do_bootloader can be set mixed case or upper case. + Catch the obvious Yes and YES too. + + * hook-functions: Really include DAC960 driver. Thanks Tim Small + <tim@buttersideup.com>. (closes: 383486) 2 module fixes thus urgency high. + + -- maximilian attems <maks@sternwelten.at> Fri, 18 Aug 2006 15:35:09 +0200 + +initramfs-tools (0.74) unstable; urgency=low + + * scripts/local-premount/resume: Reuse klibc resume, hardcode path as + uswsusp shipps too an resume binary in initramfs-tools. Thus tighten + again klibc dep to 1.4.11-1. (closes: 381535) + + * mkinitramfs: Readd mdrun when around. + + * scripts/local-top/mdrun: Rename from mdraid. Use mdrun as previously, + there is no guarantee that the sarge mdadm works and that the sarge + mdadm.conf has any sense. + + * debian/control: Better package description. + + * scripts/local: mountroot add message what to check if root is not found + in 2 straight lines to keep as much of scrolling buffer. + + * scripts/functions: Use set ``--'' to change positional paramaters without + changing any options. This is useful for the debug bootparam on d?ash. + + * update-initramfs: Respect "do_bootloader = yes" from /etc/kernel-img.conf + to call lilo if both lilo and grub are installed. (closes: 382013) + + -- maximilian attems <maks@sternwelten.at> Thu, 17 Aug 2006 16:50:51 +0200 + +initramfs-tools (0.73e) unstable; urgency=high + + * mkinitramfs: Fix if statement for conf.d. (closes: 382740) + + -- maximilian attems <maks@sternwelten.at> Sun, 13 Aug 2006 10:05:10 +0200 + +initramfs-tools (0.73d) unstable; urgency=high + + * scripts/local-top/mdraid: Fix path of expected mdadm config file. + Thanks Daniel Dickinson <cshore@wightman.ca> for report. (closes: 382602) + + * mkinitramfs: Treat /usr/share/initramfs-tools/conf.d config snippets as + the configuration files in /etc/initramfs-tools/conf.d. A configuration + file with the same name will override the first. (closes: 381315) + Thanks Vagrant Cascadian <vagrant+bugs@freegeek.org> for the patch. + + * mkinitramfs.8: Document conf.d existence. + + * hooks/lvm: Really remove it, logic is in mkinitramfs. + + * urgency high for the mdraid bug fix, rest is trivial. + + -- maximilian attems <maks@sternwelten.at> Sat, 12 Aug 2006 09:43:55 +0200 + +initramfs-tools (0.73c) unstable; urgency=low + + * scripts/local-premount/resume: Revert klibc-utils resume usage until + breakage cause is known. Thus downgrade klibc dep to 1.4.8-0. Thanks + Steinar H. Gunderson <sesse@debian.org> for report. (closes: #381475) + + -- maximilian attems <maks@sternwelten.at> Sat, 5 Aug 2006 09:31:16 +0200 + +initramfs-tools (0.73b) unstable; urgency=high + + * Revert nfs change in 0.70: Debian busybox is build with CONFIG_NFSMOUNT=n. + Reuse nfsmount from klibc. nfsroot parsing needs more care for the next + release. Now at least support those users where nfs previously worked. + Thanks Vagrant Cascadian <vagrant+bugs@freegeek.org> for report. + (closes: 380686). High urgency to get this into testing. + + -- maximilian attems <maks@sternwelten.at> Fri, 4 Aug 2006 09:53:46 +0200 + +initramfs-tools (0.73) unstable; urgency=high + + * debian/initramfs-tools.postrm: Don't forget to remove config file + modules on purge. Thanks piuparts verification. + + * mkinitramfs: Add sections that deals with sarge mdadm and lvm2. + Does nothing if etch package hooks are installed, will be dropped + postetch as then we upgrade from mdadm and lvm2 packages with hooks. + Taken from Dapper initramfs-tools-0.40ubuntu32. Adapt to add more + modules and no need for mdrun. + + * hooks/lvm: Remove handled by mkinitramfs itself. + + * scripts/local-top/lvm: Add prereqs lvm2 + mdraid. Exit if lvm2 hook is + present. Eases transition of lvm hooks to lvm2. + + * scripts/local-top/mdraid: Enable all raid devices. Add mdadm as prereqs. + Only run if no mdadm hook is in initramfs. (closes: 380089) + + * urgency high upload to get RC fixes into testing. + + -- maximilian attems <maks@sternwelten.at> Sat, 29 Jul 2006 13:35:43 +0200 + +initramfs-tools (0.72) unstable; urgency=low + + * Add scripts/init-top/framebuffer, reduces ubuntu diff even more. + fb is only activated with splash or vga boot param. + * Upload sponsored by Petter Reinholdtsen. + + -- maximilian attems <maks@sternwelten.at> Tue, 25 Jul 2006 09:11:18 +0200 + +initramfs-tools (0.71b) unstable; urgency=low + + * This time caught on bzr dotfiles, removed. + Thanks a lot to Frederik Schüler <fs@debian.org> for review. + + -- maximilian attems <maks@sternwelten.at> Mon, 24 Jul 2006 15:06:04 +0200 + +initramfs-tools (0.71) unstable; urgency=low + + * initramfs.conf.5, initramfs-tools.8, mkinitramfs.8, mkinitramfs-kpkg.8, + update-initramfs.8: Fix spacing in the SEE ALSO section and have this + section everywhere as last. Fix linebreak in mkinitramfs.8 options. + Thanks Martin Michlmayr <tbm@cyrius.com> for the notice. + + * scripts/functions: Use shell parameter expansion to strip known dir + prefix instead of gratious basename call. + + * scripts/functions: On panic call open the rescue shell with -i to get + dash interactive features. ash from busybox ignores the param. + Thanks David Härdeman <david@2gen.com> for the suggestion. + + * conf/initramfs.conf: Readd BUSYBOX=y section. Beware that a lot of boot + scripts need busybox and the current default image still does too. + + * initramfs.conf: Document BUSYBOX usage. + + * init: Add variable quoting around resume, NORESUME parsing and checks. + + * hook-functions: Add myri10ge and smc911x to the net section. Add hptiop to + the scsi section. + + * update-initramfs: Fix -v usage by not passing quoted ${OPTS} as one + option. Thanks Famelis George <famelis@otenet.gr> for the patch. + (closes: 379212) + + * mkinitramfs: Really source /usr/share/initramfs-tools/conf.d/ entries. + + * mkinitramfs: Check against modules.dep before invoking depmod. + + * hook-functions: check_minkver() only needs to call init_list(), + when a dir gets passed. Clean up check_minkver() logic. + + * scripts/function, mkinitramfs: Add output on verbose mode. + + * merge 0.69ubuntu4. + + * scripts/local-top/lvm: Prereqs s/md/mdadm/ for the new hooks. + + -- maximilian attems <maks@sternwelten.at> Mon, 24 Jul 2006 09:10:53 +0200 + +initramfs-tools (0.70b) unstable; urgency=low + + * Be more careful about vi dot files, removed. + Thanks Frederik Schüler <fs@debian.org> for review. + + -- maximilian attems <maks@sternwelten.at> Wed, 19 Jul 2006 16:00:47 +0200 + +initramfs-tools (0.70) unstable; urgency=low + + * mkinitramfs: Don't include static kinit, nor gzip. They are the biggest + klibc-utils binaries and we don't use them. Keep static gunzip, zcat and + shared kinit for now. + + * Reduce diff against 0.69ubuntu3: + - hook-functions: Fix kernel typo. + - hooks/kernelextras: Fix comment and add vga16fb too. + - init: Whitespace cleanup, add one more quiet check. + - mkinitramfs: Use check_minkver instead of dpkg itself. Whitespace + cleanup and add quoting. + - scripts/local: Whitespace cleanup and add a comment. + - scripts/nfs: Use mount with nolock instead of nfsmount. + (closes: 359926) + - update-initramfs: Add quoting + whitespace fix. + - changelog: for noise reduction add 0.69ubuntu{1,2,3}, all 0.40ubuntu*, + 0.36ubuntu1 and missing 0.29 + 0.28 entries. + - initramfs-tools.install, initramfs-tools.postinst and + initramfs-tools.preinst merge 0.69ubuntu3. + + * break.txt, debian/NEWS, debian/changelog, debian/copyright, + docs/example_hook, docs/example_hook_cpiogz, docs/example_script, + hooks/lvm, hooks/md, init, initramfs-tools.8, initramfs.conf.5, + mkinitramfs, mkinitramfs-kpkg, mkinitramfs-kpkg.8, mkinitramfs.8, + scripts/functions, scripts/local-top/udev_helper, update-initramfs, + update-initramfs.8: Cleanup trailing whitespace and non tabular indents. + + * scripts/local-premount/resume: Use new resume bin from klibc-utils. + Removes superflous stat and awk usage. + + * debian/control: Depend against newer klibc-utils 1.4.11-1. + + * hooks/md, scripts/local-top/md: Drop as mdadm > 2.5-1 features them. + (closes: #367567) + + -- maximilian attems <maks@sternwelten.at> Wed, 19 Jul 2006 11:09:52 +0200 + +initramfs-tools (0.69b) unstable; urgency=high + + * debian/initramfs-tools.preinst: Don't depend upon shipped directories + to be existing. Thanks Colin Watson <cjwatson@debian.org> for patch. + Add trailing slash to copy command. (closes: 378089) + + * mkinitramfs: Revert the removal of kernel-package supported lonng param + of 0.65. Readd that plain ugly interface. Warn users they should use + ramdisk=mkinitramfs-kpkg. As kernel-package doesn't yet support + update-initramfs. Thanks Frans Pop <fjp@debian.org> for report. + + * debian/bug: Rename to script so that it shows up in reportbug. + Fix debian/initramfs-tools.install accordingly. + + * Thus high urgency upload. + + -- maximilian attems <maks@sternwelten.at> Fri, 14 Jul 2006 00:31:30 +0200 + +initramfs-tools (0.69ubuntu22) feisty; urgency=low + + * For copy_module_dir, actually call manual_module for each one, so deps are + taken care of. + + -- Ben Collins <bcollins@ubuntu.com> Thu, 23 Nov 2006 02:10:29 -0500 + +initramfs-tools (0.69ubuntu16) edgy; urgency=low + + * Bring in preinst fixes from Debian, including s/configure/install/ in + preinst, since preinst is never called with "configure", and checking + for /proc/swaps before we blindly try to read it to determine RESUME. + * Do away with the bogus '-n "$2"' test in preinst, since "install" can + be called without any arguments at all (and often is, on a clean setup) + * On upgrades, revert the RESUME mangling that dapper's d-i did to our + config file, avoiding spurious conffile prompts (launchpad.net/63693) + + -- Adam Conrad <adconrad@ubuntu.com> Mon, 16 Oct 2006 17:23:41 +1000 + +initramfs-tools (0.69ubuntu15) edgy; urgency=low + + * Add jmicron module to ide list. + - Malone #63085 + + -- Ben Collins <bcollins@ubuntu.com> Wed, 4 Oct 2006 09:21:08 -0400 + +initramfs-tools (0.69ubuntu14) edgy; urgency=low + + * Remove stray "set -x" from scripts/local-premount/suspend. + + -- Adam Conrad <adconrad@ubuntu.com> Wed, 20 Sep 2006 08:35:05 +1000 + +initramfs-tools (0.69ubuntu11) edgy; urgency=low + + * since we ship /usr/share/initramfs-tools/conf.d as well as + /etc/initramfs-tools/conf.d, make sure mkinitramfs also reads from both, + not only from the /etc location + + -- Oliver Grawert <ogra@ubuntu.com> Sun, 10 Sep 2006 11:50:14 +0200 + +initramfs-tools (0.69ubuntu10) edgy; urgency=low + + * Create framebuffer device nodes unconditionally + + -- Matthew Garrett <mjg59@srcf.ucam.org> Tue, 5 Sep 2006 17:50:53 +0100 + +initramfs-tools (0.69ubuntu4) edgy; urgency=low + + * scripts/local-premount/suspend: Check for UUID= or LABEL= on the + start of $resume, and use /dev/disk/by-{uuid,label} if found. + + -- Scott James Remnant <scott@ubuntu.com> Fri, 21 Jul 2006 17:58:34 +0100 + +initramfs-tools (0.69ubuntu3) edgy; urgency=low + + * debian/initramfs-tools.install, debian/initramfs-tools.preinst, + debian/initramfs-tools.postinst: Copy default modules file in the + postinst (when it's actually available) rather than in the preinst (when + it isn't). Copy it from /usr/share/initramfs-tools/ rather than from + /usr/share/doc/initramfs-tools/examples/, per policy. + + -- Colin Watson <cjwatson@ubuntu.com> Thu, 13 Jul 2006 10:04:26 +0100 + +initramfs-tools (0.69ubuntu2) edgy; urgency=low + + * debian/initramfs-tools.preinst: Make sure /etc/initramfs-tools and + /etc/initramfs-tools/conf.d exist before trying to write to them. + + -- Colin Watson <cjwatson@ubuntu.com> Thu, 13 Jul 2006 09:19:05 +0100 + +initramfs-tools (0.69ubuntu1) edgy; urgency=low + + [ Jeff Bailey ] + * Merge from debian unstable. + + -- Jeff Bailey <jbailey@ubuntu.com> Wed, 12 Jul 2006 19:22:22 -0400 + +initramfs-tools (0.69) unstable; urgency=low + + * scripts/local-premount/suspend, scripts/local-premount/resume: Rename + to the later as the script resumes from resume arg. + + * init: Parse for noresume and only export resume if it is not set. + Allows boot scripts to check for it's eventual existence. + Thanks David Härdeman <david@2gen.com> for the suggestion. + + * update-initramfs: Add option "-b directory" to override BOOTDIR. + Allows the initramfs to be created in another dir without awkward + mkinitramfs invocation. Check that the passed arg is really a dir. + (ubuntu: 37690) Thanks Colin Watson <cjwatson@debian.org> + + * update-initramfs.8: Document -b switch. + + -- maximilian attems <maks@sternwelten.at> Wed, 12 Jul 2006 16:51:49 +0200 + +initramfs-tools (0.68b) unstable; urgency=high + + * script/functions, hook-functions: Move check_minkver() to the second + file as it uses dpkg and is run by mkinitramfs and not on boot. + + * mkinitramfs: Check if ${BUSYBOX} is set to n before adding it. + Add a big fat warning that this not yet supported. Helps to do the + klibc-utils work. + + * mkinitramfs: Run depmod if no /lib/modules/${version}/modules.dep exists. + Solves initramfs creation for handbuild upstream Xen targets. + Thanks to Klaus Ita <ita@ai.wu-wien.ac.at> for the report. + + * debian/initramfs-tools.preinst, debian/initramfs-tools.postinst: Do the + migration of the mkinitrd settings in the preinst. (closes: #376604) Thanks + for the checks to Justin Pryzby <justinpryzby@users.sourceforge.net>. + + * debian/initramfs-tools.preinst: Reorder. Generate an modules file similar + to the one we ship. This should minimize Sarge upgrade prompting if no + relevant modules where added to /etc/mkinitrd/modules. + + * conf/modules: Make it more similar to /etc/mkinitrd/modules. + + * Set urgency high for RC fixes upload. + Thanks Steinar H. Gunderson <sesse@debian.org> for the review. + + -- maximilian attems <maks@sternwelten.at> Mon, 10 Jul 2006 00:13:52 +0200 + +initramfs-tools (0.67) unstable; urgency=high + + Release bella, ciao, ciao, ciao! + + * scripts/local: Fix typo in log_begin_msg. (closes: #375880) + + * update-initramfs: Generate initramfs for current version if there is no + sha1sum and no initrd exists yet - regression from 0.65. (closes: #375671) + Thanks martin f krafft <madduck@debian.org> for report. + + * conf/initramfs.conf, initramfs.conf(5): Drop RESUME section. + + * debian/initramfs-tools.preinst: Don't modify conffile initramfs.tools - + drop the corresponding code. (closes: #376008) + + * initramfs-tools(8): Document that RESUME is tried to be autodected and + written to /etc/initramfs-tools/conf.d/resume on install. + + * scripts/functions: Replace expr use with printf for skipping comments on + /etc/modules. Works on both busybox ash and klibc dash. Prefix space is + ignored by both. + + * scripts/local-top/lvm: Remove harmless warnings if a volumegroup is under + /dev/mapper but not an lvm device. (closes: 376311) + Thanks David Härdeman <david@2gen.com> for the patch. + + * scripts/local-top/lvm: Change activate_vg() to return 1 if no volumegroup + is found. + + * debian/initramfs-tools.dirs: Add usr/share/initramfs-tools/conf.d entry. + + * mkinitramfs: Add stuff to the conf.d directory also from aboves directory. + + * Set urgency to high to get the RC bugfix into testing. + + -- maximilian attems <maks@sternwelten.at> Sun, 2 Jul 2006 18:35:34 +0200 + +initramfs-tools (0.66) unstable; urgency=low + + * hooks/thermal: Add i2c-powermac. + + * scripts/init-premount/thermal: Load i2c-powermac on ppc boot. + Fixes fan noises for Sven Luther <svenl@debian.org> + + * scripts/function: Fix typo s/FS1/PS1/ on panic call. (closes: #375624) + Thanks to Tim Phipps <tim@phipps-hutton.freeserve.co.uk> for the report. + + * scripts/local-top/lvm: Refix lilo check. (closes: #375786) + Thanks to the patch from Christian Weeks <christian.weeks@oracle.com>. + + -- maximilian attems <maks@sternwelten.at> Wed, 28 Jun 2006 12:11:49 +0200 + +initramfs-tools (0.65b) unstable; urgency=low + + * scripts/local-top/lvm: Load snapshot and mirror modules. (Closes: #375342) + + * scripts/local-top/lvm: Fix a wrong substitution for the lilo test. + (Closes: #375442) + + -- maximilian attems <maks@sternwelten.at> Mon, 26 Jun 2006 14:54:30 +0200 + +initramfs-tools (0.65) unstable; urgency=low + + * scripts/local-top/lvm: Activate root and resume volume group. + The initialization got refractored in an function. (closes: #374891) + Thanks for the patch to David Härdeman <david@2gen.com>. + + * scripts/local-top/lvm: Be careful to activate volume group on lilo boot + too. Although in that case we don't know the precise volume group, we + activate them all. Matches behaviour of previous hook. + + * hooks/lvm: Add dm-mirror, allows to boot from an unfinished pvmove. + (closes: #374378) + + * mkinitramfs: Remove old kernel-package supported long param. + kernel-package uses since 10.036 mkinitramfs-kpkg. + + * update-initramfs: Show by default which initramfs gets generated. + (closes: #364301) + + * Resync with 0.40ubuntu32: + - Make prereqs conditional on the script/hook actually existing. From + now on, this means that 'PREREQ="udev"' means "run udev first, iff it + happens to be installed". Having the files exist on the filesystem if + you have a HARD dependency should be enforced with package dependencies. + (closes: #369617) + - Make "update-initramfs -u" try to find the running kernel *after* it + attempts to search the symbolic link list and its own sha1 list. + Using this as a fallback, rather than the default, should solve most + upgrade issues, where people found their initramfs was half-baked. + - Abstract out the kernel minversion checking stuff into the function + library, so we can reuse it to check minversion requirements for hook + scripts as well (such as udev, which requires >= 2.6.15 in dapper) + - Bump the kernel minversion to 2.6.15 on hppa and ia64, since they used + initrd-tools with their 2.6.12 kernels in breezy, not initramfs-tools. + - If mkinitramfs fails due to minversion not being met, don't bail out + of update-initramfs, but just exit 0, so upgrades don't halt on it. + + * debian/initramfs-tools.postrm: We no longer need to explicitly remove + /etc/initramfs-tools/modules. + + -- maximilian attems <maks@sternwelten.at> Sat, 24 Jun 2006 13:27:49 +0200 + +initramfs-tools (0.64) unstable; urgency=low + + RELEASE o bella, ciao! bella, ciao! + + * debian/initramfs-tools.install: Add /etc/initramfs-tools/modules conffile, + instead of a cp from postinstall. (closes: #368043) + + * debian/control, update-initramfs.8, mkinitramfs.8: Capitalize RAM + NFS. + Rephrase nfs root support. + + Thanks to Jeff Bailey <jbailey@raspberryginger.com> and + Steinar H. Gunderson <sesse@debian.org> for the review. + + -- maximilian attems <maks@sternwelten.at> Thu, 22 Jun 2006 20:45:59 +0200 + +initramfs-tools (0.63) unstable; urgency=low + + * init: Use redirection '>' for touching /dev/.initramfs-tools. + + * debian/control, update-initramfs.8, mkinitramfs.8: + s/an (cpio archive)/a gzipped \1/. + Thanks to Andy Somerville <andy.somerville@gmail.com>. + + -- maximilian attems <maks@sternwelten.at> Thu, 22 Jun 2006 01:11:17 +0200 + +initramfs-tools (0.62) unstable; urgency=low + + * debian/control: We need at least udev 0.086-1, since earlier versions + had hooks, which don't load ide-disk automatically for 2.6.15 kernels. + Can't lower dependency to sarge version as it has no coldplug support + to escape udev dependency loop on upgrade. (closes: #358360, #362816) + + * hook-functions: Add arcmsr to the scsi modules list. + + * debian/NEWS: Add Notice about confdir mv as version 0.61. + + -- maximilian attems <maks@sternwelten.at> Wed, 21 Jun 2006 09:22:23 +0200 + +initramfs-tools (0.61) unstable; urgency=low + + Release "O partigiano portami via" + + * debian/TODO: update to latest state. + + * debian/bug: Fix reportbug script shebang line, add some descriptive echos. + Use exec to open file descriptor 3 for reportbug. + + * debian/control: Pump to 3.7.2 standard version without changes. + + * init: Use 10M as tmpfs_size for the udev /dev, that can be overriden in + /etc/udev/udev.conf. (closes: #352434) + + * /etc/initramfs-tools: Use the much more intituive conf dir location. + Thanks for the idea to Andres Salomon <dilinger@debian.org>. + + * debian/initramfs-tools.preinst: mv /etc/mkinitramfs /etc/initramfs-tools + on upgrade as this should work even with drive space issues. + Thanks to Jeff Bailey <jbailey@raspberryginger.com> for the posix atomic + mv hint and Daniel Blaschke <blaschke@hep.itp.tuwien.ac.at> for testing. + + * mkinitramfs: Set CONFDIR to /etc/initramfs-tools. + + * mkinitramfs.8, initramfs-tools.8: Document the new pathes. + + * debian/control: Change Build-depends-indep to Build-depends as we need + debhelper and cdbs for the clean target, fulfills policy 7.6. + + * debian/initramfs-tools.preinst: Warn and bail out if /etc/initramfs-tools + already exists. + + -- maximilian attems <maks@sternwelten.at> Thu, 18 May 2006 17:27:44 +0200 + +initramfs-tools (0.60) unstable; urgency=low + + "E ho trovato l'invasor" + + * scripts/functions: Allow boot scripts to modify exported boot parameters. + Thanks David Härdeman <david@2gen.com> for the patch. (closes: 348147) + This allows the inclusion of cryptoroot hooks to cryptsetup! + + * init: add cryptopts parsing and export. + + * init: Move parse_numeric down to the "mounting root" block. + + * init, scripts/local: Allow rootflags to be passed in kernel cmdline. + Thanks Thomas Luzat <thomas.luzat@gmx.net> for the patch. (closes: #358917) + + * init: Allow passing nfs root mount option in kernel cmdline. Thanks + Brian Brunswick <bdb@forbidden.co.uk> for the patch. (closes: #358649) + + * update-initramfs: s/ALL/all/, fix it to actually run on update in non + verbose mode. (closes: #362568) + + * update-initramfs: Warn in big letters about grub and lilo installs. + (closes: #362816) + + * debian/bug: Add reportbug script with info about cmdline, fs and lsmod. + + * initramfs-tools(8): Document the /conf/param.conf feature. + + * mkinitramfs-kpkg(8): Spell out, why the wrapper script is needed. + + -- maximilian attems <maks@sternwelten.at> Tue, 18 Apr 2006 13:33:18 +0200 + +initramfs-tools (0.59b) unstable; urgency=low + + * mkinitramfs-kpkg: Intialialize the variables. + (closes: #359355, #359620, #359613, #359666, #359681) + + -- maximilian attems <maks@sternwelten.at> Tue, 28 Mar 2006 16:30:59 +0200 + +initramfs-tools (0.59) unstable; urgency=low + + * debian/copyright: Add years of copyright and authors. + + * Resync with 0.40ubuntu28: + - hooks/md: Add raid10 module. + - scripts/local: Move the "loop waiting for the root filesystem" code from + the udev premount script to the local mountroot() function where it truly + belongs. + - scripts/local-top/udev_helper: Leave the remaining ide-generic part + there, should be taken over by udev itself. + - make the md local-top scripts pre-requisite the udev one. + thanks Scott James Remnant <scott@ubuntu.com> + + -- maximilian attems <maks@sternwelten.at> Sun, 26 Mar 2006 22:35:15 +0200 + +initramfs-tools (0.58) unstable; urgency=low + + * hook-functions: Be more carefull about the minor parsing. The fix of + #357332 works for 3 digit roots, but not for hdc6 aka root=1606. + Thanks Martijn Pieters <mj@zopatista.com> for report + (closes: #358354, #358740). + + * hook-functions: Add gdth to the scsi modules. + + * mkinitramfs-kpkg: Use set -eu to capture full /boot. + Really (closes: #350875) + + * Add dependency on module-init-tools. (closes: #358632) + + * Don't include full path for man page reference. (closes: #358371) + + -- maximilian attems <maks@sternwelten.at> Sun, 26 Mar 2006 16:39:37 +0200 + +initramfs-tools (0.57b) unstable; urgency=low + + * mkinitramfs, update-initramfs, hook-functions: + On verbose mode show, which modules gets added to the initramfs. + + * hook-functions: Add cpqarray to the scsi modules - thanks for the patch + to Petter Reinholdtsen <pere@hungry.com>. (closes: #357980) + + * initramfs-tools.8: Document that `-' is not allowed to be used in a script + filename - the filenames get used as shell variable. (closes: #344639) + + * mkinitramfs: Don't exit succesfully in a case of a full fs. Leaves the + linux-image unconfigured. Thanks martin f krafft <madduck@debian.org> + for pointing to that potential boot failure. (closes: #350875) + + -- maximilian attems <maks@sternwelten.at> Tue, 21 Mar 2006 11:56:29 +0100 + +initramfs-tools (0.56) unstable; urgency=low + + * hooks/md: Add linear module - thanks to Moshe Yudkowsky <moshe@pobox.com>. + + * scripts/functions: Fix numerical minor parsing - thanks for the patch to + Wolfgang Weisselberg. (closes: #357332) + + * mkinitramfs.8: Correct wrong referenced filename. + + * update-initramfs.8: Define the argument 'version' - thanks to "Susan G. + Kleinmann" <sgk@debian.org>. (closes: #357282) + + * scripts/init-premount/udev_helper: Source the relevant definition to get + it really run. Thanks to Maurice Massar <massar@unix-ag.uni-kl.de>. + (closes: #357450) + + -- maximilian attems <maks@sternwelten.at> Fri, 17 Mar 2006 19:09:11 +0100 + +initramfs-tools (0.55b) unstable; urgency=low + + * Thanks to Frederik Schüler for pointing to leftovers. + + -- maximilian attems <maks@sternwelten.at> Wed, 15 Mar 2006 13:23:51 +0100 + +initramfs-tools (0.55) unstable; urgency=low + + * scripts/init-premount/udev_helper: Fix modprobe args. + Thanks Frans Pop <fjp@debian.org> for testing 0.54. + + * scripts/local: Use quiet to load the fs. (closes: #339092) + + * hook-functions: Really add the ieee1394 modules. + Thanks to Michael Prokop <mikap@grml.org> for testing the fix. + + * update-initramfs: Run lilo on updates if no grub is around. + Thanks Adeodato Simó <adeodato@debian.org> for finding the issue. + (Closes: #356850) + + -- maximilian attems <maks@sternwelten.at> Wed, 15 Mar 2006 11:29:12 +0100 + +initramfs-tools (0.54) unstable; urgency=low + + * hooks/lvm: lvm10 has also an vgchange - exit if no lvm2 libs. + (closes: #354708) + + * debian/copyright: Meniton current bzr archive. (closes: #352738) + + * hook-functions: Add dac960 scsi driver. (closes: #355162) + + * scripts/init-premount/udev_helper: add code by Scott James Remnant + <scott@ubuntu.com> from the ubuntu udev hook. We now wait on scsi + and usb devices to settle, load ide-generic on ide boot only if + no root device appeared. + The udev hook is adding ide.agent so no longer duplicate that code. + + * hook-functions: auto_add_modules, split 1000 char wide lines up. + Should allow better diffing. Splitting them out in proper files with + each modules / line costs too much initramfs generation time. + Should allow easier diffing. + + * hook-functions: Add sata_mv thanks Kenshi Muto <kmuto@debian.org>. + (closes: #355486) + + * hook-functions: Add dasd class to auto_add_modules and dd zfcp module. + Thanks to s390 support Bastian Blank <waldi@debian.org>. (closes: #355595) + + * hook-functions: Add it821x. (closes: #352460) + + -- maximilian attems <maks@sternwelten.at> Wed, 8 Mar 2006 17:34:25 +0100 + +initramfs-tools (0.53c) unstable; urgency=low + + * update-initramfs: Really reset takeover to zero. + + -- maximilian attems <maks@sternwelten.at> Mon, 6 Mar 2006 07:59:34 +0100 + +initramfs-tools (0.53b) unstable; urgency=low + + * scripts/init-premount/udev_helper: Renamed from udev-helper. + Thanks to Tollef Fog Heen <tfheen@err.no> (closes: #355235) + + -- maximilian attems <maks@sternwelten.at> Sat, 4 Mar 2006 15:26:13 +0100 + +initramfs-tools (0.53) unstable; urgency=high + + * update-initramfs: set_current_version needs to check against + /boot/initrd-`uname -r` and not /boot/vmlinu?-`uname -r`. + Otherwise this builds initramfs for newer handbuild trees too. + + * Resync with 0.40ubuntu24: + - New conf.d dir for config snippet. + - mptspi already included. + - keep nfsmount for now, we don't want to add further busybox deps. + - adds mptfc and mptsas modules (closes: #341930) + - adds MODULES=netboot support (closes: #352669) + * Further reduce ubuntudiff: + - scripts/functions: remove duplicate dir check. + - scripts/nfs: add quiet to modules loading. + + * mkinitramfs-kpkg: Add kernel-package compat stuff, behaves like mkinitramfs, + but adds the sha1sum for update-initramfs. Reset takeover=0. + (closes: #353809) Add small mkinitramf-kpkg.8. + + * init: Move the ROOT export up, so we actually source the hardcoded device + in initramfs.conf. (closes: #352958) + + * mkinitramfs: When invoked with -r switch pass the hardcoded root device to + /etc/mkinitramfs/conf.d/root inside the initramfs. + + * hook-functions: First shot at IEEE1394 support - add ohci1394 and sbp2. + + -- maximilian attems <maks@sternwelten.at> Mon, 27 Feb 2006 10:20:03 +0100 + +initramfs-tools (0.52b) unstable; urgency=high + + * update-initramfs: Set takeover=1. This allows hooks to regenerate the + latest initramfs per default. No need for an kpkg wrapper, as + kernel-package doesn't call update-initramfs, but mkinitramfs. + + -- maximilian attems <maks@sternwelten.at> Mon, 20 Feb 2006 13:30:54 +0100 + +initramfs-tools (0.52) unstable; urgency=low + + * hooks/lvm: manual_add_modules dm_snapshot, will allow boot from lvm + snapshot. + + * init: Fix maybe_break test for the bottom stage. + + * scripts/init-premount/udev-helper: Renamed from scripts/init-premount/ide. + + * update-initramfs: s/was/has/ been altered. + (closes: #351939, #352633, #353087, #353668) + + * update-initramfs(8), mkinitramfs(8): The point of the first is to be used + on your local box. Highlight its mode of operations. The second cmd is + only needed for advanced usage. + + -- maximilian attems <maks@sternwelten.at> Fri, 17 Feb 2006 21:41:11 +0100 + +initramfs-tools (0.51) unstable; urgency=low + + * scripts/functions: Call panic on circular deps to get rescue shell. + + * mkinitramfs: Use ${CONFDIR} everywhere. + + * Sync with 0.40ubuntu16: + - skip 0.40ubuntu15 udev gets fixed to only call update-initramfs + when /etc/mkinitramfs/initramfs.conf is there. + - 0.40ubuntu13 don't take over all initramfs images in Debian. + + * hook-functions: auto_add_modules atkb and i8042. + + * scripts/functions: on panic modprobe atkb and i8042 - work around for + broken configs, where those are not build in. (Closes: #337497) + + * scripts/functions: update_progress check if /dev/.initramfs/ exists + before writing into it. + + -- maximilian attems <maks@sternwelten.at> Tue, 24 Jan 2006 13:11:24 +0100 + +initramfs-tools (0.50c) unstable; urgency=low + + "E so io muoio da partigiano" + + * hook-functions: Fix MODULES=dep as `modprobe --show-depends' prints not + only the insmod commands, but also the install ones. Thanks for the patch + to Jean Charles Delepine <delepine@nnx.com>. (Closes: #342616) + + * hooks/evms, scripts/local-top/evms: EVMS takes care of it's own hooks, rm. + Thanks Steinar H. Gunderson <sesse@debian.org>. (Closes: 340258) + + -- maximilian attems <maks@sternwelten.at> Sat, 14 Jan 2006 17:40:48 +0100 + +initramfs-tools (0.49) unstable; urgency=low + + * Pump dephelper to 4.1.0 dependency as pointed out by linda. + + * initramfs-tools.8: Add DEBUG section, cheat how to check the initramfs. + + * Add optional sarge busybox-cvs-static dep to ease backport. + + -- maximilian attems <maks@sternwelten.at> Thu, 12 Jan 2006 17:28:42 +0100 + +initramfs-tools (0.48) unstable; urgency=low + + * mkinitramfs: klibc 1.1.14 moved from /usr/lib/klibc/lib to /lib + Bonus: You can now execute any klibc bin directly. + Cope with the move and pump dep. (Closes: 345949) + + -- maximilian attems <maks@sternwelten.at> Wed, 4 Jan 2006 16:11:25 +0100 + +initramfs-tools (0.47) unstable; urgency=low + + * mkinitramfs: Don't complain about missing /bin/sh - use rm -f. + Minor cleanup for the newer packaging of klibc 1.1.14. + + -- maximilian attems <maks@sternwelten.at> Sat, 31 Dec 2005 14:17:31 +0100 + +initramfs-tools (0.46) unstable; urgency=low + + * Don't include .bzr dirs in source upload. + Thanks Frederik Schüler <fs@debian.org> + + -- maximilian attems <maks@sternwelten.at> Thu, 29 Dec 2005 14:23:46 +0100 + +initramfs-tools (0.45) unstable; urgency=high + + "Che mi sento di morir." + + * Unset debug before calling init, confuses /etc/init.d/rc. + + * scripts/init-premount/ide: Load uncondionally for ide boots ide-generic + and also ide-disk, as udev ignores them. High urgency upload for rc bugs. + Thanks Frans Pop <fjp@debian.org> and Joey Hess <joeyh@debian.org> for + testing! (Closes: #332824, #342925, #344754, #337045, #338406) + + -- maximilian attems <maks@sternwelten.at> Thu, 29 Dec 2005 10:34:32 +0100 + +initramfs-tools (0.44) unstable; urgency=high + + "O partigiano portami via" + + * Urgency high upload to stay in sync with udev for testing. + + * initramfs.conf: Fix wording choice for resume option. (Closes: #337575) + + * hooks/kernelextras: Really fix #335505. + Don't expand wildcase to current dir. (Closes: #342153) + + * Add initramfs-tools.8 describing how the hooks of initramfs-tools work + and how to use them. Thanks David Härdeman <david@2gen.com> for the patch. + (Closes: #339091) + + * initramfs.conf.5, mkinitramfs.8, update-initramfs.8: Update + cross-references of the different manpages. + + * TODO: update to current state. + + * scripts/functions: remove old duplicate suspend support. + + * Sync with 0.40ubuntu8. (Closes: #337318) + - Revert the modprobe changes for now as modules-init-tools of + testing doesn't have yet the wanted interface. + + -- maximilian attems <maks@sternwelten.at> Mon, 12 Dec 2005 11:22:15 +0100 + +initramfs-tools (0.42) unstable; urgency=low + + * hook-functions: The mptspi module is required for at least some machines + that use the mptscsih. Thanks dann frazier <dannf@hp.com> for the patch. + (Closes: #341162) + + * Resync with 0.40ubuntu7. + - Do the udev split by hand as we have a different udev invocation + supporting linux < 2.6.15. Increment udev dep to the version with + initramfs hooks. + - Debian's klibc hasn't yet the nanosleep, waiting for unbroken + linux-headers. + - Don't remove resume support from /etc/mkinitramfs/initramfs.conf + even if bootloader setting is preferred. + + -- maximilian attems <maks@sternwelten.at> Mon, 5 Dec 2005 12:59:59 +0100 + +initramfs-tools (0.40ubuntu32) dapper; urgency=low + + * Revert 0.40ubuntu31. This isn't as trivial as it should be. + + -- Matt Zimmerman <mdz@ubuntu.com> Sun, 21 May 2006 10:17:50 -0700 + +initramfs-tools (0.40ubuntu31) dapper; urgency=low + + * scripts/local-premount/resume: Print a message when a resume is about to + begin (LP#41137) + + -- Matt Zimmerman <mdz@ubuntu.com> Fri, 19 May 2006 15:14:53 -0700 + +initramfs-tools (0.40ubuntu30) dapper; urgency=low + + * This release brought to you by Fujitsu hard drives, which have forced + me to rewrite all my most recent initramfs-tools changes from memory. + * Include arcmsr module in the scsi module list (launchpad.net/40075) + * Abstract out the kernel minversion checking stuff into the function + library, so we can reuse it to check minversion requirements for hook + scripts as well (such as udev, which requires >= 2.6.15 in dapper) + * Bump the kernel minversion to 2.6.15 on hppa and ia64, since they used + initrd-tools with their 2.6.12 kernels in breezy, not initramfs-tools. + * If mkinitramfs fails due to minversion not being met, don't bail out + of update-initramfs, but just exit 0, so upgrades don't halt on it. + * Conditionalise the use of lvm and md in mkinitramfs so it's a no-op if + you don't have those packages installed, but allows for smooth upgrades + if you have older versions that don't ship their own hooks yet. + * Make prereqs conditional on the script/hook actually existing. From + now on, this means that 'PREREQ="udev"' means "run udev first, iff it + happens to be installed". Having the files exist on the filesystem if + you have a HARD dependency should be enforced with package dependencies. + * Add ohci1394 and sbp2 to the scsi module list (launchpad.net/37479) + * Move framebuffer setup from usplash to scripts/local-top/framebuffer + so that people booting with vga=1234 but no splash will still get a + framebuffer instead of a useless black console (launchpad.net/27669) + + -- Adam Conrad <adconrad@ubuntu.com> Tue, 16 May 2006 19:51:08 +1000 + +initramfs-tools (0.40ubuntu29) dapper; urgency=low + + * Make "update-initramfs -u" try to find the running kernel *after* it + attempts to search the symbolic link list and its own sha1 list. + Using this as a fallback, rather than the default, should solve most + upgrade issues, where people found their initramfs was half-baked. + + -- Adam Conrad <adconrad@ubuntu.com> Wed, 19 Apr 2006 13:51:35 +1000 + +initramfs-tools (0.40ubuntu28) dapper; urgency=low + + * Add raid10 module to the generic module list (launchpad.net/28028) + * Add cpqarray to the scsi module list (launchpad.net/{26632,35202}) + * Unset debug before we run the real init (launchpad.net/24095) + * Add the gdth module to the default scsi list (launchpad.net/31542) + + -- Adam Conrad <adconrad@ubuntu.com> Fri, 24 Mar 2006 04:33:44 +1100 + +initramfs-tools (0.40ubuntu27) dapper; urgency=low + + * Drop the evms, lvm and md local-top scripts; they're all provided by + their own packages now. This makes the depdencies rather nicer. + + -- Scott James Remnant <scott@ubuntu.com> Thu, 23 Mar 2006 18:04:48 +0000 + +initramfs-tools (0.40ubuntu26) dapper; urgency=low + + * Make the md and evms local-top scripts pre-requisite the udev one. + + -- Scott James Remnant <scott@ubuntu.com> Thu, 23 Mar 2006 17:54:32 +0000 + +initramfs-tools (0.40ubuntu25) dapper; urgency=low + + * Move the "loop waiting for the root filesystem" code from the udev + premount script to the local mountroot() function where it truly + belongs. + + -- Scott James Remnant <scott@ubuntu.com> Wed, 22 Mar 2006 16:28:46 +0000 + +initramfs-tools (0.40ubuntu24) dapper; urgency=low + + * Add support for LSI Logic's Fusion MPT SAS and FC controllers as well. + + -- Adam Conrad <adconrad@ubuntu.com> Thu, 23 Feb 2006 23:27:16 +1100 + +initramfs-tools (0.40ubuntu23) dapper; urgency=low + + * Grow a conf.d directory for config snippets, and toss the RESUME option + in there, to stop editing our own conffile in our maintainer scripts. + * Add a cleverly hackish preinst that will pull the RESUME setting from + old config files, migrate it to conf.d/resume, and reset that part of the + conffile to a factory fresh state. This should fix the unwanted conffile + prompt in breezy->dapper upgrades for people who made no local changes. + + -- Adam Conrad <adconrad@ubuntu.com> Fri, 17 Feb 2006 15:34:53 +1100 + +initramfs-tools (0.40ubuntu22) dapper; urgency=low + + * Add mptspi to the list of SCSI modules put in the initramfs by default, + which is required for some LSI Logic controllers and for the VMware SCSI + controller in recent VMware versions (See launchpad.net/{27187,31229}) + * Fix typo of /dev/disk/by-*, which I wrote as /dev/disks/by-{uuid,label} + * Load i2c-keywest before loading therm_pm72 in the PowerPC thermal hook, + since the latter sometimes needs the former (Closes launchpad.net/27269) + + -- Adam Conrad <adconrad@ubuntu.com> Tue, 14 Feb 2006 23:28:35 +1100 + +initramfs-tools (0.40ubuntu21) dapper; urgency=low + + * Don't update the progress bar once udev has taken /dev away; + after all, we can't contact usplash anyway at this point. + + -- Scott James Remnant <scott@ubuntu.com> Wed, 8 Feb 2006 14:34:10 +0000 + +initramfs-tools (0.40ubuntu20) dapper; urgency=low + + * Add ... to end of strings to match main boot sequence. + + -- Scott James Remnant <scott@ubuntu.com> Tue, 7 Feb 2006 11:07:50 +0000 + +initramfs-tools (0.40ubuntu19) dapper; urgency=low + + * Change the first of many "Loading modules" to "Loading essential drivers" + to improve debugging when people say it breaks at that stage. + + -- Scott James Remnant <scott@ubuntu.com> Tue, 7 Feb 2006 11:05:15 +0000 + +initramfs-tools (0.40ubuntu18) dapper; urgency=low + + * Add support for selecting root by UUID or LABEL with syntax such as: + root=LABEL=myrootfs or root=UUID=92addf34-0f02-4a0e-bfb2-cbaa1e907b77 + + -- Adam Conrad <adconrad@ubuntu.com> Fri, 3 Feb 2006 15:55:01 +0000 + +initramfs-tools (0.40ubuntu17) dapper; urgency=low + + * Make auto_add_modules take an argument, so you can use it to add only + some of the auto* modules (like "net" or "ide"), and create a "netboot" + option that only includes base and net (Closes launchpad.net/26426) + * Change the nfs script to use "mount -o nolock" instead of "nfsmount", + to fix some timeouts for ltsp NFS roots (Closes launchpad.net/19196) + + -- Adam Conrad <adconrad@ubuntu.com> Tue, 31 Jan 2006 11:55:11 +0000 + +initramfs-tools (0.40ubuntu16) dapper; urgency=low + + * Bump klibc-utils dependency to (>= 1.1.16-1), for hppa and ia64. + + -- Adam Conrad <adconrad@ubuntu.com> Thu, 19 Jan 2006 04:00:39 +1100 + +initramfs-tools (0.40ubuntu15) dapper; urgency=low + + * Drop the udev dependency, so we always get configured before udev. + We can get away with this now that udev hooks/scripts have been split + into the udev package proper. This should close Malone bug #28808. + + -- Adam Conrad <adconrad@ubuntu.com> Wed, 18 Jan 2006 22:50:27 +1100 + +initramfs-tools (0.40ubuntu14) dapper; urgency=low + + * If copy_exec is asked to copy to the same location twice, check if + we're copying the same file again. If so, do nothing and carry on, if + not, warn that we asked it for an impossibility, and don't overwrite. + + -- Adam Conrad <adconrad@ubuntu.com> Thu, 12 Jan 2006 18:00:12 +1100 + +initramfs-tools (0.40ubuntu13) dapper; urgency=low + + * Default to taking over other initramfs images in Ubuntu, as this is + more consistent with what our packaging expects to be able to do. + * Make "update-initramfs -u" try to find the running kernel before it + attempts to search the symbolic link list and its own sha1 list. + + -- Adam Conrad <adconrad@ubuntu.com> Wed, 11 Jan 2006 16:25:20 +1100 + +initramfs-tools (0.40ubuntu12) dapper; urgency=low + + * Oops, move the progress state file into the new directory too. + + -- Adam Conrad <adconrad@ubuntu.com> Mon, 9 Jan 2006 21:26:44 +1100 + +initramfs-tools (0.40ubuntu11) dapper; urgency=low + + * Move the state directory from /dev/initramfs to /dev/.initramfs + + -- Adam Conrad <adconrad@ubuntu.com> Mon, 9 Jan 2006 21:17:50 +1100 + +initramfs-tools (0.40ubuntu10) dapper; urgency=low + + * Create the /dev/initramfs directory as soon as we mount /dev, so other + packages that need a playground in /dev can do so in a uniform location. + * Update the usplash progress bar every time we are asked to output a + success or failure value from an init action, and write our progress to + /dev/initramfs for sysv-init to gather up and pick up where we left off. + * Export $DPKG_ARCH in both mkinitramfs (for use by hooks) and initramfs. + * Use $DPKG_ARCH in the thermal hook/script to divide the x86 stuff from + the powerpc stuff, not because we have to, but as an example to others. + + -- Adam Conrad <adconrad@ubuntu.com> Mon, 9 Jan 2006 10:51:51 +1100 + +initramfs-tools (0.40ubuntu9) dapper; urgency=low + + * Make some changes to cope with the new and improved klibc packaging: + - Add a force to the deletion of ${DESTDIR}/bin/sh, to avoid errors. + - Cope with libklibc moving from /usr/lib/klibc/lib to /lib. + - Bump dependency on klibc-utils to one new enough for the above. + + -- Adam Conrad <adconrad@ubuntu.com> Thu, 5 Jan 2006 15:13:15 +1100 + +initramfs-tools (0.40ubuntu8) dapper; urgency=low + + * Call modprobe everywhere with "-Qb" to silence messages and allow user + blacklisting. + * Copy the entire /etc/modprobe.d directory to the initramfs, so we can + pick up all user blacklists and options. + * Remove the slumber for SCSI/USB devices from the local filesystem mount + script, udev's init-premount script will take care of this when + necessary. + + -- Scott James Remnant <scott@ubuntu.com> Wed, 7 Dec 2005 16:18:12 +0000 + +initramfs-tools (0.40ubuntu7) dapper; urgency=low + + * remove "sleep 3" from the nfs script before the nfsmount command, + its a leftover from debugging in breezy and slows down thin client + booting unnecessary + + -- Oliver Grawert <ogra@ubuntu.com> Fri, 2 Dec 2005 11:45:05 +0100 + +initramfs-tools (0.40ubuntu6) dapper; urgency=low + + * When panicking, fork an interactive subshell rather than execing it, so + that if the user fixes things up and exits, we continue rather than + panic the kernel. + * Call update-initramfs in postinst to regenerate the latest initramfs on + upgrades + + -- Matt Zimmerman <mdz@ubuntu.com> Thu, 1 Dec 2005 22:23:09 -0800 + +initramfs-tools (0.40ubuntu5) dapper; urgency=low + + * Wait up to 10 seconds for the root device to appear before failing, + allowing SCSI and USB controllers time to settle. There's almost + certainly a more elegant way to do this generically for all mountroot + functions, but for now this will suffice. + + -- Scott James Remnant <scott@ubuntu.com> Thu, 1 Dec 2005 21:28:55 +0000 + +initramfs-tools (0.40ubuntu4) dapper; urgency=low + + * Mount /dev with mode 0755. + + -- Scott James Remnant <scott@ubuntu.com> Thu, 1 Dec 2005 19:30:06 +0000 + +initramfs-tools (0.40ubuntu3) dapper; urgency=low + + "A true friend stabs you in the front." + - Oscar Wilde + + * hooks/acpid: Rename to ... + * hooks/thermal: ... this. Add therm_pm72 for ppc64 systems. + + -- Jeff Bailey <jbailey@ubuntu.com> Wed, 30 Nov 2005 22:25:01 -0500 + +initramfs-tools (0.40ubuntu2) dapper; urgency=low + + * Rename scripts/init-premount/acpid to scripts/init-premount/thermal + and add therm_pm72 to avoid "vaccum cleaner mode" on ppc64 systems. + + -- Adam Conrad <adconrad@ubuntu.com> Thu, 1 Dec 2005 12:37:27 +1100 + +initramfs-tools (0.40ubuntu1) dapper; urgency=low + + * Use tmpfs for /dev, instead of ramfs; as tmpfs is swappable. + * Move /proc and /sys to the real filesystem, rather than unmounting them; + slightly reduces workload. + * Replace /root with ${rootmnt} in final usage of /dev/console + * Copy across modprobe blacklist as well as aliases + + * Change the panic/breaknow thing *again*. There's now a break= option + which can be any of top, modules, premount, mount, bottom, init and + causes the initramfs to break at that point. panic/breaknow is now + break=top, without an argument is equivalent to break=premount. + * Run depmod at the top of the init script, so init-top scripts can use + modprobe. + + * Remove udev-specific code: + - depend on the version of udev that includes all of these things itself + - remove udevstart from init + - remove code to move /dev to the real filesystem from init + - remove /sys-based module loading from load_modules + - remove boot_events functions from load_modules + - remove udev copy from mkinitramfs + - remove udev hook script + + -- Scott James Remnant <scott@ubuntu.com> Thu, 24 Nov 2005 21:21:12 +0000 + +initramfs-tools (0.41) unstable; urgency=high + + "Una mattina mi sono svegliato" + + * High urgency upload to cope with newer udev upstream - bonus: + condition to test against when udev is ready. (Closes: #341014) + Thanks Marco d'Itri <md@linux.it> for guidance and + Heikki Henriksen <heikkih@gmail.com> for double check. + + * Pump udev dep on 0.076-3. + + * Special thanks to Paul Traina for previous udev / emvs work. + + * Sync with Ubuntu (0.36ubuntu6). + + * Kill udevd as late as possible. Thanks David Härdeman <david@2gen.com> + for the patch. (Closes: #339093) + + -- maximilian attems <maks@sternwelten.at> Mon, 28 Nov 2005 17:53:24 +0100 + +initramfs-tools (0.40) unstable; urgency=high + + * High urgency upload as udev changed under our feet. Fix RC bugs. + + * hooks/udev: Add needed bits: udevsynthesize. (Closes: #340257) + Move good bits from global mkinitramfs. + + * Pump udev dep on 0.074-3. + + * Fix evms hooks properly until they get merged into the evms itself. + (Closes: #337704) + + * Sync with Ubuntu (0.36ubuntu4). + + -- maximilian attems <maks@sternwelten.at> Wed, 23 Nov 2005 10:31:57 +0100 + +initramfs-tools (0.39) unstable; urgency=medium + + * Setting urgency to medium to get this into testing. This + will make life easier for d-i. + + * Revert the mklibs-small usage patch - reduces needed dependencies: + hook-fuctions: Readds copy_exec. + mkinitramfs, hooks/{evms,lvm,md}: Use copy_exec. + + * mkinitramfs: Newer udev no longer uses /sbin/udev - remove usage. + (Closes: #339568, #339365, #338814) + + * Pump udev dependency. + + * init: Pump timeout as there is currently no way to check which udevd + processes are still running and why. + Cures hopefully breakage of missing devices on boot. + + * Sync with latest Ubuntu. + + -- maximilian attems <maks@sternwelten.at> Thu, 17 Nov 2005 19:59:47 +0100 + +initramfs-tools (0.36ubuntu6) dapper; urgency=low + + * Rename "panic" to "breaknow" + + -- Scott James Remnant <scott@ubuntu.com> Wed, 23 Nov 2005 10:23:54 +0000 + +initramfs-tools (0.36ubuntu5) dapper; urgency=low + + * Abort the boot sequence as early as possible if "panic" is placed on the + kernel command-line, allowing debugging of scripts in init-top. + + -- Scott James Remnant <scott@ubuntu.com> Mon, 21 Nov 2005 08:40:20 +0000 + +initramfs-tools (0.36ubuntu4) dapper; urgency=low + + * Replace all occurances of /etc/mkinitramfs in mkinitramfs with $CONFDIR, + so -d can be used to point at a completely alternate tree (for example, + when installing into a chroot). + + -- Scott James Remnant <scott@ubuntu.com> Mon, 21 Nov 2005 08:34:03 +0000 + +initramfs-tools (0.36ubuntu3) dapper; urgency=low + + * mkinitramfs: only copy the klibc-*.so file, and not the development + pieces that happen to sit alongside it. + + -- Scott James Remnant <scott@ubuntu.com> Thu, 10 Nov 2005 16:44:08 -0500 + +initramfs-tools (0.36ubuntu2) dapper; urgency=low + + * Fix typos in the handling of the mkinitramfs -d option (thanks, Colin). + + -- Adam Conrad <adconrad@ubuntu.com> Thu, 10 Nov 2005 12:12:32 -0500 + +initramfs-tools (0.38) unstable; urgency=low + + [ dann frazier ] + + * initramfs.conf: Reference correct manpage. (Closes: #336095) + + [ maximilian attems ] + + * scripts/functions, scripts/local-premount/suspend: Fix suspend to disk + by using decimal numbers. Thanks to Adrian Bridgett <adrian@smop.co.uk> + for the patch. (Closes: #336936) + + * hooks/evms: manual_add_module dm_mod, now we no longer pull it in by + default. Thanks to Steinar H. Gunderson <sesse@debian.org> + (Closes: #336617) + + -- maximilian attems <maks@sternwelten.at> Wed, 2 Nov 2005 07:21:29 +0100 + +initramfs-tools (0.37) unstable; urgency=low + + * scripts/functions, scripts/local-premount/suspend: Use of "stat" + which isn' any more provided by busybox (1.01-3). + Thanks to Adrian Bridgett <adrian@smop.co.uk> for the patch using awk. + (Closes: #335801) + + * hooks/kernelextras: Check for existence of ${MODULESDIR}/initrd/: + Exit if it doesn't exist before including current dir. + Thanks to Jean Charles Delepine <delepine@nnx.com> (Closes: #335505) + + * hooks/lvm, hooks/md: Remove FIXME's at second thought. You better want + to check against the binaries for your not yet created raid/lvm. + + -- maximilian attems <maks@sternwelten.at> Wed, 26 Oct 2005 09:22:58 +0200 + +initramfs-tools (0.36ubuntu1) dapper; urgency=low + + * Forced version bump to minimise the scary until I have a chance to dig + through the ubuntu:debian diffs and do a proper merge of their changes. + * Remove the "Loading, please wait..." message from the top of init, as + we now have other fairly early visual feedback, and this is just ugly. + + -- Adam Conrad <adconrad@ubuntu.com> Wed, 26 Oct 2005 11:27:36 +1000 + +initramfs-tools (0.36) unstable; urgency=low + + "Sunny Autumn Release" + + * Minor cleanups in mkiniramfs. + + * Remove manpage section about return values. Needs to be rephrased. + Not sure if it's important for the enduser. + + -- maximilian attems <maks@sternwelten.at> Mon, 24 Oct 2005 19:51:51 +0200 + +initramfs-tools (0.35) unstable; urgency=low + + * mkinitramfs: Return 2 for failure path of --supported-(host|target)-version. + + * mkinitramfs: Run the hooks before mklibs-copy, broke evms. + Thanks for fix and testing to Steinar H. Gunderson <sesse@debian.org> + + * Change name of virtual package that is provided into linux-initramfs-tool. + + * Add hooks/lvm allowing to remove dependency on lvm2. + + * Add hooks/md allowing to remove dependency on mdadm. + + * Remove the mdadm and lvm dependencies, they work as hooks when present. + The lvm2 version in sarge is good enough to address issues mentioned in + 0.16. A woody backport will need newer lvm2 although.. + + -- maximilian attems <maks@sternwelten.at> Mon, 24 Oct 2005 19:16:14 +0200 + +initramfs-tools (0.32) unstable; urgency=low + + [ Bastian Blank ] + * Use mklibs-copy. + * Use udevsynthesize instead of udevstart. + * hook-functions: Add ibmvscsic to list of scsi modules. + + [ Sven Luther ] + * Added --supported-(host|target)-version support for the new post-2.6.13 + ramdisk-tool policy. Added linux-ramdisk-tool virtual package too. + (Closes: #333856) + + [ maximilian attems ] + * Resynchronise with latest upstream release. + * Place shift after variable outfile assignment. + * Fix strange chars in the Depends line resulting in no depends at all. + * Thanks to Bastian Blank for the fixes concerning the new busybox version. + (Closes: #334467) + + [ Jeff Bailey ] + * scripts/nfs (mountroot): New variable: NFSOPTS, default to + -o retranfs=10. (Ubuntu 12942) + This can be overridden in the initramfs.conf file. + Thanks to Oliver Grawert for testing this! + + * hook-scripts (auto_add_modules): Add jfs + (dep_add_modules): Ditto. (Ubuntu #16742) + Thanks to Colin Watson for this fix! + + [ Adam Conrad ] + * Make us a bit more silent/tidy by default, unless "quiet" isn't on + the kernel's command line (then we're just as verbose as ever) + + [ Jonas Smedegaard ] + * Use GNU getopt (instead of bash builtin getopts) for improved long- + opts handling. + * Quote variables. + * Use test options -n and -z. + + -- maximilian attems <maks@sternwelten.at> Wed, 19 Oct 2005 17:42:08 +0200 + +initramfs-tools (0.31) unstable; urgency=low + + Quick fix for sluggish dep + + [ Bastian Blank ] + * Use new busybox. (closes: #333755) + + -- maximilian attems <maks@sternwelten.at> Mon, 17 Oct 2005 16:27:31 +0200 + +initramfs-tools (0.30) unstable; urgency=low + + Apparition Octobre Rouge + + [ maximilian Attems ] + + * Resynconise with latest upstream now we are in unstable. + + [ Jeff Bailey ] + * debian/rules: Make sure hooks and scripts are chmod +x + + * hook-functions (auto_add_modules): Add advansys. + + * debian/init: Add "Loading, please wait..." message. + Don't log for init-top scripts to avoid usplash noise. + + * init: Add start of debug command line option. + + * scripts/functions (log_begin_msg): Call usplash if available + (log_end_msg): Call usplash if available + (panic): Close usplash if available + + * scripts/functions (load_modules): Quote resume variable. + Thanks to Christian Kellner for helping test that! + + * scripts/local-premount/suspend: Quote resume variable. + + * update-initramfs: Use basename on the link target to get the + version number. + + * HACKING: Start of some notes on how this package actually works. + * debian/initramfs-tools.docs: Install it. + + [ Matthew Garrett ] + * scripts/functions (load_modules): Run udevstart after loading block + drivers should fix resume from hibernate on non-LVM systems. + + -- maximilian attems <maks@sternwelten.at> Fri, 30 Sep 2005 19:34:55 +0200 + +initramfs-tools (0.29) breezy; urgency=low + + "Beauty is a form of genius - is higher, indeed, than genius, as it + needs no explanation." + - Oscar Wilde + + * hook-functions (auto_add_modules): Add advansys. + + * debian/rules: Make sure hooks and scripts are chmod +x + + * init: Add start of debug command line option. + + -- Jeff Bailey <jbailey@ubuntu.com> Tue, 20 Sep 2005 15:47:42 -0400 + +initramfs-tools (0.28) breezy; urgency=low + + * Run udevstart after loading block drivers - should fix resume from + hibernate on non-LVM systems. + + -- Matthew Garrett <mjg59@srcf.ucam.org> Tue, 20 Sep 2005 01:13:31 +0100 + +initramfs-tools (0.27) unstable; urgency=low + + * Remove unused BUSYBOX config option as we use busybox anyway. + + * Add Jeff Bailey and myself as Uploaders, Debian kernel team as + MAINTAINER. + + * Upload to debian unstable - allows use of nondevfs kernel >= 2.6.13 + with initramfs image. (Closes: #312561, #315654) + + * Fix busybox dependency to the relevant debian package. + + * Reorder the initramfs.conf variables. + + * Add question mark to the getopts for the help message. + + * update-initramfs.8 New file install it. + + * The debian busybox-cvs-static installs into /bin/busybox: + fix pathes vis-a-vis ubuntu version. make that a variable on top. + + -- maximilian attems <maks@sternwelten.at> Tue, 20 Sep 2005 13:52:00 +0200 + +initramfs-tools (0.26) breezy; urgency=low + + "Experience is one thing you can't get for nothing." + - Oscar Wilde + + * scripts/local-top/lvm: Reduce -- to - in VG strings for feeding + to vgchange. (Ubuntu: #13387) + + * update-initramfs: New file + * debian/dirs: Add /var/lib/initramfs-tools + + * hooks/evms: New file + * scripts/local-top/evms: New file. + Thanks to Jerry Haltom for helping test this! + + * debian/control: Bump klibc depends to 1.0.14-1ubuntu2 for jfs support + + * hook-scripts (manual_add_modules): Don't do unnecessary depmod + (dep_add_modules): No need for a sleep 2 here. + Thanks to Matt Zimmmerman for noticing these! + + * scripts/functions: Attempt resume before loading USB or Network + modules to avoid resume issues with USB. + Thanks to Matthew Garrett for this patch! + + * scripts/functions (ide_boot_events): Always load ide-generic + before going further. This allows us to catch any hidden + IDE controllers that might not otherwise get found. + + * initramfs.conf.5: New file + * debian/initramfs-tools.manpages: Install it. + Thanks to maximilian attems for the manpage! + + * hook-functions (auto_add_modules): Add mptscsih (Ubuntu #15406) + Thanks to Jesper Krogh for the bug report! + + * debian/dirs: Add etc/mkinitramfs/hooks, move all scripts subdirs + into etc/mkinitramfs/scripts. + + * mkinitramfs: Set the umask. Copy the scripts from + /etc/mkinitramfs/scripts into the image. + Make sure that modules file lists is actually a regular file. + + * init: Use ${rootmnt} instead of hardcoded /root, use mount -n + Fix typo. + + * hook-functions (catenate_cpiogz): Add sanity check. + (add_modules_from_file): Document, quote variable, add warning. + + * docs/example_hook: Update + Thanks to Karl Hegbloom for these previous 5 patches! + + * init: Create /var/lock on the initramfs + Thanks to Jerry Haltom for noticing this! + + * debian/dirs: rename to ... + * debian/initramfs-tools.dirs: ... this. + + * scripts/functions (scsi_boot_events): Don't attempt to look + at ${device}/type if it doesn't actually exist. + + -- Jeff Bailey <jbailey@ubuntu.com> Wed, 14 Sep 2005 14:12:24 -0400 + +initramfs-tools (0.25) breezy; urgency=low + + "If there was less sympathy in the world, there would be less + trouble in the world." + - Oscar Wilde + + * init: Module the /dev tmpfs earlier. Make /dev/console, and + /dev/null on it at the beginning, just in case. + + * debian/initramfs-tools.postinst: When copying the modules file over + from initrd-tools installations, filter out ext2, ext3, ide-generic + and ide-disk. These are leftovers from Warty. + (Ubuntu #14242) + + * hooks/udev: New File (Ubuntu #12915) + + * init: panic if ${init} doesn't exist on the target filesystem. + + -- Jeff Bailey <jbailey@ubuntu.com> Thu, 1 Sep 2005 00:13:47 -0400 + +initramfs-tools (0.24) breezy; urgency=low + + "Experience is simply the name we give out mistakes." + - Oscar Wilde + + * hook-functions (auto_add_modules): Add cciss + (Ubuntu #14177) Thanks Fabionne! + + * scripts/functions (parse_numeric): Noop on empty parameter. + Fixes LTSP boot failure. Thanks to Oliver Grawert + for testing! + + * scripts/local-top/md: Don't run modprobe when raidlvl is unset. + Run mdadm if raidlvl has ever been set, not just if the most + recent device checked was part of the raid setup. + Thanks to Jeff Waugh for the bug report! + + * mkinitramfs: Feed the -o argument through readlink -f to + get the canonical pathname. + + -- Jeff Bailey <jbailey@ubuntu.com> Fri, 26 Aug 2005 09:35:32 -0400 + +initramfs-tools (0.23) breezy; urgency=low + + "This suspense is terrible. I hope it will last." + - Oscar Wilde + + * scripts/local: Quote ${ROOT} so that an empty value causes us + to drop to a shell. + Thanks to Matt Zimmerman for this fix! + + * hook-functions (auto_add_modules): Add atiixp and opti621 to + the IDE set. + + * hook-functions (dep_add_modules): Detect i2o and add i2o_block + (auto_add_modules): Include i2o_block. + + * scripts/functions (i2o_boot_events): New function + (load_modules): Call it. (Ubuntu# 13806) + Thanks to Tollef Fog Heen for the i2o patch! + + * debian/control: Depend on udev. + Thanks to Alexander Butenko for troubleshooting this with me. + + * init: Move the /dev directory to the root filesystem. + Handle all the udev bind mounts as needed. + Make sure input and output is associated with dev/console. + + * scripts/functions (parse_numeric): Exit if we're refering to a path. + Otherwise override root setting to be /dev/root. + * init: Call parse_numeric when setting the root variable. + * scripts/local-top/lvm: When using a numeric root, call vgchange -ay + Don't attempt to start LVM on regular partitions. + (Ubuntu #13365, #13778, and some of #13399) + + * scripts/local-top/lvm: Cope with -'s in the Volume Group and + logical volume names. (Ubuntu #13387) + Thanks to Stephen Shirley for the patch! + + -- Jeff Bailey <jbailey@ubuntu.com> Thu, 25 Aug 2005 11:48:15 -0400 + +initramfs-tools (0.22) breezy; urgency=low + + * Fix argument handling in force_load hook-function + * Add "sleep 3" to scripts/nfs as a nasty hack around bug #12942 + + -- Matt Zimmerman <mdz@ubuntu.com> Fri, 19 Aug 2005 23:50:16 -0700 + +initramfs-tools (0.21) breezy; urgency=low + + "All that I desire to point out is the general principle that + life imitates art far more than art imitates life." + - Oscar Wilde + + * mkinitramfs: Define MODULESDIR and use it. + + * hook-functions: Use MODULESDIR + (add_modules_from_file): Do not add .ko extension to file lists. + Call force_load instead of twiddling conf/modules directly. + (Ubuntu #13372) + (force_load): New function. + (copy_exec): Attempt to use non-optimsed libraries if available. + (Ubuntu #13470) + (auto_add_modules) Include forcedeth (Ubuntu #13448) + + * hooks/kernelextras: New file. (Ubuntu #13414) + + * debian/initramfs-tools.postinst: Preserve /etc/mkinitrd/modules if + possible on new install. (Ubuntu #13372) + + -- Jeff Bailey <jbailey@ubuntu.com> Thu, 18 Aug 2005 00:20:11 -0400 + +initramfs-tools (0.20) breezy; urgency=low + + * Depend on cpio. + + -- Colin Watson <cjwatson@ubuntu.com> Fri, 12 Aug 2005 10:43:04 +0100 + +initramfs-tools (0.19) breezy; urgency=low + + "The basis of optimism is sheer terror." + - Oscar Wilde + + * mkinitramfs: Honour MODULES=list and MODULES=dep. + + * hook-functions: New function dep_add_modules. + + -- Jeff Bailey <jbailey@ubuntu.com> Wed, 10 Aug 2005 23:20:11 -0400 + +initramfs-tools (0.18) breezy; urgency=low + + "We are all in the gutter, but some of us are looking at the stars." + - Oscar Wilde + + * debian/initramfs-tools.postrm: Use rm -f for removing the modules + file, in case it doesn't exist for some reason. (Ubuntu #13335) + Thanks to Colin Watson for the bug report! + + * mkinitramfs.8: Correct my email address to be jbailey@ubuntu.com + Document /etc/mkinitramfs/DSDT.aml + + * debian/initramfs-tools.postinst: Attempt to inherit RESUME settings + from initrd-tools. Also copy the DSDT from /etc/mkinitrd/DSDT to + /etc/mkinitramfs/DSDT.aml + + -- Jeff Bailey <jbailey@ubuntu.com> Wed, 10 Aug 2005 13:09:44 -0400 + +initramfs-tools (0.17) breezy; urgency=low + + "The public is wonderfully tolerant. It forgives everything except + genius." + - Oscar Wilde + + * debian/initramfs-tools.postinst: Get the name of the config file + right when seeding RESUME=. Also fix the sed expression. + Thanks to Matthew Garrett for noticing this! + + -- Jeff Bailey <jbailey@ubuntu.com> Wed, 10 Aug 2005 11:54:07 -0400 + +initramfs-tools (0.16) breezy; urgency=low + + "It is through art, and through art only, that we can realise our + perfection." + - Oscar Wilde + + * mkinitramfs: Make sure all relevant ide modules are included. + Add RESUME= support. + + * scripts/functions: Be silent when adding non-detected modules. + + * conf/mkinitramfs.conf: MODULES=most by default, BUSYBOX=y + (Non-busybox isn't supported now. It's not clear that it ever + will be). Add RESUME line for resuming from suspend-to-disk. + + * scripts/local-premount/suspend: New script for suspend-to-disk. + + * debian/control: Bump depends on busybox-cvs-initramfs to + 20040623-1ubuntu19. Add dependancy on lvm2. + Bump standards version to 3.6.2.0 (no-op) + + * debian/control: + Force version depend on lvm2 (>= 2.01.04-5) to make sure newer kernels + will boot. + Thanks for Andrew Mitchell for discovering this. + + * hooks/: New directory + + * debian/dirs: Move hooks to ... + * debian/initramfs-tools.install: ... here. + + * hooks/acpid: New file. + + * scripts/init-premount/acpid: New file + Thanks for the hint from Matthew Garrett for this. + + * debian/initramfs-tools.postinst: Add RESUME support on first install. + + * debian/mkinitramfs: Move functions to ... + * debian/hook-functions: ... here. + + * debian/initramfs-tools.install: Install hook-functions + + * mkinitramfs.8: New file. + Thanks to Maximilian Attems for contributing this! + + * scripts/local-top/md: Don't try to detect raid on non-existant devices + or on whole devices. Quiet other warning messages. + + * hook-functions: When generating initramfs, don't complain about missing + modules. + + -- Jeff Bailey <jbailey@ubuntu.com> Tue, 9 Aug 2005 23:35:08 -0400 + +initramfs-tools (0.15) breezy; urgency=low + + "Nothing looks so like innocence as an indiscretion." + - Oscar Wilde + + * mkinitramfs: Handle putting DSDT.aml into the initramfs + Add sata_nv to list of modules to import for main mode. + + * init: New scripts directory, init-premount for generic premount + handling (like usplash) + + * debian/dirs: Make the /etc version of this directory for user + addons. + + * debian/rules: Use prebuild, rather than debian-build-arch. + + -- Jeff Bailey <jbailey@ubuntu.com> Tue, 9 Aug 2005 11:29:10 -0400 + +initramfs-tools (0.14) breezy; urgency=low + + "The world is a stage, but the play is badly cast." + - Oscar Wilde + + * scripts/functions: Add scsi_boot_events and call it to load sd_mod + + * scripts/local-top/md: Autodetect raid level + + * scripts/local-top/lvm: Only activate the volumegroup required by + the root device. Don't bother with lvm if the root partition isn't + /dev/mapper/FOO. + + * scripts/functions: Fix ide_boot_events. This never worked, even + if I thought it did. + + * init: init variable should be lower case. Exported ROOT variable + should be upper case. + + -- Jeff Bailey <jbailey@ubuntu.com> Tue, 26 Jul 2005 20:30:57 -0400 + +initramfs-tools (0.13) breezy; urgency=low + + "We live in age when unnecessary things are our only necessities." + - Oscar Wilde + + * Use detailed logging now for debian/changelog. We have at least + three people hacking now, and details would probably be useful. + + * debian/TODO: Update + + * debian/dirs: Sort and add usr/share/initramfs-tools/hooks + + * debian/initramfs-tools.examples: Add docs/example_hook and + docs/example_hook_cpiogz + + * debian/initramfs-tools.install: Pretty Print. + + * debian/rules: Ensure that mkinitramfs is executable + + * docs/example_script: New file + + * init: Add concept of 'quiet', be verbose if not specified + + * mkinitramfs: Do not load script functions until needed + Clear up comments / documentation + Use DESTDIR instead of TMPDIR + Add ability to link in extra hunks into the cpio file + Cosmetic cleanups + + * scripts/functions: Add lsb stype log_FOO_msg functions + + * scripts/local: Add logging + + * scripts/nfs: Add logging + + Thanks to Karl Hegbloom for most of these patches! + + * debian/control: Get a much better description + + Thanks to Maximilian Attems for this! + + * scripts/functions: Add copy_exec function that copies a program + and all libraries that it depends on. + + * mkinitramfs: Use it + + * scripts/local-top/lvm: New file + + * mkinitramfs: Specify the modules to copy rather than mass copying + directories + + * scripts/functions: Always load ide-generic to cope with ide subsystem + suckage. + + -- Jeff Bailey <jbailey@ubuntu.com> Wed, 29 Jun 2005 23:50:56 +0000 + +initramfs-tools (0.12) breezy; urgency=low + + "I am not young enough to know everything." - Oscar Wilde + + * Don't complain if /etc/mkinitramfs/modules doesn't exist. + + * Make sure that raid1 is pulled in. + + * Include /etc/modprobe.d/aliases in the initramfs + + * Default to currently running kernel version. + Based on a patch from maximilian attems, thanks! + + * Handle module arguments in /etc/mkinitramfs/modules + + * Do hookscripts at generation time. Drop things into + /usr/share/initramfs-tools/hooks or /etc/mkinitramfs/hooks + + * Make sure local-bottom and nfs-bottom get created + Thanks to Karl Hegbloom for these three patches! + + * Prune stray echo from call_scripts + + * Load raid1 for now so that md setups will work. + + * Detect ide modules load + Thanks to Jeff Waugh for initial testing of this! + + -- Jeff Bailey <jbailey@ubuntu.com> Mon, 20 Jun 2005 23:05:04 +0000 + +initramfs-tools (0.11) breezy; urgency=low + + "Illusion is the first of all pleasures" - Oscar Wilde + + * Make the init much less noisy + + * Pull in all the dependancies for nfs and af_packet + + * Be compatible with misdocumented mkinitrd interface + + Thanks to Matt Zimmerman for the bug reports and testing! + + * Update debian/copyright to have the location of the bzr + archive + + -- Jeff Bailey <jbailey@ubuntu.com> Fri, 17 Jun 2005 21:23:25 +0000 + +initramfs-tools (0.10) breezy; urgency=low + + The "I can see you!" release. + + * Unconditionally require busybox. Might revert this eventually + but it's too much of a pain right now do this without + a reasonably environment + + * Use modprobe to load modules + + * Iterate through /sys/bus/pci and /sys/bus/usb and load drivers + based on their modalias + + * Start to use /sbin for things + + * Include depmod in the image. Use it at boot time. + + * Edit config example to show the modules that do need to be included + manually for this build. + + -- Jeff Bailey <jbailey@ubuntu.com> Fri, 17 Jun 2005 12:45:07 +0000 + +initramfs-tools (0.9) breezy; urgency=low + + * Be consistent about y/n vs. yes/no values for the readonly variable + + -- Matt Zimmerman <mdz@ubuntu.com> Thu, 16 Jun 2005 15:22:30 -0700 + +initramfs-tools (0.8) breezy; urgency=low + + The "We are one in the spirit..." release + + * Export the command line variables so that the various scripts + can see them. + + * Honour command line 'ro' or 'rw' settings for nfs. + + -- Jeff Bailey <jbailey@ubuntu.com> Tue, 14 Jun 2005 21:35:14 +0000 + +initramfs-tools (0.7) breezy; urgency=low + + The "CONFORM!" release. + + * Make command line arguments almost match mkinitrd. The -m argument + doesn't make any sense, so it's not supported. Add support for + overriding the confdir, and specifying version no longer expects -v. + + * Add sed and grep to the initramfs for now. Will prune these + eventually, but for now mdrun needs them. + + * Add mdadm and mdrun to the initramfs. + + * Add hookscript directories. + + * Call hookscripts + + Thanks to David Weinhall <tao@acc.umu.se> for the dependancy-based + hookscripts. + + -- Jeff Bailey <jbailey@ubuntu.com> Thu, 9 Jun 2005 17:08:01 +0000 + +initramfs-tools (0.6) breezy; urgency=low + + The "Sweep! .... Off!" release. + + * Source in the net-${DEVICE}.conf file to get IP address information. + + * Add commandline parameters for NFSROOT and BOOT. + + * Moving loading of boot functions to after commandline parsing. + + * Allow NFSROOT variable to be set to auto to pick up value from DHCP + Server. + + -- Jeff Bailey <jbailey@ubuntu.com> Wed, 1 Jun 2005 12:02:40 -0400 + +initramfs-tools (0.5) breezy; urgency=low + + The "Climbing to the horizons" release. + + * Update for newer udev, call "udevstart" rather than "udev udevstart" + + * /etc/mkinitramfs/modules should not be a conffile. + + * Support busybox. + + * Fix bug where -k would delete the tmp files, and otherwise it would keep + them. + + * Handle # for comments in the modules file. + + * arch:all, not arch:any + + -- Jeff Bailey <jbailey@ubuntu.com> Tue, 31 May 2005 15:17:56 -0400 + +initramfs-tools (0.4) breezy; urgency=low + + * First upload to Ubuntu. + + * Handle glibc compiled udev for now. + + -- Jeff Bailey <jbailey@ubuntu.com> Tue, 24 May 2005 14:30:07 +0000 + +initramfs-tools (0.3) unstable; urgency=low + + * Fix init and root variables + + -- Jeff Bailey <jbailey@ubuntu.com> Sat, 29 Jan 2005 17:49:08 -0500 + +initramfs-tools (0.2) unstable; urgency=low + + * Include the modules in the initrd + * Drop the .ko ending from the module loads. + * Actually chain to the sub scripts. + * kilbc is now named properly + * First cut of an NFS root implementation + + -- Jeff Bailey <jbailey@ubuntu.com> Fri, 28 Jan 2005 16:50:53 -0500 + +initramfs-tools (0.1) unstable; urgency=low + + * Initial Release. + + -- Jeff Bailey <jbailey@ubuntu.com> Thu, 27 Jan 2005 15:23:52 -0500 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..4986dea --- /dev/null +++ b/debian/control @@ -0,0 +1,23 @@ +Source: initramfs-tools +Section: utils +Priority: optional +Uploaders: Jeff Bailey <jbailey@ubuntu.com>, maximilian attems <maks@debian.org>, David Härdeman <david@hardeman.nu> +Maintainer: Debian kernel team <debian-kernel@lists.debian.org> +Build-Depends: debhelper (>= 4.1.0), cdbs +Standards-Version: 3.8.0 +Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git +Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git + +Package: initramfs-tools +Architecture: all +Recommends: busybox (>= 1:1.01-3) | busybox-initramfs +Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24) +Provides: linux-initramfs-tool +Description: tools for generating an initramfs + This package contains tools to create and boot an initramfs for packaged 2.6 + Linux kernel. The initramfs is a gzipped cpio archive. At boot time, the + kernel unpacks that archive into RAM, mounts and uses it as initial root file + system. The mounting of the real root file system occurs in early user space. + klibc provides utilities to setup root. Having the root on EVMS, MD, LVM2, + LUKS or NFS is also supported. + Any boot loader with initrd support is able to load an initramfs archive. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..b473ab4 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,29 @@ +This package was debianized by Jeff Bailey <jbailey@ubuntu.com> on +Thu, 27 Jan 2005 15:23:52 -0500. + +The current Debian maintainer is maximilian attems <maks@debian.org> + +The current ubuntu release can be found at: +http://archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/ + +The Debian tree is maintained with "git" at: +git://git.debian.org/git/kernel/initramfs-tools.git +http://git.debian.org/?p=kernel/initramfs-tools.git;a=shortlog + +Authors: Adam Conrad <adconrad@ubuntu.com>, + Ben Collins <bcollins@ubuntu.com>, + David Härdeman <david@hardeman.nu>, + Jeff Bailey <jbailey@ubuntu.com>, + maximilian attems <maks@debian.org>, + Scott James Remnant <scott@ubuntu.com> + +Copyright: 2005 - 2006 Adam Conrad + 2006 Ben Collins + 2005 - 2007 David Härdeman + 2005 Jeff Bailey + 2005 - 2007 maximilian attems + 2005 - 2006 Scott James Remnant + +License: + +PUBLIC DOMAIN diff --git a/debian/initramfs-tools.dirs b/debian/initramfs-tools.dirs new file mode 100644 index 0000000..a11bf32 --- /dev/null +++ b/debian/initramfs-tools.dirs @@ -0,0 +1,15 @@ +etc/initramfs-tools/scripts/init-bottom +etc/initramfs-tools/scripts/init-premount +etc/initramfs-tools/scripts/init-top +etc/initramfs-tools/scripts/local-bottom +etc/initramfs-tools/scripts/local-premount +etc/initramfs-tools/scripts/local-top +etc/initramfs-tools/scripts/nfs-bottom +etc/initramfs-tools/scripts/nfs-premount +etc/initramfs-tools/scripts/nfs-top +etc/initramfs-tools/hooks +etc/initramfs-tools/conf.d +usr/share/initramfs-tools/conf.d +usr/share/initramfs-tools/hooksconf.d +usr/share/initramfs-tools/modules.d +/var/lib/initramfs-tools diff --git a/debian/initramfs-tools.docs b/debian/initramfs-tools.docs new file mode 100644 index 0000000..5c374b1 --- /dev/null +++ b/debian/initramfs-tools.docs @@ -0,0 +1 @@ +HACKING diff --git a/debian/initramfs-tools.examples b/debian/initramfs-tools.examples new file mode 100644 index 0000000..9f67297 --- /dev/null +++ b/debian/initramfs-tools.examples @@ -0,0 +1,4 @@ +conf/modules +docs/example_script +docs/example_hook +docs/example_hook_cpiogz diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install new file mode 100644 index 0000000..fb1c088 --- /dev/null +++ b/debian/initramfs-tools.install @@ -0,0 +1,12 @@ +mkinitramfs usr/sbin +mkinitramfs-kpkg usr/sbin +init usr/share/initramfs-tools +scripts usr/share/initramfs-tools +conf/initramfs.conf etc/initramfs-tools +conf/update-initramfs.conf etc/initramfs-tools +hooks usr/share/initramfs-tools +hook-functions usr/share/initramfs-tools +conf/modules usr/share/initramfs-tools +update-initramfs usr/sbin +debian/script usr/share/bug/initramfs-tools +debian/lintian/initramfs-tools usr/share/lintian/overrides diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages new file mode 100644 index 0000000..0c88045 --- /dev/null +++ b/debian/initramfs-tools.manpages @@ -0,0 +1,6 @@ +mkinitramfs.8 +mkinitramfs-kpkg.8 +initramfs.conf.5 +initramfs-tools.8 +update-initramfs.8 +update-initramfs.conf.5 diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst new file mode 100644 index 0000000..6ecfe2e --- /dev/null +++ b/debian/initramfs-tools.postinst @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +if [ ! -e /etc/initramfs-tools/modules ]; then + cp /usr/share/initramfs-tools/modules /etc/initramfs-tools/ +fi + +# Regenerate initramfs whenever we go to dpkg state `installed' + +if [ "x$1" != xtriggered ] && \ + dpkg --compare-versions "$DPKG_RUNNING_VERSION" ge '1.14.5ubuntu10~~' +then + # this activates the trigger, if triggers are working + update-initramfs -u +else + # force it to actually happen + DPKG_MAINTSCRIPT_PACKAGE='' update-initramfs -u +fi + +#DEBHELPER# + diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm new file mode 100644 index 0000000..6896636 --- /dev/null +++ b/debian/initramfs-tools.postrm @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "x${1}" = "xpurge" ]; then + rm -f /etc/initramfs-tools/conf.d/resume + rm -f /etc/initramfs-tools/modules +fi + +#DEBHELPER# + diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst new file mode 100644 index 0000000..758b504 --- /dev/null +++ b/debian/initramfs-tools.preinst @@ -0,0 +1,65 @@ +#!/bin/sh + +set -e + +chrooted() { + # borrowed from udev's postinst + if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then + # the devicenumber/inode pair of / is the same as that of + # /sbin/init's root, so we're *not* in a chroot and hence + # return false. + return 1 + fi + return 0 +} + +case "$1" in + install) + mkdir -p /etc/initramfs-tools/conf.d + + # First time install. Can we autodetect the RESUME partition? + if [ -r /proc/swaps ]; then + RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') + if [ -x /sbin/vol_id ]; then + UUID=$(/sbin/vol_id -u "$RESUME" || true) + elif [ -x /lib/udev/vol_id ]; then + UUID=$(/lib/udev/vol_id -u "$RESUME" || true) + fi + if [ -n "$UUID" ]; then + RESUME="UUID=$UUID" + fi + fi + + # Inherit initrd-tools settings if possible. + if [ -e /etc/mkinitrd/mkinitrd.conf ]; then + . /etc/mkinitrd/mkinitrd.conf + fi + # write conf.d/resume if not in a chroot + if [ -n "${RESUME}" ] && ! chrooted; then + echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume + fi + + # Add initrd-tools modules, while trying to minimize prompting + if [ -e /etc/mkinitrd/modules ]; then + cp /etc/mkinitrd/modules /etc/initramfs-tools/ + sed -i \ + -e 's/\/etc\/mkinitrd\/modules: Kernel modules to load for initrd./List of modules that you want to include in your initramfs./g' \ + -e 's/mkinitrd/update-initramfs/g' \ + -e '/# This file should/,/one per line\./d' \ + -e 's/Comments begin with.*/Syntax: module_name [args ...]/' \ + -e 's/^# ext2$/# raid1/' \ + -e 's/^# wd io=0x300$/# sd_mod/' \ + -e '/^ide-generic/d' \ + -e '/^ide-disk/d' \ + -e '/^ext2/d' \ + -e '/^ext3/d' \ + /etc/initramfs-tools/modules + fi + + if [ -e /etc/mkinitrd/DSDT ]; then + cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml + fi + ;; +esac + +#DEBHELPER# diff --git a/debian/initramfs-tools.triggers b/debian/initramfs-tools.triggers new file mode 100644 index 0000000..860c664 --- /dev/null +++ b/debian/initramfs-tools.triggers @@ -0,0 +1 @@ +interest update-initramfs diff --git a/debian/lintian/initramfs-tools b/debian/lintian/initramfs-tools new file mode 100644 index 0000000..6d1b9c8 --- /dev/null +++ b/debian/lintian/initramfs-tools @@ -0,0 +1,3 @@ +initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/conf.d/ +initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/hooksconf.d/ +initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/modules.d/ diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2a5ae55 --- /dev/null +++ b/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk + +pre-build:: + chmod +x init mkinitramfs + chmod +x hooks/* + for x in `find scripts/ -maxdepth 1 -type d | tail -n+2`; do \ + chmod -R +x $$x; \ + done diff --git a/debian/script b/debian/script new file mode 100755 index 0000000..706a84d --- /dev/null +++ b/debian/script @@ -0,0 +1,39 @@ +#!/bin/sh + +exec >&3 + +echo "-- /proc/cmdline" +cat /proc/cmdline +echo + +echo "-- /proc/filesystems" +grep -v nodev /proc/filesystems +echo + +echo "-- lsmod" +lsmod +echo + +if [ -r /etc/kernel-img.conf ]; then + echo "-- /etc/kernel-img.conf" + cat /etc/kernel-img.conf + echo +fi + +if [ -r /etc/initramfs-tools/initramfs.conf ]; then + echo "-- /etc/initramfs-tools/initramfs.conf" + sed 's/#.*$//;/^[[:space:]]*$/d' /etc/initramfs-tools/initramfs.conf + echo +fi + +if [ -r /etc/crypttab ]; then + echo "-- /etc/crypttab" + cat /etc/crypttab + echo +fi + +if grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ; then + echo "-- /sys/block" + ls /sys/block + echo +fi diff --git a/docs/example_hook b/docs/example_hook new file mode 100644 index 0000000..a0d015a --- /dev/null +++ b/docs/example_hook @@ -0,0 +1,114 @@ +#!/bin/sh + +# +# This is an example hook script. It will be run by 'mkinitramfs' +# when it creates the image. It's job is to decide which files to +# install, then install them into the staging area, where the +# initramfs is being created. This happens when a new 'linux-image' +# package is installed, or when the administrator runs 'mkinitramfs' +# by hand to update an initramfs image. +# +# TODO: What about the case where you install something that should be +# added to the initramfs, but the linux-image it relates to has +# already been installed previously? Does this happen often +# enough that it needs to be handled? How can it be handled? +# +# * Think about the 'usplash'. The initramfs will need to be +# updated if a theme change or update is desired. Maybe it +# should not be totally automatic, but offered on upgrade +# predicated on a user response to a debconf question? That +# issue needs to be explored and a solution specified. +# +# * Do not assume that any needed subdirectories have been created +# yet, but don't bail out if they are already there. +# +# * All of the standard system tools are available, of course, since +# this hook is running in the real system, not the initramfs. +# +# * TODO: ... ? Anything else to tell them in this bullet-list? +# + +# +# The environment contains at least: +# +# CONFDIR -- usually /etc/mkinitramfs, can be set on mkinitramfs +# command line. +# +# DESTDIR -- The staging directory where we are building the image. +# +# TODO: Decide what environment variables are meaningful and defined +# in this context, then document them as part of the interface. +# +# TODO: May need a version_compare function for comparison of VERSION? + + +# +# List the soft prerequisites here. This is a space separated list of +# names, of scripts that are in the same directory as this one, that +# must be run before this one can be. +# +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + + +# You can do anything you need to from here on. +# + +# Source the optional 'hook-functions' scriptlet, if you need the +# functions defined within it. Read it to see what is available to +# you. It contains functions for copying dynamically linked program +# binaries, and kernel modules into the DESTDIR. +# +. /usr/share/initramfs-tools/hook-functions + + +# If this hook script is a conffile (and thus stored in +# /etc/mkinitramfs/hooks), it must take care to do the right thing +# when the package containing it is removed but not purged. There of +# course may be other reasons to have custom logic deciding what to +# install. The version variable may be useful for this. +# +if [ -x /usr/bin/myprog ]; then + copy_exec /usr/bin/myprog usr/bin +fi + +# To accompany this, there should usually be a script for inside the +# initramfs named something like: +# +# "/etc/mkinitramfs/local-premount/myprog" +# +# ... and it should do what is necessary to have 'myprog' get run +# inside the early runtime environment. + +# Handle an error: +# +if [ -n "$an_error_occured" ]; +then + # + # TODO: Do we need 'warn()', 'error()', and/or 'fatal()' for this? + # + echo "An error occured in $0: $an_error_occured" >&2 + exit 1 + # + # TODO: Decide if different error codes are meaningful, what they + # mean, and what the semantics of them are wrt 'mkinitramfs' + # pass or fail. Consider naming the error values with + # mnemonic symbols rather than magic numbers. They may or + # may not be the same set of errors as the set for + # in-initramfs scripts. + # +fi + +exit 0 diff --git a/docs/example_hook_cpiogz b/docs/example_hook_cpiogz new file mode 100644 index 0000000..f3e44d9 --- /dev/null +++ b/docs/example_hook_cpiogz @@ -0,0 +1,84 @@ +#!/bin/sh + +# +# The environment contains at least: +# +# CONFDIR -- usually /etc/mkinitramfs, can be set on mkinitramfs +# command line. +# +# DESTDIR -- The staging directory where we are building the image. +# +# TODO: Decide what environment variables are meaningful and defined +# in this context, then document them as part of the interface. +# +# TODO: Write a common header for these examples or move this +# documentation to a man page and reference it here. :-) +# + +# +# List the soft prerequisites here. This is a space separated list of +# names, of scripts that are in the same directory as this one, that +# must be run before this one can be. +# +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# +# Source the 'hook-functions' scriptlet (for 'catenate_cpiogz'): +# +. /usr/share/initramfs-tools/hook-functions + +# +# Lets pretend it has a conffile (think debconf), and we source it +# here. Don't make debconf lookup calls here. The postinst for the +# package owning this hook script should have done that and configured +# the "/etc/default/conffile" already. +# +# TODO: How does the package ensure that it's installed BEFORE the +# corresponding 'linux-image' package? Can it declare that, in +# the case where it's an add-on that the 'linux-image' is not +# aware of? This might be an apt and dpkg issue. +# +# * Eg. an optional usplash or suspend2ui_fbsplash package. +# +. /etc/default/mypackage-initramfs + +# +# Also pretend that we only include our initramfs overlay if an opion +# is not "no", and the 'linux-image' package we are generating this +# initramfs for matches the version this script's package is designed +# for. Just for example; pretend this example mkinitramfs hook script +# is part of a 'linux-image' or 'xxx-modules' package. +# +if [ "$MYOPTION" != "no" -a "$version" = "2.6.12+ss2.1.9.1" ]; then + catenate_cpiogz /usr/lib/mypackage/initramfs.cpio.gz +fi + +# +# In this case, there does not have to be an (eg.): +# +# "/etc/mkinitramfs/init-top/mypackage" +# +# ... since that script is probably inside of the initramfs overlay +# already. If it's a conffile though, it does not belong in there, +# and should be placed in the appropriate location inside of +# "/etc/mkinitramfs". Remember that if it needs access to the +# settings in our "/etc/default/mypackage-initramfs", then that file +# must also get copied into a location inside of ${DESTDIR} by this +# hook script in order to make it available inside of the initramfs +# environment. +# + +exit 0 diff --git a/docs/example_script b/docs/example_script new file mode 100644 index 0000000..d7f407f --- /dev/null +++ b/docs/example_script @@ -0,0 +1,90 @@ +#!/bin/sh + +# +# This script is run inside of the initramfs environment during the +# system boot process. It is installed there by 'mkinitramfs'. The +# package that owns it may opt to install it in either an appropriate +# location under "/usr/share/initramfs-tools/scripts/", or a similar +# location under "/etc/mkinitramfs/scripts/", depending upon whether +# it should be considered to be a user modifiable conffile or not. +# +# TODO: How do we deal with the case where the package that installed +# this has been removed but not purged, if we always arbitrarily +# copy all of these scripts into the initramfs? +# +# * The available toolset is limited inside this environment... +# +# TODO: document that toolset in the man page. +# +# * /dev, /proc, and /sys are already mounted. / is a ?? ro/rw +# filesystem... etc. more documentation. +# +# * It is expected that /proc and /sys will be umounted before +# changing over to the real root file system, so you must not keep +# any files open on them beyond these scripts. +# +# * You may like to strip these documentation comments from this +# example if you take it for a template, to save a little space in +# the initramfs, since nobody will ever read it from inside of +# there anyhow. +# + +# +# The environment contains at least the following variables: +# +# TODO: Decide what environment variables are meaningful and defined +# in this context, then document them as part of the interface. +# +# Because this script will be run as a full separate process, rather +# than sourced inside the context of the driver script, if it needs to +# pass information to another script that may run after it, it must do +# so by writing data to a file location known to both scripts. Simply +# setting an environment variable will not work. +# + +# +# List the soft prerequisites here. This is a space separated list of +# names, of scripts that are in the same directory as this one, that +# must be run before this one can be. +# +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Do the work here. + +echo "Got here!" + +# Handle an error: + +if [ -n "$an_error_occured" ]; +then + # + # TODO: Do we need 'warn()', 'error()', and/or 'fatal()' for this? + # I think we ultimately do, and that they need to be in their own + # well-documented location so that an overlay can override them. + # Think 'usplash' progress updates. + # + echo "An error occured in $0: $an_error_occured" >&2 + exit 1 + # + # TODO: Decide if different error codes are meaningful, what they + # mean, and what the semantics of them are wrt 'init' pass + # or panic. Consider naming the error values with mnemonic + # symbols rather than magic numbers. + # +fi + +exit 0 + diff --git a/hook-functions b/hook-functions new file mode 100644 index 0000000..e9f2368 --- /dev/null +++ b/hook-functions @@ -0,0 +1,457 @@ +# -*- shell-script -*- + +catenate_cpiogz() { + # Sanity check + if [ ! -e "${1}" ]; then + echo "W:catenate_cpiogz: arg1='${1}' does not exist." >&2 + return + fi + + cat "${1}" >>"${__TMPCPIOGZ}" +} + +force_load() +{ + manual_add_modules ${@} + echo "${@}" >>"${DESTDIR}/conf/modules" +} + +# Takes a file containing a list of modules to be added as an +# argument, figures out dependancies, and adds them. +# +# Input file syntax: +# +# # comment +# modprobe_module_name [args ...] +# [...] +# +add_modules_from_file() +{ + # Sanity check + if [ ! -e "${1}" ]; then + echo "W:add_modules_from_file: arg1='${1}' does not exist." >&2 + return + fi + + sed -e '/^#/d' ${1} | while read module rest; do + force_load "${module}" "${rest}" + done +} + +# Add dependent modules + eventual firmware +manual_add_modules() +{ + local mam_x firmwares firmware + + for mam_x in $(modprobe --set-version="${version}" --ignore-install \ + --show-depends "${1}" 2>/dev/null | awk '/^insmod/ { print $2 }'); do + # Prune duplicates + if [ -e "${DESTDIR}/${mam_x}" ]; then + continue + fi + + mkdir -p "${DESTDIR}/$(dirname "${mam_x}")" + ln -s "${mam_x}" "${DESTDIR}/$(dirname "${mam_x}")" + if [ "${verbose}" = "y" ]; then + echo "Adding module ${mam_x}" + fi + + # Add firmware files if necessary + firmwares=$(modinfo -F firmware "${mam_x}") + if [ -z "${firmwares}" ]; then + continue + fi + for firmware in $firmwares; do + if [ -e "${DESTDIR}/lib/firmware/${firmware}" ]; then + continue + fi + + # Only print warning for missing fw of loaded module + # or forced loaded module + if [ ! -e "/lib/firmware/${firmware}" ]; then + if grep -q "^$(basename "${mam_x}" .ko)" \ + /proc/modules \ + || grep -q "^$(basename "${mam_x}" .ko)" \ + "${CONFDIR}/modules"; then + echo "W: Possible missing firmware /lib/firmware/${firmware} for module $(basename ${mam_x} .ko)" >&2 + fi + continue + fi + + if [ ! -e "${DESTDIR}/lib/udev/firmware.agent" ] \ + && [ -e "/lib/udev/firmware.agent" ]; then + copy_exec /lib/udev/firmware.agent + fi + + copy_exec "/lib/firmware/${firmware}" + if [ "${verbose}" = "y" ]; then + echo "Adding firmware ${firmware}" + fi + done + done +} + +# $1 is the source path (e.g. /usr/bin/time) +# $2 is the relative destination (e.g. /usr or /usr/time) +# +# The destination is interpreted in the same way "cp" would, meaning +# (assuming /bin is a directory): +# +# "copy_exec /usr/bin/time /bin" -> /bin/time +# "copy_exec /usr/bin/time /bin/mytime" -> /bin/mytime +# +# If $2 is left out, the same destination path as for the source arg will +# be used and directories will be created as needed, so: +# +# "copy_exec /usr/bin/time" -> /usr/bin/time +# +copy_exec() { + local source target destination final_destination x nonoptlib + local libname dirname + + source="${1}" + if [ -n "${2}" ]; then + target="${2}" + else + if [ ! -e "${DESTDIR}/$(dirname "${1}")" ]; then + mkdir -p "${DESTDIR}/$(dirname "${1}")" + fi + target="${1}" + fi + + if [ -d "${DESTDIR}/${target}" ]; then + destination="${target}/$(basename "${source}")" + else + destination="${target}" + fi + final_destination="${DESTDIR}/${destination}" + + if [ -L "$final_destination" ]; then + if [ $(readlink "${final_destination}") != "${source}" ]; then + echo "W:copy_exec: Not copying ${source} to \$DESTDIR${destination}, which is already a copy of $(readlink ${final_destination})" >&2 + return + fi + else + ln -s ${source} ${DESTDIR}/${destination} + if [ "${verbose}" = "y" ]; then + echo "Adding binary ${source}" + fi + fi + + # Copy the dependant libraries + for x in $(ldd ${source} 2>/dev/null | sed -e ' + /\//!d; + /linux-gate/d; + /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; + s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do + + # Try to use non-optimised libraries where possible. + # We assume that all HWCAP libraries will be in tls. + nonoptlib=$(echo "${x}" | sed -e 's#/lib/\(tls\|i686\).*/\(lib.*\)#/lib/\2#') + + if [ -e "${nonoptlib}" ]; then + x="${nonoptlib}" + fi + + libname=$(basename "${x}") + dirname=$(dirname "${x}") + + mkdir -p "${DESTDIR}/${dirname}" + if [ ! -e "${DESTDIR}/${dirname}/${libname}" ]; then + ln -s "${x}" "${DESTDIR}/${dirname}" + if [ "${verbose}" = "y" ]; then + echo "Adding library ${x}" + fi + fi + done +} + +# Copy entire subtrees to the initramfs +copy_modules_dir() +{ + local x_mod + + if ! [ -d "${MODULESDIR}/${1}" ]; then + return; + fi + if [ "${verbose}" = "y" ]; then + echo "Copying module directory ${1}" + fi + for x_mod in $(find "${MODULESDIR}/${1}" -name '*.ko' -print); do + manual_add_modules $(basename ${x_mod} .ko) + done +} + +# walk /sys for relevant modules +sys_walk_mod_add() +{ + local driver_path module + device_path="$1" + + while [ "${device_path}" != "/sys" ]; do + sys_walk_modalias ${device_path} + driver_path="$(readlink -f ${device_path}/driver)" + if [ -e "$driver_path" ]; then + module="$(basename $(readlink -f $driver_path))" + if [ -n "${module}" ]; then + force_load "${module}" + fi + fi + device_path="$(dirname ${device_path})" + done +} + +# walk /sys for relevant modalias +sys_walk_modalias() +{ + local device_path modalias + + device_path="$(dirname "${1}")" + device_path="$(dirname "${device_path}")" + if [ -e "${device_path}/modalias" ]; then + modalias=$(cat "${device_path}/modalias") + fi + + if [ -n "${modalias}" ]; then + force_load "${modalias}" + fi +} + +# find and only copy root relevant modules +dep_add_modules() +{ + local block minor root FSTYPE root_dev_path x + + # findout root block device + fstype + eval "$(mount | awk '/\/dev\// {if ($3 == "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')" + if [ "${root}" = "/dev/root" ] ; then + root="/dev/disk/by-uuid/"$(/lib/udev/vol_id --uuid ${root}) 2>/dev/null + fi + root="$(readlink -f ${root})" + + # find out real rootfs on auto type + if [ "${FSTYPE}" = "auto" ]; then + eval "$(/usr/lib/klibc/bin/fstype ${root})" + fi + + # check that fstype rootfs recognition + if [ "${FSTYPE}" = "unknown" ]; then + echo "mkinitramfs: unknown fstype on root ${root}" + echo "mkinitramfs: workaround is MODULES=most" + echo "mkinitramfs: Error please report bug on initramfs-tools" + exit 1 + fi + + # Add rootfs + manual_add_modules "${FSTYPE}" + + # lvm or luks root + if [ "${root#/dev/mapper/}" != "${root}" ]; then + minor=$((0x$(stat --format "%T" ${root}) % 256)) + block=$(ls -1 /sys/block/dm-${minor}/slaves | head -n 1) + # lvm on luks or luks on lvm + if [ "${block#dm-}" != "${block}" ]; then + block=$(ls -1 /sys/block/${block}/slaves | head -n 1) + fi + # lvm on md or luks on md + if [ "${block#md}" != "${block}" ]; then + block=$(awk "/^${block}/{print substr(\$5, 1, 4); exit}" \ + /proc/mdstat) + fi + block=${block%[0-9]*} + # md root new naming scheme /dev/md/X + elif [ "${root#/dev/md/}" != "${root}" ]; then + root=${root#/dev/md/} + block=$(awk "/^md${root}/{print substr(\$5, 1, 3); exit}" \ + /proc/mdstat) + # md root /dev/mdX + elif [ "${root#/dev/md}" != "${root}" ]; then + root=${root#/dev/} + block=$(awk "/^${root}/{print substr(\$5, 1, 3); exit}" \ + /proc/mdstat) + # classical root device + else + block=${root#/dev/} + block=${block%[0-9]*} + fi + + # Error out if /sys lack block dev + if [ -z "${block}" ] || [ ! -e /sys/block/${block} ]; then + echo "mkinitramfs: missing ${block} root ${root} /sys entry" + echo "mkinitramfs: workaround is MODULES=most" + echo "mkinitramfs: Error please report the bug" + exit 1 + fi + + # sys walk ATA + root_dev_path=$(readlink -f /sys/block/${block}/device) + sys_walk_mod_add ${root_dev_path} + + # catch old-style IDE + if [ -e /sys/bus/ide/devices/ ]; then + sys_walk_modalias ${root_dev_path} + manual_add_modules ide-disk + manual_add_modules ide-cd + fi + + if [ -e /sys/bus/scsi/devices/ ]; then + manual_add_modules sd_mod + fi + + if [ -e /sys/bus/i2o/devices/ ]; then + force_load i2o_block + force_load i2o_config + fi + + if [ -e /sys/bus/ps3_system_bus/ ]; then + for x in ps3disk ps3rom ps3-gelic ps3_sys_manager; do + manual_add_modules "${x}" + done + fi + + if [ -e /sys/bus/vio/ ]; then + for x in sunvnet sunvdc; do + manual_add_modules "${x}" + done + fi +} + + +# The modules "most" classes added per default to the initramfs +auto_add_modules() +{ + case "$1" in + base) + for x in ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 \ + ext3 ext4 ext4dev isofs jfs nfs reiserfs udf xfs af_packet \ + atkbd i8042 virtio_pci; do + manual_add_modules "${x}" + done + ;; + net) + for x in 3c59x 8139cp 8139too 8390 atl1 b44 bmac \ + bnx2 cxgb3 defxx dl2k e100 e1000 e1000e ehea epic100 \ + ep93xx_eth eql fealnx famachi forcedeth gelic_net \ + hp100 igb ipg mace mv643xx_eth myri10ge \ + natsemi ne2k-pci netconsole niu ns83820 pcnet32 qla3xxx \ + r8169 s2io sis900 skge sky2 slhc smc911x starfire \ + sundance sungem sungem_phy sunhme sunvnet tg3 tlan de2104x \ + de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb \ + typhon via-rhine via-velocity yellowfin; do + manual_add_modules "${x}" + done + ;; + ide) + copy_modules_dir kernel/drivers/ide + ;; + mmc) + copy_modules_dir kernel/drivers/mmc + ;; + scsi) + copy_modules_dir kernel/drivers/scsi + for x in mptfc mptsas mptscsih mptspi zfcp; do + manual_add_modules "${x}" + done + ;; + ata) + copy_modules_dir kernel/drivers/ata + ;; + block) + copy_modules_dir kernel/drivers/block + for x in dasd_diag_mod; do + manual_add_modules "${x}" + done + ;; + # FIXME: can be removed after Lenny release + ieee1394) + for x in ohci1394 sbp2; do + manual_add_modules "${x}" + done + ;; + firewire) + for x in firewire-ohci firewire-sbp2; do + manual_add_modules "${x}" + done + ;; + i2o) + for x in i2o_block; do + manual_add_modules "${x}" + done + ;; + dasd) + for x in dasd_eckd_mod dasd_fba_mod; do + manual_add_modules "${x}" + done + ;; + *) + auto_add_modules base + auto_add_modules net + auto_add_modules ide + auto_add_modules scsi + auto_add_modules block + auto_add_modules ata + auto_add_modules i2o + auto_add_modules dasd + auto_add_modules ieee1394 + auto_add_modules firewire + auto_add_modules mmc + ;; + esac +} + +usage() +{ + cat >&2 << EOF + +Usage: ${0} [OPTION]... -o outfile [version] + +Options: + -d confdir Specify an alternative configuration directory. + -k Keep temporary directory used to make the image. + -o outfile Write to outfile. + -r root Override ROOT setting in mkinitrd.conf. + +See mkinitramfs(8) for further details. +EOF + exit 1 + +} + +# minimal supported kernel version +check_minkver() +{ + local curversion initdir DPKG_ARCH minversion cm_x tmp + + curversion="${1}" + initdir="${2}" + if [ -z "${initdir}" ]; then + DPKG_ARCH=$(dpkg --print-installation-architecture) + case ${DPKG_ARCH} in + ia64|hppa) + minversion="2.6.15" + ;; + *) + minversion="2.6.12" + ;; + esac + if dpkg --compare-versions "${curversion}" lt "${minversion}"; then + echo "W: kernel ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + return 0 + fi + set_initlist + for cm_x in ${initlist}; do + # sed: keep last line starting with MINKVER=, + # remove MINKVER= and trailing space + minver=$(sed '/^MINKVER=/!d;$!d;s/^MINKVER=//;s/[[:space:]]*$//' "${initdir}/${cm_x}") + if [ -z "${tmp}" ]; then + continue + elif dpkg --compare-versions "${curversion}" lt "${minver}"; then + echo "W: ${cm_x} hook script requires at least kernel version ${minver}" >&2 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + done +} diff --git a/hooks/kernelextras b/hooks/kernelextras new file mode 100755 index 0000000..714e9a9 --- /dev/null +++ b/hooks/kernelextras @@ -0,0 +1,44 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hooks for loading extra kernel bits into the initramfs + +. /usr/share/initramfs-tools/hook-functions + +fbcon=n + +for x in ${MODULESDIR}/initrd/*; do + x=${x##*/} + x=${x%.*} + case ${x} in + '*') + break + ;; + *fb) + fbcon=y + ;; + esac + + force_load ${x} +done + +# And add vga16fb for usplash to use as well +manual_add_modules vga16fb + +if [ ${fbcon} = "y" ]; then + force_load fbcon +fi diff --git a/hooks/keymap b/hooks/keymap new file mode 100755 index 0000000..a2b1b08 --- /dev/null +++ b/hooks/keymap @@ -0,0 +1,55 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hook to load keymaps into the initramfs if requested by KEYMAP="y" +if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then + exit 0 +fi + +# Step 1 - Basic tools +if [ ! -x /bin/loadkeys ] || [ ! -r /etc/console/boottime.kmap.gz ]; then + exit 0 +fi + +. /usr/share/initramfs-tools/hook-functions +copy_exec /bin/loadkeys /bin +cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc/ + +# Step 2 - Check for UTF8 console +if [ ! -x /usr/bin/kbd_mode ]; then + exit 0 +fi + +if [ -r /etc/environment ]; then + env="/etc/environment" +elif [ -r /etc/default/locale ]; then + env="/etc/default/locale" +else + exit 0 +fi + +for var in LANG LC_ALL LC_CTYPE; do + value=$(egrep "^[^#]*${var}=" $env | tail -n1 | cut -d= -f2) + eval $var=$value +done + +charmap=$(LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap) +if [ "$charmap" = "UTF-8" ]; then + copy_exec /usr/bin/kbd_mode /bin +fi +exit 0 + diff --git a/hooks/legacylvm b/hooks/legacylvm new file mode 100755 index 0000000..9121f90 --- /dev/null +++ b/hooks/legacylvm @@ -0,0 +1,28 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# FIXME: Remove this hook after Lenny releases +. /usr/share/initramfs-tools/hook-functions + +if [ -x /sbin/vgchange ] && [ -d /lib/lvm-200 ] \ + && [ ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then + copy_exec /lib/lvm-200/vgchange /sbin + for x in dm_mod dm_snapshot dm_mirror; do + manual_add_modules ${x} + done +fi +exit 0 diff --git a/hooks/thermal b/hooks/thermal new file mode 100755 index 0000000..ece7243 --- /dev/null +++ b/hooks/thermal @@ -0,0 +1,43 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hooks for loading thermal bits into the initramfs + +. /usr/share/initramfs-tools/hook-functions + +case "$DPKG_ARCH" in +# copy the right modules +powerpc|ppc64) + manual_add_modules therm_pm72 + manual_add_modules windfarm_core + manual_add_modules windfarm_cpufreq_clamp + manual_add_modules windfarm_lm75_sensor + manual_add_modules windfarm_max6690_sensor + manual_add_modules windfarm_pid + manual_add_modules windfarm_pm112 + manual_add_modules windfarm_pm81 + manual_add_modules windfarm_pm91 + manual_add_modules windfarm_smu_controls + manual_add_modules windfarm_smu_sat + manual_add_modules windfarm_smu_sensors + manual_add_modules i2c-powermac + ;; +i386|amd64|ia64) + manual_add_modules fan + manual_add_modules thermal + ;; +esac diff --git a/hooks/udevhelper b/hooks/udevhelper new file mode 100755 index 0000000..f86e4af --- /dev/null +++ b/hooks/udevhelper @@ -0,0 +1,36 @@ +#!/bin/sh +# FIXME: kill after lenny release +# needed for UUID root and partial etch upgrades +# +PREREQ="udev" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +# should never happen +if [ ! -e $DESTDIR/lib/udev/ ]; then + exit 0 +fi + +# fixed udev hook +if [ -e $DESTDIR/lib/udev/ ] && [ -e $DESTDIR/lib/udev/hotplug.functions ]; then + exit 0 +fi + +cp /lib/udev/hotplug.functions $DESTDIR/lib/udev/ +for program in /lib/udev/*_id; do + copy_exec $program /lib/udev/ +done +exit 0 @@ -0,0 +1,215 @@ +#!/bin/sh + +echo "Loading, please wait..." + +[ -d /dev ] || mkdir -m 0755 /dev +[ -d /root ] || mkdir -m 0700 /root +[ -d /sys ] || mkdir /sys +[ -d /proc ] || mkdir /proc +[ -d /tmp ] || mkdir /tmp +mkdir -p /var/lock +mount -t sysfs -o nodev,noexec,nosuid none /sys +mount -t proc -o nodev,noexec,nosuid none /proc + +# Note that this only becomes /dev on the real filesystem if udev's scripts +# are used; which they will be, but it's worth pointing out +tmpfs_size="10M" +if [ -e /etc/udev/udev.conf ]; then + . /etc/udev/udev.conf +fi +mount -t tmpfs -o size=$tmpfs_size,mode=0755 udev /dev +[ -e /dev/console ] || mknod -m 0600 /dev/console c 5 1 +[ -e /dev/null ] || mknod /dev/null c 1 3 +> /dev/.initramfs-tools +mkdir /dev/.initramfs + +# Export the dpkg architecture +export DPKG_ARCH= +. /conf/arch.conf + +# Set modprobe env +export MODPROBE_OPTIONS="-qb" + +# Export relevant variables +export ROOT= +export ROOTDELAY= +export ROOTFLAGS= +export ROOTFSTYPE= +export break= +export init=/sbin/init +export quiet=n +export readonly=y +export rootmnt=/root +export debug= +export panic= +export blacklist= +export resume_offset= + +# Bring in the main config +. /conf/initramfs.conf +for conf in conf/conf.d/*; do + [ -f ${conf} ] && . ${conf} +done +. /scripts/functions + +# Parse command line options +for x in $(cat /proc/cmdline); do + case $x in + init=*) + init=${x#init=} + ;; + root=*) + ROOT=${x#root=} + case $ROOT in + LABEL=*) + ROOT="/dev/disk/by-label/${ROOT#LABEL=}" + ;; + UUID=*) + ROOT="/dev/disk/by-uuid/${ROOT#UUID=}" + ;; + /dev/nfs) + [ -z "${BOOT}" ] && BOOT=nfs + ;; + esac + ;; + rootflags=*) + ROOTFLAGS="-o ${x#rootflags=}" + ;; + rootfstype=*) + ROOTFSTYPE="${x#rootfstype=}" + ;; + rootdelay=*) + ROOTDELAY="${x#rootdelay=}" + case ${ROOTDELAY} in + *[![:digit:].]*) + ROOTDELAY= + ;; + esac + ;; + nfsroot=*) + NFSROOT="${x#nfsroot=}" + ;; + ip=*) + IPOPTS="${x#ip=}" + ;; + boot=*) + BOOT=${x#boot=} + ;; + resume=*) + RESUME="${x#resume=}" + ;; + resume_offset=*) + resume_offset="${x#resume_offset=}" + ;; + noresume) + noresume=y + ;; + panic=*) + panic="${x#panic=}" + case ${panic} in + *[![:digit:].]*) + panic= + ;; + esac + ;; + quiet) + quiet=y + ;; + ro) + readonly=y + ;; + rw) + readonly=n + ;; + debug) + debug=y + quiet=n + exec >/tmp/initramfs.debug 2>&1 + set -x + ;; + debug=*) + debug=y + quiet=n + set -x + ;; + break=*) + break=${x#break=} + ;; + break) + break=premount + ;; + blacklist=*) + blacklist=${x#blacklist=} + ;; + esac +done + +if [ -z "${noresume}" ]; then + export resume=${RESUME} +else + export noresume +fi + +depmod -a +maybe_break top + +# Don't do log messages here to avoid confusing usplash +run_scripts /scripts/init-top + +maybe_break modules +log_begin_msg "Loading essential drivers" +load_modules +log_end_msg + +maybe_break premount +[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-premount" +run_scripts /scripts/init-premount +[ "$quiet" != "y" ] && log_end_msg + +maybe_break mount +log_begin_msg "Mounting root file system" +. /scripts/${BOOT} +parse_numeric ${ROOT} +maybe_break mountroot +mountroot +log_end_msg + +maybe_break bottom +[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom" +run_scripts /scripts/init-bottom +[ "$quiet" != "y" ] && log_end_msg + +# Move virtual filesystems over to the real filesystem +mount -n -o move /sys ${rootmnt}/sys +mount -n -o move /proc ${rootmnt}/proc + +# Check init bootarg +if [ -n "${init}" ] && [ ! -x "${rootmnt}${init}" ]; then + echo "Target filesystem doesn't have ${init}." + init= +fi + +# Search for valid init +if [ -z "${init}" ] ; then + for init in /sbin/init /etc/init /bin/init /bin/sh; do + if [ ! -x "${rootmnt}${init}" ]; then + continue + fi + break + done +fi + +# No init on rootmount +if [ ! -x "${rootmnt}${init}" ]; then + panic "No init found. Try passing init= bootarg." +fi + +# Confuses /etc/init.d/rc +if [ -n ${debug} ]; then + unset debug +fi + +# Chain to real filesystem +maybe_break init +exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console +panic "Could not execute run-init." diff --git a/initramfs-tools.8 b/initramfs-tools.8 new file mode 100644 index 0000000..5e1f083 --- /dev/null +++ b/initramfs-tools.8 @@ -0,0 +1,477 @@ +.TH INITRAMFS-TOOLS 8 "2008/07/05" "" "mkinitramfs script overview" + +.SH NAME +initramfs-tools \- an introduction to writing scripts for mkinitramfs + +.SH DESCRIPTION +initramfs-tools has one main script and two different sets of subscripts which +will be used during different phases of execution. Each of these will be +discussed separately below with the help of an imaginary tool which performs a +frobnication of a lvm partition prior to mounting the root partition. + +Valid boot and hook scripts names consist solely of alphabetics, numerics +and underscores. Other scripts are discarded. + +.SS Hook scripts +These are used when an initramfs image is created and not included in the +image itself. They can however cause files to be included in the image. + +.SS Boot scripts +These are included in the initramfs image and normally executed during +kernel boot in the early user-space before the root partition has been +mounted. + +.SH INIT SCRIPT +The script which is executed first and is in charge of running all other +scripts can be found in /usr/share/initramfs-tools/init. It takes a number of +arguments which influence the boot procedure: + +.SS Boot options + +The init and root are usually passed by the boot loader for local boot. +The other parameters are optional. + +.TP +\fB\fI init +the binary to hand over execution to on the root fs after the initramfs scripts are done. + +.TP +\fB\fI root +the device node to mount as the root file system. +The recommended usage is to specify the UUID as followed "root=UUID=xxx". +As normal device names are not stable and may change depending on the +boot order. + +.TP +\fB\fI rootdelay +set delay in seconds. Determines how long mountroot waits for root to appear. + +.TP +\fB\fI rootflags +set the file system mount option string. + +.TP +\fB\fI rootfstype +set the root file system type. + +.TP +\fB\fI nfsroot +can be either "auto" to try to get the relevant information from DHCP or a +string of the form NFSSERVER:NFSPATH or NFSSERVER:NFSPATH:NFSOPTS. +Use root=/dev/nfs for NFS to kick to in. + +.TP +\fB\fI ip +tells how to configure the ip address. Allows to specify an different +NFS server than the DHCP server. See Documentation/nfsroot.txt in +any recent Linux source for details. Optional paramater for NFS root. + +.TP +\fB\fI cryptopts +passes the args for cryptoroot. Set by the cryptsetup boot hooks. + +.TP +\fB\fI boot +either local or NFS (affects which initramfs scripts are run, see the "Subdirectories" section under boot scripts). + +.TP +\fB\fI resume +On install initramfs-tools tries to autodetect the resume partition. On success +the RESUME variable is written to /etc/initramfs-tools/conf.d/resume. +The boot variable noresume overrides it. + +.TP +\fB\fI resume_offset +Specify the offset from the partition given by "resume=" at which the swap +header of the swap file is located. + +.TP +\fB\fI quiet +reduces the amount of text output to the console during boot. + +.TP +\fB\fI ro +mounts the rootfs read-only. + +.TP +\fB\fI rw +mounts the rootfs read-write. + +.TP +\fB\fI blacklist +disables load of specific modules. +Use blacklist=module1,module2,module3 bootparameter. + +.TP +\fB\fI panic +sets an timeout on panic. +panic=<sec> is a documented security feature: it disables the debug shell. + +.TP +\fB\fI debug +generates lots of output. It writes a log to /tmp/initramfs.debug. +Instead when invoked with an arbitrary argument output is written to console. +Use for example "debug=vc". + +.TP +\fB\fI break +spawns a shell in the initramfs image at chosen run-time +(top, modules, premount, mount, mountroot, bottom, init). +The default is premount without any arg. +Beware that if both "panic" and "break" are present, +initramfs will not spawn any shells but reboot instead. + +.TP +\fB\fI all_generic_ide +loads generic IDE/ATA chipset support on boot. + + +.SH HOOK SCRIPTS + +Hooks can be found in two places: /usr/share/initramfs-tools/hooks and +/etc/initramfs-tools/hooks. They are executed during generation of the +initramfs-image and are responsible for including all the necessary components +in the image itself. No guarantees are made as to the order in which the +different scripts are executed unless the prereqs are setup in the script. + +.SS Header +In order to support prereqs, each script should begin with the following lines: + +.RS +.nf +#!/bin/sh +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +\fR. /usr/share/initramfs-tools/hook-functions +# Begin real processing below this line +.fi +.RE + +For example, if you are writing a new hook script which relies on lvm, the line +starting with PREREQ should be changed to PREREQ="lvm" which will ensure that +the lvm hook script is run before your custom script. + +.SS Help functions +/usr/share/initramfs-tools/hook-functions contains a number of functions which +deal with some common tasks in a hook script: +.TP +\fB\fI +manual_add_modules +adds a module (and any modules which it depends on) to the initramfs image. +.RS +.PP +.B Example: +manual_add_modules isofs +.RE + +.TP +\fB\fI +add_modules_from_file +reads a file containing a list of modules (one per line) to be added to the +initramfs image. The file can contain comments (lines starting with #) and +arguments to the modules by writing the arguments on the same line as the name +of the module. +.RS +.PP +.B Example: +add_modules_from_file /tmp/modlist +.RE + +.TP +\fB\fI +force_load +adds a module (and its dependencies) to the initramfs image and also +unconditionally loads the module during boot. Also supports passing arguments +to the module by listing them after the module name. +.RS +.PP +.B Example: +force_load cdrom debug=1 +.RE + +.TP +\fB\fI +copy_modules_dir +copies an entire module directory from /lib/modules/KERNELVERSION/ into the +initramfs image. +.RS +.PP +.B Example: +copy_modules_dir kernel/drivers/ata +.RE + +.SS Including binaries +If you need to copy binaries to the initramfs module, a command like this +should be used: +.PP +.RS +copy_exec /sbin/mdadm /sbin +.RE + +mkinitramfs will automatically detect which libraries the executable depends on +and copy them to the initramfs. This means that most executables, unless +compiled with klibc, will automatically include glibc in the image which will +increase its size by several hundred kilobytes. + + +.SH BOOT SCRIPTS + +Similarly to hook scripts, boot scripts can be found in two places +/usr/share/initramfs-tools/scripts/ and /etc/initramfs-tools/scripts/. There +are a number of subdirectories to these two directories which control the boot +stage at which the scripts are executed. + +.SS Header +Like for hook scripts, there are no guarantees as to the order in which the +different scripts in one subdirectory (see "Subdirectories" below) are +executed. In order to define a certain order, a similar header as for hook +scripts should be used: + +.RS +.nf +#!/bin/sh +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac +.fi +.RE + +Where PREREQ is modified to list other scripts in the same subdirectory if necessary. + +.SS Help functions +A number of functions (mostly dealing with output) are provided to boot scripts: + +.TP +\fB\fI +log_success_msg +Logs a success message +.RS +.PP +.B Example: +log_success_msg "Frobnication successful" +.RE + +.TP +\fB\fI +log_failure_msg +Logs a failure message +.RS +.PP +.B Example: +log_failure_msg "Frobnication component froobz missing" +.RE + +.TP +\fB\fI +log_warning_msg +Logs a warning message +.RS +.PP +.B Example: +log_warning_msg "Only partial frobnication possible" +.RE + +.TP +\fB\fI +log_begin_msg +Logs a message that some processing step has begun + +.TP +\fB\fI +log_end_msg +Logs a message that some processing step is finished +.RS +.PP +.B Example: +.PP +.RS +.nf +log_begin_msg "Frobnication begun" +# Do something +log_end_msg +.fi +.RE +.RE + +.TP +\fB\fI +panic +Logs an error message and executes a shell in the initramfs image to allow the +user to investigate the situation. +.RS +.PP +.B Example: +panic "Frobnication failed" +.RE + +.SS Subdirectories +Both /usr/share/initramfs-tools/scripts and /etc/initramfs-tools/scripts +contains the following subdirectories. + +.TP +\fB\fI +init-top +the scripts in this directory are the first scripts to be executed after sysfs +and procfs have been mounted and /dev/console and /dev/null have been created. +No other device files are present yet. + +.TP +\fB\fI +init-premount +runs the udev hooks for populating the /dev tree (udev will keep running until +init-bottom) after modules specified by hooks and /etc/initramfs-tools/modules +have been loaded. + +.TP +\fB\fI +local-top OR nfs-top +After these scripts have been executed, the root device node is expected to be +present (local) or the network interface is expected to be usable (NFS). + +.TP +\fB\fI +local-premount OR nfs-premount +are run after the sanity of the root device has been verified (local) or the +network interface has been brought up (NFS), but before the actual root fs has +been mounted. + +.TP +\fB\fI +local-bottom OR nfs-bottom +are run after the rootfs has been mounted (local) or the NFS root share has +been mounted. udev is stopped. + +.TP +\fB\fI +init-bottom +are the last scripts to be executed before procfs and sysfs are moved to the +real rootfs and execution is turned over to the init binary which should now be +found in the mounted rootfs. + +.SS Boot parameters +.TP +\fB\fI +/conf/param.conf +allows boot scripts to change exported variables that are listed on top of init. Write the new values to it. It will be sourced after an boot script run if it exists. + + +.SH EXAMPLES + +.SS Hook script +An example hook script would look something like this (and would usually be +placed in /etc/initramfs-tools/hooks/frobnicate): + +.RS +.nf +#!/bin/sh +# Example frobnication hook script + +PREREQ="lvm" +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +\fR. /usr/share/initramfs-tools/hook-functions +# Begin real processing below this line + +if [ ! \-x "/sbin/frobnicate" ]; then + exit 0 +fi + +force_load frobnicator interval=10 +cp /sbin/frobnicate "${DESTDIR}/sbin" +exit 0 +.fi +.RE + +.SS Boot script +An example boot script would look something like this (and would usually be placed in /etc/initramfs-tools/scripts/local-top/frobnicate): + +.RS +.nf +#!/bin/sh +# Example frobnication boot script + +PREREQ="lvm" +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +# Begin real processing below this line +if [ ! \-x "/sbin/frobnicate" ]; then + panic "Frobnication executable not found" +fi + +if [ ! \-e "/dev/mapper/frobb" ]; then + panic "Frobnication device not found" +fi + +log_begin_msg "Starting frobnication" +/sbin/frobnicate "/dev/mapper/frobb" || panic "Frobnication failed" +log_end_msg + +exit 0 +.fi +.RE + +.SH DEBUG +It is easy to check the generated initramfs for its content. One may need +to double-check if it contains the relevant binaries, libs or modules: +.RS +.nf +mkdir tmp/initramfs +cd tmp/initramfs +gunzip \-c /boot/initrd.img\-2.6.18\-1\-686 | \\ +cpio \-i \-d \-H newc \-\-no\-absolute\-filenames +.fi +.RE + + +.SH AUTHOR +The initramfs-tools are written by Maximilian Attems <maks@debian.org>, +Jeff Bailey <jbailey@raspberryginger.com> and numerous others. +.PP +This manual was written by David H\[:a]rdeman <david@hardeman.nu>, +updated by Maximilian Attems <maks@debian.org>. + +.SH SEE ALSO +.BR +.IR initramfs.conf (5), +.IR mkinitramfs (8), +.IR update-initramfs(8). diff --git a/initramfs.conf.5 b/initramfs.conf.5 new file mode 100644 index 0000000..ac3b959 --- /dev/null +++ b/initramfs.conf.5 @@ -0,0 +1,82 @@ +.TH INITRAMFS.CONF 5 "2007/01/01" "" "initramfs.conf manual" + +.SH NAME +initramfs.conf \- configuration file for mkinitramfs + +.SH DESCRIPTION +The behaviour of +.B mkinitramfs +can be modified by its configuration file. + +Each line in the file can be a configuration variable, a blank line, +or a comment. The value of an variable is assigned by an statement +of the form: \fIname\fP=[\fIvalue\fP] + +Configuration options can be broken out into configuration snippets and +placed in individual files in the /etc/mkinitramfs/conf.d directory. Files +in this directory are always read \fBafter\fP the main configuration file, +so you can override the settings in the main config file without editing it +directly. + +.SH GENERAL VARIABLES +.TP +\fB MODULES +Specifies the modules for the initramfs image. +The default setting is \fImost\fP. + +\fImost\fP adds all the framebuffer, acpi, file system, ide, sata, scsi and usb drivers. + +\fIdep\fP tries to guess which modules are necessary for the running box. + +\fInetboot\fP adds the base modules, network modules, but skips block devices. + +\fIlist\fP includes only modules from the additional modules list to load them +early. + +.TP +\fB BUSYBOX +Include busybox utilities for the boot scripts. +If set to 'n' +.B mkinitramfs +will build an initramfs without busybox. +Beware that many boot scripts need busybox utilities. + +.TP +\fB KEYMAP +If set to 'y', the console keymap will be loaded during the initramfs stage. +The keymap will anyway be loaded by the initscripts later, and the packages +that might need input will normally set this variable automatically, so there +should normally be no need to set this. + +.SH NFS VARIABLES +.TP +\fB BOOT +Allows to use an nfs drive as the root of the drive. +The default is to boot from \fIlocal\fP media (hard drive, USB stick). +Set to \fInfs\fP for an NFS root share. + +.TP +\fB DEVICE +Specifies the network interface, like eth0. + +.TP +\fB ROOT +Allows optional root bootarg hardcoding, when no root bootarg can be passed. +A root bootarg overrides that special setting. + +.TP +\fB NFSROOT +Defaults to \fIauto\fP in order to pick up value from DHCP server. +Otherwise you need to specify \fIHOST:MOUNT\fP. + + +.SH AUTHOR +The initramfs-tools are written by Maximilian Attems <maks@debian.org>, +Jeff Bailey <jbailey@raspberryginger.com> and numerous others. +Loosely based on mkinitrd.conf by Herbert Xu. + +.SH SEE ALSO +.BR +.IR initramfs-tools (8), +.IR mkinitramfs (8), +.IR update-initramfs (8). diff --git a/mkinitramfs b/mkinitramfs new file mode 100755 index 0000000..0fc45db --- /dev/null +++ b/mkinitramfs @@ -0,0 +1,305 @@ +#!/bin/sh + +umask 0022 +export PATH='/usr/bin:/sbin:/bin' + +# Defaults +keep="n" +CONFDIR="/etc/initramfs-tools" +verbose="n" +errors_to="2>/dev/null" +# BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" +BUSYBOXDIR="/bin" + +OPTIONS=`getopt -o d:ko:r:v --long supported-host-version:,supported-target-version: -n "$0" -- "$@"` + +# Check for non-GNU getopt +if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi + +eval set -- "$OPTIONS" + +while true; do + case "$1" in + -d) + CONFDIR="$2" + shift 2 + if [ ! -d "${CONFDIR}" ]; then + echo "${0}: ${CONFDIR}: Not a directory" >&2 + exit 1 + fi + ;; + -o) + outfile="$2" + shift 2 + ;; + -k) + keep="y" + shift + ;; + -r) + ROOT="$2" + shift 2 + ;; + -v) + verbose="y" + shift + ;; + --supported-host-version) + supported_host_version="$2" + shift 2 + ;; + --supported-target-version) + supported_target_version="$2" + shift 2 + ;; + --) + shift + break + ;; + *) + echo "Internal error!" >&2 + exit 1 + ;; + esac +done + +# FIXME: remove after Lenny (needed for Etch linux-images) +if [ -n "$supported_host_version" ] || [ -n "$supported_target_version" ]; then + if [ -n "$supported_host_version" ]; then + host_upstream_version="${supported_host_version%%-*}" + fi + if [ -n "$supported_target_version" ]; then + target_upstream_version="${supported_target_version%%-*}" + if dpkg --compare-versions "$target_upstream_version" lt "2.6.12"; then + exit 2 + fi + fi + echo "Depreciation warning: use ramdisk=mkinitramfs-kpkg." + exit 0 +fi + +# For dependency ordered mkinitramfs hook scripts. +. /usr/share/initramfs-tools/scripts/functions +. /usr/share/initramfs-tools/hook-functions + +. "${CONFDIR}/initramfs.conf" +EXTRA_CONF='' +for i in /usr/share/initramfs-tools/conf.d/* ${CONFDIR}/conf.d/*; do + EXTRA_CONF="${EXTRA_CONF} $(basename $i \ + | grep '^[[:alnum:]][[:alnum:]\._-]*$' | grep -v '\.dpkg-.*$')"; +done +# FIXME: deprecated those settings on mkinitramfs run +# these conf dirs are for boot scripts and land on initramfs +for i in ${EXTRA_CONF}; do + if [ -e ${CONFDIR}/conf.d/${i} ]; then + . ${CONFDIR}/conf.d/${i} + elif [ -e /usr/share/initramfs-tools/conf.d/${i} ]; then + . /usr/share/initramfs-tools/conf.d/${i} + fi +done + +# source package confs +for i in /usr/share/initramfs-tools/conf-hooks.d/*; do + if [ -e "${i}" ]; then + . "${i}" + fi +done + +if [ -n "${UMASK}" ]; then + umask "${UMASK}" +fi + +if [ -z "${outfile}" ]; then + usage +fi + +touch "$outfile" +outfile="$(readlink -f "$outfile")" + +# And by "version" we really mean path to kernel modules +# This is braindead, and exists to preserve the interface with mkinitrd +if [ ${#} -ne 1 ]; then + version="$(uname -r)" +else + version="${1}" +fi + +# Check that we're using a new enough kernel version, first for ourselves, +# then for each of the hooks, which can have a MINKVER variable defined +check_minkver ${version} +check_minkver ${version} /usr/share/initramfs-tools/hooks +check_minkver ${version} ${CONFDIR}/hooks + +case "${version}" in +/lib/modules/*/[!/]*) + ;; +/lib/modules/[!/]*) + version="${version#/lib/modules/}" + version="${version%%/*}" + ;; +esac + +case "${version}" in +*/*) + echo "$PROG: ${version} is not a valid kernel version" >&2 + exit 1 + ;; +esac + +if [ -d "${outfile}" ]; then + echo "${outfile} is a directory" + exit 1 +fi + +MODULESDIR="/lib/modules/${version}" + +if [ ! -e "${MODULESDIR}" ]; then + echo "Cannot find ${MODULESDIR}" + exit 1 +fi +if [ ! -e "${MODULESDIR}/modules.dep" ]; then + depmod ${version} +fi + +DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1 +__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1 + +DPKG_ARCH=`dpkg --print-installation-architecture` + +# Export environment for hook scripts. +# +export MODULESDIR +export version +export CONFDIR +export DESTDIR +export DPKG_ARCH +export verbose +export KEYMAP +export MODULES + +# Private, used by 'catenate_cpiogz'. +export __TMPCPIOGZ + +for d in bin conf/conf.d etc lib/modules sbin scripts ${MODULESDIR}; do + mkdir -p "${DESTDIR}/${d}" +done + +# MODULES=list case. Always honour. +for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do + if [ -f "${x}" ]; then + add_modules_from_file "${x}" + fi +done + +# MODULES=most is default +case "${MODULES}" in +dep) + dep_add_modules + ;; +most) + auto_add_modules + ;; +netboot) + auto_add_modules base + auto_add_modules net + ;; +list) + # nothing to add + ;; +*) + echo "mkinitramfs: Warning unsupported MODULES setting: ${MODULES}." + echo "mkinitramfs: Falling back to MODULES=most." + auto_add_modules + ;; +esac + +# Have to do each file, because cpio --dereference doesn't recurse down +# symlinks. + +# klibc +ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin +ln -s /lib/klibc-*.so ${DESTDIR}/lib +rm -f ${DESTDIR}/bin/kinit* ${DESTDIR}/bin/gzip + +copy_exec /usr/share/initramfs-tools/init /init + +# add existant boot scripts +for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ + -regextype posix-extended -regex '.*/[[:alnum:]_]+$' -type f); do + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ + || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "/usr/share/initramfs-tools/scripts/${b}" \ + "${DESTDIR}/scripts/$(dirname "${b}")/" +done +for b in $(cd "${CONFDIR}/scripts" && find . \ + -regextype posix-extended -regex '.*/[[:alnum:]_]+$' -type f); do + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ + || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/" +done + +echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf +copy_exec "${CONFDIR}/initramfs.conf" /conf +for i in ${EXTRA_CONF}; do + if [ -e "${CONFDIR}/conf.d/${i}" ]; then + copy_exec "${CONFDIR}/conf.d/${i}" /conf/conf.d + elif [ -e "/usr/share/initramfs-tools/conf.d/${i}" ]; then + copy_exec "/usr/share/initramfs-tools/conf.d/${i}" /conf/conf.d + fi +done + +# ROOT hardcoding +if [ -n "${ROOT}" ]; then + echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root +fi + +# Busybox +if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then + mv ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh + # those root need busybox + eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')" + if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ]; then + echo "Warning: Busybox is required for successful boot!" + fi +else + rm -f ${DESTDIR}/bin/sh + rm -f ${DESTDIR}/bin/busybox + copy_exec ${BUSYBOXDIR}/busybox /bin/busybox + ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh +fi + +# Modutils +copy_exec /sbin/modprobe /sbin +copy_exec /sbin/depmod /sbin +copy_exec /sbin/rmmod /sbin +mkdir -p "${DESTDIR}/etc/modprobe.d" +cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/" + +# workaround: libgcc always needed on old-abi arm +if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then + cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/" +fi + +run_scripts /usr/share/initramfs-tools/hooks +run_scripts "${CONFDIR}"/hooks + +# Apply DSDT to initramfs +if [ -e "${CONFDIR}/DSDT.aml" ]; then + copy_exec "${CONFDIR}/DSDT.aml" / +fi + +[ "${verbose}" = y ] && echo "Building cpio ${outfile} initramfs" +(cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip >"${outfile}") || exit 1 + +if [ -s "${__TMPCPIOGZ}" ]; then + cat "${__TMPCPIOGZ}" >>"${outfile}" || exit 1 +fi + +if [ "${keep}" = "y" ]; then + echo "Working files in ${DESTDIR} and overlay in ${__TMPCPIOGZ}" +else + rm -rf "${DESTDIR}" + rm -rf "${__TMPCPIOGZ}" +fi + +exit 0 diff --git a/mkinitramfs-kpkg b/mkinitramfs-kpkg new file mode 100755 index 0000000..ea0e783 --- /dev/null +++ b/mkinitramfs-kpkg @@ -0,0 +1,100 @@ +#!/bin/sh +set -eu + +STATEDIR=/var/lib/initramfs-tools +supported_host_version="" +supported_target_version="" +outfile="" + +# FIXME: drop script after Lenny (needed for Etch linux-images) + +usage() +{ + cat >&2 << EOF + +Usage: ${0} <-o outfile> [version] + +Please use update-initramfs(8): +${0} exists for compatibility by kernel-package(5) calls. +See mkinitramfs-kpkg(8) for further details. +EOF + exit 1 +} + +OPTIONS=`getopt -o m:o: --long supported-host-version:,supported-target-version: -n "$0" -- "$@"` +# Check for non-GNU getopt +if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi + +eval set -- "$OPTIONS" + +while true; do + case "$1" in + -m) + # ignore + shift 2 + ;; + -o) + touch $2 + outfile="$(readlink -f "$2")" + shift 2 + ;; + --supported-host-version) + supported_host_version="$2" + shift 2 + ;; + --supported-target-version) + supported_target_version="$2" + shift 2 + ;; + --) + shift + break + ;; + *) + echo "Internal error!" >&2 + exit 1 + ;; + esac +done + +if [ -n "$supported_host_version" ] || [ -n "$supported_target_version" ]; then + if [ -n "$supported_host_version" ]; then + host_upstream_version="${supported_host_version%%-*}" + fi + if [ -n "$supported_target_version" ]; then + target_upstream_version="${supported_target_version%%-*}" + if dpkg --compare-versions "$target_upstream_version" lt "2.6.12"; then + exit 2 + fi + fi + exit 0 +fi + + +if [ -z "${outfile}" ]; then + usage +fi + +# And by "version" we really mean path to kernel modules +# This is braindead, and exists to preserve the interface with mkinitrd +version="${1}" + +case "${version}" in +/lib/modules/*/[!/]*) + ;; +/lib/modules/[!/]*) + version="${version#/lib/modules/}" + version="${version%%/*}" + ;; +esac + +case "${version}" in +*/*) + echo "$PROG: ${version} is not a valid kernel version" >&2 + exit 1 + ;; +esac + +# linux-image installs latest version +mkinitramfs -o ${outfile} ${version} +sha1sum "${outfile}" | sed -e 's/\.new//' > "${STATEDIR}/${version}" diff --git a/mkinitramfs-kpkg.8 b/mkinitramfs-kpkg.8 new file mode 100644 index 0000000..482a49b --- /dev/null +++ b/mkinitramfs-kpkg.8 @@ -0,0 +1,52 @@ +.TH MKINITRAMFS-KPKG 8 "2006/02/17" "" "mkinitramfs-kpkg manual" + +.SH NAME +mkinitramfs-kpkg \- generates an initramfs image for kernel-package + +.SH SYNOPSIS +.B mkinitramfs +.RB [ \-o +.IR outfile ] +.RI [ version ] +.B mkinitramfs +.RB [ \-\-supported-host-version= +.IR hversion ] +.RB [ \-\-supported-target-version= +.IR tversion ] + +.SH DESCRIPTION +The +.B mkinitramfs-kpkg +script calls +.B mkinitramfs +as wrapper script for kernel-package. It preservers the old mkinitrd calling +conventions. It's usage is not recommended. +See +.B update-initramfs (8) +for an better alternative. + +.SH OPTIONS + +.TP +\fB \-o \fI outfile +Write the image to +.IR outfile . + +.TP +\fB\-\-supported-host-version=\fIhversion +This option queries if mkinitramfs can create ramdisks on a running kernel of version +.IR hversion . + +.TP +\fB\-\-supported-target-version=\fItversion +This option queries if mkinitramfs can create ramdisks for kernel version +.IR tversion . + +.SH AUTHOR +mkinitramfs-kpkg is maintained by Maximilian Attems <maks@debian.org>. + +.SH SEE ALSO +.BR +.IR initramfs.conf (5), +.IR initramfs-tools (8), +.IR update-initramfs (8). diff --git a/mkinitramfs.8 b/mkinitramfs.8 new file mode 100644 index 0000000..abb3f39 --- /dev/null +++ b/mkinitramfs.8 @@ -0,0 +1,135 @@ +.TH MKINITRAMFS 8 "2008/08/12" "" "mkinitramfs manual" + +.SH NAME +mkinitramfs \- low-level tool for generating an initramfs image + +.SH SYNOPSIS +.B mkinitramfs +.RB [ \-d +.IR confdir ] +.RB [ \-k ] +.RB \-o +.IR outfile +.RB [ \-r +.IR root ] +.RB [ \-v ] +.RI [ version ] + +.B mkinitramfs +.RB [ \-\-supported-host-version= +.IR hversion ] + +.B mkinitramfs +.RB [ \-\-supported-target-version= +.IR tversion ] + +.SH DESCRIPTION +The +.B mkinitramfs +script generates an initramfs image. +The initramfs is a gzipped cpio archive. The archive can be used on a +different box of the same arch with the corresponding Linux kernel. +.B mkinitramfs +is meant for advanced usage. On your local box +.B update-initramfs +calls +.B mkinitramfs +with the relevant parameters. +.B update-initramfs +keeps sha1sum of generated initramfs. It takes care to generate backups +and eventually runs the bootloader. + +At boot time, the kernel unpacks that archive into RAM disk, mounts and +uses it as initial root file system. All finding of the root device +happens in this early userspace. + +.SH OPTIONS +.TP +\fB \-d \fI confdir +Set an alternate configuration directory. + +.TP +\fB \-k +Keep the temporary directory used to make the image. + +.TP +\fB \-o \fI outfile +Write the image to +.IR outfile . + +.TP +\fB \-r \fI root +Override the +.B ROOT +setting in +.IR initramfs.conf . + +.TP +\fB \-v +Set the verbose mode output. + +.TP +\fI version +Set the kernel version of the initramfs image +(defaults to the running kernel). + +.TP +\fB\-\-supported-host-version=\fIhversion +This option queries if mkinitramfs can create ramdisks on a running kernel of version +.IR hversion . + +.TP +\fB\-\-supported-target-version=\fItversion +This option queries if mkinitramfs can create ramdisks for kernel version +.IR tversion . + +.SH FILES +.TP +.I /etc/initramfs-tools/initramfs.conf +The default configuration file for the script. See +.BR initramfs.conf (5) +for a description of the available configuration parameter. + +.TP +.I /etc/initramfs-tools/modules +Specified modules will be put in the generated image and loaded when the system boots. The format - one per line - is identical to that of +.I /etc/modules, +which is described in +.BR modules (5). + +.TP +.I /etc/initramfs-tools/conf.d +The conf.d directory allows to hardcode bootargs at initramfs build time +via config snippets. This allows to set ROOT or RESUME. +This is especially useful for bootloaders, which do not pass an root bootarg. + +.TP +.I /etc/initramfs-tools/DSDT.aml +If this file exists, it will be appended to the initramfs in a way that causes +it to be loaded by ACPI. + +.SH EXAMPLES + +Create an initramfs for current running kernel: + +.PP +.B mkinitramfs -o ~/tmp/initramfs-$(uname -r) + +Create an initramfs for specific kernel and keep builddirs: + +.PP +.B mkinitramfs -k -o ~/tmp/initramfs-2.6.21-686 2.6.21-686 + +Debug initramfs creation (check out written logfile) +.PP +.B sh -x mkinitramfs -o ~/tmp/initramfs-$(uname -r) 2> ~/tmp/log + +.SH AUTHOR +The initramfs-tools are written by Maximilian Attems <maks@debian.org>, +Jeff Bailey <jbailey@raspberryginger.com> and numerous others. + +.SH SEE ALSO +.BR +.IR initramfs.conf (5), +.IR initramfs-tools (8), +.IR update-initramfs (8). diff --git a/scripts/functions b/scripts/functions new file mode 100644 index 0000000..299c29c --- /dev/null +++ b/scripts/functions @@ -0,0 +1,308 @@ +# -*- shell-script -*- + +_log_msg() +{ + if [ "$quiet" = "y" ]; then return; fi + printf "$@" +} + +log_success_msg() +{ + _log_msg "Success: $@\n" +} + +log_failure_msg() +{ + _log_msg "Failure: $@\n" +} + +log_warning_msg() +{ + _log_msg "Warning: $@\n" +} + +log_begin_msg() +{ + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TEXT $@" + fi + _log_msg "Begin: $@ ... " +} + +log_end_msg() +{ + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "SUCCESS ok" + fi + _log_msg "done.\n" +} + +panic() +{ + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "QUIT" + fi + # Disallow console access + if [ -n "${panic}" ]; then + sleep ${panic} + reboot + fi + modprobe i8042 + modprobe atkbd + echo $@ + PS1='(initramfs) ' /bin/sh -i </dev/console >/dev/console 2>&1 +} + +maybe_break() +{ + if [ "${break}" = "$1" ]; then + panic "Spawning shell within the initramfs" + fi +} + +render() +{ + eval "echo -n \${$@}" +} + +set_initlist() +{ + unset initlist + for si_x in ${initdir}/*; do + # skip empty dirs without warning + [ "${si_x}" = "${initdir}/*" ] && return + + # only allow variable name chars + case ${si_x#${initdir}/} in + *[![:alnum:]_]*) + [ "${verbose}" = "y" ] \ + && echo "$si_x ignored: not alphanumeric or '_' file" + continue + ;; + esac + + # skip non executable scripts + if [ ! -x ${si_x} ]; then + [ "${verbose}" = "y" ] \ + && echo "$si_x ignored: not executable" + continue + fi + + # skip directories + if [ -d ${si_x} ]; then + [ "${verbose}" = "y" ] \ + && echo "$si_x ignored: a directory" + continue + fi + + initlist="${initlist} ${si_x#${initdir}/}" + done +} + +reduce_satisfied() +{ + deplist="$(render array_${1})" + unset tmpdeplist + for rs_y in ${deplist}; do + # only allow variable name chars + case ${rs_y} in + *[![:alnum:]_]*) + continue + ;; + esac + # skip non executable scripts + if [ ! -x ${initdir}/${rs_y} ]; then + continue + fi + # skip directories + if [ -d ${initdir}/${rs_y} ]; then + continue + fi + tmpdeplist="${tmpdeplist} ${rs_y}" + done + deplist=${tmpdeplist} + for rs_x in ${runlist}; do + pop_list_item ${rs_x} ${deplist} + deplist=${tmppop} + done + eval array_${1}=\"${deplist}\" +} + +get_prereqs() +{ + set_initlist + for gp_x in ${initlist}; do + tmp=$(${initdir}/${gp_x} prereqs) + eval array_${gp_x}=\"${tmp}\" + done +} + +count_unsatisfied() +{ + set -- ${@} + return ${#} +} + +# Removes $1 from initlist +pop_list_item() +{ + item=${1} + shift + set -- ${@} + unset tmppop + # Iterate + for pop in ${@}; do + if [ ${pop} = ${item} ]; then + continue + fi + tmppop="${tmppop} ${pop}" + done + +} + +# This function generates the runlist, so we clear it first. +reduce_prereqs() +{ + unset runlist + set -- ${initlist} + i=$# + # Loop until there's no more in the queue to loop through + while [ ${i} -ne 0 ]; do + oldi=${i} + for rp_x in ${initlist}; do + reduce_satisfied ${rp_x} + count_unsatisfied $(render array_${rp_x}) + cnt=${?} + if [ ${cnt} -eq 0 ]; then + runlist="${runlist} ${rp_x}" + pop_list_item ${rp_x} ${initlist} + initlist=${tmppop} + i=$((${i} - 1)) + fi + done + if [ ${i} -eq ${oldi} ]; then + panic "PANIC: Circular dependancy. Exiting." + fi + done +} + +call_scripts() +{ + for cs_x in ${runlist}; do + # mkinitramfs verbose output + if [ "${verbose}" = "y" ]; then + echo "Calling hook ${cs_x}" + fi + ${initdir}/${cs_x} + # allow boot scripts to modify exported boot paramaters + if [ -e /conf/param.conf ]; then + . /conf/param.conf + fi + done +} + +run_scripts() +{ + initdir=${1} + [ ! -d ${initdir} ] && return + get_prereqs + reduce_prereqs + call_scripts +} + +# Load custom modules first +load_modules() +{ + if [ -e /conf/modules ]; then + cat /conf/modules | while read m; do + # Skip empty lines + if [ -z "$m" ]; then + continue + fi + # Skip comments - d?ash removes whitespace prefix + com=$(printf "%.1s" "${m}") + if [ "$com" = "#" ]; then + continue + fi + modprobe $m + done + fi +} + +# lilo compatibility +parse_numeric() { + case $1 in + "") + return + ;; + /*) + return + ;; + *:*) + minor=${1#*:} + major=${1%:*} + ;; + [A-Fa-f0-9]*) + value=$(( 0x${1} )) + minor=$(( ${value} % 256 )) + major=$(( ${value} / 256 )) + ;; + *) + return + ;; + esac + + mknod -m 600 /dev/root b ${major} ${minor} + ROOT=/dev/root +} + +configure_networking() +{ + # networking already configured thus bail out + [ -n "${DEVICE}" ] && [ -e /tmp/net-"${DEVICE}".conf ] && return 0 + + # support ip options see linux sources Documentation/nfsroot.txt + case ${IPOPTS} in + none|off) + # Do nothing + ;; + ""|on|any) + # Bring up device + ipconfig ${DEVICE} + ;; + dhcp|bootp|rarp|both) + ipconfig -c ${IPOPTS} -d ${DEVICE} + ;; + *) + ipconfig -d $IPOPTS + + # grab device entry from ip option + NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} + if [ "${NEW_DEVICE}" != "${IPOPTS}" ]; then + NEW_DEVICE=${NEW_DEVICE%:*} + else + # wrong parse, possibly only a partial string + NEW_DEVICE= + fi + if [ -n "${NEW_DEVICE}" ]; then + DEVICE="${NEW_DEVICE}" + fi + ;; + esac + + # source ipconfig output + if [ -n "${DEVICE}" ]; then + # source specific bootdevice + . /tmp/net-${DEVICE}.conf + else + # source any interface as not exaclty specified + . /tmp/net-*.conf + fi +} + +# Wait for queued kernel/udev events +wait_for_udev() +{ + [ -x "$(command -v udevadm)" ] && return 0 + udevadm settle ${1:+--timeout=$1} +} diff --git a/scripts/init-premount/blacklist b/scripts/init-premount/blacklist new file mode 100755 index 0000000..1dd9dbc --- /dev/null +++ b/scripts/init-premount/blacklist @@ -0,0 +1,25 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# sanity check +[ -z "${blacklist}" ] && exit 0 + +# write blacklist to modprobe.d +IFS=',' +for b in ${blacklist}; do + echo "blacklist $b" >> /etc/modprobe.d/initramfs +done diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal new file mode 100755 index 0000000..aa146ec --- /dev/null +++ b/scripts/init-premount/thermal @@ -0,0 +1,37 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +case "$DPKG_ARCH" in +# load the right modules +powerpc|ppc64) + modprobe i2c-powermac + modprobe therm_pm72 + modprobe windfarm_cpufreq_clamp + modprobe windfarm_lm75_sensor + modprobe windfarm_max6690_sensor + modprobe windfarm_pm112 + modprobe windfarm_pm81 + modprobe windfarm_pm91 + modprobe windfarm_smu_controls + modprobe windfarm_smu_sat + modprobe windfarm_smu_sensors + ;; +i386|amd64|ia64) + modprobe fan + modprobe thermal + ;; +esac diff --git a/scripts/init-top/all_generic_ide b/scripts/init-top/all_generic_ide new file mode 100755 index 0000000..28b519a --- /dev/null +++ b/scripts/init-top/all_generic_ide @@ -0,0 +1,22 @@ +#!/bin/sh + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +for x in $(cat /proc/cmdline); do + case ${x} in + all_generic_ide) + modprobe ide-generic + ;; + esac +done diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer new file mode 100755 index 0000000..21a6b19 --- /dev/null +++ b/scripts/init-top/framebuffer @@ -0,0 +1,87 @@ +#!/bin/sh + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + + +# The options part of the kernel "video=" argument (i.e. everyting +# after "video=<fbdriver>:") has very inconsistent rules. +# +# Generally the following applies: +# 1) options are comma-separated +# 2) options can be in either of these three forms: +# <arg>=<value>, <arg>:<value>, <boolean-arg>. +# 3) the "mode" option has the form <xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m] +# and may or may not start with "mode=" +# +# When the options are used with modules, they need to be space-separated +# and the following conversions are needed: +# <arg>:<value> -> <arg>=<value> +# <boolean-arg> -> <boolean-arg>=1 +# <modevalue> -> mode=<modevalue> +parse_video_opts() +{ + local OPTS="$1" + local IFS="," + + # Must be a line like video=<fbdriver>:<opt1>,[opt2]... + if [ "${OPTS}" = "${OPTS%%:*}" ]; then + return + fi + OPTS="${OPTS#*:}" + for opt in ${OPTS}; do + # Already in the "<arg>=<value>" form + if [ "${opt}" != "${opt#*=}" ]; then + echo -n "$opt " + # In the "<arg>:<value>" form + elif [ "${opt}" != "${opt#*:}" ]; then + echo -n "${opt%:*}=${opt#*:} " + # Presumably a modevalue without the "mode=" prefix + elif [ "${opt}" != "${opt#[0-9]*x[0-9]}" ]; then + echo -n "mode=$opt " + # Presumably a boolean + else + echo -n "${opt}=1 " + fi + done +} + +FB="" +OPTS="" + +for x in $(cat /proc/cmdline); do + case ${x} in + vga=*) + FB="vesafb"; + OPTS=""; + ;; + video=*) + FB=${x#*=} + FB="${FB%%:*}" + OPTS="$(parse_video_opts "${x}")" + esac +done + +# Map command line name to module name +case ${FB} in +matroxfb) + FB=matroxfb_base + ;; +*) + ;; +esac + +if [ -n "${FB}" ]; then + modprobe fbcon + modprobe ${FB} ${OPTS} +fi diff --git a/scripts/init-top/keymap b/scripts/init-top/keymap new file mode 100755 index 0000000..f011abf --- /dev/null +++ b/scripts/init-top/keymap @@ -0,0 +1,27 @@ +#!/bin/sh + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +OPTS="-q" + +# Should terminal be in UTF8 mode? +if [ -x /bin/kbd_mode ]; then + /bin/kbd_mode -u + OPTS="${OPTS} -u" +fi + +# Load custom keymap +if [ -x /bin/loadkeys -a -r /etc/boottime.kmap.gz ]; then + loadkeys ${OPTS} /etc/boottime.kmap.gz +fi diff --git a/scripts/local b/scripts/local new file mode 100644 index 0000000..85d62af --- /dev/null +++ b/scripts/local @@ -0,0 +1,125 @@ +# Local filesystem mounting -*- shell-script -*- + +# Parameter: device node to check +# Echos fstype to stdout +# Return value: indicates if an fs could be recognized +get_fstype () +{ + local FS FSTYPE FSSIZE RET + FS="${1}" + + # vol_id has a more complete list of file systems, + # but fstype is more robust + eval $(fstype "${FS}" 2> /dev/null) + if [ "$FSTYPE" = "unknown" ] && [ -x /lib/udev/vol_id ]; then + FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null) + fi + RET=$? + + if [ -z "${FSTYPE}" ]; then + FSTYPE="unknown" + fi + + echo "${FSTYPE}" + return ${RET} +} + +# Parameter: Where to mount the filesystem +mountroot () +{ + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-top" + run_scripts /scripts/local-top + [ "$quiet" != "y" ] && log_end_msg + + wait_for_udev 10 + + # If the root device hasn't shown up yet, give it a little while + # to deal with removable devices + if [ ! -e "${ROOT}" ] || ! $(get_fstype "${ROOT}" >/dev/null); then + log_begin_msg "Waiting for root file system" + + # Default delay is 180s + if [ -z "${ROOTDELAY}" ]; then + slumber=180 + else + slumber=${ROOTDELAY} + fi + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TIMEOUT ${slumber}" || true + fi + + slumber=$(( ${slumber} * 10 )) + while [ ! -e "${ROOT}" ] \ + || ! $(get_fstype "${ROOT}" >/dev/null); do + /bin/sleep 0.1 + slumber=$(( ${slumber} - 1 )) + [ ${slumber} -gt 0 ] || break + done + + if [ ${slumber} -gt 0 ]; then + log_end_msg 0 + else + log_end_msg 1 || true + fi + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TIMEOUT 15" || true + fi + fi + + # We've given up, but we'll let the user fix matters if they can + while [ ! -e "${ROOT}" ]; do + # give hint about renamed root + case "${ROOT}" in + /dev/hd*) + suffix="${ROOT#/dev/hd}" + major="${suffix%[[:digit:]]}" + major="${major%[[:digit:]]}" + if [ -d "/sys/block/sd${major}" ]; then + echo "WARNING bootdevice may be renamed. Try root=/dev/sd${suffix}" + fi + ;; + /dev/sd*) + suffix="${ROOT#/dev/sd}" + major="${suffix%[[:digit:]]}" + major="${major%[[:digit:]]}" + if [ -d "/sys/block/hd${major}" ]; then + echo "WARNING bootdevice may be renamed. Try root=/dev/hd${suffix}" + fi + ;; + esac + echo "Gave up waiting for root device. Common problems:" + echo " - Boot args (cat /proc/cmdline)" + echo " - Check rootdelay= (did the system wait long enough?)" + echo " - Check root= (did the system wait for the right device?)" + echo " - Missing modules (cat /proc/modules; ls /dev)" + panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" + done + + # Get the root filesystem type if not set + if [ -z "${ROOTFSTYPE}" ]; then + FSTYPE=$(get_fstype "${ROOT}") + else + FSTYPE=${ROOTFSTYPE} + fi + + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" + run_scripts /scripts/local-premount + [ "$quiet" != "y" ] && log_end_msg + + if [ "${readonly}" = "y" ]; then + roflag=-r + else + roflag=-w + fi + + # FIXME This has no error checking + modprobe ${FSTYPE} + + # FIXME This has no error checking + # Mount root + mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt} + + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom" + run_scripts /scripts/local-bottom + [ "$quiet" != "y" ] && log_end_msg +} diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume new file mode 100755 index 0000000..6bf95e5 --- /dev/null +++ b/scripts/local-premount/resume @@ -0,0 +1,40 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +if [ -z "${resume}" ]; then + exit 0 +fi + +case $resume in + LABEL=*) + resume="/dev/disk/by-label/${resume#LABEL=}" + ;; + UUID=*) + resume="/dev/disk/by-uuid/${resume#UUID=}" + ;; +esac + +[ ! -e "${resume}" ] && exit 0 + +[ ! -e /sys/power/resume ] && exit 0 + +# hardcode path, uswsusp ships an resume binary too +if [ -n "${resume_offset}" ]; then + /bin/resume ${resume} ${resume_offset} +else + /bin/resume ${resume} +fi diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm new file mode 100755 index 0000000..4cf48ad --- /dev/null +++ b/scripts/local-top/lvm @@ -0,0 +1,74 @@ +#!/bin/sh + +PREREQ="mdadm mdrun lvm2" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +activate_vg() +{ + local vg="$1" + + # Make sure that we have a non-empty argument + if [ -z "${vg}" ]; then + return 1 + fi + + # Take care of lilo boot arg, risky activating of all vg + case $vg in + fe[0-9]*) + vgchange -ay + exit 0 + ;; + # FIXME: check major + /dev/root) + vgchange -ay + exit 0 + ;; + esac + + # Make sure that we have a d-m path + vg=${vg#/dev/mapper/} + if [ "$vg" = "$1" ]; then + return 1 + fi + + # Make sure that the device includes at least one dash + if [ "$(echo -n "$vg" | tr -d -)" = "$vg" ]; then + return 1 + fi + + # Split volume group from logical volume. + vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') + # Reduce padded --'s to -'s + vg=$(echo ${vg} | sed -e 's#--#-#g') + + vgchange -ay ${vg} +} + +if [ -e /scripts/local-top/lvm2 ]; then + exit 0 +fi + +if [ ! -e /sbin/vgchange ]; then + exit 0 +fi + +modprobe dm-mod +modprobe dm-snapshot +modprobe dm-mirror + +activate_vg "$ROOT" +activate_vg "$resume" + +exit 0 diff --git a/scripts/nfs b/scripts/nfs new file mode 100644 index 0000000..435d2d0 --- /dev/null +++ b/scripts/nfs @@ -0,0 +1,85 @@ +# NFS filesystem mounting -*- shell-script -*- + +# FIXME This needs error checking + +retry_nr=0 + +# parse nfs bootargs and mount nfs +do_nfsmount() +{ + + configure_networking + + # get nfs root from dhcp + if [ "x${NFSROOT}" = "xauto" ]; then + # check if server ip is part of dhcp root-path + if [ "${ROOTPATH#*:}" = "${ROOTPATH}" ]; then + NFSROOT=${ROOTSERVER}:${ROOTPATH} + else + NFSROOT=${ROOTPATH} + fi + + # nfsroot=[<server-ip>:]<root-dir>[,<nfs-options>] + elif [ -n "${NFSROOT}" ]; then + # nfs options are an optional arg + if [ "${NFSROOT#*,}" != "${NFSROOT}" ]; then + NFSOPTS="-o ${NFSROOT#*,}" + fi + NFSROOT=${NFSROOT%%,*} + if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then + NFSROOT=${ROOTSERVER}:${NFSROOT} + fi + fi + + if [ -z "${NFSOPTS}" ]; then + NFSOPTS="-o retrans=10" + fi + + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-premount" + run_scripts /scripts/nfs-premount + [ "$quiet" != "y" ] && log_end_msg + + if [ ${readonly} = y ]; then + roflag="-o ro" + else + roflag="-o rw" + fi + + nfsmount -o nolock ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt} +} + +# NFS root mounting +mountroot() +{ + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-top" + run_scripts /scripts/nfs-top + [ "$quiet" != "y" ] && log_end_msg + + modprobe nfs + # For DHCP + modprobe af_packet + + wait_for_udev 10 + + # Default delay is around 180s + # FIXME: add usplash_write info + if [ -z "${ROOTDELAY}" ]; then + delay=180 + else + delay=${ROOTDELAY} + fi + + # loop until nfsmount succeds + while [ ${retry_nr} -lt ${delay} ] && [ ! -e ${rootmnt}${init} ]; do + [ ${retry_nr} -gt 0 ] && \ + [ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount" + do_nfsmount + retry_nr=$(( ${retry_nr} + 1 )) + [ ! -e ${rootmnt}${init} ] && /bin/sleep 1 + [ ${retry_nr} -gt 0 ] && [ "$quiet" != "y" ] && log_end_msg + done + + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom" + run_scripts /scripts/nfs-bottom + [ "$quiet" != "y" ] && log_end_msg +} diff --git a/update-initramfs b/update-initramfs new file mode 100755 index 0000000..9830a7d --- /dev/null +++ b/update-initramfs @@ -0,0 +1,553 @@ +#!/bin/sh + +STATEDIR=/var/lib/initramfs-tools +BOOTDIR=/boot +CONF=/etc/initramfs-tools/update-initramfs.conf +KPKGCONF=/etc/kernel-img.conf +USETRIGGERS=true +mode="" +version="" + +set -e + +[ -r ${CONF} ] && . ${CONF} + +if $USETRIGGERS \ + && [ x"$DPKG_MAINTSCRIPT_PACKAGE" != x ] \ + && [ $# = 1 ] \ + && [ x"$1" = x-u ] \ + && dpkg-trigger --check-supported 2>/dev/null +then + if dpkg-trigger --no-await update-initramfs; then + echo "update-initramfs: deferring update (trigger activated)" + exit 0 + fi +fi + +usage() +{ + if [ -n "${1}" ]; then + printf "${@}\n\n" >&2 + fi + cat >&2 << EOF +Usage: ${0} [OPTION]... + +Options: + -k [version] Specify kernel version or 'all' + -c Create a new initramfs + -u Update an existing initramfs + -d Remove an existing initramfs + -t Take over a custom initramfs with this one + -b Set alternate boot directory + -v Be verbose + -h This message + +EOF + exit 1 +} + +# chroot check +chrooted() +{ + # borrowed from udev's postinst + if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then + # the devicenumber/inode pair of / is the same as that of + # /sbin/init's root, so we're *not* in a chroot and hence + # return false. + return 1 + fi + return 0 +} + +mild_panic() +{ + if [ -n "${1}" ]; then + printf "${@}\n" >&2 + fi + exit 0 +} + +panic() +{ + if [ -n "${1}" ]; then + printf "${@}\n" >&2 + fi + exit 1 +} + +verbose() +{ + if [ "${verbose}" = 1 ]; then + printf "${@}\n" + fi +} + +version_exists() +{ + [ -e "${STATEDIR}/${1}" ] && [ -e "${initramfs}" ] + return $? +} + +set_initramfs() +{ + initramfs="${BOOTDIR}/initrd.img-${version}" +} + + +# backup initramfs while running +backup_initramfs() +{ + [ ! -r "${initramfs}" ] && return 0 + initramfs_bak="${initramfs}.dpkg-bak" + [ -r "${initramfs_bak}" ] && rm -f "${initramfs_bak}" + ln -f "${initramfs}" "${initramfs_bak}" \ + || cp -a "${initramfs}" "${initramfs_bak}" + verbose "Keeping ${initramfs_bak}" +} + +# keep booted initramfs +backup_booted_initramfs() +{ + initramfs_bak="${initramfs}.dpkg-bak" + + # first time run thus no backup + [ ! -r "${initramfs_bak}" ] && return 0 + + # chroot with no /proc + [ ! -r /proc/uptime ] && rm -f "${initramfs_bak}" && return 0 + + # no kept backup wanted + [ "${backup_initramfs}" = "no" ] && rm -f "${initramfs_bak}" && return 0 + + # no backup yet + if [ ! -r "${initramfs}.bak" ]; then + mv -f ${initramfs_bak} "${initramfs}.bak" + verbose "Backup ${initramfs}.bak" + return 0 + fi + + # keep booted initramfs + uptime_days=$(awk '{printf "%d", $1 / 3600 / 24}' /proc/uptime) + if [ -n "$uptime_days" ]; then + boot_initramfs=$(find "${initramfs}.bak" -mtime +${uptime_days}) + fi + if [ -n "${boot_initramfs}" ]; then + mv -f "${initramfs_bak}" "${initramfs}.bak" + verbose "Backup ${initramfs}.bak" + return 0 + fi + verbose "Removing current backup ${initramfs_bak}" + rm -f ${initramfs_bak} +} + +# nuke generated copy +remove_initramfs() +{ + [ -z "${initramfs_bak}" ] && return 0 + rm -f "${initramfs_bak}" + verbose "Removing ${initramfs_bak}" +} + + +generate_initramfs() +{ + echo "update-initramfs: Generating ${initramfs}" + OPTS="-o" + if [ "${verbose}" = 1 ]; then + OPTS="-v ${OPTS}" + fi + if mkinitramfs ${OPTS} "${initramfs}.new" "${version}"; then + mv -f "${initramfs}.new" "${initramfs}" + set_sha1 + else + mkinitramfs_return="$?" + remove_initramfs + rm -f "${initramfs}.new" + if [ "$mkinitramfs_return" = "2" ]; then + # minversion wasn't met, exit 0 + exit 0 + fi + echo "update-initramfs: failed for ${initramfs}" + exit $mkinitramfs_return + fi +} + +# lilo call +run_lilo() +{ + # show lilo errors on failure + if ! lilo -t > /dev/null 2>&1 ; then + echo "ERROR lilo fails for new ${initramfs}:" + echo + lilo -t + fi + lilo +} + +# check if lilo is on mbr +mbr_check() +{ + # try to discover grub and be happy + [ -r /boot/grub/menu.lst ] \ + && groot=$(awk '/^root/{print substr($2, 2, 3); exit}' \ + /boot/grub/menu.lst) + [ -e /boot/grub/device.map ] && [ -n "${groot}" ] \ + && dev=$(awk "/${groot}/{ print \$NF}" /boot/grub/device.map) + [ -n "${dev}" ] && [ -r ${dev} ] \ + && dd if="${dev}" bs=512 skip=0 count=1 2> /dev/null \ + | grep -q GRUB && return 0 + + # check out lilo.conf for validity + boot=$(awk -F = '/^boot=/{ print $2}' /etc/lilo.conf) + [ -z "${boot}" ] && return 0 + case ${boot} in + /dev/md/*) + if [ -r /proc/mdstat ]; then + MD=${boot#/dev/md/} + boot="/dev/$(awk "/^md${MD}/{print substr(\$5, 1, 3)}" \ + /proc/mdstat)" + fi + ;; + /dev/md*) + if [ -r /proc/mdstat ]; then + MD=${boot#/dev/} + boot="/dev/$(awk "/^${MD}/{print substr(\$5, 1, 3)}" \ + /proc/mdstat)" + fi + ;; + esac + [ ! -r "${boot}" ] && return 0 + dd if="${boot}" bs=512 skip=0 count=1 2> /dev/null | grep -q LILO \ + && run_lilo && return 0 + + # no idea which bootloader is used + echo + echo "WARNING: grub and lilo installed." + echo "If you use grub as bootloader everything is fine." + echo "If you use lilo as bootloader you must run lilo!" + echo +} + +# Invoke bootloader +run_bootloader() +{ + # if both lilo and grub around, figure out if lilo needs to be run + if [ -x /sbin/grub ] || [ -e /boot/grub/menu.lst ] \ + || [ -x /usr/sbin/grub ]; then + if [ -e /etc/lilo.conf ] && [ -x /sbin/lilo ]; then + [ -r "${KPKGCONF}" ] && \ + do_b=$(awk '/^do_bootloader/{print $3}' "${KPKGCONF}") + if [ "${do_b}" = "yes" ] || [ "${do_b}" = "Yes" ] \ + || [ "${do_b}" = "YES" ]; then + run_lilo + return 0 + elif [ "${do_b}" = "no" ] || [ "${do_b}" = "No" ] \ + || [ "${do_b}" = "NO" ]; then + return 0 + else + mbr_check + return 0 + fi + fi + return 0 + fi + if [ -r /etc/lilo.conf ] && [ -x /sbin/lilo ]; then + run_lilo + return 0 + fi + if [ -x /sbin/elilo ]; then + elilo + return 0 + fi + if [ -r /etc/zipl.conf ]; then + zipl + fi + if flash-kernel --supported >/dev/null 2>&1; then + flash-kernel + fi + if glantank-update-kernel --supported >/dev/null 2>&1; then + glantank-update-kernel + fi +} + +compare_sha1() +{ + sha1sum "${initramfs}" | diff "${STATEDIR}/${version}" - >/dev/null 2>&1 + return $? +} + +# Note that this must overwrite so that updates work. +set_sha1() +{ + sha1sum "${initramfs}" > "${STATEDIR}/${version}" +} + +delete_sha1() +{ + rm -f "${STATEDIR}/${version}" +} + +# ro /boot is not modified +ro_boot_check() +{ + # check irrelevant inside of a chroot + if [ ! -r /proc/mounts ] || chrooted; then + return 0 + fi + + boot_opts=$(awk '/boot/{if ((match($4, /^ro/) || match($4, /,ro/)) \ + && $2 == "/boot") print "ro"}' /proc/mounts) + if [ -n "${boot_opts}" ]; then + echo "WARNING: /boot is ro mounted." + echo "update-initramfs: Not updating ${initramfs}" + exit 0 + fi +} + +get_sorted_versions() +{ + version_list="" + + for gsv_x in "${STATEDIR}"/*; do + gsv_x="$(basename "${gsv_x}")" + if [ "${gsv_x}" = '*' ]; then + return 0 + fi + worklist="" + for gsv_i in $version_list; do + if dpkg --compare-versions "${gsv_x}" '>' "${gsv_i}"; then + worklist="${worklist} ${gsv_x} ${gsv_i}" + gsv_x="" + else + worklist="${worklist} ${gsv_i}" + fi + done + if [ "${gsv_x}" != "" ]; then + worklist="${worklist} ${gsv_x}" + fi + version_list="${worklist}" + done + + verbose "Available versions: ${version_list}" +} + +set_current_version() +{ + if [ -f /boot/initrd.img-`uname -r` ]; then + version=`uname -r` + fi +} + +set_linked_version() +{ + if [ -L /initrd.img ]; then + linktarget="$(basename "$(readlink /initrd.img)")" + fi + + if [ -L /boot/initrd.img ]; then + linktarget="$(basename "$(readlink /boot/initrd.img)")" + fi + + if [ -z "${linktarget}" ]; then + return + fi + + version="${linktarget##initrd.img-}" +} + +set_highest_version() +{ + get_sorted_versions + set -- ${version_list} + version=${1} +} + +create() +{ + if [ -z "${version}" ]; then + usage "Create mode requires a version argument" + fi + + set_initramfs + + if [ "${takeover}" = 0 ]; then + if version_exists "${version}"; then + panic "Cannot create version ${version}: already exists" + fi + + if [ -e "${initramfs}" ]; then + panic "${initramfs} already exists, cannot create." + fi + fi + + generate_initramfs +} + +update() +{ + if [ "${update_initramfs}" = "no" ]; then + echo "update-initramfs: Not updating initramfs." + exit 0 + fi + + if [ -z "${version}" ]; then + set_linked_version + fi + + if [ -z "${version}" ]; then + set_highest_version + fi + + if [ -z "${version}" ]; then + set_current_version + fi + + if [ -z "${version}" ]; then + verbose "Nothing to do, exiting." + exit 0 + fi + + set_initramfs + + ro_boot_check + + altered_check + + backup_initramfs + + generate_initramfs + + run_bootloader + + backup_booted_initramfs +} + +delete() +{ + if [ -z "${version}" ]; then + usage "Delete mode requires a version argument" + fi + + set_initramfs + + if [ ! -e "${initramfs}" ]; then + panic "Cannot delete ${initramfs}, doesn't exist." + fi + + if ! version_exists "${version}"; then + panic "Cannot delete version ${version}: Not created by this utility." + fi + + altered_check + + echo "update-initramfs: Deleting ${initramfs}" + + delete_sha1 + + rm -f "${initramfs}" +} + +# Check for update mode on existing and modified initramfs +altered_check() +{ + # No check on takeover + [ "${takeover}" = 1 ] && return 0 + if [ ! -e "${initramfs}" ]; then + mild_panic "${initramfs} does not exist. Cannot update." + fi + if ! compare_sha1; then + echo "update-initramfs: ${initramfs} has been altered." >&2 + mild_panic "update-initramfs: Cannot update. Override with -t option." + fi +} + +# Defaults +verbose=0 +yes=0 +# We default to takeover=1 in Ubuntu, but not Debian +takeover=0 + +## + +while getopts "k:cudyvtb:h?" flag; do + case "${flag}" in + k) + version="${OPTARG}" + ;; + c) + mode="c" + ;; + d) + mode="d" + ;; + u) + mode="u" + ;; + v) + verbose="1" + ;; + y) + yes="1" + ;; + t) + takeover="1" + ;; + b) + BOOTDIR="${OPTARG}" + if [ ! -d "${BOOTDIR}" ]; then + echo "Error: ${BOOTDIR} is not a directory." + exit 1 + fi + ;; + h|?) + usage + ;; + esac +done + +# Validate arguments +if [ -z "${mode}" ]; then + usage "You must specify at least one of -c, -u, or -d." +fi + +if [ "${version}" = "all" ] \ + || ( [ "${update_initramfs}" = "all" ] && [ -z "${version}" ] ); then + : FIXME check for --yes, and if not ask are you sure + get_sorted_versions + if [ -z "${version_list}" ]; then + verbose "Nothing to do, exiting." + exit 0 + fi + + OPTS="-b ${BOOTDIR}" + if [ "${verbose}" = "1" ]; then + OPTS="${OPTS} -v" + fi + if [ "${takeover}" = "1" ]; then + OPTS="${OPTS} -t" + fi + if [ "${yes}" = "1" ]; then + OPTS="${OPTS} -y" + fi + for u_version in ${version_list}; do + # Don't stop if one version doesn't work. + set +e + verbose "Execute: ${0} -${mode} -k \"${u_version}\" ${OPTS}" + "${0}" -${mode} -k "${u_version}" ${OPTS} + set -e + done + exit 0 +fi + + +case "${mode}" in + c) + create + ;; + d) + delete + ;; + u) + update + ;; +esac diff --git a/update-initramfs.8 b/update-initramfs.8 new file mode 100644 index 0000000..77ebe17 --- /dev/null +++ b/update-initramfs.8 @@ -0,0 +1,95 @@ +.TH UPDATE-INITRAMFS 8 "2006/10/12" "" "update\-initramfs manual" + +.SH NAME +update\-initramfs \- generate an initramfs image + +.SH SYNOPSIS +.B update\-initramfs +.RB [ \-k +.IR version ] +.RB [ \-c ] +.RB [ \-u ] +.RB [ \-t ] +.RB [ \-v ] +.RB [ \-b ] +.RB [ \-h ] +.SH DESCRIPTION +The +.B update\-initramfs +script manages your initramfs images on your local box. +It keeps track of the existing initramfs archives in /boot. +There are three modes of operation create, update or delete. +You must at least specify one of those modes. + +The initramfs is a gzipped cpio archive. +At boot time, the kernel unpacks that archive into RAM disk, mounts and +uses it as initial root file system. All finding of the root device +happens in this early userspace. + +.SH OPTIONS +.TP +\fB \-k \fI version +Set the specific kernel version for whom the initramfs will be generated. +For example the output of uname \-r for your currently running kernel. +This argument is optional for update. The default is the latest kernel version. + +The use of "all" for the +.I version +string specifies +.B update\-initramfs +to execute the chosen action for all kernel versions, that are already known +to +.B update\-initramfs. + +.TP +\fB \-c +This mode creates a new initramfs. + +.TP +\fB \-u +This mode updates an existing initramfs. + +.TP +\fB \-d +This mode removes an existing initramfs. + +.TP +\fB \-t +Allows to take over an custom initramfs with a newer one. + +.TP +\fB \-v +This option increases the amount of information you are given during +the chosen action. + +.TP +\fB \-b +Set an different bootdir for the image creation. + +.TP +\fB \-h +Print a short help page describing the available options in +.B update\-initramfs. + +.SH EXAMPLES + +Update the initramfs of the newest kernel: + +.PP +.B update\-initramfs -u + + +Create the initramfs for a specific kernel: + +.PP +.B update\-initramfs -c -k 2.6.18-1-686 + +.SH AUTHOR +The initramfs-tools are written by Maximilian Attems <maks@debian.org>, +Jeff Bailey <jbailey@raspberryginger.com> and numerous others. + +.SH SEE ALSO +.BR +.IR initramfs.conf (5), +.IR initramfs-tools (8), +.IR mkinitramfs (8). diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 new file mode 100644 index 0000000..fa28ee0 --- /dev/null +++ b/update-initramfs.conf.5 @@ -0,0 +1,31 @@ +.TH UPDATE-INITRAMFS.CONF 5 "2008/07/03" "" "update-initramfs.conf manual" + +.SH NAME +update-initramfs.conf \- configuration file for update-initramfs + +.SH DESCRIPTION +The configuration file allows to disable the update action from +.B update-initramfs. + +.SH GENERAL VARIABLES +.TP +\fB update_initramfs +Default is \fIyes\fP for running the latest initramfs-tools hooks in the +newest Linux image. +Setting it to \fIall\fP updates any known initramfs. +It is possible to set it to \fIno\fP for remote servers or boxes where +conservative manners needs to be applied. This disables +the \fBupdate_initramfs \-u\fP call. +.TP +\fB backup_initramfs +By default \fBupdate_initramfs\fP keeps an .bak file of the previous initramfs. If set to \fIno\fP the backup initramfs will not be kept. + +.SH AUTHOR +The initramfs-tools are written by Maximilian Attems <maks@debian.org>, +Jeff Bailey <jbailey@raspberryginger.com> and numerous others. +.SH SEE ALSO +.BR +.IR initramfs.conf (5), +.IR initramfs-tools (8), +.IR mkinitramfs (8), +.IR update-initramfs (8). |