From d1373b552d74f2ec4dd36bc0c8ea9e8faa963150 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 20 Sep 2005 13:53:59 +0200 Subject: add update-initramfs.8 --- update-initramfs.8 | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 update-initramfs.8 (limited to 'update-initramfs.8') diff --git a/update-initramfs.8 b/update-initramfs.8 new file mode 100644 index 0000000..90b7bd9 --- /dev/null +++ b/update-initramfs.8 @@ -0,0 +1,60 @@ +.TH UPDATE-INITRAMFS 8 "$Date: 2005/09/20" $" "" "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 [ \-h ] +.SH DESCRIPTION +The +.B update-initramfs +script manages your initramfs images. The initramfs is an 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 kernel for whom the initramfs will be generated. + +.TP +\fB \-c +Create a new initramfs. + +.TP +\fB \-u +Update an existing initramfs. + +.TP +\fB \-d +Remove an existing initramfs. + +.TP +\fB \-t +Take over a custom initramfs with this one. + +.TP +\fB \-v +This option increases the amount of information you are given during +the chosen action. + +.TP +\fB \-h +Print a short help page describing the available options in +.B update-initramfs. + +.SH AUTHOR +The initramfs-tools are written by Jeff Bailey . +This manual is maintained by Maximilian Attems . + +.SH SEE ALSO + +.BR initramfs.conf (5) -- cgit v1.2.3 From 6ee91456c25623ea694b8aab41dc5ca2fe2f1c91 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Dec 2005 10:34:22 +0100 Subject: add initramfs-tools.8 update manpage crossreferences --- debian/changelog | 9 +- debian/initramfs-tools.manpages | 1 + initramfs-tools.8 | 397 ++++++++++++++++++++++++++++++++++++++++ initramfs.conf.5 | 4 +- mkinitramfs.8 | 4 +- update-initramfs.8 | 4 +- 6 files changed, 412 insertions(+), 7 deletions(-) create mode 100644 initramfs-tools.8 (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index 6a87941..3aa7509 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,14 @@ initramfs-tools (0.43) unstable; urgency=low * hooks/kernelextras: Really fix #335505. Don't expand wildcase to current dir. (Closes: #342153) - -- maximilian attems Tue, 6 Dec 2005 01:16:41 +0100 + * Add initramfs-tools.8 describing how the hooks of initramfs-tools work + and how to use them. Thanks David Härdeman for the patch. + (Closes: #339091) + + * initramfs.conf.5, mkinitramfs.8, update-initramfs.8: Update + cross-references of the different manpages. + + -- maximilian attems Tue, 6 Dec 2005 10:25:28 +0100 initramfs-tools (0.42) unstable; urgency=low diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages index 0f42d94..8a27566 100644 --- a/debian/initramfs-tools.manpages +++ b/debian/initramfs-tools.manpages @@ -1,3 +1,4 @@ mkinitramfs.8 initramfs.conf.5 +initramfs-tools.8 update-initramfs.8 diff --git a/initramfs-tools.8 b/initramfs-tools.8 new file mode 100644 index 0000000..1df7c62 --- /dev/null +++ b/initramfs-tools.8 @@ -0,0 +1,397 @@ +.TH INITRAMFS-TOOLS 8 "Date: 2005/12/06" "" "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. + +.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 + +.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 rootfs. + +.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 + +.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 +device node which holds the result of a previous suspension using swsusp +(usually the swap partition). + +.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 debug +generates lots of output to /tmp/initramfs.debug + +.TP +\fB \fI break +spawns a shell in the initramfs image at chosen run-time + + +.SH HOOK SCRIPTS + +Hooks can be found in two places: /usr/share/initramfs-tools/hooks and +/etc/mkinitramfs/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 + +. /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 reiserfs +.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/pci/foobar +.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 "${DESTDIR}/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/mkinitramfs/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/mkinitramfs/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/mkinitramfs/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. + +.SH EXAMPLES + +.SS Hook script +An example hook script would look something like this (and would usually be +placed in /etc/mkinitramfs/hooks/frobnicate): + +.RS +.nf +#!/bin/sh +# Example frobnication hook script + +PREREQ="lvm" +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +. /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/mkinitramfs/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 AUTHOR +The initramfs-tools are written by Jeff Bailey . +.PP +This manual was written by David Härdeman , +updated by Maximilian Attems . + +.SH SEE ALSO +.BR +initramfs.conf (5), mkinitramfs (8), update-initramfs(8) + diff --git a/initramfs.conf.5 b/initramfs.conf.5 index c1ee3e7..a1cb341 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH INITRAMFS.CONF 5 "$Date: 2005/09/13 $" "" "initramfs.conf manual" +.TH INITRAMFS.CONF 5 "$Date: 2005/12/06 $" "" "initramfs.conf manual" .SH NAME initramfs.conf \- configuration file for mkinitramfs @@ -48,7 +48,7 @@ Otherwise you need to specify \fIHOST:MOUNT\fP. .SH SEE ALSO -.BR mkinitramfs (8) +.BR initramfs-tools (8), mkinitramfs (8), update-initramfs (8) .SH AUTHOR The initramfs-tools are written by Jeff Bailey . diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 0918767..64f8786 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS 8 "$Date: 2005/07/15 $" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "$Date: 2005/12/06 $" "" "mkinitramfs manual" .SH NAME mkinitramfs \- generate an initramfs image @@ -84,4 +84,4 @@ This manual is maintained by Maximilian Attems . .SH SEE ALSO -.BR initramfs.conf (5) +.BR initramfs.conf (5), initramfs-tools (8), update-initramfs (8) diff --git a/update-initramfs.8 b/update-initramfs.8 index 90b7bd9..35f1572 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS 8 "$Date: 2005/09/20" $" "" "update-initramfs manual" +.TH UPDATE-INITRAMFS 8 "$Date: 2005/12/06" $" "" "update-initramfs manual" .SH NAME update-initramfs \- generate an initramfs image @@ -57,4 +57,4 @@ This manual is maintained by Maximilian Attems . .SH SEE ALSO -.BR initramfs.conf (5) +.BR initramfs.conf (5), initramfs-tools (8), mkinitramfs (8) -- cgit v1.2.3 From b3fcee343807b6dcec5bb6a075ede8b3bc5da060 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 14 Feb 2006 11:22:50 +0100 Subject: better document the point of update-initramfs and mkinitramfs. --- debian/changelog | 5 ++++- mkinitramfs.8 | 9 ++++++++- update-initramfs.8 | 6 +++++- 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index 31ed427..bc1f8d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,7 +9,10 @@ initramfs-tools (0.52) unstable; urgency=low * update-initramfs: s/was/has/ been altered. (closes: #351939) - -- maximilian attems Mon, 13 Feb 2006 11:18:11 +0100 + * update-initramfs(8), mkinitramfs(8): The point of the first is to be used + on your local box. The second cmd should help for advanced usage. + + -- maximilian attems Tue, 14 Feb 2006 11:18:44 +0100 initramfs-tools (0.51) unstable; urgency=low diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 64f8786..79ce777 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -22,7 +22,14 @@ mkinitramfs \- generate an initramfs image .SH DESCRIPTION The .B mkinitramfs -script generates an initramfs image. The initramfs is an cpio archive. +script generates an initramfs image. +The initramfs is an 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 +should do all necessary steps. + 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. diff --git a/update-initramfs.8 b/update-initramfs.8 index 35f1572..d1e1ed0 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -15,7 +15,11 @@ update-initramfs \- generate an initramfs image .SH DESCRIPTION The .B update-initramfs -script manages your initramfs images. The initramfs is an cpio archive. +script manages your initramfs images on your local box. +It keeps track of the existing initramfs archives in /boot. +It helps to update, create and remove those. + +The initramfs is an 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. -- cgit v1.2.3 From 785fb28847d8a620625a23aeafdc0fe85ef7adf9 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 17 Feb 2006 10:05:12 +0100 Subject: highlight the mode of operation of update-initramfs --- debian/changelog | 10 ++++++---- update-initramfs.8 | 11 ++++++----- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index bc1f8d7..fe7fc20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,18 +1,20 @@ initramfs-tools (0.52) unstable; urgency=low * hooks/lvm: manual_add_modules dm_snapshot, will allow boot from lvm - snapshot. (ubuntu: #3842) + 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) + * update-initramfs: s/was/has/ been altered. + (closes: #351939, #352633, #353087) * update-initramfs(8), mkinitramfs(8): The point of the first is to be used - on your local box. The second cmd should help for advanced usage. + on your local box. Highlight its mode of operations. The second cmd is + only needed for advanced usage. - -- maximilian attems Tue, 14 Feb 2006 11:18:44 +0100 + -- maximilian attems Fri, 17 Feb 2006 10:04:17 +0100 initramfs-tools (0.51) unstable; urgency=low diff --git a/update-initramfs.8 b/update-initramfs.8 index d1e1ed0..dd9efe3 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -17,7 +17,8 @@ The .B update-initramfs script manages your initramfs images on your local box. It keeps track of the existing initramfs archives in /boot. -It helps to update, create and remove those. +There are three modes of operation create, update or delete. +You must at least specify one of those modes. The initramfs is an cpio archive. At boot time, the kernel unpacks that archive into ram disk, mounts and @@ -31,19 +32,19 @@ Set the kernel for whom the initramfs will be generated. .TP \fB \-c -Create a new initramfs. +This mode creates a new initramfs. .TP \fB \-u -Update an existing initramfs. +This mode updates an existing initramfs. .TP \fB \-d -Remove an existing initramfs. +This mode removes an existing initramfs. .TP \fB \-t -Take over a custom initramfs with this one. +Allows to take over an custom initramfs with a newer one. .TP \fB \-v -- cgit v1.2.3 From 0d19ff751ee9d9ceb2bf41de2b6fb0c0094a1aaa Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 17 Feb 2006 21:43:38 +0100 Subject: add kernel-package compat stuff, behaves like mkinitramfs and adds an sha1sum for update-initramfs. is meant for etch release, hope we get rid afterwards. will allow to clean up mkinitramfs from the longoption calls. --- debian/changelog | 9 +++- debian/initramfs-tools.install | 1 + debian/initramfs-tools.manpages | 1 + mkinitramfs-kpkg | 94 +++++++++++++++++++++++++++++++++++++++++ mkinitramfs-kpkg.8 | 49 +++++++++++++++++++++ mkinitramfs.8 | 2 +- update-initramfs.8 | 2 +- 7 files changed, 154 insertions(+), 4 deletions(-) create mode 100644 mkinitramfs-kpkg create mode 100644 mkinitramfs-kpkg.8 (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index fe7fc20..720c344 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,10 +11,15 @@ initramfs-tools (0.52) unstable; urgency=low (closes: #351939, #352633, #353087) * 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 + on your local box. Highlight its mode of operations. The second cmd is only needed for advanced usage. - -- maximilian attems Fri, 17 Feb 2006 10:04:17 +0100 + * mkinitramfs-kpkg: Add an compat call for kernel-package. Has the same + broken syntax than mkinitrd and adds an sha1sum for update-initramfs. + + * mkinitramfs-kpkg.8: Add warnings to use update-initramfs instead. + + -- maximilian attems Fri, 17 Feb 2006 21:41:11 +0100 initramfs-tools (0.51) unstable; urgency=low diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index 3a7a503..b722d90 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -1,4 +1,5 @@ mkinitramfs usr/sbin +mkinitramfs-kpkg usr/sbin init usr/share/initramfs-tools scripts usr/share/initramfs-tools conf/initramfs.conf etc/mkinitramfs diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages index 8a27566..f127e99 100644 --- a/debian/initramfs-tools.manpages +++ b/debian/initramfs-tools.manpages @@ -1,4 +1,5 @@ mkinitramfs.8 +mkinitramfs-kpkg.8 initramfs.conf.5 initramfs-tools.8 update-initramfs.8 diff --git a/mkinitramfs-kpkg b/mkinitramfs-kpkg new file mode 100644 index 0000000..d36710a --- /dev/null +++ b/mkinitramfs-kpkg @@ -0,0 +1,94 @@ +#!/bin/sh + +STATEDIR=/var/lib/initramfs-tools + +usage() +{ + cat >&2 << EOF + +Usage: ${0} <-o outfile> [version] + +Please use update-initramfs(8): +${0} exists for compatibility by kernel-package(5) calls. +See ${0}(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..34f76db --- /dev/null +++ b/mkinitramfs-kpkg.8 @@ -0,0 +1,49 @@ +.TH MKINITRAMFS-KPKG 8 "$Date: 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 +for kernel-package. It's usage is not recommended. +See +.B update-initramfs +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 . + +.SH SEE ALSO + +.BR initramfs.conf (5), initramfs-tools (8), update-initramfs (8) diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 79ce777..b0da75e 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS 8 "$Date: 2005/12/06 $" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "$Date: 2006/02/17 $" "" "mkinitramfs manual" .SH NAME mkinitramfs \- generate an initramfs image diff --git a/update-initramfs.8 b/update-initramfs.8 index dd9efe3..9e107e9 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS 8 "$Date: 2005/12/06" $" "" "update-initramfs manual" +.TH UPDATE-INITRAMFS 8 "$Date: 2006/02/17" $" "" "update-initramfs manual" .SH NAME update-initramfs \- generate an initramfs image -- cgit v1.2.3 From aad10a3ce2e626e9ca66e08da5edb0ad17d9bd16 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 18 Mar 2006 09:24:43 +0100 Subject: * fix minor parsing * add linear module * manpage polishing * udev_helper needs some conf sourced --- debian/changelog | 24 ++++++++++++++++++++++++ hooks/md | 2 +- mkinitramfs.8 | 2 +- scripts/functions | 2 +- scripts/init-premount/udev_helper | 4 ++++ update-initramfs.8 | 3 ++- 6 files changed, 33 insertions(+), 4 deletions(-) (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index 3edb850..c67e009 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,27 @@ +initramfs-tools (0.56) unstable; urgency=low + + * hooks/md: Add linear module - thanks to Moshe Yudkowsky . + + * 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" . (closes: #357282) + + * scripts/init-premount/udev_helper: Source the relevant definition to get + it really run. Thanks to Maurice Massar . + (closes: #354458) + + -- maximilian attems 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 Wed, 15 Mar 2006 13:23:51 +0100 + initramfs-tools (0.55) unstable; urgency=low * scripts/init-premount/udev_helper: Fix modprobe args. diff --git a/hooks/md b/hooks/md index 64b8f9e..c020c3a 100755 --- a/hooks/md +++ b/hooks/md @@ -23,6 +23,6 @@ fi copy_exec /sbin/mdadm /sbin copy_exec /sbin/mdrun /sbin -for x in md raid0 raid1 raid5 raid6; do +for x in md linear raid0 raid1 raid5 raid6; do manual_add_modules ${x} done diff --git a/mkinitramfs.8 b/mkinitramfs.8 index b0da75e..539c4c0 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -53,7 +53,7 @@ Write the image to Override the .B ROOT setting in -.IR mkinitramfs.conf . +.IR initramfs.conf . .TP \fB\-\-supported-host-version=\fIhversion diff --git a/scripts/functions b/scripts/functions index 6825519..05b7779 100644 --- a/scripts/functions +++ b/scripts/functions @@ -202,7 +202,7 @@ parse_numeric() { major=${1%:*} ;; *) - minor=$((0x${1#??})) + minor=$((0x${1#?})) major=$((0x${1%??})) ;; esac diff --git a/scripts/init-premount/udev_helper b/scripts/init-premount/udev_helper index f2bc204..d2ef579 100755 --- a/scripts/init-premount/udev_helper +++ b/scripts/init-premount/udev_helper @@ -15,6 +15,10 @@ prereqs) ;; esac +# Source the relevant scripts for later decisions +. /conf/initramfs.conf +. /scripts/functions + # Nothing todo for nfs boot case "${BOOT}" in local) diff --git a/update-initramfs.8 b/update-initramfs.8 index 9e107e9..7ab8b3f 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -28,7 +28,8 @@ happens in this early userspace. .SH OPTIONS .TP \fB \-k \fI version -Set the kernel for whom the initramfs will be generated. +Set the kernel version for whom the initramfs will be generated. +For example the output of uname -r for your currently running kernel. .TP \fB \-c -- cgit v1.2.3 From 0754335a68ecc127f73dd5c42fa042928952b579 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 22 Jun 2006 20:50:14 +0200 Subject: rephrase docs remove cp modules from postinstall, install confdir lots of small polishing thanks to Sesse review don't use touch on init --- debian/changelog | 40 ++++++++++++++++++++++++++++++++-------- debian/control | 9 +++++---- debian/initramfs-tools.install | 1 + debian/initramfs-tools.postinst | 9 --------- init | 2 +- initramfs-tools.8 | 8 ++++---- mkinitramfs.8 | 6 +++--- update-initramfs.8 | 4 ++-- 8 files changed, 48 insertions(+), 31 deletions(-) (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index ba0fe4f..83c5a46 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,12 +1,34 @@ -initramfs-tools (0.62) unstable; urgency=low +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 and + Steinar H. Gunderson for the review. + + -- maximilian attems Thu, 22 Jun 2006 20:45:59 +0200 - * debian/control: Tighten dep on udev. udev 0.086-1 loads ide-disk. - Can't lower to sarge version anyway as no coldplugg support there. - (closes: #358360, #362816) +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 . + + -- maximilian attems Thu, 22 Jun 2006 01:11:17 +0200 + +initramfs-tools (0.62) unstable; urgency=low - * debian/initramfs-tools.postinst: Check if modules example is available - under doc before copying if not touch $CONFDIR/modules. - (closes: #368043) + * 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. @@ -21,10 +43,12 @@ initramfs-tools (0.61) unstable; urgency=low * 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. (closes: #352434) + * 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 . diff --git a/debian/control b/debian/control index 6c59d5e..a5a1cee 100644 --- a/debian/control +++ b/debian/control @@ -12,8 +12,9 @@ Depends: klibc-utils (>= 1.1.16-1), busybox (>= 1:1.01-3) | busybox-cvs-static ( Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged - 2.6 Linux kernel. The initramfs is an cpio archive. At boot time, the kernel - unpacks that archive into ram, mounts and uses it as initial root file system. - From there on the mounting of the real root file system occurs in user space. - klibc handles the boot-time networking setup. Supports nfs root system. + 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. From there on the mounting of the real root file system occurs in user + space. klibc handles the boot-time networking setup. Having the root on NFS + is also supported. Any boot loader with initrd support is able to load an initramfs archive. diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index a5b87df..84cde80 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -3,6 +3,7 @@ mkinitramfs-kpkg usr/sbin init usr/share/initramfs-tools scripts usr/share/initramfs-tools conf/initramfs.conf etc/initramfs-tools +conf/modules etc/initramfs-tools hooks usr/share/initramfs-tools hook-functions usr/share/initramfs-tools update-initramfs usr/sbin diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index f1cfcfa..9a0b555 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -35,15 +35,6 @@ if [ "$1" = configure ]; then fi fi -if [ ! -e /etc/initramfs-tools/modules ]; then - if [ -e /usr/share/doc/initramfs-tools/examples/modules ]; then - cp /usr/share/doc/initramfs-tools/examples/modules \ - /etc/initramfs-tools/ - else - touch /etc/initramfs-tools/modules - fi -fi - # Regenerate initramfs on upgrade if [ "$1" = "configure" -a -n "$2" ]; then update-initramfs -u diff --git a/init b/init index 5e2084f..2c25295 100755 --- a/init +++ b/init @@ -16,7 +16,7 @@ if [ -e /etc/udev/udev.conf ]; then . /etc/udev/udev.conf fi mount -t tmpfs -o size=$tmpfs_size,mode=0755 udev /dev -touch /dev/.initramfs-tools +> /dev/.initramfs-tools mkdir /dev/.initramfs mknod /dev/console c 5 1 mknod /dev/null c 1 3 diff --git a/initramfs-tools.8 b/initramfs-tools.8 index b0a9f32..eb46827 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -44,7 +44,7 @@ string of the form NFSSERVER:NFSPATH .TP \fB \fI boot -either local or nfs (affects which initramfs scripts are run, see the "Subdirectories" section under boot scripts). +either local or NFS (affects which initramfs scripts are run, see the "Subdirectories" section under boot scripts). .TP \fB \fI resume @@ -292,19 +292,19 @@ have been loaded. \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). +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 +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 +are run after the rootfs has been mounted (local) or the NFS root share has been mounted. udev is stopped. .TP diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 49b606f..5af552b 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -23,14 +23,14 @@ mkinitramfs \- generate an initramfs image The .B mkinitramfs script generates an initramfs image. -The initramfs is an cpio archive. The archive can be used on a different -box of the same arch with the corresponding Linux kernel. +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 should do all necessary steps. -At boot time, the kernel unpacks that archive into ram disk, mounts and +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. diff --git a/update-initramfs.8 b/update-initramfs.8 index 7ab8b3f..71f2500 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -20,8 +20,8 @@ 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 an cpio archive. -At boot time, the kernel unpacks that archive into ram disk, mounts and +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. -- cgit v1.2.3 From 50586c0818aa8de3ba3aa1c105acbe31537a9be1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 12 Jul 2006 18:21:16 +0200 Subject: - rename suspend boot script in resume - update-initramfs add -b bootdif flag document it - check for noresume arg in init --- debian/changelog | 25 ++++++++++++++++++++++--- init | 10 ++++++++-- scripts/local-premount/resume | 29 +++++++++++++++++++++++++++++ scripts/local-premount/suspend | 29 ----------------------------- update-initramfs | 10 +++++++++- update-initramfs.8 | 5 +++++ 6 files changed, 73 insertions(+), 35 deletions(-) create mode 100755 scripts/local-premount/resume delete mode 100755 scripts/local-premount/suspend (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index bbc2944..9623ae4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,22 @@ -initramfs-tools (0.68) unstable; urgency=high +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 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 + + * update-initramfs.8: Document -b switch. + + -- maximilian attems 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. @@ -19,11 +37,12 @@ initramfs-tools (0.68) unstable; urgency=high to the one we ship. This should minimize Sarge upgrade prompting if no relevant modules where added to /etc/mkinitrd/modules. - * conf/initramfs.conf: Make it more similar 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 for the review. - -- maximilian attems Fri, 7 Jul 2006 11:45:56 +0200 + -- maximilian attems Mon, 10 Jul 2006 00:13:52 +0200 initramfs-tools (0.67) unstable; urgency=high diff --git a/init b/init index 2c25295..427b964 100755 --- a/init +++ b/init @@ -40,7 +40,6 @@ export break= export init=/sbin/init export quiet=n export readonly=y -export resume=${RESUME} export rootmnt=/root export debug= export cryptopts=${CRYPTOPTS} @@ -77,7 +76,10 @@ for x in $(cat /proc/cmdline); do BOOT=${x#boot=} ;; resume=*) - resume=${x#resume=} + RESUME=${x#resume=} + ;; + noresume) + NORESUME=y ;; quiet) quiet=y @@ -102,6 +104,10 @@ for x in $(cat /proc/cmdline); do esac done +if [ -n ${NORESUME} ]; then + export resume=${RESUME} +fi + depmod -a maybe_break top diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume new file mode 100755 index 0000000..0c88ccc --- /dev/null +++ b/scripts/local-premount/resume @@ -0,0 +1,29 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +if [ "x${resume}" = "x" ]; then + exit +fi + +if [ ! -e "${resume}" ]; then + exit +fi + +if [ -e /sys/power/resume ]; then + major_minor=$(ls -l ${resume} | awk '{printf "%d:%d", $5, $6}') + echo $major_minor >/sys/power/resume +fi diff --git a/scripts/local-premount/suspend b/scripts/local-premount/suspend deleted file mode 100755 index 0c88ccc..0000000 --- a/scripts/local-premount/suspend +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -if [ "x${resume}" = "x" ]; then - exit -fi - -if [ ! -e "${resume}" ]; then - exit -fi - -if [ -e /sys/power/resume ]; then - major_minor=$(ls -l ${resume} | awk '{printf "%d:%d", $5, $6}') - echo $major_minor >/sys/power/resume -fi diff --git a/update-initramfs b/update-initramfs index 1826233..71cc90d 100755 --- a/update-initramfs +++ b/update-initramfs @@ -19,6 +19,7 @@ Options: -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 @@ -287,7 +288,7 @@ takeover=0 ## -while getopts "k:cudyvht?" flag; do +while getopts "k:cudyvtb:h?" flag; do case "${flag}" in k) version="${OPTARG}" @@ -310,6 +311,13 @@ while getopts "k:cudyvht?" flag; do t) takeover="1" ;; + b) + BOOTDIR="${OPTARG}" + if [ ! -d $BOOTDIR ]; then + echo "Error: ${BOOTDIR} is not a directory." + exit 1 + fi + ;; h|?) usage ;; diff --git a/update-initramfs.8 b/update-initramfs.8 index 71f2500..9590ca3 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -11,6 +11,7 @@ update-initramfs \- generate an initramfs image .RB [ \-u ] .RB [ \-t ] .RB [ \-v ] +.RB [ \-b ] .RB [ \-h ] .SH DESCRIPTION The @@ -52,6 +53,10 @@ Allows to take over an custom initramfs with a newer one. 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 -- cgit v1.2.3 From 17d01b3434dac54ace5991029ed069b3d185ffd2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 16 Jul 2006 21:54:14 +0200 Subject: massif whitespace cleanup --- break.txt | 2 +- debian/NEWS | 2 +- debian/changelog | 48 +++++++++++++++++++++++++------------------ debian/copyright | 2 +- docs/example_hook | 6 +++--- docs/example_hook_cpiogz | 2 +- docs/example_script | 4 ++-- hooks/lvm | 2 +- hooks/md | 2 +- init | 2 +- initramfs-tools.8 | 18 ++++++++-------- initramfs.conf.5 | 4 ++-- mkinitramfs | 20 +++++++++--------- mkinitramfs-kpkg | 16 +++++++-------- mkinitramfs-kpkg.8 | 6 +++--- mkinitramfs.8 | 30 +++++++++++++-------------- scripts/functions | 12 +++++------ scripts/local-top/udev_helper | 2 +- update-initramfs | 6 +++--- update-initramfs.8 | 26 +++++++++++------------ 20 files changed, 110 insertions(+), 102 deletions(-) (limited to 'update-initramfs.8') diff --git a/break.txt b/break.txt index ff26d5b..64ecf84 100644 --- a/break.txt +++ b/break.txt @@ -1,4 +1,4 @@ -if [ x${break} = xyes ]; then +if [ x${break} = xyes ]; then panic "Spawning shell within the initramfs" fi diff --git a/debian/NEWS b/debian/NEWS index d4647d4..a6ae4bc 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -15,7 +15,7 @@ initramfs-tools (0.10) breezy; urgency=low 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 + 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 diff --git a/debian/changelog b/debian/changelog index 8a519b4..b48be87 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,12 +8,20 @@ initramfs-tools (0.70) unstable; urgency=low cleanup and add quoting. - scripts/local: Whitespace cleanup and add a comment. - update-initramfs: Add quoting + whitespace fix. - - changelog: for noise reduction add 0.69ubuntu{1,2,3}, all 0.40ubuntu*, + - 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. - -- maximilian attems Sun, 16 Jul 2006 20:23:41 +0200 + * 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: Whitespace policy cleanup trailing whitespace and + non tabular indents. + + -- maximilian attems Sun, 16 Jul 2006 21:50:34 +0200 initramfs-tools (0.69b) unstable; urgency=high @@ -68,7 +76,7 @@ initramfs-tools (0.69) unstable; urgency=low * 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. + mkinitramfs invocation. Check that the passed arg is really a dir. (ubuntu: 37690) Thanks Colin Watson * update-initramfs.8: Document -b switch. @@ -312,7 +320,7 @@ initramfs-tools (0.60) unstable; urgency=low initramfs-tools (0.59b) unstable; urgency=low - * mkinitramfs-kpkg: Intialialize the variables. + * mkinitramfs-kpkg: Intialialize the variables. (closes: #359355, #359620, #359613, #359666, #359681) -- maximilian attems Tue, 28 Mar 2006 16:30:59 +0200 @@ -329,7 +337,7 @@ initramfs-tools (0.59) unstable; urgency=low - 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 + thanks Scott James Remnant -- maximilian attems Sun, 26 Mar 2006 22:35:15 +0200 @@ -768,7 +776,7 @@ 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) + 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) @@ -854,7 +862,7 @@ initramfs-tools (0.40ubuntu8) dapper; urgency=low 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 + its a leftover from debugging in breezy and slows down thin client booting unnecessary -- Oliver Grawert Fri, 2 Dec 2005 11:45:05 +0100 @@ -887,7 +895,7 @@ initramfs-tools (0.40ubuntu4) dapper; urgency=low initramfs-tools (0.40ubuntu3) dapper; urgency=low "A true friend stabs you in the front." - - Oscar Wilde + - Oscar Wilde * hooks/acpid: Rename to ... * hooks/thermal: ... this. Add therm_pm72 for ppc64 systems. @@ -933,7 +941,7 @@ initramfs-tools (0.41) unstable; urgency=high * High urgency upload to cope with newer udev upstream - bonus: condition to test against when udev is ready. (Closes: #341014) - Thanks Marco d'Itri for guidance and + Thanks Marco d'Itri for guidance and Heikki Henriksen for double check. * Pump udev dep on 0.076-3. @@ -978,7 +986,7 @@ initramfs-tools (0.39) unstable; urgency=medium * Pump udev dependency. * init: Pump timeout as there is currently no way to check which udevd - processes are still running and why. + processes are still running and why. Cures hopefully breakage of missing devices on boot. * Sync with latest Ubuntu. @@ -1048,7 +1056,7 @@ initramfs-tools (0.37) unstable; urgency=low Exit if it doesn't exist before including current dir. Thanks to Jean Charles Delepine (Closes: #335505) - * hooks/lvm, hooks/md: Remove FIXME's at second thought. You better want + * 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 Wed, 26 Oct 2005 09:22:58 +0200 @@ -1065,7 +1073,7 @@ initramfs-tools (0.36ubuntu1) dapper; urgency=low initramfs-tools (0.36) unstable; urgency=low "Sunny Autumn Release" - + * Minor cleanups in mkiniramfs. * Remove manpage section about return values. Needs to be rephrased. @@ -1149,7 +1157,7 @@ initramfs-tools (0.30) unstable; urgency=low [ maximilian Attems ] * Resynconise with latest upstream now we are in unstable. - + [ Jeff Bailey ] * debian/rules: Make sure hooks and scripts are chmod +x @@ -1197,7 +1205,7 @@ initramfs-tools (0.29) breezy; urgency=low initramfs-tools (0.28) breezy; urgency=low - * Run udevstart after loading block drivers - should fix resume from + * Run udevstart after loading block drivers - should fix resume from hibernate on non-LVM systems. -- Matthew Garrett Tue, 20 Sep 2005 01:13:31 +0100 @@ -1228,7 +1236,7 @@ initramfs-tools (0.27) unstable; urgency=low initramfs-tools (0.26) breezy; urgency=low "Experience is one thing you can't get for nothing." - - Oscar Wilde + - Oscar Wilde * scripts/local-top/lvm: Reduce -- to - in VG strings for feeding to vgchange. (Ubuntu: #13387) @@ -1264,7 +1272,7 @@ initramfs-tools (0.26) breezy; urgency=low * debian/dirs: Add etc/mkinitramfs/hooks, move all scripts subdirs into etc/mkinitramfs/scripts. - * mkinitramfs: Set the umask. Copy the scripts from + * 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. @@ -1441,9 +1449,9 @@ initramfs-tools (0.17) breezy; urgency=low genius." - Oscar Wilde - * debian/initramfs-tools.postinst: Get the name of the config file + * 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! + Thanks to Matthew Garrett for noticing this! -- Jeff Bailey Wed, 10 Aug 2005 11:54:07 -0400 @@ -1459,7 +1467,7 @@ initramfs-tools (0.16) breezy; urgency=low * 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 + (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. @@ -1568,7 +1576,7 @@ initramfs-tools (0.13) breezy; urgency=low 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 diff --git a/debian/copyright b/debian/copyright index 3a3bc5b..2c681c2 100644 --- a/debian/copyright +++ b/debian/copyright @@ -13,7 +13,7 @@ The Debian tree is maintained with "bzr" at: http://debian.stro.at/bzr-test/initramfs-tools/ Authors: Jeff Bailey , Adam Conrad , - Scott James Remnant , + Scott James Remnant , maximilian attems Copyright: 2005 Jeff Bailey diff --git a/docs/example_hook b/docs/example_hook index de5392d..a0d015a 100644 --- a/docs/example_hook +++ b/docs/example_hook @@ -12,7 +12,7 @@ # 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 @@ -96,9 +96,9 @@ fi # 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 # diff --git a/docs/example_hook_cpiogz b/docs/example_hook_cpiogz index dcd1416..f3e44d9 100644 --- a/docs/example_hook_cpiogz +++ b/docs/example_hook_cpiogz @@ -50,7 +50,7 @@ esac # 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 diff --git a/docs/example_script b/docs/example_script index 221c888..d7f407f 100644 --- a/docs/example_script +++ b/docs/example_script @@ -70,12 +70,12 @@ echo "Got here!" 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 # diff --git a/hooks/lvm b/hooks/lvm index 98c0e0a..49a8887 100755 --- a/hooks/lvm +++ b/hooks/lvm @@ -23,5 +23,5 @@ fi copy_exec /lib/lvm-200/vgchange /sbin for x in dm_mod dm_snapshot dm_mirror; do - manual_add_modules ${x} + manual_add_modules ${x} done diff --git a/hooks/md b/hooks/md index becaba1..df2abc8 100755 --- a/hooks/md +++ b/hooks/md @@ -24,5 +24,5 @@ copy_exec /sbin/mdadm /sbin copy_exec /sbin/mdrun /sbin for x in md linear raid0 raid1 raid5 raid6 raid10; do - manual_add_modules ${x} + manual_add_modules ${x} done diff --git a/init b/init index f66281c..eb14326 100755 --- a/init +++ b/init @@ -18,7 +18,7 @@ fi mount -t tmpfs -o size=$tmpfs_size,mode=0755 udev /dev > /dev/.initramfs-tools mkdir /dev/.initramfs -mknod /dev/console c 5 1 +mknod /dev/console c 5 1 mknod /dev/null c 1 3 # Export the dpkg architecture diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 5d7c105..5712bdd 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -4,19 +4,19 @@ initramfs-tools \- an introduction to writing scripts for mkinitramfs .SH DESCRIPTION -initramfs-tools has one main script and two different sets of subscripts which +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. .SS Hook scripts -These are used when an initramfs image is created and not included in the +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 +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. +mounted. initramfs-tools uses shell variable names for handling dependencies. Notice that `-' is not a valid shell variable name and thus should @@ -40,7 +40,7 @@ the device node to mount as the rootfs. .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 +string of the form NFSSERVER:NFSPATH .TP \fB \fI boot @@ -79,7 +79,7 @@ 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. +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: @@ -113,7 +113,7 @@ the lvm hook script is run before your custom script. /usr/share/initramfs-tools/hook-functions contains a number of functions which deal with some common tasks in a hook script: .TP -\fB \fI +\fB \fI manual_add_modules adds a module (and any modules which it depends on) to the initramfs image. .RS @@ -389,7 +389,7 @@ if [ ! -e "/dev/mapper/frobb" ]; then panic "Frobnication device not found" fi -log_begin_msg "Starting frobnication" +log_begin_msg "Starting frobnication" /sbin/frobnicate "/dev/mapper/frobb" || panic "Frobnication failed" log_end_msg @@ -398,7 +398,7 @@ exit 0 .RE .SH DEBUG -It is easy to check the generated initramfs for its content. One may need +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 diff --git a/initramfs.conf.5 b/initramfs.conf.5 index 2874fdb..afd799b 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -5,7 +5,7 @@ initramfs.conf \- configuration file for mkinitramfs .SH DESCRIPTION The behaviour of -.B mkinitramfs +.B mkinitramfs can be modified by its configuration file. Each line in the file can be a configuration variable, a blank line, @@ -35,7 +35,7 @@ The default setting is \fImost\fP. .SH NFS VARIABLES .TP \fB BOOT -Allows to use an nfs drive as the root of the drive. +Allows to use an nfs drive as the root of the drive. The default is to boot of an \fIlocal\fP media (harddrive, USB stick). Set to \fInfs\fP for an NFS root share. diff --git a/mkinitramfs b/mkinitramfs index 6c048df..81a859e 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -8,7 +8,7 @@ CONFDIR="/etc/initramfs-tools" verbose="n" errors_to="2>/dev/null" # BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" -BUSYBOXDIR="/bin" +BUSYBOXDIR="/bin" OPTIONS=`getopt -o d:ko:r:v --long supported-host-version:,supported-target-version: -n "$0" -- "$@"` @@ -110,18 +110,18 @@ check_minkver ${version} ${CONFDIR}/hooks case "${version}" in /lib/modules/*/[!/]*) - ;; + ;; /lib/modules/[!/]*) - version="${version#/lib/modules/}" - version="${version%%/*}" - ;; + version="${version#/lib/modules/}" + version="${version%%/*}" + ;; esac case "${version}" in */*) - echo "$PROG: ${version} is not a valid kernel version" >&2 - exit 1 - ;; + echo "$PROG: ${version} is not a valid kernel version" >&2 + exit 1 + ;; esac if [ -d "${outfile}" ]; then @@ -157,7 +157,7 @@ export verbose export __TMPCPIOGZ for d in bin conf/conf.d etc lib modules sbin scripts; do - mkdir -p "${DESTDIR}/${d}" + mkdir -p "${DESTDIR}/${d}" done # MODULES=list case. Always honour. @@ -228,7 +228,7 @@ fi (cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}") || exit 1 if [ -s "${__TMPCPIOGZ}" ]; then - cat "${__TMPCPIOGZ}" >>"${outfile}" || exit 1 + cat "${__TMPCPIOGZ}" >>"${outfile}" || exit 1 fi if [ "${keep}" = "y" ]; then diff --git a/mkinitramfs-kpkg b/mkinitramfs-kpkg index 437b0ac..df3dc0c 100755 --- a/mkinitramfs-kpkg +++ b/mkinitramfs-kpkg @@ -79,20 +79,20 @@ version="${1}" case "${version}" in /lib/modules/*/[!/]*) - ;; + ;; /lib/modules/[!/]*) - version="${version#/lib/modules/}" - version="${version%%/*}" - ;; + version="${version#/lib/modules/}" + version="${version%%/*}" + ;; esac case "${version}" in */*) - echo "$PROG: ${version} is not a valid kernel version" >&2 - exit 1 - ;; + echo "$PROG: ${version} is not a valid kernel version" >&2 + exit 1 + ;; esac -# linux-image installs latest version +# 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 index 0bdc1dc..871a0f4 100644 --- a/mkinitramfs-kpkg.8 +++ b/mkinitramfs-kpkg.8 @@ -5,8 +5,8 @@ mkinitramfs-kpkg \- generates an initramfs image for kernel-package .SH SYNOPSIS .B mkinitramfs -.RB [ \-o -.IR outfile ] +.RB [ \-o +.IR outfile ] .RI [ version ] .B mkinitramfs .RB [ \-\-supported-host-version= @@ -29,7 +29,7 @@ for an better alternative. .TP \fB \-o \fI outfile -Write the image to +Write the image to .IR outfile . .TP diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 5af552b..3dc2e2e 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -5,13 +5,13 @@ mkinitramfs \- generate an initramfs image .SH SYNOPSIS .B mkinitramfs -.RB [ \-d -.IR confdir ] -.RB [ \-k ] -.RB [ \-o -.IR outfile ] -.RB [ \-r -.IR root ] +.RB [ \-d +.IR confdir ] +.RB [ \-k ] +.RB [ \-o +.IR outfile ] +.RB [ \-r +.IR root ] .RI [ version ] .B mkinitramfs .RB [ \-\-supported-host-version= @@ -21,17 +21,17 @@ mkinitramfs \- generate an initramfs image .SH DESCRIPTION The -.B mkinitramfs +.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 +is meant for advanced usage. On your local box .B update-initramfs should do all necessary steps. -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 +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 @@ -45,14 +45,14 @@ Keep the temporary directory used to make the image. .TP \fB \-o \fI outfile -Write the image to +Write the image to .IR outfile . .TP \fB \-r \fI root -Override the -.B ROOT -setting in +Override the +.B ROOT +setting in .IR initramfs.conf . .TP diff --git a/scripts/functions b/scripts/functions index c3a3e16..53e07ca 100644 --- a/scripts/functions +++ b/scripts/functions @@ -2,23 +2,23 @@ _log_msg() { - if [ "$quiet" = "y" ]; then return; fi - echo "$@" + if [ "$quiet" = "y" ]; then return; fi + echo "$@" } log_success_msg() { - _log_msg "Success: $@" + _log_msg "Success: $@" } log_failure_msg() { - _log_msg "Failure: $@" + _log_msg "Failure: $@" } log_warning_msg() { - _log_msg "Warning: $@" + _log_msg "Warning: $@" } log_begin_msg() @@ -190,7 +190,7 @@ load_modules() if [ -e /conf/modules ]; then cat /conf/modules | while read m; do # Skip empty lines - if [ -z "$m" ]; then + if [ -z "$m" ]; then continue fi # Skip comments - d?ash removes whitespace prefix diff --git a/scripts/local-top/udev_helper b/scripts/local-top/udev_helper index 5a747ba..2d4c209 100755 --- a/scripts/local-top/udev_helper +++ b/scripts/local-top/udev_helper @@ -19,5 +19,5 @@ esac # but might be an old fashioned ISA controller; in which case # we need to load ide-generic. if [ ! -e "${ROOT}" -o "${ROOT}" = "/dev/root" ]; then - modprobe -q ide-generic + modprobe -q ide-generic fi diff --git a/update-initramfs b/update-initramfs index 866609e..85a5dd2 100755 --- a/update-initramfs +++ b/update-initramfs @@ -189,7 +189,7 @@ create() if version_exists "${version}"; then panic "Cannot create version ${version}: already exists" fi - + if [ -e "${initramfs}" ]; then panic "${initramfs} already exists, cannot create." fi @@ -257,7 +257,7 @@ delete() 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 @@ -291,7 +291,7 @@ takeover=0 while getopts "k:cudyvtb:h?" flag; do case "${flag}" in k) - version="${OPTARG}" + version="${OPTARG}" ;; c) mode="c" diff --git a/update-initramfs.8 b/update-initramfs.8 index 9590ca3..a36e83c 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -5,25 +5,25 @@ 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 ] +.RB [ \-k +.IR version ] +.RB [ \-c ] +.RB [ \-u ] +.RB [ \-t ] +.RB [ \-v ] +.RB [ \-b ] +.RB [ \-h ] .SH DESCRIPTION The -.B update-initramfs +.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 +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 @@ -59,7 +59,7 @@ Set an different bootdir for the image creation. .TP \fB \-h -Print a short help page describing the available options in +Print a short help page describing the available options in .B update-initramfs. .SH AUTHOR -- cgit v1.2.3 From 8761821795732a9755d673e92fb45ac9202270df Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Jul 2006 09:13:28 +0200 Subject: - add BUSYBOX section to conf - add myri10ge, smc911x and hptiop modules - fix check_minkver() logic - escape resume variables - fix SEE ALSO section in all manpages - source /usr/share/initramfs-tools/conf.d/* - check against modules.dep before running depmod - more verbose output - open console with -i for dash interactive - fix resume param by LABEL or UUID - lvm has new prereq mdadm - update-initramfs fix -v calling - functions/scripts replace basename usage with shell expansion --- conf/initramfs.conf | 7 ++++++ debian/changelog | 50 +++++++++++++++++++++++++++++++++++++++++++ hook-functions | 17 ++++++++------- init | 4 ++-- initramfs-tools.8 | 5 +++-- initramfs.conf.5 | 16 +++++++++++--- mkinitramfs | 12 ++++++++--- mkinitramfs-kpkg.8 | 6 ++++-- mkinitramfs.8 | 9 ++++++-- scripts/functions | 8 +++++-- scripts/local-premount/resume | 9 ++++++++ scripts/local-top/lvm | 2 +- update-initramfs | 4 ++-- update-initramfs.8 | 6 ++++-- 14 files changed, 126 insertions(+), 29 deletions(-) (limited to 'update-initramfs.8') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index 84d3b24..b0d1dc0 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -17,6 +17,13 @@ MODULES=most +# BUSYBOX: [ y | n ] +# +# Use busybox if available. +# + +BUSYBOX=y + # # NFS Section of the config. # diff --git a/debian/changelog b/debian/changelog index faaf90a..e6f271b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,46 @@ +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 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 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 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 Mon, 24 Jul 2006 09:10:53 +0200 + initramfs-tools (0.70b) unstable; urgency=low * Be more careful about vi dot files, removed. @@ -61,6 +104,13 @@ initramfs-tools (0.69b) unstable; urgency=high -- maximilian attems Fri, 14 Jul 2006 00:31:30 +0200 +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 Fri, 21 Jul 2006 17:58:34 +0100 + initramfs-tools (0.69ubuntu3) edgy; urgency=low * debian/initramfs-tools.install, debian/initramfs-tools.preinst, diff --git a/hook-functions b/hook-functions index 9b1bd24..3175cba 100644 --- a/hook-functions +++ b/hook-functions @@ -149,8 +149,8 @@ auto_add_modules() net) for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx \ dl2k e1000 e100 epic100 eql fealnx famachi forcedeth \ - hp100 mace mv643xx_eth natsemi ne2k-pci netconsole \ - ns83820 pcnet32 r8169 s2io sis900 skge slhc starfire \ + hp100 mace mv643xx_eth myri10ge natsemi ne2k-pci netconsole \ + ns83820 pcnet32 r8169 s2io sis900 skge slhc smc911x starfire \ sundance sungem sungem_phy sunhme tg3 tlan de2104x \ de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb \ typhon via-rhine via-velocity yellowfin; do @@ -170,10 +170,10 @@ auto_add_modules() for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci \ aic79xx aic7xxx arcmsr ata_piix atari_scsi atp870u BusLogic \ cciss ch cpqarray dac960 dc395x dmx3191d dpt_i2o eata fdomain \ - gdth ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 \ - megaraid megaraid_mbox megaraid_mm mesh mptfc mptscsih \ - mptsas mptspi nsp32 osst qla1280 qla2100 qla2200 qla2300 \ - qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_mv \ + gdth hptiop ibmvscsic initio ipr ips isp1020 lpfc max_scsi \ + mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptfc \ + mptscsih mptsas mptspi nsp32 osst qla1280 qla2100 qla2200 \ + qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_mv \ sata_nv sata_promise sata_qstor sata_sil sata_sis sata_svw \ sata_sx4 sata_uli sata_via sata_vsc scsi_mod \ scsi_transport_fc scsi_transport_iscsi scsi_transport_spi \ @@ -231,7 +231,6 @@ check_minkver() { curversion=${1} initdir=${2} - set_initlist if [ -z ${initdir} ]; then DPKG_ARCH=`dpkg --print-installation-architecture` case ${DPKG_ARCH} in @@ -247,8 +246,10 @@ check_minkver() echo "W: not generating requested initramfs for kernel ${curversion}" >&2 exit 2 fi + return 0 fi - [ -z ${initdir} ] || for cm_x in ${initlist}; do + set_initlist + for cm_x in ${initlist}; do tmp=$(eval echo $(grep ^MINKVER ${initdir}/${cm_x} | cut -d'=' -f2)) if dpkg --compare-versions "${curversion}" lt "${tmp}"; then echo "W: ${cm_x} hook script requires at least kernel version ${tmp}" >&2 diff --git a/init b/init index eb14326..69d9542 100755 --- a/init +++ b/init @@ -76,7 +76,7 @@ for x in $(cat /proc/cmdline); do BOOT=${x#boot=} ;; resume=*) - RESUME=${x#resume=} + RESUME="${x#resume=}" ;; noresume) NORESUME=y @@ -104,7 +104,7 @@ for x in $(cat /proc/cmdline); do esac done -if [ -z ${NORESUME} ]; then +if [ -z "${NORESUME}" ]; then export resume=${RESUME} fi diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 5712bdd..0950b39 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -418,5 +418,6 @@ updated by Maximilian Attems . .SH SEE ALSO .BR -initramfs.conf (5), mkinitramfs (8), update-initramfs(8) - +.IR initramfs.conf (5), +.IR mkinitramfs (8), +.IR update-initramfs(8). diff --git a/initramfs.conf.5 b/initramfs.conf.5 index afd799b..8d6b621 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -32,6 +32,14 @@ The default setting is \fImost\fP. \fIlist\fP includes only modules from the additional modules list. +.TP +\fB BUSYBOX +Include busybox utilities for the boot scripts. +If set to 'n' +.B mkinitramfs +will build an initramfs whithout busybox. +Beware that many boot scripts need busybox utilities. + .SH NFS VARIABLES .TP \fB BOOT @@ -48,12 +56,14 @@ Specifies the network interface, like eth0. Defaults to \fIauto\fP in order to pick up value from DHCP server. Otherwise you need to specify \fIHOST:MOUNT\fP. -.SH SEE ALSO - -.BR initramfs-tools (8), mkinitramfs (8), update-initramfs (8) .SH AUTHOR The initramfs-tools are written by Jeff Bailey . This manual is maintained by Maximilian Attems . 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 index 0f1cb58..52dea45 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -83,11 +83,16 @@ fi . "${CONFDIR}/initramfs.conf" EXTRA_CONF='' -for i in ${CONFDIR}/conf.d/* /usr/share/initramfs-tools/conf.d/*; do +for i in ${CONFDIR}/conf.d/*; do EXTRA_CONF="${EXTRA_CONF} $(basename $i | grep '^[a-z0-9][a-z0-9\._-]*$' | grep -v '\.dpkg-.*$')"; done for i in ${EXTRA_CONF}; do -. ${CONFDIR}/conf.d/${i} + . ${CONFDIR}/conf.d/${i} +done +for i in /usr/share/initramfs-tools/conf.d/*; do + if [ -e $i ]; then + . ${i} + fi done if [ -z "${outfile}" ]; then @@ -135,7 +140,7 @@ if [ ! -e "${MODULESDIR}" ]; then echo "Cannot find ${MODULESDIR}" exit 1 fi -if [ ! -e "${MODULESDIR}/modules.depmod" ]; then +if [ ! -e "${MODULESDIR}/modules.dep" ]; then depmod ${version} fi @@ -228,6 +233,7 @@ 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 -9 >"${outfile}") || exit 1 if [ -s "${__TMPCPIOGZ}" ]; then diff --git a/mkinitramfs-kpkg.8 b/mkinitramfs-kpkg.8 index 871a0f4..2a3072b 100644 --- a/mkinitramfs-kpkg.8 +++ b/mkinitramfs-kpkg.8 @@ -46,5 +46,7 @@ This option queries if mkinitramfs can create ramdisks for kernel version mkinitramfs-kpkg is maintained by Maximilian Attems . .SH SEE ALSO - -.BR initramfs.conf (5), initramfs-tools (8), update-initramfs (8) +.BR +.IR initramfs.conf (5), +.IR initramfs-tools (8), +.IR update-initramfs (8). diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 3dc2e2e..65f6203 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -13,9 +13,12 @@ mkinitramfs \- generate an initramfs image .RB [ \-r .IR root ] .RI [ version ] + .B mkinitramfs .RB [ \-\-supported-host-version= .IR hversion ] + +.B mkinitramfs .RB [ \-\-supported-target-version= .IR tversion ] @@ -90,5 +93,7 @@ The initramfs-tools are written by Jeff Bailey . This manual is maintained by Maximilian Attems . .SH SEE ALSO - -.BR initramfs.conf (5), initramfs-tools (8), update-initramfs (8) +.BR +.IR initramfs.conf (5), +.IR initramfs-tools (8), +.IR update-initramfs (8). diff --git a/scripts/functions b/scripts/functions index 53e07ca..9e578d7 100644 --- a/scripts/functions +++ b/scripts/functions @@ -62,7 +62,7 @@ panic() modprobe -q i8042 modprobe -q atkbd echo $@ - PS1='(initramfs) ' /bin/sh /dev/console 2>&1 + PS1='(initramfs) ' /bin/sh -i /dev/console 2>&1 } maybe_break() @@ -84,7 +84,7 @@ set_initlist() if [ ! -x ${si_x} ]; then continue fi - initlist="${initlist} $(basename ${si_x})" + initlist="${initlist} ${si_x#${initdir}/}" done } @@ -168,6 +168,10 @@ reduce_prereqs() 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 diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume index 059e7a4..564d6f8 100755 --- a/scripts/local-premount/resume +++ b/scripts/local-premount/resume @@ -19,6 +19,15 @@ if [ "x${resume}" = "x" ]; then exit fi +case $resume in + LABEL=*) + resume="/dev/disk/by-label/${resume#LABEL=}" + ;; + UUID=*) + resume="/dev/disk/by-uuid/${resume#UUID=}" + ;; +esac + if [ ! -e "${resume}" ]; then exit fi diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 5323a7d..9a45220 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -1,6 +1,6 @@ #!/bin/sh -PREREQ="md" +PREREQ="mdadm" prereqs() { diff --git a/update-initramfs b/update-initramfs index 85a5dd2..ea74136 100755 --- a/update-initramfs +++ b/update-initramfs @@ -66,9 +66,9 @@ generate_initramfs() echo "update-initramfs: Generating ${initramfs}" OPTS="-o" if [ "${verbose}" = 1 ]; then - OPTS="-v $OPTS" + OPTS="-v ${OPTS}" fi - if mkinitramfs "${OPTS}" "${initramfs}" "${version}"; then + if mkinitramfs ${OPTS} "${initramfs}" "${version}"; then set_sha1 else mkinitramfs_return="$?" diff --git a/update-initramfs.8 b/update-initramfs.8 index a36e83c..7cfc206 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -67,5 +67,7 @@ The initramfs-tools are written by Jeff Bailey . This manual is maintained by Maximilian Attems . .SH SEE ALSO - -.BR initramfs.conf (5), initramfs-tools (8), mkinitramfs (8) +.BR +.IR initramfs.conf (5), +.IR initramfs-tools (8), +.IR mkinitramfs (8). -- cgit v1.2.3 From cf4bba337d69510c4551ba84e8c69562873ea93f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 4 Sep 2006 18:54:59 +0200 Subject: - better nfs handling: merge vagrant branch :) + local changes - cleanup stupid whitespace all over the place --- debian/changelog | 23 +++++++++++++++++++---- init | 4 ++-- initramfs.conf.5 | 4 ++-- mkinitramfs | 10 +++++----- scripts/local | 2 +- scripts/local-top/mdrun | 2 +- scripts/nfs | 35 ++++++++++++++++++----------------- update-initramfs.8 | 4 ++-- 8 files changed, 50 insertions(+), 34 deletions(-) (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index b46db63..1f00b6d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,11 +8,26 @@ initramfs-tools (0.78) unstable; urgency=medium * debian/scripts: Add /etc/kernel-img.conf section, as update-initramfs needs to act according to it. - -- maximilian attems Thu, 31 Aug 2006 14:44:01 +0200 + * scripts/nfs: Fix parsing of etherboot ip options. Based on a patch by + to Vagrant Cascadian . (closes: 385252) + + * scripts/nfs: No need to duplicate work of ntfsmount. Thanks for the patch + to Vagrant Cascadian . (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 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 + * mkinitramfs: Fix destination of mdrun.conf. Thanks for the report to Scott Glenn . Urgency high as broken in testing too and needed for partial mdadm upgrades. (closes: 385406) @@ -1347,7 +1362,7 @@ initramfs-tools (0.36ubuntu1) dapper; urgency=low initramfs-tools (0.36) unstable; urgency=low "Sunny Autumn Release" - + * Minor cleanups in mkiniramfs. * Remove manpage section about return values. Needs to be rephrased. @@ -1850,7 +1865,7 @@ initramfs-tools (0.13) breezy; urgency=low 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 diff --git a/init b/init index 0c336b3..85f6291 100755 --- a/init +++ b/init @@ -4,8 +4,6 @@ echo "Loading, please wait..." [ -d /dev ] || mkdir -m 0755 /dev [ -d /root ] || mkdir --mode=0700 /root -[ -e /dev/console ] || mknod /dev/console c 5 1 -[ -e /dev/null ] || mknod /dev/null c 1 3 [ -d /sys ] || mkdir /sys [ -d /proc ] || mkdir /proc [ -d /tmp ] || mkdir /tmp @@ -20,6 +18,8 @@ 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 /dev/console c 5 1 +[ -e /dev/null ] || mknod /dev/null c 1 3 > /dev/.initramfs-tools mkdir /dev/.initramfs diff --git a/initramfs.conf.5 b/initramfs.conf.5 index 8d6b621..89e9f4b 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH INITRAMFS.CONF 5 "$Date: 2005/12/06 $" "" "initramfs.conf manual" +.TH INITRAMFS.CONF 5 "$Date: 2006/09/02 $" "" "initramfs.conf manual" .SH NAME initramfs.conf \- configuration file for mkinitramfs @@ -35,7 +35,7 @@ The default setting is \fImost\fP. .TP \fB BUSYBOX Include busybox utilities for the boot scripts. -If set to 'n' +If set to 'n' .B mkinitramfs will build an initramfs whithout busybox. Beware that many boot scripts need busybox utilities. diff --git a/mkinitramfs b/mkinitramfs index c36e845..8d5911d 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -242,11 +242,11 @@ if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then echo "rootraiddev=${rootraiddev}" > ${DESTDIR}/conf/mdrun.conf mdadm=$(mdadm --detail "${rootraiddev}") echo "${mdadm}" | awk ' - $1 == "Number" && $2 == "Major" { start = 1; next } - $1 == "UUID" { print "uuid=" $3; next } - !start { next } - $2 == 0 && $3 == 0 { next } - { devices = devices " " $NF } + $1 == "Number" && $2 == "Major" { start = 1; next } + $1 == "UUID" { print "uuid=" $3; next } + !start { next } + $2 == 0 && $3 == 0 { next } + { devices = devices " " $NF } END { print "devices='\''" devices "'\''" }' \ >> ${DESTDIR}/conf/mdrun.conf copy_exec /sbin/mdadm /sbin diff --git a/scripts/local b/scripts/local index e7bf23e..299fc65 100644 --- a/scripts/local +++ b/scripts/local @@ -48,7 +48,7 @@ mountroot () # Get the root filesystem type if not set if [ -z "${ROOTFSTYPE}" ]; then eval $(fstype < ${ROOT}) - else + else FSTYPE=${ROOTFSTYPE} fi diff --git a/scripts/local-top/mdrun b/scripts/local-top/mdrun index da890c5..f733656 100755 --- a/scripts/local-top/mdrun +++ b/scripts/local-top/mdrun @@ -16,7 +16,7 @@ prereqs) esac if [ -e /scripts/local-top/mdadm ]; then - exit 0 + exit 0 fi unset raidlvl diff --git a/scripts/nfs b/scripts/nfs index f42ed22..c66e2a1 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -2,6 +2,8 @@ # FIXME This needs error checking +retry_nr=0 + # parse nfs bootargs + launch ipconfig and nfsmount do_nfsmount() { @@ -20,19 +22,21 @@ do_nfsmount() *) ipconfig -d $IPOPTS - # grab device entry from full line + # grab device entry from ip option NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} - NEW_DEVICE=${NEW_DEVICE%:*} + 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 - # grab server-ip - SERVER_IP=${IPOPTS#*:} - SERVER_IP=${SERVER_IP%:*:*:*:*:*:*} ;; esac - - # FIXME: source ipconfig output - might overwrite aboves + + # source relevant ipconfig output . /tmp/net-${DEVICE}.conf # get nfs root from dhcp @@ -45,13 +49,8 @@ do_nfsmount() NFSOPTS="-o ${NFSROOT#*,}" fi NFSROOT=${NFSROOT%%,*} - # server-ip could be passed by ip if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then - if [ -n "${SERVER_IP}" ]; then - NFSROOT="${SERVER_IP}:${NFSROOT}" - else - NFSROOT=${ROOTSERVER}:${ROOTPATH} - fi + NFSROOT=${ROOTSERVER}:${NFSROOT} fi fi @@ -92,13 +91,15 @@ mountroot() fi # loop until nfsmount succeds - # FIXME: another place of init bin hardcoding - while [ ${delay} -gt 0 ] && [ ! -e ${rootmnt}/sbin/init ]; do + while [ ${delay} -gt 0 ] && [ ! -e ${rootmnt}${init} ]; do + [ ${retry_nr} -gt 0 ] && \ [ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount" - do_nfsmount + do_nfsmount # FIXME: ipconfig loops every min at least - better param?? delay=$(( ${delay} - 1 )) - [ "$quiet" != "y" ] && log_end_msg + [ ${retry_nr} -gt 0 ] && [ "$quiet" != "y" ] && log_end_msg + [ ! -e ${rootmnt}/sbin/init ] && /bin/sleep 0.1 + retry_nr=$(( ${retry_nr} + 1 )) done [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom" diff --git a/update-initramfs.8 b/update-initramfs.8 index 7cfc206..fa1728a 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS 8 "$Date: 2006/02/17" $" "" "update-initramfs manual" +.TH UPDATE-INITRAMFS 8 "$Date: 2006/09/02" $" "" "update-initramfs manual" .SH NAME update-initramfs \- generate an initramfs image @@ -67,7 +67,7 @@ The initramfs-tools are written by Jeff Bailey . This manual is maintained by Maximilian Attems . .SH SEE ALSO -.BR +.BR .IR initramfs.conf (5), .IR initramfs-tools (8), .IR mkinitramfs (8). -- cgit v1.2.3 From 773f7f37a7a28977409e1369ae284d4ccc03812a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 12 Sep 2006 09:29:44 +0200 Subject: - check for ro /boot - allow -k all for all modes and more feedback on deleting - small whitespace cleanup --- HACKING | 1 - break.txt | 4 ---- debian/changelog | 18 ++++++++++++++ update-initramfs | 69 +++++++++++++++++++++++++++++++++++------------------- update-initramfs.8 | 34 ++++++++++++++++++++++----- 5 files changed, 91 insertions(+), 35 deletions(-) delete mode 100644 break.txt (limited to 'update-initramfs.8') diff --git a/HACKING b/HACKING index 2fd9136..d171c56 100644 --- a/HACKING +++ b/HACKING @@ -16,4 +16,3 @@ I hope this helps. I'll paste this text into a HACKING file on the hopes that s Tks, Jeff Bailey - diff --git a/break.txt b/break.txt deleted file mode 100644 index 64ecf84..0000000 --- a/break.txt +++ /dev/null @@ -1,4 +0,0 @@ -if [ x${break} = xyes ]; then - panic "Spawning shell within the initramfs" -fi - diff --git a/debian/changelog b/debian/changelog index 1f00b6d..6c06903 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,21 @@ +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 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 to improve the awk snippet. + + * update-initramfs: run_lilo don't return 1 if no lilo executable is there. + Thanks "Peter D. St. Onge" for the report. + (closes: 386999) + + -- maximilian attems 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, diff --git a/update-initramfs b/update-initramfs index 5cd1e2e..fa6c837 100755 --- a/update-initramfs +++ b/update-initramfs @@ -15,7 +15,7 @@ usage() Usage: ${0} [OPTION]... Options: - -k [version] Specify kernel version or all + -k [version] Specify kernel version or 'all' -c Create a new initramfs -u Update an existing initramfs -d Remove an existing initramfs @@ -86,7 +86,7 @@ generate_initramfs() run_lilo() { if [ ! -x /sbin/lilo ]; then - return 1 + return 0 fi lilo -t > /dev/null if [ $? -eq 0 ]; then @@ -138,6 +138,17 @@ delete_sha1() rm -f "${STATEDIR}/${version}" } +# ro /boot is not modified +ro_boot_check() +{ + boot_opts=$(awk '/boot/{if (match($4, /ro/)) 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="" @@ -236,27 +247,10 @@ update() exit 0 fi - if [ "${version}" = "all" ]; 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 - for u_version in ${version_list}; do - if [ "${verbose}" = "1" ]; then - vflag="-v" - fi - # Don't stop if one version doesn't work. - set +e - "${0}" -u -k "${u_version}" ${vflag} - set -e - done - exit 0 - fi - set_initramfs + ro_boot_check + altered_check generate_initramfs @@ -283,6 +277,8 @@ delete() altered_check + echo "update-initramfs: Deleting ${initramfs}" + delete_sha1 rm -f "${initramfs}" @@ -344,11 +340,38 @@ while getopts "k:cudyvtb:h?" flag; do done # Validate arguments - if [ -z "${mode}" ]; then usage "You must specify at least one of -c, -u, or -d." fi +if [ "${version}" = "all" ]; 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 @@ -360,5 +383,3 @@ case "${mode}" in update ;; esac - - diff --git a/update-initramfs.8 b/update-initramfs.8 index fa1728a..871e9a5 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -1,10 +1,10 @@ -.TH UPDATE-INITRAMFS 8 "$Date: 2006/09/02" $" "" "update-initramfs manual" +.TH UPDATE-INITRAMFS 8 "$Date: 2006/09/06" $" "" "update\-initramfs manual" .SH NAME -update-initramfs \- generate an initramfs image +update\-initramfs \- generate an initramfs image .SH SYNOPSIS -.B update-initramfs +.B update\-initramfs .RB [ \-k .IR version ] .RB [ \-c ] @@ -15,7 +15,7 @@ update-initramfs \- generate an initramfs image .RB [ \-h ] .SH DESCRIPTION The -.B update-initramfs +.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. @@ -29,8 +29,17 @@ happens in this early userspace. .SH OPTIONS .TP \fB \-k \fI version -Set the kernel version for whom the initramfs will be generated. +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 @@ -60,7 +69,20 @@ Set an different bootdir for the image creation. .TP \fB \-h Print a short help page describing the available options in -.B update-initramfs. +.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 Jeff Bailey . -- cgit v1.2.3 From 849c7c5f29f3689a4879204c23a6e89e2e6c0d7e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 13 Oct 2006 08:52:12 +0200 Subject: - add backup handling to initramfs-tools - allow conservative settings for skipping updated initramfs. - debug output to screen - parse mbr for lilo + small fixes --- conf/update-initramfs.conf | 11 ++++++ debian/changelog | 38 ++++++++++++++++++++ debian/initramfs-tools.install | 1 + debian/initramfs-tools.manpages | 1 + debian/initramfs-tools.preinst | 2 +- hooks/kernelextras | 1 - init | 4 +++ initramfs-tools.8 | 9 +++-- initramfs.conf.5 | 6 ++-- mkinitramfs.8 | 6 ++-- scripts/init-top/framebuffer | 69 +++++++++++++++++++++++++++++++----- update-initramfs | 78 +++++++++++++++++++++++++++++++++++++---- update-initramfs.8 | 6 ++-- update-initramfs.conf.5 | 26 ++++++++++++++ 14 files changed, 228 insertions(+), 30 deletions(-) create mode 100644 conf/update-initramfs.conf create mode 100644 update-initramfs.conf.5 (limited to 'update-initramfs.8') diff --git a/conf/update-initramfs.conf b/conf/update-initramfs.conf new file mode 100644 index 0000000..36c3dde --- /dev/null +++ b/conf/update-initramfs.conf @@ -0,0 +1,11 @@ +# +# Configuration file for update-initramfs(8) +# + +# +# update_initramfs [ yes | no ] +# +# Default is yes +# If set to no disables any update to initramfs beside kernel upgrade + +update_initramfs=yes diff --git a/debian/changelog b/debian/changelog index 2990625..1eaf2f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,41 @@ +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 for report. (closes: 387780) + + * init: When debug is invoked with an additional arg, write output to + console. Thanks Christian Aichinger for the idea. + Should ease remote debugging. + + * initramfs-tools.8: Document new debug= 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 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 . + + * 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 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. + + -- maximilian attems Fri, 13 Oct 2006 08:12:40 +0200 + initramfs-tools (0.82) unstable; urgency=high * Merge 0.69ubuntu15, plus 0.69ubuntu14 and 0.69ubuntu11 changelog entries diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index 5514c2e..5b3d8a6 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -3,6 +3,7 @@ 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 diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages index f127e99..0c88045 100644 --- a/debian/initramfs-tools.manpages +++ b/debian/initramfs-tools.manpages @@ -3,3 +3,4 @@ mkinitramfs-kpkg.8 initramfs.conf.5 initramfs-tools.8 update-initramfs.8 +update-initramfs.conf.5 diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 7b02612..fc1fd06 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -3,7 +3,7 @@ set -e case "$1" in - configure) + install) if [ -n "$2" ]; then mkdir -p /etc/initramfs-tools/conf.d diff --git a/hooks/kernelextras b/hooks/kernelextras index 6bbd6b9..714e9a9 100755 --- a/hooks/kernelextras +++ b/hooks/kernelextras @@ -42,4 +42,3 @@ manual_add_modules vga16fb if [ ${fbcon} = "y" ]; then force_load fbcon fi - diff --git a/init b/init index 85f6291..fbe32be 100755 --- a/init +++ b/init @@ -110,6 +110,10 @@ for x in $(cat /proc/cmdline); do exec >/tmp/initramfs.debug 2>&1 set -x ;; + debug=*) + debug=y + set -x + ;; break=*) break=${x#break=} ;; diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 7af09e1..4ce53d3 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -1,4 +1,4 @@ -.TH INITRAMFS-TOOLS 8 "Date: 2006/08/19" "" "mkinitramfs script overview" +.TH INITRAMFS-TOOLS 8 "Date: 2006/10/11" "" "mkinitramfs script overview" .SH NAME initramfs-tools \- an introduction to writing scripts for mkinitramfs @@ -96,7 +96,9 @@ sets an timeout on panic. Currently only zero value supported. .TP \fB \fI debug -generates lots of output to /tmp/initramfs.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 @@ -443,7 +445,8 @@ cpio -i -d -H newc --no-absolute-filenames .SH AUTHOR -The initramfs-tools are written by Jeff Bailey . +The initramfs-tools are written by Maximilian Attems , +Jeff Bailey and numerous others. .PP This manual was written by David H\[:a]rdeman , updated by Maximilian Attems . diff --git a/initramfs.conf.5 b/initramfs.conf.5 index 89e9f4b..ca47a02 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH INITRAMFS.CONF 5 "$Date: 2006/09/02 $" "" "initramfs.conf manual" +.TH INITRAMFS.CONF 5 "$Date: 2006/10/12 $" "" "initramfs.conf manual" .SH NAME initramfs.conf \- configuration file for mkinitramfs @@ -58,8 +58,8 @@ Otherwise you need to specify \fIHOST:MOUNT\fP. .SH AUTHOR -The initramfs-tools are written by Jeff Bailey . -This manual is maintained by Maximilian Attems . +The initramfs-tools are written by Maximilian Attems , +Jeff Bailey and numerous others. Loosely based on mkinitrd.conf by Herbert Xu. .SH SEE ALSO diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 9041ba6..23e719f 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS 8 "$Date: 2006/08/12 $" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "$Date: 2006/10/12 $" "" "mkinitramfs manual" .SH NAME mkinitramfs \- generate an initramfs image @@ -95,8 +95,8 @@ it to be loaded by ACPI. .SH AUTHOR -The initramfs-tools are written by Jeff Bailey . -This manual is maintained by Maximilian Attems . +The initramfs-tools are written by Maximilian Attems , +Jeff Bailey and numerous others. .SH SEE ALSO .BR diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer index 4f0ab62..bafbe19 100755 --- a/scripts/init-top/framebuffer +++ b/scripts/init-top/framebuffer @@ -13,27 +13,78 @@ prereqs) ;; esac + +# The options part of the kernel "video=" argument (i.e. everyting +# after "video=:") has very inconsistent rules. +# +# Generally the following applies: +# 1) options are comma-separated +# 2) options can be in either of these three forms: +# =, :, . +# 3) the "mode" option has the form x[M][R][-][@][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: +# : -> = +# -> =1 +# -> mode= +parse_video_opts() +{ + local OPTS="$1" + local IFS="," + + # Must be a line like video=:,[opt2]... + if [ "$OPTS" = "${OPTS%%:*}" ]; then + return + fi + OPTS="${OPTS#*:}" + for opt in $OPTS; do + # Already in the "=" form + if [ "$opt" != "${opt#*=}" ]; then + echo -n "$opt " + # Presumably a modevalue without the "mode=" prefix + elif [ "$opt" != "${opt#[[:digit:]]*x[[:digit:]]}"; then + echo -n "mode=$opt " + # Presumably a boolean + else + echo -n "$opt=1 " + fi + done +} + +FB="" +OPTS="" + SPLASH=false; VESA=false; for x in $(cat /proc/cmdline); do case $x in splash*) - SPLASH=true; + FB="vga16fb"; + OPTS=""; ;; vga=*) - VESA=true; + FB="vesafb"; + OPTS=""; ;; + video=*) + FB=${x#*=} + FB="${FB%%:*}" + OPTS="$(parse_video_opts "$TMP")" esac done -if [ $SPLASH = "true" -o $VESA = "true" ]; then - modprobe -q fbcon - if [ $VESA = "true" ]; then - modprobe -q vesafb - else - modprobe -q vga16fb - fi +if [ -n "$FB" ]; then + modprobe -q $FB $OPTS +fi + +if [ -e /proc/fb ]; then + while read fbno desc; do + mknod /dev/fb$fbno 29 $fbno + done < /proc/fb + mknod /dev/fb0 c 29 0 for i in 0 1 2 3 4 5 6 7 8; do mknod /dev/tty$i c 4 $i diff --git a/update-initramfs b/update-initramfs index 45d4631..4995553 100755 --- a/update-initramfs +++ b/update-initramfs @@ -2,10 +2,13 @@ STATEDIR=/var/lib/initramfs-tools BOOTDIR=/boot +CONF=/etc/initramfs-tools/update-initramfs.conf KPKGCONF=/etc/kernel-img.conf set -e +[ -r ${CONF} ] && . ${CONF} + usage() { if [ -n "${1}" ]; then @@ -62,6 +65,46 @@ 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}" + mv -f "${initramfs}" "${initramfs_bak}" + verbose "Keeping ${initramfs_bak}" +} + +# keep booted initramfs +backup_booted_initramfs() +{ + # chroot + [ ! -r /proc/uptime ] && rm -f "${initramfs_bak}" && return 0 + + # no backup yet + initramfs_bak="${initramfs}.dpkg-bak" + 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} +} + generate_initramfs() { echo "update-initramfs: Generating ${initramfs}" @@ -91,11 +134,27 @@ run_lilo() fi } +# check if lilo is on mbr +mbr_check() +{ + boot=$(awk -F = '/^boot=/{ print $2}' /etc/lilo.conf) + [ -z "${boot}" ] && return 0 + [ ! -r "${boot}" ] && return 0 + dd if="${boot}" bs=512 skip=0 count=1 2> /dev/null | grep -q LILO + [ $? -eq 0 ] && run_lilo && return 0 + 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 +} + # only run lilo if no grub is around # or if "do_bootloader = yes" is set run_bootloader() { - if [ -x /sbin/grub ] || [ -e /boot/grub/menu.lst ]; then + 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 '/bootloader/{print $3}' "${KPKGCONF}") @@ -103,13 +162,10 @@ run_bootloader() || [ "${do_b}" = "YES" ]; then run_lilo return 0 + else + mbr_check + return 0 fi - - 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 fi return 0 fi @@ -228,6 +284,11 @@ create() update() { + if [ "${update_initramfs}" = "no" ]; then + echo "update-initramfs: Not updating initramfs." + exit 0 + fi + if [ -z "${version}" ]; then set_linked_version fi @@ -251,10 +312,13 @@ update() altered_check + backup_initramfs + generate_initramfs run_bootloader + backup_booted_initramfs } delete() diff --git a/update-initramfs.8 b/update-initramfs.8 index 871e9a5..a562349 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS 8 "$Date: 2006/09/06" $" "" "update\-initramfs manual" +.TH UPDATE-INITRAMFS 8 "$Date: 2006/10/12" $" "" "update\-initramfs manual" .SH NAME update\-initramfs \- generate an initramfs image @@ -85,8 +85,8 @@ Create the initramfs for a specific kernel: .B update\-initramfs -c -k 2.6.18-1-686 .SH AUTHOR -The initramfs-tools are written by Jeff Bailey . -This manual is maintained by Maximilian Attems . +The initramfs-tools are written by Maximilian Attems , +Jeff Bailey and numerous others. .SH SEE ALSO .BR diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 new file mode 100644 index 0000000..551f6c9 --- /dev/null +++ b/update-initramfs.conf.5 @@ -0,0 +1,26 @@ +.TH UPDATE-INITRAMFS.CONF 5 "$Date: 2006/10/12 $" "" "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. +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. + +.SH AUTHOR +The initramfs-tools are written by Maximilian Attems , +Jeff Bailey and numerous others. +.SH SEE ALSO +.BR +.IR initramfs-tools (8), +.IR mkinitramfs (8), +.IR update-initramfs (8). -- cgit v1.2.3 From abb7b4e13f1fab5b6d9c4ea0682429c474931fa0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 13 Oct 2006 09:11:54 +0200 Subject: whitespace policy --- update-initramfs | 3 +-- update-initramfs.8 | 8 ++++---- update-initramfs.conf.5 | 1 + 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'update-initramfs.8') diff --git a/update-initramfs b/update-initramfs index 4995553..11d48be 100755 --- a/update-initramfs +++ b/update-initramfs @@ -7,7 +7,7 @@ KPKGCONF=/etc/kernel-img.conf set -e -[ -r ${CONF} ] && . ${CONF} +[ -r ${CONF} ] && . ${CONF} usage() { @@ -89,7 +89,6 @@ backup_booted_initramfs() verbose "Backup ${initramfs}.bak" return 0 fi - # keep booted initramfs uptime_days=$(awk '{printf "%d", $1 / 3600 / 24}' /proc/uptime) diff --git a/update-initramfs.8 b/update-initramfs.8 index a562349..0db2609 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -33,12 +33,12 @@ 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 +The use of "all" for the .I version -string specifies -.B update\-initramfs +string specifies +.B update\-initramfs to execute the chosen action for all kernel versions, that are already known -to +to .B update\-initramfs. .TP diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 index 551f6c9..30ef6d0 100644 --- a/update-initramfs.conf.5 +++ b/update-initramfs.conf.5 @@ -21,6 +21,7 @@ The initramfs-tools are written by Maximilian Attems , Jeff Bailey and numerous others. .SH SEE ALSO .BR +.IR initramfs.conf (5), .IR initramfs-tools (8), .IR mkinitramfs (8), .IR update-initramfs (8). -- cgit v1.2.3 From adda784dc1289b3ceb0ce207850ef9a93102febe Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 16 Apr 2007 20:05:00 +0200 Subject: minor cleanups to get 0.87 ready: - add changelog entries to david changes - change to my new debian.org email adresses in manpages too - module list is alphabetic --- debian/changelog | 7 +++++-- debian/copyright | 2 +- hook-functions | 4 ++-- initramfs-tools.8 | 4 ++-- initramfs.conf.5 | 2 +- mkinitramfs-kpkg.8 | 2 +- mkinitramfs.8 | 2 +- update-initramfs.8 | 2 +- update-initramfs.conf.5 | 2 +- 9 files changed, 15 insertions(+), 12 deletions(-) (limited to 'update-initramfs.8') diff --git a/debian/changelog b/debian/changelog index 838da0c..c5a5e01 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,9 +11,12 @@ initramfs-tools (0.87) UNRELEASED; urgency=low * Add support for loading keymaps. (closes: 337663) * Move legacy code from mkinitramfs to separate hooks. * Ubuntu merge - - Add PS3 module loading functionality. + - 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. - -- David Härdeman Sat, 14 Apr 2007 10:53:56 +0200 + -- maximilian attems Mon, 16 Apr 2007 19:54:04 +0200 initramfs-tools (0.86) unstable; urgency=low diff --git a/debian/copyright b/debian/copyright index 44905db..2b3581a 100644 --- a/debian/copyright +++ b/debian/copyright @@ -17,7 +17,7 @@ Authors: Adam Conrad , Ben Collins , David Härdeman , Jeff Bailey , - maximilian attems + maximilian attems , Scott James Remnant Copyright: 2005 - 2006 Adam Conrad diff --git a/hook-functions b/hook-functions index f33d323..a5d1f61 100644 --- a/hook-functions +++ b/hook-functions @@ -168,12 +168,12 @@ auto_add_modules() net) for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx \ dl2k e1000 e100 ehea epic100 ep93xx_eth eql fealnx \ - famachi forcedeth hp100 mace mv643xx_eth myri10ge \ + famachi forcedeth gelic_net hp100 mace mv643xx_eth myri10ge \ natsemi ne2k-pci netconsole ns83820 pcnet32 qla3xxx \ r8169 s2io sis900 skge slhc smc911x starfire \ sundance sungem sungem_phy sunhme tg3 tlan de2104x \ de4x5 dmfe tulip winbond-840 xircom_cb xircom_tulip_cb \ - typhon via-rhine via-velocity yellowfin gelic_net; do + typhon via-rhine via-velocity yellowfin; do manual_add_modules "${x}" done ;; diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 20b9755..fd0a83f 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -449,11 +449,11 @@ cpio -i -d -H newc --no-absolute-filenames .SH AUTHOR -The initramfs-tools are written by Maximilian Attems , +The initramfs-tools are written by Maximilian Attems , Jeff Bailey and numerous others. .PP This manual was written by David H\[:a]rdeman , -updated by Maximilian Attems . +updated by Maximilian Attems . .SH SEE ALSO .BR diff --git a/initramfs.conf.5 b/initramfs.conf.5 index 2258cb7..c7fee03 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -65,7 +65,7 @@ Otherwise you need to specify \fIHOST:MOUNT\fP. .SH AUTHOR -The initramfs-tools are written by Maximilian Attems , +The initramfs-tools are written by Maximilian Attems , Jeff Bailey and numerous others. Loosely based on mkinitrd.conf by Herbert Xu. diff --git a/mkinitramfs-kpkg.8 b/mkinitramfs-kpkg.8 index 2a3072b..2d96465 100644 --- a/mkinitramfs-kpkg.8 +++ b/mkinitramfs-kpkg.8 @@ -43,7 +43,7 @@ This option queries if mkinitramfs can create ramdisks for kernel version .IR tversion . .SH AUTHOR -mkinitramfs-kpkg is maintained by Maximilian Attems . +mkinitramfs-kpkg is maintained by Maximilian Attems . .SH SEE ALSO .BR diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 6d81233..a35a561 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -100,7 +100,7 @@ it to be loaded by ACPI. .SH AUTHOR -The initramfs-tools are written by Maximilian Attems , +The initramfs-tools are written by Maximilian Attems , Jeff Bailey and numerous others. .SH SEE ALSO diff --git a/update-initramfs.8 b/update-initramfs.8 index 0db2609..4ba12de 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -85,7 +85,7 @@ Create the initramfs for a specific kernel: .B update\-initramfs -c -k 2.6.18-1-686 .SH AUTHOR -The initramfs-tools are written by Maximilian Attems , +The initramfs-tools are written by Maximilian Attems , Jeff Bailey and numerous others. .SH SEE ALSO diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 index 50e1f95..302cffe 100644 --- a/update-initramfs.conf.5 +++ b/update-initramfs.conf.5 @@ -17,7 +17,7 @@ conservative manners needs to be applied. This disables the \fBupdate_initramfs -u\fP call. .SH AUTHOR -The initramfs-tools are written by Maximilian Attems , +The initramfs-tools are written by Maximilian Attems , Jeff Bailey and numerous others. .SH SEE ALSO .BR -- cgit v1.2.3 From 701f56e007030e64f117fb3ff06ed6d394bfc86e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 29 Mar 2008 12:24:22 +0100 Subject: manpages: fix hyphen-used-as-minus-sign properly escape minus signs to make them easily pastable. --- initramfs-tools.8 | 10 +++++----- update-initramfs.8 | 2 +- update-initramfs.conf.5 | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'update-initramfs.8') diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 3708575..317fdc8 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -387,7 +387,7 @@ esac . /usr/share/initramfs-tools/hook-functions # Begin real processing below this line -if [ ! -x "/sbin/frobnicate" ]; then +if [ ! \-x "/sbin/frobnicate" ]; then exit 0 fi @@ -419,11 +419,11 @@ prereqs) esac # Begin real processing below this line -if [ ! -x "/sbin/frobnicate" ]; then +if [ ! \-x "/sbin/frobnicate" ]; then panic "Frobnication executable not found" fi -if [ ! -e "/dev/mapper/frobb" ]; then +if [ ! \-e "/dev/mapper/frobb" ]; then panic "Frobnication device not found" fi @@ -442,8 +442,8 @@ to double-check if it contains the relevant binaries, libs or modules: .nf mkdir tmp/initramfs cd tmp/initramfs -gunzip -c -9 /boot/initrd.img-2.6.18-1-686 | \\ -cpio -i -d -H newc --no-absolute-filenames +gunzip \-c \-9 /boot/initrd.img\-2.6.18\-1\-686 | \\ +cpio \-i \-d \-H newc \-\-no\-absolute\-filenames .fi .RE diff --git a/update-initramfs.8 b/update-initramfs.8 index 4ba12de..84f0b14 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -30,7 +30,7 @@ happens in this early userspace. .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. +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 diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 index 58e3cc4..fcba12f 100644 --- a/update-initramfs.conf.5 +++ b/update-initramfs.conf.5 @@ -15,7 +15,7 @@ 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. +the \fBupdate_initramfs \-u\fP call. .SH AUTHOR The initramfs-tools are written by Maximilian Attems , -- cgit v1.2.3 From 0d2613de43f952a0ef8b74bd4594ea1c0e910ad3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 4 Jul 2008 00:09:35 +0200 Subject: doc: fix date string of manual pages. thanks to jidanni@jidanni.org Signed-off-by: maximilian attems --- initramfs-tools.8 | 2 +- initramfs.conf.5 | 2 +- mkinitramfs-kpkg.8 | 2 +- mkinitramfs.8 | 2 +- update-initramfs.8 | 2 +- update-initramfs.conf.5 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'update-initramfs.8') diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 83884b7..d096e80 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -1,4 +1,4 @@ -.TH INITRAMFS-TOOLS 8 "Date: 2007/07/07" "" "mkinitramfs script overview" +.TH INITRAMFS-TOOLS 8 "2007/07/07" "" "mkinitramfs script overview" .SH NAME initramfs-tools \- an introduction to writing scripts for mkinitramfs diff --git a/initramfs.conf.5 b/initramfs.conf.5 index 8957ba6..ac3b959 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH INITRAMFS.CONF 5 "$Date: 2007/01/01 $" "" "initramfs.conf manual" +.TH INITRAMFS.CONF 5 "2007/01/01" "" "initramfs.conf manual" .SH NAME initramfs.conf \- configuration file for mkinitramfs diff --git a/mkinitramfs-kpkg.8 b/mkinitramfs-kpkg.8 index 2d96465..482a49b 100644 --- a/mkinitramfs-kpkg.8 +++ b/mkinitramfs-kpkg.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS-KPKG 8 "$Date: 2006/02/17 $" "" "mkinitramfs-kpkg manual" +.TH MKINITRAMFS-KPKG 8 "2006/02/17" "" "mkinitramfs-kpkg manual" .SH NAME mkinitramfs-kpkg \- generates an initramfs image for kernel-package diff --git a/mkinitramfs.8 b/mkinitramfs.8 index a40de53..8d94a8c 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS 8 "$Date: 2007/08/08 $" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "2007/08/08" "" "mkinitramfs manual" .SH NAME mkinitramfs \- low-level tool for generating an initramfs image diff --git a/update-initramfs.8 b/update-initramfs.8 index 84f0b14..77ebe17 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS 8 "$Date: 2006/10/12" $" "" "update\-initramfs manual" +.TH UPDATE-INITRAMFS 8 "2006/10/12" "" "update\-initramfs manual" .SH NAME update\-initramfs \- generate an initramfs image diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 index fcba12f..331ad25 100644 --- a/update-initramfs.conf.5 +++ b/update-initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS.CONF 5 "$Date: 2007/08/09 $" "" "update-initramfs.conf manual" +.TH UPDATE-INITRAMFS.CONF 5 "2007/08/09" "" "update-initramfs.conf manual" .SH NAME update-initramfs.conf \- configuration file for update-initramfs -- cgit v1.2.3 From c9df41aa3214887d2f306a493778a3cf8965060f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 19 Dec 2008 01:57:01 +0100 Subject: update-initramfs.8: List -d and mark the non-optional as such. -d was missing in synopsis. -c or -d or -u are not optional. --- update-initramfs.8 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'update-initramfs.8') diff --git a/update-initramfs.8 b/update-initramfs.8 index 77ebe17..a01ba06 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -1,14 +1,13 @@ -.TH UPDATE-INITRAMFS 8 "2006/10/12" "" "update\-initramfs manual" +.TH UPDATE-INITRAMFS 8 "2008/12/19" "" "update\-initramfs manual" .SH NAME update\-initramfs \- generate an initramfs image .SH SYNOPSIS .B update\-initramfs +.RB \-c | \-d | \-u .RB [ \-k .IR version ] -.RB [ \-c ] -.RB [ \-u ] .RB [ \-t ] .RB [ \-v ] .RB [ \-b ] -- cgit v1.2.3 From 6966048d94e1951fc7699a004bd6e1f602c2ec3e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 19 Dec 2008 14:25:48 +0100 Subject: manpages: Set Linux as necessary OS. thanks to jidanni@jidanni.org for pointing out the missed field. --- initramfs-tools.8 | 2 +- initramfs.conf.5 | 2 +- mkinitramfs-kpkg.8 | 2 +- mkinitramfs.8 | 2 +- update-initramfs.8 | 2 +- update-initramfs.conf.5 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'update-initramfs.8') diff --git a/initramfs-tools.8 b/initramfs-tools.8 index ea0952b..05c7734 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -1,4 +1,4 @@ -.TH INITRAMFS-TOOLS 8 "2008/12/18" "" "mkinitramfs script overview" +.TH INITRAMFS-TOOLS 8 "2008/12/19" "Linux" "mkinitramfs script overview" .SH NAME initramfs-tools \- an introduction to writing scripts for mkinitramfs diff --git a/initramfs.conf.5 b/initramfs.conf.5 index ac3b959..6f6ee06 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH INITRAMFS.CONF 5 "2007/01/01" "" "initramfs.conf manual" +.TH INITRAMFS.CONF 5 "2008/12/19" "Linux" "initramfs.conf manual" .SH NAME initramfs.conf \- configuration file for mkinitramfs diff --git a/mkinitramfs-kpkg.8 b/mkinitramfs-kpkg.8 index 482a49b..0e8783e 100644 --- a/mkinitramfs-kpkg.8 +++ b/mkinitramfs-kpkg.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS-KPKG 8 "2006/02/17" "" "mkinitramfs-kpkg manual" +.TH MKINITRAMFS-KPKG 8 "2008/12/19" "Linux" "mkinitramfs-kpkg manual" .SH NAME mkinitramfs-kpkg \- generates an initramfs image for kernel-package diff --git a/mkinitramfs.8 b/mkinitramfs.8 index abb3f39..5d3c42b 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS 8 "2008/08/12" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "2008/12/19" "Linux" "mkinitramfs manual" .SH NAME mkinitramfs \- low-level tool for generating an initramfs image diff --git a/update-initramfs.8 b/update-initramfs.8 index a01ba06..efc1c2e 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS 8 "2008/12/19" "" "update\-initramfs manual" +.TH UPDATE-INITRAMFS 8 "2008/12/19" "Linux" "update\-initramfs manual" .SH NAME update\-initramfs \- generate an initramfs image diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 index fa28ee0..30e1a97 100644 --- a/update-initramfs.conf.5 +++ b/update-initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS.CONF 5 "2008/07/03" "" "update-initramfs.conf manual" +.TH UPDATE-INITRAMFS.CONF 5 "2008/12/19" "Linux" "update-initramfs.conf manual" .SH NAME update-initramfs.conf \- configuration file for update-initramfs -- cgit v1.2.3 From c5e4c28ef9e1b205a8a69c5c663ab00a1dfc97f3 Mon Sep 17 00:00:00 2001 From: e2xbegqsdyt21hfc Date: Mon, 18 Feb 2008 19:01:48 -0800 Subject: update-initramfs.8: mentions the specific conf file adds FILES section. --- update-initramfs.8 | 3 +++ 1 file changed, 3 insertions(+) (limited to 'update-initramfs.8') diff --git a/update-initramfs.8 b/update-initramfs.8 index efc1c2e..bf5080b 100644 --- a/update-initramfs.8 +++ b/update-initramfs.8 @@ -83,6 +83,9 @@ Create the initramfs for a specific kernel: .PP .B update\-initramfs -c -k 2.6.18-1-686 +.SH FILES +/etc/initramfs-tools/update-initramfs.conf + .SH AUTHOR The initramfs-tools are written by Maximilian Attems , Jeff Bailey and numerous others. -- cgit v1.2.3