From de9c780f57ae626f05ec1c971c56648250cba03c Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Wed, 8 Jun 2005 21:13:41 +0000 Subject: Initial checkin --- debian/README | 12 +++ debian/TODO | 8 ++ debian/changelog | 64 ++++++++++++++ debian/compat | 1 + debian/control | 12 +++ debian/copyright | 10 +++ debian/files | 1 + debian/initramfs-tools.examples | 1 + debian/initramfs-tools.install | 4 + debian/initramfs-tools.postinst | 10 +++ debian/initramfs-tools.postrm | 8 ++ debian/initramfs-tools/DEBIAN/conffiles | 1 + debian/initramfs-tools/DEBIAN/control | 10 +++ debian/initramfs-tools/DEBIAN/md5sums | 9 ++ debian/initramfs-tools/DEBIAN/postinst | 10 +++ debian/initramfs-tools/DEBIAN/postrm | 8 ++ .../initramfs-tools/etc/mkinitramfs/initramfs.conf | 50 +++++++++++ debian/initramfs-tools/usr/sbin/mkinitramfs | 93 +++++++++++++++++++++ .../usr/share/doc/initramfs-tools/TODO | 8 ++ .../usr/share/doc/initramfs-tools/changelog.gz | Bin 0 -> 784 bytes .../usr/share/doc/initramfs-tools/copyright | 10 +++ .../usr/share/doc/initramfs-tools/examples/modules | 7 ++ .../initramfs-tools/usr/share/initramfs-tools/init | 64 ++++++++++++++ .../usr/share/initramfs-tools/scripts/functions | 9 ++ .../usr/share/initramfs-tools/scripts/local | 15 ++++ .../usr/share/initramfs-tools/scripts/nfs | 11 +++ debian/rules | 6 ++ 27 files changed, 442 insertions(+) create mode 100644 debian/README create mode 100644 debian/TODO create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/files create mode 100644 debian/initramfs-tools.examples create mode 100644 debian/initramfs-tools.install create mode 100644 debian/initramfs-tools.postinst create mode 100644 debian/initramfs-tools.postrm create mode 100644 debian/initramfs-tools/DEBIAN/conffiles create mode 100644 debian/initramfs-tools/DEBIAN/control create mode 100644 debian/initramfs-tools/DEBIAN/md5sums create mode 100644 debian/initramfs-tools/DEBIAN/postinst create mode 100644 debian/initramfs-tools/DEBIAN/postrm create mode 100644 debian/initramfs-tools/etc/mkinitramfs/initramfs.conf create mode 100644 debian/initramfs-tools/usr/sbin/mkinitramfs create mode 100644 debian/initramfs-tools/usr/share/doc/initramfs-tools/TODO create mode 100644 debian/initramfs-tools/usr/share/doc/initramfs-tools/changelog.gz create mode 100644 debian/initramfs-tools/usr/share/doc/initramfs-tools/copyright create mode 100644 debian/initramfs-tools/usr/share/doc/initramfs-tools/examples/modules create mode 100644 debian/initramfs-tools/usr/share/initramfs-tools/init create mode 100644 debian/initramfs-tools/usr/share/initramfs-tools/scripts/functions create mode 100644 debian/initramfs-tools/usr/share/initramfs-tools/scripts/local create mode 100644 debian/initramfs-tools/usr/share/initramfs-tools/scripts/nfs create mode 100644 debian/rules (limited to 'debian') diff --git a/debian/README b/debian/README new file mode 100644 index 0000000..dc85c9b --- /dev/null +++ b/debian/README @@ -0,0 +1,12 @@ +initramfs-tools +=============== + +This package is a work in progress towards the replacement of the initrd +system with an initramfs system. + +The goals include using klibc for all earlyspace tools, an integrated udev +and an integrated hotplug. + +See the TODO file for a current status. + +Jeff Bailey - 2005-04-24 diff --git a/debian/TODO b/debian/TODO new file mode 100644 index 0000000..bf7e07d --- /dev/null +++ b/debian/TODO @@ -0,0 +1,8 @@ +TODO +==== + + o Get udev compiled against klibc + + o Integrate hotplug-ng + + o Add option to make-kpkg to use mkinitramfs diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8a999a1 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,64 @@ +initramfs-tools (0.6) breezy; urgency=low + + The "Sweep! .... Off!" release. + + * Source in the net-${DEVICE}.conf file to get IP address information. + + * Add commandline parameters for NFSROOT and BOOT. + + * Moving loading of boot functions to after commandline parsing. + + * Allow NFSROOT variable to be set to auto to pick up value from DHCP + Server. + + -- Jeff Bailey Wed, 1 Jun 2005 12:02:40 -0400 + +initramfs-tools (0.5) breezy; urgency=low + + The "Climbing to the horizons" release. + + * Update for newer udev, call "udevstart" rather than "udev udevstart" + + * /etc/mkinitramfs/modules should not be a conffile. + + * Support busybox. + + * Fix bug where -k would delete the tmp files, and otherwise it would keep + them. + + * Handle # for comments in the modules file. + + * arch:all, not arch:any + + -- Jeff Bailey Tue, 31 May 2005 15:17:56 -0400 + +initramfs-tools (0.4) breezy; urgency=low + + * First upload to Ubuntu. + + * Handle glibc compiled udev for now. + + -- Jeff Bailey Tue, 24 May 2005 14:30:07 +0000 + +initramfs-tools (0.3) unstable; urgency=low + + * Fix init and root variables + + -- Jeff Bailey Sat, 29 Jan 2005 17:49:08 -0500 + +initramfs-tools (0.2) unstable; urgency=low + + * Include the modules in the initrd + * Drop the .ko ending from the module loads. + * Actually chain to the sub scripts. + * kilbc is now named properly + * First cut of an NFS root implementation + + -- Jeff Bailey Fri, 28 Jan 2005 16:50:53 -0500 + +initramfs-tools (0.1) unstable; urgency=low + + * Initial Release. + + -- Jeff Bailey Thu, 27 Jan 2005 15:23:52 -0500 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..fe8d332 --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: initramfs-tools +Section: utils +Priority: optional +Maintainer: Jeff Bailey +Build-Depends-Indep: debhelper (>= 4.0.0), cdbs, busybox-cvs-static +Standards-Version: 3.6.1 + +Package: initramfs-tools +Architecture: all +Depends: klibc-utils +Description: tools for generting an Ubuntu-style initramfs + This package generates an initramfs for an Ubuntu system. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..cdc2919 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,10 @@ +This package was debianized by Jeff Bailey on +Thu, 27 Jan 2005 15:23:52 -0500. + +Copyright: + +Author: Jeff Bailey, with some pieces for initrd-tools + +License: + +PUBLIC DOMAIN diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..b9277fc --- /dev/null +++ b/debian/files @@ -0,0 +1 @@ +initramfs-tools_0.6_all.deb utils optional diff --git a/debian/initramfs-tools.examples b/debian/initramfs-tools.examples new file mode 100644 index 0000000..35ca94c --- /dev/null +++ b/debian/initramfs-tools.examples @@ -0,0 +1 @@ +conf/modules diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install new file mode 100644 index 0000000..e76186f --- /dev/null +++ b/debian/initramfs-tools.install @@ -0,0 +1,4 @@ +mkinitramfs usr/sbin +init usr/share/initramfs-tools +scripts usr/share/initramfs-tools +conf/initramfs.conf etc/mkinitramfs diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst new file mode 100644 index 0000000..70be9f6 --- /dev/null +++ b/debian/initramfs-tools.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +if [ ! -e /etc/mkinitramfs/modules ]; then + cp /usr/share/doc/initramfs-tools/examples/modules /etc/mkinitramfs/ +fi + +#DEBHELPER# + diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm new file mode 100644 index 0000000..7bea06f --- /dev/null +++ b/debian/initramfs-tools.postrm @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "x${1}" = "xpurge" ]; then + rm /etc/mkinitramfs/modules +fi + +#DEBHELPER# + diff --git a/debian/initramfs-tools/DEBIAN/conffiles b/debian/initramfs-tools/DEBIAN/conffiles new file mode 100644 index 0000000..cd2afc0 --- /dev/null +++ b/debian/initramfs-tools/DEBIAN/conffiles @@ -0,0 +1 @@ +/etc/mkinitramfs/initramfs.conf diff --git a/debian/initramfs-tools/DEBIAN/control b/debian/initramfs-tools/DEBIAN/control new file mode 100644 index 0000000..9192ae1 --- /dev/null +++ b/debian/initramfs-tools/DEBIAN/control @@ -0,0 +1,10 @@ +Package: initramfs-tools +Version: 0.6 +Section: utils +Priority: optional +Architecture: all +Depends: klibc-utils +Installed-Size: 100 +Maintainer: Jeff Bailey +Description: tools for generting an Ubuntu-style initramfs + This package generates an initramfs for an Ubuntu system. diff --git a/debian/initramfs-tools/DEBIAN/md5sums b/debian/initramfs-tools/DEBIAN/md5sums new file mode 100644 index 0000000..420e544 --- /dev/null +++ b/debian/initramfs-tools/DEBIAN/md5sums @@ -0,0 +1,9 @@ +741626a7104d48b15ee4f7f0f8973deb usr/share/doc/initramfs-tools/TODO +ed79de81154495c4c23a93b32471cb19 usr/share/doc/initramfs-tools/copyright +12933b9f50570c11cf0f384eee619ee9 usr/share/doc/initramfs-tools/examples/modules +35c556b7165396ffbb9daf1e33f75e80 usr/share/doc/initramfs-tools/changelog.gz +614dec8a64e5f9798d4e0eb42219d96d usr/share/initramfs-tools/init +f18121fe1135572dbbea347371e8d730 usr/share/initramfs-tools/scripts/nfs +9d5014b1fbc092a32526ffa52549193c usr/share/initramfs-tools/scripts/local +6ebc6e800720aab93d022fe8ef5063d5 usr/share/initramfs-tools/scripts/functions +fd7c4a390d50d181203e0ca2007254e2 usr/sbin/mkinitramfs diff --git a/debian/initramfs-tools/DEBIAN/postinst b/debian/initramfs-tools/DEBIAN/postinst new file mode 100644 index 0000000..36f508d --- /dev/null +++ b/debian/initramfs-tools/DEBIAN/postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +if [ ! -e /etc/mkinitramfs/modules ]; then + cp /usr/share/doc/initramfs-tools/examples/modules /etc/mkinitramfs/ +fi + + + diff --git a/debian/initramfs-tools/DEBIAN/postrm b/debian/initramfs-tools/DEBIAN/postrm new file mode 100644 index 0000000..84bff36 --- /dev/null +++ b/debian/initramfs-tools/DEBIAN/postrm @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ "x${1}" = "xpurge" ]; then + rm /etc/mkinitramfs/modules +fi + + + diff --git a/debian/initramfs-tools/etc/mkinitramfs/initramfs.conf b/debian/initramfs-tools/etc/mkinitramfs/initramfs.conf new file mode 100644 index 0000000..a056469 --- /dev/null +++ b/debian/initramfs-tools/etc/mkinitramfs/initramfs.conf @@ -0,0 +1,50 @@ +# +# initramfs.conf +# + +# BUSYBOX: [ y | n ] +# +# Use busybox if available. You MUST use the -static version +# + +BUSYBOX=n + +# +# BOOT: [ local | nfs ] +# +# local - Boot off of local media (harddrive, USB stick). +# +# nfs - Boot using an NFS drive as the root of the drive. +# + +BOOT=local + +# +# MODULES: [ most | dep | list ] +# +# most - Add all framebuffer, acpi, filesystem, and harddrive drivers. +# +# dep - Try and guess which modules to load. +# +# list - Only include modules from the 'additional modules' list +# +MODULES=list + +# +# NFS Section of the config. +# + +# +# DEVICE: ... +# +# Specify the network device, like eth0 +# + +DEVICE=eth0 + +# +# NFSROOT: [ auto | HOST:MOUNT ] +# + +NFSROOT=auto + diff --git a/debian/initramfs-tools/usr/sbin/mkinitramfs b/debian/initramfs-tools/usr/sbin/mkinitramfs new file mode 100644 index 0000000..593c69e --- /dev/null +++ b/debian/initramfs-tools/usr/sbin/mkinitramfs @@ -0,0 +1,93 @@ +#!/bin/sh + +. /etc/mkinitramfs/initramfs.conf + +usage() +{ + echo "-o Output" + echo "-v version" + echo "-k Keep temp files" + exit 1 +} + +# Defaults +keep="n" + +while getopts "ko:v:" flag; do + case $flag in + o) + outfile="${OPTARG}" + ;; + v) + version="${OPTARG}" + ;; + k) + keep="y" + ;; + esac +done + +if [ x${outfile} = x ]; then + usage +fi + +if [ -d ${outfile} ]; then + echo "${outfile} is a directory" + exit 1 +fi + +if [ ! -e /lib/modules/${version} ]; then + echo "Cannot find /lib/modules/${version}" + exit 1 +fi + +TMPDIR=$(mktemp -d) || exit 1 +mkdir -p ${TMPDIR}/modules ${TMPDIR}/conf ${TMPDIR}/etc +mkdir -p ${TMPDIR}/bin ${TMPDIR}/lib ${TMPDIR}/scripts + +for x in $(sed -e '/^#/d' /etc/mkinitramfs/modules); do + for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do + # Prune duplicates + if [ -e ${TMPDIR}/modules/$(basename ${y}) ]; then + continue + fi + + ln -s ${y} ${TMPDIR}/modules + echo $(basename ${y}) >>${TMPDIR}/conf/modules + done +done + +# Have to do each file, because cpio --dereference doesn't recurse down +# symlinks. + +ln -s /usr/lib/klibc/bin/* ${TMPDIR}/bin +ln -s /usr/lib/klibc/lib/* ${TMPDIR}/lib +ln -s /usr/share/initramfs-tools/init ${TMPDIR}/init +ln -s /usr/share/initramfs-tools/scripts/* ${TMPDIR}/scripts +ln -s /etc/mkinitramfs/initramfs.conf ${TMPDIR}/conf +ln -s /etc/udev ${TMPDIR}/etc + +# Hack until udev is built with klibc +ln -s /sbin/udev ${TMPDIR}/bin +ln -s /sbin/udevstart ${TMPDIR}/bin +ln -s /lib/libc.so.* ${TMPDIR}/lib +ln -s /lib/ld*.so.* ${TMPDIR}/lib +rm ${TMPDIR}/lib/*lsb* + +# Busybox +if [ "x${BUSYBOX}" = "xy" ]; then + rm ${TMPDIR}/bin/sh + ln -s /bin/busybox ${TMPDIR}/bin/sh +fi + +# Raid +ln -s /sbin/mdadm ${TMPDIR}/bin +ln -s /sbin/mdrun ${TMPDIR}/bin + +(cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) + +if [ "${keep}" = "y" ]; then + echo "Working files in ${TMPDIR}" +else + rm -rf "${TMPDIR}" +fi diff --git a/debian/initramfs-tools/usr/share/doc/initramfs-tools/TODO b/debian/initramfs-tools/usr/share/doc/initramfs-tools/TODO new file mode 100644 index 0000000..bf7e07d --- /dev/null +++ b/debian/initramfs-tools/usr/share/doc/initramfs-tools/TODO @@ -0,0 +1,8 @@ +TODO +==== + + o Get udev compiled against klibc + + o Integrate hotplug-ng + + o Add option to make-kpkg to use mkinitramfs diff --git a/debian/initramfs-tools/usr/share/doc/initramfs-tools/changelog.gz b/debian/initramfs-tools/usr/share/doc/initramfs-tools/changelog.gz new file mode 100644 index 0000000..c89e14f Binary files /dev/null and b/debian/initramfs-tools/usr/share/doc/initramfs-tools/changelog.gz differ diff --git a/debian/initramfs-tools/usr/share/doc/initramfs-tools/copyright b/debian/initramfs-tools/usr/share/doc/initramfs-tools/copyright new file mode 100644 index 0000000..cdc2919 --- /dev/null +++ b/debian/initramfs-tools/usr/share/doc/initramfs-tools/copyright @@ -0,0 +1,10 @@ +This package was debianized by Jeff Bailey on +Thu, 27 Jan 2005 15:23:52 -0500. + +Copyright: + +Author: Jeff Bailey, with some pieces for initrd-tools + +License: + +PUBLIC DOMAIN diff --git a/debian/initramfs-tools/usr/share/doc/initramfs-tools/examples/modules b/debian/initramfs-tools/usr/share/doc/initramfs-tools/examples/modules new file mode 100644 index 0000000..ee1310a --- /dev/null +++ b/debian/initramfs-tools/usr/share/doc/initramfs-tools/examples/modules @@ -0,0 +1,7 @@ +# List of modules that you want to include in your initramfs. +# This might be good choices: +# +#ide-disk +#ide-generic +#ext2 +#ext3 diff --git a/debian/initramfs-tools/usr/share/initramfs-tools/init b/debian/initramfs-tools/usr/share/initramfs-tools/init new file mode 100644 index 0000000..c3e4887 --- /dev/null +++ b/debian/initramfs-tools/usr/share/initramfs-tools/init @@ -0,0 +1,64 @@ +#!/bin/sh -x +mkdir /sys +mkdir /proc +mkdir /tmp +mount -t sysfs sysfs /sys +mount -t proc proc /proc + +. /conf/initramfs.conf +. /scripts/functions + +# Parse command line options +init=/sbin/init +root= +ro=-r +break= +rootmnt=/root +for x in $(cat /proc/cmdline); do + case $x in + init=*) + INIT=${x#init=} + ;; + root=*) + ROOT=${x#root=} + ;; + nfsroot=*) + NFSROOT=${x#nfsroot=} + ;; + boot=*) + BOOT=${x#boot=} + ;; + ro) + ro=-r + ;; + rw) + ro=-w + ;; + break) + break=yes + ;; + esac +done + +. /scripts/${BOOT} + +# Load the modules +# FIXME - do module options here +for x in $(cat /conf/modules); do + insmod /modules/$x +done + +# Populate /dev tree +udevstart + +if [ x${break} = xyes ]; then + panic "Spawning shell within the initramfs" +fi + +mountroot + +umount /sys +umount /proc + +# Chain to real filesystem +exec run-init ${rootmnt} ${init} "$@" diff --git a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/functions b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/functions new file mode 100644 index 0000000..19560ba --- /dev/null +++ b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/functions @@ -0,0 +1,9 @@ +panic() +{ + echo $@ + if [ -e /bin/busybox ]; then + FS1='(initramfs) ' exec /bin/busybox sh + else + FS1='(initramfs) ' exec /bin/sh + fi +} diff --git a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/local b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/local new file mode 100644 index 0000000..572f185 --- /dev/null +++ b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/local @@ -0,0 +1,15 @@ +# Local filesystem mounting + +# Parameter: Where to mount the filesystem +mountroot () +{ + # Get the root filesystem type + if [ ! -e ${ROOT} ]; then + panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" + fi + + eval $(fstype < ${ROOT}) + + # Mount root + mount ${ro} -t ${FSTYPE} ${ROOT} ${rootmnt} +} diff --git a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/nfs b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/nfs new file mode 100644 index 0000000..1225c4d --- /dev/null +++ b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/nfs @@ -0,0 +1,11 @@ + +# Paramter: Where the root should be mounted +mountroot () +{ + ipconfig ${DEVICE} + . /tmp/net-${DEVICE}.conf + if [ "x${NFSROOT}" = "xauto" ]; then + NFSROOT=${ROOTSERVER}:${ROOTPATH} + fi + nfsmount ${NFSROOT} ${rootmnt} +} diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..0a1575f --- /dev/null +++ b/debian/rules @@ -0,0 +1,6 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk + +common-build-arch:: + chmod +x init -- cgit v1.2.3 From c7df22010dcd9b237952e5135fea8b670039f547 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 9 Jun 2005 14:31:21 +0000 Subject: Use commandline args from mkinitrd --- debian/changelog | 12 ++++++++++++ mkinitramfs | 38 +++++++++++++++++++++++++++++--------- 2 files changed, 41 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8a999a1..1973e74 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +initramfs-tools (0.7) breezy; urgency=low + + The "CONFORM!" release. + + * Make command line arguments almost match mkinitrd. The -m argument + doesn't make any sense, so it's not supported. Add support for + overriding the confdir, and specifying version no longer expects -v. + + + + -- Jeff Bailey Thu, 9 Jun 2005 14:30:18 +0000 + initramfs-tools (0.6) breezy; urgency=low The "Sweep! .... Off!" release. diff --git a/mkinitramfs b/mkinitramfs index 593c69e..d2036fd 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -1,20 +1,36 @@ #!/bin/sh -. /etc/mkinitramfs/initramfs.conf - usage() { - echo "-o Output" - echo "-v version" - echo "-k Keep temp files" + cat >&2 << EOF + +Usage: ${0} [OPTION]... <-o outfile> [version] + +Options: + -d confdir Specify an alternative configuration directory. + -k Keep temporary directory used to make the image. + -o outfile Write to outfile. + -r root Override ROOT setting in mkinitrd.conf. + +See ${0}(8) for further details. +EOF exit 1 + } # Defaults keep="n" +CONFDIR="/etc/mkinitramfs" -while getopts "ko:v:" flag; do +while getopts "d:ko:r:" flag; do case $flag in + d) + CONFDIR="${OPTAGS}" + if [ ! d "${CONFDIR}" ]; then + echo "${0}: ${CONFDIR}: Not a directory" >&2 + exit 1 + fi + ;; o) outfile="${OPTARG}" ;; @@ -27,7 +43,11 @@ while getopts "ko:v:" flag; do esac done -if [ x${outfile} = x ]; then +shift $((${OPTIND} - 1)) + +. ${CONFDIR}/initramfs.conf + +if [ x${outfile} = x ] || [ ${#} -ne 1 ]; then usage fi @@ -45,7 +65,7 @@ TMPDIR=$(mktemp -d) || exit 1 mkdir -p ${TMPDIR}/modules ${TMPDIR}/conf ${TMPDIR}/etc mkdir -p ${TMPDIR}/bin ${TMPDIR}/lib ${TMPDIR}/scripts -for x in $(sed -e '/^#/d' /etc/mkinitramfs/modules); do +for x in $(sed -e '/^#/d' ${CONFDIR}/modules); do for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do # Prune duplicates if [ -e ${TMPDIR}/modules/$(basename ${y}) ]; then @@ -64,7 +84,7 @@ ln -s /usr/lib/klibc/bin/* ${TMPDIR}/bin ln -s /usr/lib/klibc/lib/* ${TMPDIR}/lib ln -s /usr/share/initramfs-tools/init ${TMPDIR}/init ln -s /usr/share/initramfs-tools/scripts/* ${TMPDIR}/scripts -ln -s /etc/mkinitramfs/initramfs.conf ${TMPDIR}/conf +ln -s ${CONFDIR}/initramfs.conf ${TMPDIR}/conf ln -s /etc/udev ${TMPDIR}/etc # Hack until udev is built with klibc -- cgit v1.2.3 From 8cfdec86dd2e4662a09d6384ab9042d32636560d Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 9 Jun 2005 15:16:40 +0000 Subject: Add hookscript directories --- debian/changelog | 7 ++++++- debian/dirs | 6 ++++++ mkinitramfs | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 debian/dirs (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1973e74..787f5fa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,9 +6,14 @@ initramfs-tools (0.7) breezy; urgency=low doesn't make any sense, so it's not supported. Add support for overriding the confdir, and specifying version no longer expects -v. + * Add sed and grep to the initramfs for now. Will prune these + eventually, but for now mdrun needs them. + * Add mdadm and mdrun to the initramfs. - -- Jeff Bailey Thu, 9 Jun 2005 14:30:18 +0000 + * Add hookscript directories. + + -- Jeff Bailey Thu, 9 Jun 2005 15:16:15 +0000 initramfs-tools (0.6) breezy; urgency=low diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..fd55804 --- /dev/null +++ b/debian/dirs @@ -0,0 +1,6 @@ +etc/mkiniramfs/init-bottom +etc/mkiniramfs/init-top +etc/mkiniramfs/local-premount +etc/mkiniramfs/local-top +etc/mkiniramfs/nfs-premount +etc/mkiniramfs/nfs-top diff --git a/mkinitramfs b/mkinitramfs index d2036fd..7b6af66 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -103,6 +103,8 @@ fi # Raid ln -s /sbin/mdadm ${TMPDIR}/bin ln -s /sbin/mdrun ${TMPDIR}/bin +ln -s /bin/grep ${TMPDIR}/bin +ln -s /bin/sed ${TMPDIR}/bin (cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) -- cgit v1.2.3 From ac222142f849ed340c3b7a0300a57cc3153e0436 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 9 Jun 2005 17:23:35 +0000 Subject: Add hookscripts --- debian/changelog | 7 ++- debian/initramfs-tools.examples | 1 + docs/example_script | 21 +++++++ init | 4 ++ scripts/functions | 121 ++++++++++++++++++++++++++++++++++++++++ scripts/init-top/test | 18 ++++++ scripts/local | 6 ++ scripts/nfs | 8 +++ 8 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 docs/example_script create mode 100644 scripts/init-top/test (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 787f5fa..41f15e5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,7 +13,12 @@ initramfs-tools (0.7) breezy; urgency=low * Add hookscript directories. - -- Jeff Bailey Thu, 9 Jun 2005 15:16:15 +0000 + * Call hookscripts + + Thanks to David Weinhall for the dependancy-based + hookscripts. + + -- Jeff Bailey Thu, 9 Jun 2005 17:08:01 +0000 initramfs-tools (0.6) breezy; urgency=low diff --git a/debian/initramfs-tools.examples b/debian/initramfs-tools.examples index 35ca94c..0e8472b 100644 --- a/debian/initramfs-tools.examples +++ b/debian/initramfs-tools.examples @@ -1 +1,2 @@ conf/modules +docs/example_script diff --git a/docs/example_script b/docs/example_script new file mode 100644 index 0000000..111b0d8 --- /dev/null +++ b/docs/example_script @@ -0,0 +1,21 @@ +#!/bin/sh + +# List the soft prerequisites here. So if there's something you know +# should be run first iff it exists. +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Do the work here. +echo "Got here!" diff --git a/init b/init index c3e4887..c09074f 100644 --- a/init +++ b/init @@ -40,6 +40,8 @@ for x in $(cat /proc/cmdline); do esac done +run_scripts /scripts/init_top + . /scripts/${BOOT} # Load the modules @@ -57,6 +59,8 @@ fi mountroot +run_scripts /scripts/init_bottom + umount /sys umount /proc diff --git a/scripts/functions b/scripts/functions index 19560ba..586c82f 100644 --- a/scripts/functions +++ b/scripts/functions @@ -7,3 +7,124 @@ panic() FS1='(initramfs) ' exec /bin/sh fi } + +# this function finds scripts with empty depends and adds them +# to the ordered list +dep_reduce() +{ + i=0 + j=0 + unset neworder + + for entry in "${array[@]}"; do + set - ${entry} + + if [ "$#" -eq "0" ]; then + continue + elif [ "$#" -eq "1" ]; then + if [ $end -eq 0 ] || + [ x"${order[$((end-1))]}" != x"$1" ]; then + order[$((end))]=$1 + end=$((end+1)) + neworder[$((j))]=$1 + j=$((j+1)) + fi + + array[$((i))]= + fi + + i=$((i+1)) + done +} + +dep_remove() +{ + i=0 + + # for each row in the array + for entry in "${array[@]}"; do + unset newentry + + set - ${entry} + + # for each dependency of the script + for dep in "$@"; do + new=1 + + # for each new dependency + for tmp in "${order[@]}"; do + if [ x"$dep" = x"$tmp" ]; then + new=0 + fi + done + + if [ x"$new" = x"1" ]; then + newentry="$newentry $dep" + fi + done + + array[$((i))]="$newentry" + i=$((i+1)) + done +} + +run_scripts() +{ + initdir=${1} + scripts=$(ls ${initdir}) + order= + end=0 + array= + + # FIXME: New algorithm + # array of strings: "$file $prereqs" + # iterate over all strings; find empty strings (just $file) + # add to order, delete from all strings and zero out entry + # repeat until all strings are empty + + i=0 + for file in $scripts; do + # if it's not a regular file, or if it's not executable, skip it + if ! [ -f ${initdir}/${file} ] || ! [ -x ${initdir}/${file} ]; then + continue + fi + + array[$((i))]="$file $(${initdir}/${file} prereqs)" + i=$((i+1)) + done + + # No scripts in directory, bail. + if [ ${i} -eq 0 ]; then + return 0 + fi + + while /bin/true; do + set - ${array[@]} + + if [ "$#" -eq "0" ]; then + break + fi + + dep_reduce + + dep_remove + + if [ "${#neworder}" -eq "0" ]; then + for x in "${array[@]}"; do + if [ x"$x" != x"" ]; then + printf "could not reduce further; " + printf "circular dependencies\n" + return 1 + fi + done + + # we're done! + break + fi + done + + # run the initscripts + for script in "${order[@]}"; do + ${initdir}/${script} + done +} diff --git a/scripts/init-top/test b/scripts/init-top/test new file mode 100644 index 0000000..e4d59fb --- /dev/null +++ b/scripts/init-top/test @@ -0,0 +1,18 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +echo "Got here!" diff --git a/scripts/local b/scripts/local index 572f185..ffbd230 100644 --- a/scripts/local +++ b/scripts/local @@ -3,6 +3,8 @@ # Parameter: Where to mount the filesystem mountroot () { + run_scripts /scripts/local_top + # Get the root filesystem type if [ ! -e ${ROOT} ]; then panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" @@ -10,6 +12,10 @@ mountroot () eval $(fstype < ${ROOT}) + run_scripts /scripts/local_premount + # Mount root mount ${ro} -t ${FSTYPE} ${ROOT} ${rootmnt} + + run_scripts /scripts/local_bottom } diff --git a/scripts/nfs b/scripts/nfs index 1225c4d..d0f1600 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -2,10 +2,18 @@ # Paramter: Where the root should be mounted mountroot () { + run_scripts /scripts/nfs_top + ipconfig ${DEVICE} . /tmp/net-${DEVICE}.conf if [ "x${NFSROOT}" = "xauto" ]; then NFSROOT=${ROOTSERVER}:${ROOTPATH} fi + + run_scripts /scripts/nfs_premount + nfsmount ${NFSROOT} ${rootmnt} + + run_scripts /scripts/nfs_bottom + } -- cgit v1.2.3 From d49e80ad3723c35714bf44b21545090da62f558e Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 9 Jun 2005 20:08:12 +0000 Subject: Hookscripts, prunce extras --- debian/dirs | 13 +-- debian/files | 2 +- debian/initramfs-tools/DEBIAN/conffiles | 1 - debian/initramfs-tools/DEBIAN/control | 10 --- debian/initramfs-tools/DEBIAN/md5sums | 9 -- debian/initramfs-tools/DEBIAN/postinst | 10 --- debian/initramfs-tools/DEBIAN/postrm | 8 -- .../initramfs-tools/etc/mkinitramfs/initramfs.conf | 50 ----------- debian/initramfs-tools/usr/sbin/mkinitramfs | 93 --------------------- .../usr/share/doc/initramfs-tools/TODO | 8 -- .../usr/share/doc/initramfs-tools/changelog.gz | Bin 784 -> 0 bytes .../usr/share/doc/initramfs-tools/copyright | 10 --- .../usr/share/doc/initramfs-tools/examples/modules | 7 -- .../initramfs-tools/usr/share/initramfs-tools/init | 64 -------------- .../usr/share/initramfs-tools/scripts/functions | 9 -- .../usr/share/initramfs-tools/scripts/local | 15 ---- .../usr/share/initramfs-tools/scripts/nfs | 11 --- mkinitramfs | 36 +++++--- scripts/functions | 1 + 19 files changed, 35 insertions(+), 322 deletions(-) delete mode 100644 debian/initramfs-tools/DEBIAN/conffiles delete mode 100644 debian/initramfs-tools/DEBIAN/control delete mode 100644 debian/initramfs-tools/DEBIAN/md5sums delete mode 100644 debian/initramfs-tools/DEBIAN/postinst delete mode 100644 debian/initramfs-tools/DEBIAN/postrm delete mode 100644 debian/initramfs-tools/etc/mkinitramfs/initramfs.conf delete mode 100644 debian/initramfs-tools/usr/sbin/mkinitramfs delete mode 100644 debian/initramfs-tools/usr/share/doc/initramfs-tools/TODO delete mode 100644 debian/initramfs-tools/usr/share/doc/initramfs-tools/changelog.gz delete mode 100644 debian/initramfs-tools/usr/share/doc/initramfs-tools/copyright delete mode 100644 debian/initramfs-tools/usr/share/doc/initramfs-tools/examples/modules delete mode 100644 debian/initramfs-tools/usr/share/initramfs-tools/init delete mode 100644 debian/initramfs-tools/usr/share/initramfs-tools/scripts/functions delete mode 100644 debian/initramfs-tools/usr/share/initramfs-tools/scripts/local delete mode 100644 debian/initramfs-tools/usr/share/initramfs-tools/scripts/nfs (limited to 'debian') diff --git a/debian/dirs b/debian/dirs index fd55804..ef40692 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,6 +1,7 @@ -etc/mkiniramfs/init-bottom -etc/mkiniramfs/init-top -etc/mkiniramfs/local-premount -etc/mkiniramfs/local-top -etc/mkiniramfs/nfs-premount -etc/mkiniramfs/nfs-top +etc/mkinitramfs/init-bottom +etc/mkinitramfs/init-top +etc/mkinitramfs/local-premount +etc/mkinitramfs/local-top +etc/mkinitramfs/nfs-premount +etc/mkinitramfs/nfs-top +usr/share/initramfs-tools/modules.d diff --git a/debian/files b/debian/files index b9277fc..47aa909 100644 --- a/debian/files +++ b/debian/files @@ -1 +1 @@ -initramfs-tools_0.6_all.deb utils optional +initramfs-tools_0.7_all.deb utils optional diff --git a/debian/initramfs-tools/DEBIAN/conffiles b/debian/initramfs-tools/DEBIAN/conffiles deleted file mode 100644 index cd2afc0..0000000 --- a/debian/initramfs-tools/DEBIAN/conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/mkinitramfs/initramfs.conf diff --git a/debian/initramfs-tools/DEBIAN/control b/debian/initramfs-tools/DEBIAN/control deleted file mode 100644 index 9192ae1..0000000 --- a/debian/initramfs-tools/DEBIAN/control +++ /dev/null @@ -1,10 +0,0 @@ -Package: initramfs-tools -Version: 0.6 -Section: utils -Priority: optional -Architecture: all -Depends: klibc-utils -Installed-Size: 100 -Maintainer: Jeff Bailey -Description: tools for generting an Ubuntu-style initramfs - This package generates an initramfs for an Ubuntu system. diff --git a/debian/initramfs-tools/DEBIAN/md5sums b/debian/initramfs-tools/DEBIAN/md5sums deleted file mode 100644 index 420e544..0000000 --- a/debian/initramfs-tools/DEBIAN/md5sums +++ /dev/null @@ -1,9 +0,0 @@ -741626a7104d48b15ee4f7f0f8973deb usr/share/doc/initramfs-tools/TODO -ed79de81154495c4c23a93b32471cb19 usr/share/doc/initramfs-tools/copyright -12933b9f50570c11cf0f384eee619ee9 usr/share/doc/initramfs-tools/examples/modules -35c556b7165396ffbb9daf1e33f75e80 usr/share/doc/initramfs-tools/changelog.gz -614dec8a64e5f9798d4e0eb42219d96d usr/share/initramfs-tools/init -f18121fe1135572dbbea347371e8d730 usr/share/initramfs-tools/scripts/nfs -9d5014b1fbc092a32526ffa52549193c usr/share/initramfs-tools/scripts/local -6ebc6e800720aab93d022fe8ef5063d5 usr/share/initramfs-tools/scripts/functions -fd7c4a390d50d181203e0ca2007254e2 usr/sbin/mkinitramfs diff --git a/debian/initramfs-tools/DEBIAN/postinst b/debian/initramfs-tools/DEBIAN/postinst deleted file mode 100644 index 36f508d..0000000 --- a/debian/initramfs-tools/DEBIAN/postinst +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -if [ ! -e /etc/mkinitramfs/modules ]; then - cp /usr/share/doc/initramfs-tools/examples/modules /etc/mkinitramfs/ -fi - - - diff --git a/debian/initramfs-tools/DEBIAN/postrm b/debian/initramfs-tools/DEBIAN/postrm deleted file mode 100644 index 84bff36..0000000 --- a/debian/initramfs-tools/DEBIAN/postrm +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -if [ "x${1}" = "xpurge" ]; then - rm /etc/mkinitramfs/modules -fi - - - diff --git a/debian/initramfs-tools/etc/mkinitramfs/initramfs.conf b/debian/initramfs-tools/etc/mkinitramfs/initramfs.conf deleted file mode 100644 index a056469..0000000 --- a/debian/initramfs-tools/etc/mkinitramfs/initramfs.conf +++ /dev/null @@ -1,50 +0,0 @@ -# -# initramfs.conf -# - -# BUSYBOX: [ y | n ] -# -# Use busybox if available. You MUST use the -static version -# - -BUSYBOX=n - -# -# BOOT: [ local | nfs ] -# -# local - Boot off of local media (harddrive, USB stick). -# -# nfs - Boot using an NFS drive as the root of the drive. -# - -BOOT=local - -# -# MODULES: [ most | dep | list ] -# -# most - Add all framebuffer, acpi, filesystem, and harddrive drivers. -# -# dep - Try and guess which modules to load. -# -# list - Only include modules from the 'additional modules' list -# -MODULES=list - -# -# NFS Section of the config. -# - -# -# DEVICE: ... -# -# Specify the network device, like eth0 -# - -DEVICE=eth0 - -# -# NFSROOT: [ auto | HOST:MOUNT ] -# - -NFSROOT=auto - diff --git a/debian/initramfs-tools/usr/sbin/mkinitramfs b/debian/initramfs-tools/usr/sbin/mkinitramfs deleted file mode 100644 index 593c69e..0000000 --- a/debian/initramfs-tools/usr/sbin/mkinitramfs +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh - -. /etc/mkinitramfs/initramfs.conf - -usage() -{ - echo "-o Output" - echo "-v version" - echo "-k Keep temp files" - exit 1 -} - -# Defaults -keep="n" - -while getopts "ko:v:" flag; do - case $flag in - o) - outfile="${OPTARG}" - ;; - v) - version="${OPTARG}" - ;; - k) - keep="y" - ;; - esac -done - -if [ x${outfile} = x ]; then - usage -fi - -if [ -d ${outfile} ]; then - echo "${outfile} is a directory" - exit 1 -fi - -if [ ! -e /lib/modules/${version} ]; then - echo "Cannot find /lib/modules/${version}" - exit 1 -fi - -TMPDIR=$(mktemp -d) || exit 1 -mkdir -p ${TMPDIR}/modules ${TMPDIR}/conf ${TMPDIR}/etc -mkdir -p ${TMPDIR}/bin ${TMPDIR}/lib ${TMPDIR}/scripts - -for x in $(sed -e '/^#/d' /etc/mkinitramfs/modules); do - for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do - # Prune duplicates - if [ -e ${TMPDIR}/modules/$(basename ${y}) ]; then - continue - fi - - ln -s ${y} ${TMPDIR}/modules - echo $(basename ${y}) >>${TMPDIR}/conf/modules - done -done - -# Have to do each file, because cpio --dereference doesn't recurse down -# symlinks. - -ln -s /usr/lib/klibc/bin/* ${TMPDIR}/bin -ln -s /usr/lib/klibc/lib/* ${TMPDIR}/lib -ln -s /usr/share/initramfs-tools/init ${TMPDIR}/init -ln -s /usr/share/initramfs-tools/scripts/* ${TMPDIR}/scripts -ln -s /etc/mkinitramfs/initramfs.conf ${TMPDIR}/conf -ln -s /etc/udev ${TMPDIR}/etc - -# Hack until udev is built with klibc -ln -s /sbin/udev ${TMPDIR}/bin -ln -s /sbin/udevstart ${TMPDIR}/bin -ln -s /lib/libc.so.* ${TMPDIR}/lib -ln -s /lib/ld*.so.* ${TMPDIR}/lib -rm ${TMPDIR}/lib/*lsb* - -# Busybox -if [ "x${BUSYBOX}" = "xy" ]; then - rm ${TMPDIR}/bin/sh - ln -s /bin/busybox ${TMPDIR}/bin/sh -fi - -# Raid -ln -s /sbin/mdadm ${TMPDIR}/bin -ln -s /sbin/mdrun ${TMPDIR}/bin - -(cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) - -if [ "${keep}" = "y" ]; then - echo "Working files in ${TMPDIR}" -else - rm -rf "${TMPDIR}" -fi diff --git a/debian/initramfs-tools/usr/share/doc/initramfs-tools/TODO b/debian/initramfs-tools/usr/share/doc/initramfs-tools/TODO deleted file mode 100644 index bf7e07d..0000000 --- a/debian/initramfs-tools/usr/share/doc/initramfs-tools/TODO +++ /dev/null @@ -1,8 +0,0 @@ -TODO -==== - - o Get udev compiled against klibc - - o Integrate hotplug-ng - - o Add option to make-kpkg to use mkinitramfs diff --git a/debian/initramfs-tools/usr/share/doc/initramfs-tools/changelog.gz b/debian/initramfs-tools/usr/share/doc/initramfs-tools/changelog.gz deleted file mode 100644 index c89e14f..0000000 Binary files a/debian/initramfs-tools/usr/share/doc/initramfs-tools/changelog.gz and /dev/null differ diff --git a/debian/initramfs-tools/usr/share/doc/initramfs-tools/copyright b/debian/initramfs-tools/usr/share/doc/initramfs-tools/copyright deleted file mode 100644 index cdc2919..0000000 --- a/debian/initramfs-tools/usr/share/doc/initramfs-tools/copyright +++ /dev/null @@ -1,10 +0,0 @@ -This package was debianized by Jeff Bailey on -Thu, 27 Jan 2005 15:23:52 -0500. - -Copyright: - -Author: Jeff Bailey, with some pieces for initrd-tools - -License: - -PUBLIC DOMAIN diff --git a/debian/initramfs-tools/usr/share/doc/initramfs-tools/examples/modules b/debian/initramfs-tools/usr/share/doc/initramfs-tools/examples/modules deleted file mode 100644 index ee1310a..0000000 --- a/debian/initramfs-tools/usr/share/doc/initramfs-tools/examples/modules +++ /dev/null @@ -1,7 +0,0 @@ -# List of modules that you want to include in your initramfs. -# This might be good choices: -# -#ide-disk -#ide-generic -#ext2 -#ext3 diff --git a/debian/initramfs-tools/usr/share/initramfs-tools/init b/debian/initramfs-tools/usr/share/initramfs-tools/init deleted file mode 100644 index c3e4887..0000000 --- a/debian/initramfs-tools/usr/share/initramfs-tools/init +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh -x -mkdir /sys -mkdir /proc -mkdir /tmp -mount -t sysfs sysfs /sys -mount -t proc proc /proc - -. /conf/initramfs.conf -. /scripts/functions - -# Parse command line options -init=/sbin/init -root= -ro=-r -break= -rootmnt=/root -for x in $(cat /proc/cmdline); do - case $x in - init=*) - INIT=${x#init=} - ;; - root=*) - ROOT=${x#root=} - ;; - nfsroot=*) - NFSROOT=${x#nfsroot=} - ;; - boot=*) - BOOT=${x#boot=} - ;; - ro) - ro=-r - ;; - rw) - ro=-w - ;; - break) - break=yes - ;; - esac -done - -. /scripts/${BOOT} - -# Load the modules -# FIXME - do module options here -for x in $(cat /conf/modules); do - insmod /modules/$x -done - -# Populate /dev tree -udevstart - -if [ x${break} = xyes ]; then - panic "Spawning shell within the initramfs" -fi - -mountroot - -umount /sys -umount /proc - -# Chain to real filesystem -exec run-init ${rootmnt} ${init} "$@" diff --git a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/functions b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/functions deleted file mode 100644 index 19560ba..0000000 --- a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/functions +++ /dev/null @@ -1,9 +0,0 @@ -panic() -{ - echo $@ - if [ -e /bin/busybox ]; then - FS1='(initramfs) ' exec /bin/busybox sh - else - FS1='(initramfs) ' exec /bin/sh - fi -} diff --git a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/local b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/local deleted file mode 100644 index 572f185..0000000 --- a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/local +++ /dev/null @@ -1,15 +0,0 @@ -# Local filesystem mounting - -# Parameter: Where to mount the filesystem -mountroot () -{ - # Get the root filesystem type - if [ ! -e ${ROOT} ]; then - panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" - fi - - eval $(fstype < ${ROOT}) - - # Mount root - mount ${ro} -t ${FSTYPE} ${ROOT} ${rootmnt} -} diff --git a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/nfs b/debian/initramfs-tools/usr/share/initramfs-tools/scripts/nfs deleted file mode 100644 index 1225c4d..0000000 --- a/debian/initramfs-tools/usr/share/initramfs-tools/scripts/nfs +++ /dev/null @@ -1,11 +0,0 @@ - -# Paramter: Where the root should be mounted -mountroot () -{ - ipconfig ${DEVICE} - . /tmp/net-${DEVICE}.conf - if [ "x${NFSROOT}" = "xauto" ]; then - NFSROOT=${ROOTSERVER}:${ROOTPATH} - fi - nfsmount ${NFSROOT} ${rootmnt} -} diff --git a/mkinitramfs b/mkinitramfs index 7b6af66..2134a2d 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -1,5 +1,27 @@ #!/bin/sh +# Takes a file containing a list of modules to be added as an argument +# Figures out dependancies and adds it in. +manual_add_modules() +{ + # Sanity check + if [ ! -e ${1} ]; then + return + fi + + for x in $(sed -e '/^#/d' ${1}); do + for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do + # Prune duplicates + if [ -e ${TMPDIR}/modules/$(basename ${y}) ]; then + continue + fi + + ln -s ${y} ${TMPDIR}/modules + echo $(basename ${y}) >>${TMPDIR}/conf/modules + done + done +} + usage() { cat >&2 << EOF @@ -51,6 +73,8 @@ if [ x${outfile} = x ] || [ ${#} -ne 1 ]; then usage fi +version=${1} + if [ -d ${outfile} ]; then echo "${outfile} is a directory" exit 1 @@ -65,16 +89,8 @@ TMPDIR=$(mktemp -d) || exit 1 mkdir -p ${TMPDIR}/modules ${TMPDIR}/conf ${TMPDIR}/etc mkdir -p ${TMPDIR}/bin ${TMPDIR}/lib ${TMPDIR}/scripts -for x in $(sed -e '/^#/d' ${CONFDIR}/modules); do - for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do - # Prune duplicates - if [ -e ${TMPDIR}/modules/$(basename ${y}) ]; then - continue - fi - - ln -s ${y} ${TMPDIR}/modules - echo $(basename ${y}) >>${TMPDIR}/conf/modules - done +for x in ${CONFDIR}/modules /usr/share/initramfs-tools/modules.d/*; do + manual_add_modules ${x} done # Have to do each file, because cpio --dereference doesn't recurse down diff --git a/scripts/functions b/scripts/functions index 586c82f..4a92011 100644 --- a/scripts/functions +++ b/scripts/functions @@ -128,3 +128,4 @@ run_scripts() ${initdir}/${script} done } + -- cgit v1.2.3 From 76840aa0b07eeb0fc7a3ae96e0419aa39af53c9d Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 9 Jun 2005 20:08:55 +0000 Subject: Remove more generated files --- debian/files | 1 - 1 file changed, 1 deletion(-) delete mode 100644 debian/files (limited to 'debian') diff --git a/debian/files b/debian/files deleted file mode 100644 index 47aa909..0000000 --- a/debian/files +++ /dev/null @@ -1 +0,0 @@ -initramfs-tools_0.7_all.deb utils optional -- cgit v1.2.3 From 8d503582491ccf26b6925e5eb7cf77d9158fc65b Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Mon, 13 Jun 2005 01:40:55 +0000 Subject: Update with new dependancy based init system, call the right script directories, always use busybox now, sigh. --- debian/control | 4 +- init | 14 +++- mkinitramfs | 8 ++- scripts/functions | 178 ++++++++++++++++++++++---------------------------- scripts/init-top/test | 18 ----- scripts/local | 6 +- scripts/local-top/md | 18 +++++ scripts/nfs | 6 +- 8 files changed, 122 insertions(+), 130 deletions(-) delete mode 100644 scripts/init-top/test create mode 100644 scripts/local-top/md (limited to 'debian') diff --git a/debian/control b/debian/control index fe8d332..89c37e4 100644 --- a/debian/control +++ b/debian/control @@ -2,11 +2,11 @@ Source: initramfs-tools Section: utils Priority: optional Maintainer: Jeff Bailey -Build-Depends-Indep: debhelper (>= 4.0.0), cdbs, busybox-cvs-static +Build-Depends-Indep: debhelper (>= 4.0.0), cdbs Standards-Version: 3.6.1 Package: initramfs-tools Architecture: all -Depends: klibc-utils +Depends: klibc-utils, busybox-cvs-static Description: tools for generting an Ubuntu-style initramfs This package generates an initramfs for an Ubuntu system. diff --git a/init b/init index c09074f..733e7fd 100644 --- a/init +++ b/init @@ -1,4 +1,14 @@ #!/bin/sh -x + +/bin/busybox ln -s /bin/busybox /bin/[ +/bin/busybox ln -s /bin/busybox /bin/basename +/bin/busybox ln -s /bin/busybox /bin/mount +/bin/busybox ln -s /bin/busybox /bin/mkdir +/bin/busybox ln -s /bin/busybox /bin/umount +/bin/busybox ln -s /bin/busybox /bin/sed +/bin/busybox ln -s /bin/busybox /bin/grep +/bin/busybox ln -s /bin/busybox /bin/cat + mkdir /sys mkdir /proc mkdir /tmp @@ -40,7 +50,7 @@ for x in $(cat /proc/cmdline); do esac done -run_scripts /scripts/init_top +run_scripts /scripts/init-top . /scripts/${BOOT} @@ -59,7 +69,7 @@ fi mountroot -run_scripts /scripts/init_bottom +run_scripts /scripts/init-bottom umount /sys umount /proc diff --git a/mkinitramfs b/mkinitramfs index 359ecd2..e1c9a6b 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -99,7 +99,7 @@ done ln -s /usr/lib/klibc/bin/* ${TMPDIR}/bin ln -s /usr/lib/klibc/lib/* ${TMPDIR}/lib ln -s /usr/share/initramfs-tools/init ${TMPDIR}/init -ln -s /usr/share/initramfs-tools/scripts/* ${TMPDIR}/scripts +cp -a /usr/share/initramfs-tools/scripts/* ${TMPDIR}/scripts ln -s ${CONFDIR}/initramfs.conf ${TMPDIR}/conf ln -s /etc/udev ${TMPDIR}/etc @@ -112,14 +112,16 @@ rm ${TMPDIR}/lib/*lsb* # Busybox if [ "x${BUSYBOX}" = "xy" ]; then + rm ${TMPDIR}/bin/sh ln -s /bin/busybox ${TMPDIR}/bin + ln -s /bin/busybox ${TMPDIR}/bin/sh fi # Raid ln -s /sbin/mdadm ${TMPDIR}/bin ln -s /sbin/mdrun ${TMPDIR}/bin -ln -s /bin/grep ${TMPDIR}/bin -ln -s /bin/sed ${TMPDIR}/bin +#ln -s /bin/grep ${TMPDIR}/bin +#ln -s /bin/sed ${TMPDIR}/bin (cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) diff --git a/scripts/functions b/scripts/functions index 4a92011..a2ffd54 100644 --- a/scripts/functions +++ b/scripts/functions @@ -8,124 +8,104 @@ panic() fi } -# this function finds scripts with empty depends and adds them -# to the ordered list -dep_reduce() +render() { - i=0 - j=0 - unset neworder - - for entry in "${array[@]}"; do - set - ${entry} + eval "echo -n \${$@}" +} - if [ "$#" -eq "0" ]; then +set_initlist() +{ + unset initlist + for si_x in ${initdir}/*; do + if [ ! -x ${si_x} ]; then continue - elif [ "$#" -eq "1" ]; then - if [ $end -eq 0 ] || - [ x"${order[$((end-1))]}" != x"$1" ]; then - order[$((end))]=$1 - end=$((end+1)) - neworder[$((j))]=$1 - j=$((j+1)) - fi - - array[$((i))]= fi - - i=$((i+1)) + initlist="${initlist} $(basename ${si_x})" done } -dep_remove() +reduce_satisfied() { - i=0 - - # for each row in the array - for entry in "${array[@]}"; do - unset newentry - - set - ${entry} - - # for each dependency of the script - for dep in "$@"; do - new=1 - - # for each new dependency - for tmp in "${order[@]}"; do - if [ x"$dep" = x"$tmp" ]; then - new=0 - fi - done - - if [ x"$new" = x"1" ]; then - newentry="$newentry $dep" - fi - done + deplist="$(render array_${1})" + for rs_x in ${runlist}; do + pop_list_item ${rs_x} ${deplist} + deplist=${tmppop} + done + eval array_${1}=\"${deplist}\" +} - array[$((i))]="$newentry" - i=$((i+1)) +get_prereqs() +{ + set_initlist + for gp_x in ${initlist}; do + tmp=$(${initdir}/${gp_x} prereqs) + eval array_${gp_x}=\"${tmp}\" done } -run_scripts() +count_unsatisfied() { - initdir=${1} - scripts=$(ls ${initdir}) - order= - end=0 - array= + set - ${@} + return ${#} +} - # FIXME: New algorithm - # array of strings: "$file $prereqs" - # iterate over all strings; find empty strings (just $file) - # add to order, delete from all strings and zero out entry - # repeat until all strings are empty - - i=0 - for file in $scripts; do - # if it's not a regular file, or if it's not executable, skip it - if ! [ -f ${initdir}/${file} ] || ! [ -x ${initdir}/${file} ]; then +# Removes $1 from initlist +pop_list_item() +{ + item=${1} + shift + set - ${@} + unset tmppop + # Iterate + for pop in ${@}; do + if [ ${pop} = ${item} ]; then continue fi - - array[$((i))]="$file $(${initdir}/${file} prereqs)" - i=$((i+1)) + tmppop="${tmppop} ${pop}" done - # No scripts in directory, bail. - if [ ${i} -eq 0 ]; then - return 0 - fi - - while /bin/true; do - set - ${array[@]} - - if [ "$#" -eq "0" ]; then - break - fi - - dep_reduce - - dep_remove - - if [ "${#neworder}" -eq "0" ]; then - for x in "${array[@]}"; do - if [ x"$x" != x"" ]; then - printf "could not reduce further; " - printf "circular dependencies\n" - return 1 - fi - done - - # we're done! - break +} + +# This function generates the runlist, so we clear it first. +reduce_prereqs() +{ + unset runlist + set_initlist + set - ${initlist} + i=$# + # Loop until there's no more in the queue to loop through + while [ ${i} -ne 0 ]; do + oldi=${i} + for rp_x in ${initlist}; do + reduce_satisfied ${rp_x} + count_unsatisfied $(render array_${rp_x}) + cnt=${?} + if [ ${cnt} -eq 0 ]; then + runlist="${runlist} ${rp_x}" + pop_list_item ${rp_x} ${initlist} + initlist=${tmppop} + i=$((${i} - 1)) + fi + done + if [ ${i} -eq ${oldi} ]; then + echo "PANIC: Circular dependancy. Exiting." >&2 + exit 1 fi done - - # run the initscripts - for script in "${order[@]}"; do - ${initdir}/${script} +} + +call_scripts() +{ + echo ${runlist} + for cs_x in ${runlist}; do + ${initdir}/${cs_x} done -} +} +run_scripts() +{ + initdir=${1} + get_prereqs + reduce_prereqs + call_scripts +} diff --git a/scripts/init-top/test b/scripts/init-top/test deleted file mode 100644 index e4d59fb..0000000 --- a/scripts/init-top/test +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -echo "Got here!" diff --git a/scripts/local b/scripts/local index ffbd230..b322f09 100644 --- a/scripts/local +++ b/scripts/local @@ -3,7 +3,7 @@ # Parameter: Where to mount the filesystem mountroot () { - run_scripts /scripts/local_top + run_scripts /scripts/local-top # Get the root filesystem type if [ ! -e ${ROOT} ]; then @@ -12,10 +12,10 @@ mountroot () eval $(fstype < ${ROOT}) - run_scripts /scripts/local_premount + run_scripts /scripts/local-premount # Mount root mount ${ro} -t ${FSTYPE} ${ROOT} ${rootmnt} - run_scripts /scripts/local_bottom + run_scripts /scripts/local-bottom } diff --git a/scripts/local-top/md b/scripts/local-top/md new file mode 100644 index 0000000..d6f7e94 --- /dev/null +++ b/scripts/local-top/md @@ -0,0 +1,18 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +/bin/mdrun /dev diff --git a/scripts/nfs b/scripts/nfs index d0f1600..9860ea7 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -2,7 +2,7 @@ # Paramter: Where the root should be mounted mountroot () { - run_scripts /scripts/nfs_top + run_scripts /scripts/nfs-top ipconfig ${DEVICE} . /tmp/net-${DEVICE}.conf @@ -10,10 +10,10 @@ mountroot () NFSROOT=${ROOTSERVER}:${ROOTPATH} fi - run_scripts /scripts/nfs_premount + run_scripts /scripts/nfs-premount nfsmount ${NFSROOT} ${rootmnt} - run_scripts /scripts/nfs_bottom + run_scripts /scripts/nfs-bottom } -- cgit v1.2.3 From 74a75c2b53b50aeadc939d14aa174505a93271b1 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Mon, 13 Jun 2005 01:52:43 +0000 Subject: Depend on mdadm --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 89c37e4..e2c4dbb 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,6 @@ Standards-Version: 3.6.1 Package: initramfs-tools Architecture: all -Depends: klibc-utils, busybox-cvs-static +Depends: klibc-utils, busybox-cvs-static, mdadm Description: tools for generting an Ubuntu-style initramfs This package generates an initramfs for an Ubuntu system. -- cgit v1.2.3 From 433e18f414f120c3c28568114ea6854167fe7c74 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Mon, 13 Jun 2005 02:03:37 +0000 Subject: Bump version to 0.8 --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 41f15e5..7f0053e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.8) UNRELEASED; urgency=low + + + + * + + -- Jeff Bailey Mon, 13 Jun 2005 01:53:01 +0000 + initramfs-tools (0.7) breezy; urgency=low The "CONFORM!" release. -- cgit v1.2.3 From 43528be821f50d8676ba29d7e51be6915d74cfae Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Tue, 14 Jun 2005 21:39:18 +0000 Subject: export command line parameters to run scripts. honour commandline readonly/readwrite parameters for nfs. Release initramfs 0.8 --- debian/changelog | 11 +++++++---- init | 14 +++++++------- scripts/local | 8 +++++++- scripts/nfs | 8 +++++++- 4 files changed, 28 insertions(+), 13 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7f0053e..b96929f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,13 @@ -initramfs-tools (0.8) UNRELEASED; urgency=low +initramfs-tools (0.8) breezy; urgency=low - + The "We are one in the spirit..." release - * + * Export the command line variables so that the various scripts + can see them. - -- Jeff Bailey Mon, 13 Jun 2005 01:53:01 +0000 + * Honour command line 'ro' or 'rw' settings for nfs. + + -- Jeff Bailey Tue, 14 Jun 2005 21:35:14 +0000 initramfs-tools (0.7) breezy; urgency=low diff --git a/init b/init index 733e7fd..31a16c0 100644 --- a/init +++ b/init @@ -19,11 +19,11 @@ mount -t proc proc /proc . /scripts/functions # Parse command line options -init=/sbin/init -root= -ro=-r -break= -rootmnt=/root +export init=/sbin/init +export root= +export readonly=y +export break= +export rootmnt=/root for x in $(cat /proc/cmdline); do case $x in init=*) @@ -39,10 +39,10 @@ for x in $(cat /proc/cmdline); do BOOT=${x#boot=} ;; ro) - ro=-r + readonly=yes ;; rw) - ro=-w + readonly=no ;; break) break=yes diff --git a/scripts/local b/scripts/local index b322f09..cf9e331 100644 --- a/scripts/local +++ b/scripts/local @@ -14,8 +14,14 @@ mountroot () run_scripts /scripts/local-premount + if [ ${readonly} = y ]; then + roflag=-r + else + roflag=-w + fi + # Mount root - mount ${ro} -t ${FSTYPE} ${ROOT} ${rootmnt} + mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt} run_scripts /scripts/local-bottom } diff --git a/scripts/nfs b/scripts/nfs index 9860ea7..d8a259a 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -12,7 +12,13 @@ mountroot () run_scripts /scripts/nfs-premount - nfsmount ${NFSROOT} ${rootmnt} + if [ ${readonly} = y ]; then + roflag="-o ro" + else + roflag="-o rw" + fi + + nfsmount ${roflag} ${NFSROOT} ${rootmnt} run_scripts /scripts/nfs-bottom -- cgit v1.2.3 From 333765e767ca14365b8078598aee55bfb5a4db32 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 16 Jun 2005 19:41:14 +0000 Subject: Require busybox-cvs-initramfs, include modprobe bits --- debian/changelog | 8 ++++++++ debian/control | 2 +- init | 9 --------- mkinitramfs | 13 ++++++------- scripts/functions | 6 +----- 5 files changed, 16 insertions(+), 22 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b96929f..88abe0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.9) breezy; urgency=low + + * Unconditionally require busybox. Might revert this eventually + but it's too much of a pain right now do this without + a reasonably environment. + + -- Jeff Bailey Thu, 16 Jun 2005 02:23:50 +0000 + initramfs-tools (0.8) breezy; urgency=low The "We are one in the spirit..." release diff --git a/debian/control b/debian/control index e2c4dbb..7222e98 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,6 @@ Standards-Version: 3.6.1 Package: initramfs-tools Architecture: all -Depends: klibc-utils, busybox-cvs-static, mdadm +Depends: klibc-utils, busybox-cvs-initramfs, mdadm Description: tools for generting an Ubuntu-style initramfs This package generates an initramfs for an Ubuntu system. diff --git a/init b/init index 31a16c0..a338889 100644 --- a/init +++ b/init @@ -1,14 +1,5 @@ #!/bin/sh -x -/bin/busybox ln -s /bin/busybox /bin/[ -/bin/busybox ln -s /bin/busybox /bin/basename -/bin/busybox ln -s /bin/busybox /bin/mount -/bin/busybox ln -s /bin/busybox /bin/mkdir -/bin/busybox ln -s /bin/busybox /bin/umount -/bin/busybox ln -s /bin/busybox /bin/sed -/bin/busybox ln -s /bin/busybox /bin/grep -/bin/busybox ln -s /bin/busybox /bin/cat - mkdir /sys mkdir /proc mkdir /tmp diff --git a/mkinitramfs b/mkinitramfs index e1c9a6b..94cf4c5 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -111,17 +111,16 @@ ln -s /lib/ld*.so.* ${TMPDIR}/lib rm ${TMPDIR}/lib/*lsb* # Busybox -if [ "x${BUSYBOX}" = "xy" ]; then - rm ${TMPDIR}/bin/sh - ln -s /bin/busybox ${TMPDIR}/bin - ln -s /bin/busybox ${TMPDIR}/bin/sh -fi +rm ${TMPDIR}/bin/sh +ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/sh + +# Modutils +ln -s /sbin/insmod ${TMPDIR}/bin +ln -s /sbin/modprobe ${TMPDIR}/bin # Raid ln -s /sbin/mdadm ${TMPDIR}/bin ln -s /sbin/mdrun ${TMPDIR}/bin -#ln -s /bin/grep ${TMPDIR}/bin -#ln -s /bin/sed ${TMPDIR}/bin (cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) diff --git a/scripts/functions b/scripts/functions index a2ffd54..717418f 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1,11 +1,7 @@ panic() { echo $@ - if [ -e /bin/busybox ]; then - FS1='(initramfs) ' exec /bin/busybox sh - else - FS1='(initramfs) ' exec /bin/sh - fi + FS1='(initramfs) ' exec /bin/sh } render() -- cgit v1.2.3 From bf8d6100fb13127151c309d842185b3a250ecfff Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Fri, 17 Jun 2005 12:17:42 +0000 Subject: Integrate Matt Zimmerman's changes to initramfs --- debian/changelog | 15 +++++++++++++-- init | 10 +++------- mkinitramfs | 25 +++++++++++++++++++++++-- scripts/functions | 20 ++++++++++++++++++++ scripts/local | 2 ++ 5 files changed, 61 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 88abe0c..5cd9969 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,22 @@ -initramfs-tools (0.9) breezy; urgency=low +initramfs-tools (0.10) breezy; urgency=low * Unconditionally require busybox. Might revert this eventually but it's too much of a pain right now do this without - a reasonably environment. + a reasonably environment + + * Use modprobe to load modules + + * Iterate through /sys/bus/pci and /sys/bus/usb and load drivers + based on their modalias -- Jeff Bailey Thu, 16 Jun 2005 02:23:50 +0000 +initramfs-tools (0.9) breezy; urgency=low + + * Be consistent about y/n vs. yes/no values for the readonly variable + + -- Matt Zimmerman Thu, 16 Jun 2005 15:22:30 -0700 + initramfs-tools (0.8) breezy; urgency=low The "We are one in the spirit..." release diff --git a/init b/init index 73981a5..52e10bd 100644 --- a/init +++ b/init @@ -30,10 +30,10 @@ for x in $(cat /proc/cmdline); do BOOT=${x#boot=} ;; ro) - readonly=yes + readonly=y ;; rw) - readonly=no + readonly=n ;; break) break=yes @@ -45,11 +45,7 @@ run_scripts /scripts/init-top . /scripts/${BOOT} -# Load the modules -# FIXME - do module options here -for x in $(cat /conf/modules); do - modprobe $x -done +load_modules # Populate /dev tree udevstart diff --git a/mkinitramfs b/mkinitramfs index bfb0007..c3e98a3 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -19,7 +19,24 @@ manual_add_modules() mkdir -p ${TMPDIR}/$(dirname ${y}) ln -s ${y} ${TMPDIR}/$(dirname ${y}) depmod -b ${TMPDIR} ${version} - echo $(basename ${y}) >>${TMPDIR}/conf/modules + echo $(basename ${y} .ko) >>${TMPDIR}/conf/modules + done + done +} + +# Modules that we always add to the initramfs +auto_add_modules() +{ + for x in ext3 ext2 raid1 md sd_mod sata_svw usbhid ohci_hcd ehci_hcd; do + for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do + # Prune duplicates + if [ -e ${TMPDIR}/${y} ]; then + continue + fi + + mkdir -p ${TMPDIR}/$(dirname ${y}) + ln -s ${y} ${TMPDIR}/$(dirname ${y}) + depmod -b ${TMPDIR} ${version} done done } @@ -90,11 +107,14 @@ fi TMPDIR=$(mktemp -d) || exit 1 mkdir -p ${TMPDIR}/modules ${TMPDIR}/conf ${TMPDIR}/etc mkdir -p ${TMPDIR}/bin ${TMPDIR}/lib ${TMPDIR}/scripts +mkdir -p ${TMPDIR}/sbin for x in ${CONFDIR}/modules /usr/share/initramfs-tools/modules.d/*; do manual_add_modules ${x} done +auto_add_modules + # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. @@ -119,7 +139,8 @@ ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/sh ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/busybox # Modutils -ln -s /sbin/modprobe ${TMPDIR}/bin +ln -s /sbin/modprobe ${TMPDIR}/sbin +ln -s /sbin/rmmod ${TMPDIR}/bin # Raid ln -s /sbin/mdadm ${TMPDIR}/bin diff --git a/scripts/functions b/scripts/functions index 717418f..7e8c725 100644 --- a/scripts/functions +++ b/scripts/functions @@ -105,3 +105,23 @@ run_scripts() reduce_prereqs call_scripts } + +load_modules() +{ + for x in /sys/bus/pci/devices/*; do + modprobe -q $(cat ${x}/modalias) + done + + # Give the USB bus a moment to catch up + sleep 2 + + for x in /sys/bus/usb/devices/*; do + modprobe -q $(cat ${x}/modalias) + done + + # Load the modules + # FIXME - do module options here + for x in $(cat /conf/modules); do + modprobe -v $x + done +} diff --git a/scripts/local b/scripts/local index cf9e331..99eea77 100644 --- a/scripts/local +++ b/scripts/local @@ -20,6 +20,8 @@ mountroot () roflag=-w fi + modprobe ${FSTYPE} + # Mount root mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt} -- cgit v1.2.3 From 287dcae1407c303ee929d2bff0a49c1e721b05ae Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Fri, 17 Jun 2005 15:57:54 +0000 Subject: Use /sbin, do depmod at boot time, copy all the interesting hardware drivers onto the initramfs --- conf/modules | 6 ++---- debian/NEWS | 15 +++++++++++++++ debian/changelog | 11 ++++++++++- mkinitramfs | 35 ++++++++++++++++++++++++++++++----- scripts/functions | 2 ++ scripts/local-top/md | 2 +- 6 files changed, 60 insertions(+), 11 deletions(-) create mode 100644 debian/NEWS (limited to 'debian') diff --git a/conf/modules b/conf/modules index ee1310a..8f12189 100644 --- a/conf/modules +++ b/conf/modules @@ -1,7 +1,5 @@ # List of modules that you want to include in your initramfs. # This might be good choices: # -#ide-disk -#ide-generic -#ext2 -#ext3 +# raid1 +# sd_mod diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 0000000..e755806 --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,15 @@ +initramfs-tools (0.10) breezy; urgency=low + + * This release includes hardware auto detection in the initramfs. + This means two things in particular that are important: + + 1) the resulting initramfs will be huge. Like 10 megs huge. + I will shrink it down once it's correct. If you're on an + arch that doesn't like >4mb initramfs', then this won't boot. + + 2) Your network drivers are loaded in the initramfs, so hotplug + won't see a network event, so ifup won't be run. This will + be fixed shortly in hotplug. + + -- Jeff Bailey Fri, 17 Jun 2005 15:17:06 +0000 + diff --git a/debian/changelog b/debian/changelog index 5cd9969..ca4efc1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ initramfs-tools (0.10) breezy; urgency=low + The "I can see you!" release. + * Unconditionally require busybox. Might revert this eventually but it's too much of a pain right now do this without a reasonably environment @@ -9,7 +11,14 @@ initramfs-tools (0.10) breezy; urgency=low * Iterate through /sys/bus/pci and /sys/bus/usb and load drivers based on their modalias - -- Jeff Bailey Thu, 16 Jun 2005 02:23:50 +0000 + * Start to use /sbin for things + + * Include depmod in the image. Use it at boot time. + + * Edit config example to show the modules that do need to be included + manually for this build. + + -- Jeff Bailey Fri, 17 Jun 2005 12:45:07 +0000 initramfs-tools (0.9) breezy; urgency=low diff --git a/mkinitramfs b/mkinitramfs index c3e98a3..078346f 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -18,16 +18,40 @@ manual_add_modules() mkdir -p ${TMPDIR}/$(dirname ${y}) ln -s ${y} ${TMPDIR}/$(dirname ${y}) - depmod -b ${TMPDIR} ${version} echo $(basename ${y} .ko) >>${TMPDIR}/conf/modules done done } +# Copy entire subtrees to the initramfs +copy_modules_dir() +{ + tmpdir_modbase=${TMPDIR}/lib/modules/${version} + mkdir -p $(dirname ${tmpdir_modbase}/${1}) + cp -a /lib/modules/${version}/${1} ${tmpdir_modbase}/${1} +} + # Modules that we always add to the initramfs auto_add_modules() { - for x in ext3 ext2 raid1 md sd_mod sata_svw usbhid ohci_hcd ehci_hcd; do + copy_modules_dir kernel/drivers/net + copy_modules_dir kernel/drivers/scsi + copy_modules_dir kernel/drivers/ide + copy_modules_dir kernel/drivers/md + copy_modules_dir kernel/drivers/usb + copy_modules_dir kernel/drivers/block + copy_modules_dir kernel/drivers/input + copy_modules_dir kernel/fs/ext2 + copy_modules_dir kernel/fs/ext3 + copy_modules_dir kernel/fs/isofs + copy_modules_dir kernel/fs/jbd + copy_modules_dir kernel/fs/jfs + copy_modules_dir kernel/fs/nfs + copy_modules_dir kernel/fs/reiserfs + copy_modules_dir kernel/fs/xfs + + # These aren't caught by the above but really need to be there: + for x in mbcache; do for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do # Prune duplicates if [ -e ${TMPDIR}/${y} ]; then @@ -140,11 +164,12 @@ ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/busybox # Modutils ln -s /sbin/modprobe ${TMPDIR}/sbin -ln -s /sbin/rmmod ${TMPDIR}/bin +ln -s /sbin/depmod ${TMPDIR}/sbin +ln -s /sbin/rmmod ${TMPDIR}/sbin # Raid -ln -s /sbin/mdadm ${TMPDIR}/bin -ln -s /sbin/mdrun ${TMPDIR}/bin +ln -s /sbin/mdadm ${TMPDIR}/sbin +ln -s /sbin/mdrun ${TMPDIR}/sbin (cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) diff --git a/scripts/functions b/scripts/functions index 7e8c725..d5d1035 100644 --- a/scripts/functions +++ b/scripts/functions @@ -108,6 +108,8 @@ run_scripts() load_modules() { + depmod + for x in /sys/bus/pci/devices/*; do modprobe -q $(cat ${x}/modalias) done diff --git a/scripts/local-top/md b/scripts/local-top/md index d6f7e94..864ffe4 100644 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -15,4 +15,4 @@ prereqs) ;; esac -/bin/mdrun /dev +/sbin/mdrun /dev -- cgit v1.2.3 From b22f2c7fc49c9874eb8f2df1d8b1fabec540cfb0 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Fri, 17 Jun 2005 21:24:55 +0000 Subject: Make quieter, match mkinitrd interface, pull in dependencies for nfs and dhcp, document upstream repository location --- debian/changelog | 17 +++++++++++++++++ debian/copyright | 7 +++++-- init | 2 +- mkinitramfs | 22 +++++++++++++++++++++- scripts/functions | 8 ++++++-- scripts/nfs | 4 ++++ 6 files changed, 54 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ca4efc1..dfdbc50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +initramfs-tools (0.11) breezy; urgency=low + + "Illusion is the first of all pleasures" - Oscar Wilde + + * Make the init much less noisy + + * Pull in all the dependancies for nfs and af_packet + + * Be compatible with misdocumented mkinitrd interface + + Thanks to Matt Zimmerman for the bug reports and testing! + + * Update debian/copyright to have the location of the bzr + archive + + -- Jeff Bailey Fri, 17 Jun 2005 21:23:25 +0000 + initramfs-tools (0.10) breezy; urgency=low The "I can see you!" release. diff --git a/debian/copyright b/debian/copyright index cdc2919..a40b722 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,9 +1,12 @@ -This package was debianized by Jeff Bailey on +This package was debianized by Jeff Bailey on Thu, 27 Jan 2005 15:23:52 -0500. Copyright: -Author: Jeff Bailey, with some pieces for initrd-tools +Author: Jeff Bailey + +The source code can be found by using "bzr" at: +http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools License: diff --git a/init b/init index 52e10bd..8c5c53e 100644 --- a/init +++ b/init @@ -1,4 +1,4 @@ -#!/bin/sh -x +#!/bin/sh mkdir /sys mkdir /proc diff --git a/mkinitramfs b/mkinitramfs index 078346f..8ef22c4 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -51,7 +51,7 @@ auto_add_modules() copy_modules_dir kernel/fs/xfs # These aren't caught by the above but really need to be there: - for x in mbcache; do + for x in mbcache nfs af_packet; do for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do # Prune duplicates if [ -e ${TMPDIR}/${y} ]; then @@ -116,7 +116,27 @@ if [ x${outfile} = x ] || [ ${#} -ne 1 ]; 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} +[ $# -gt 0 ] || unset version +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 + +version="${version-$(uname -r)}" if [ -d ${outfile} ]; then echo "${outfile} is a directory" diff --git a/scripts/functions b/scripts/functions index d5d1035..ab23352 100644 --- a/scripts/functions +++ b/scripts/functions @@ -111,14 +111,18 @@ load_modules() depmod for x in /sys/bus/pci/devices/*; do - modprobe -q $(cat ${x}/modalias) + if [ -e ${x}/modalias ]; then + modprobe -q $(cat ${x}/modalias) + fi done # Give the USB bus a moment to catch up sleep 2 for x in /sys/bus/usb/devices/*; do - modprobe -q $(cat ${x}/modalias) + if [ -e ${x}/modalias ]; then + modprobe -q $(cat ${x}/modalias) + fi done # Load the modules diff --git a/scripts/nfs b/scripts/nfs index d8a259a..11c61f8 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -4,6 +4,10 @@ mountroot () { run_scripts /scripts/nfs-top + modprobe nfs + # For DHCP + modprobe af_packet + ipconfig ${DEVICE} . /tmp/net-${DEVICE}.conf if [ "x${NFSROOT}" = "xauto" ]; then -- cgit v1.2.3 From a137627150b76d48d96ef72d26915005a1ce8538 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Mon, 20 Jun 2005 23:05:53 +0000 Subject: * Don't complain if /etc/mkinitramfs/modules doesn't exist. * Make sure that raid1 is pulled in. * Include /etc/modprobe.d/aliases in the initramfs --- debian/changelog | 10 ++++++++++ mkinitramfs | 4 +++- scripts/functions | 8 +++++--- 3 files changed, 18 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index dfdbc50..07d6a4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +initramfs-tools (0.12) breezy; urgency=low + + * Don't complain if /etc/mkinitramfs/modules doesn't exist. + + * Make sure that raid1 is pulled in. + + * Include /etc/modprobe.d/aliases in the initramfs + + -- Jeff Bailey Mon, 20 Jun 2005 23:05:04 +0000 + initramfs-tools (0.11) breezy; urgency=low "Illusion is the first of all pleasures" - Oscar Wilde diff --git a/mkinitramfs b/mkinitramfs index 8ef22c4..f06811e 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -51,7 +51,7 @@ auto_add_modules() copy_modules_dir kernel/fs/xfs # These aren't caught by the above but really need to be there: - for x in mbcache nfs af_packet; do + for x in mbcache nfs af_packet raid1; do for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do # Prune duplicates if [ -e ${TMPDIR}/${y} ]; then @@ -186,6 +186,8 @@ ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/busybox ln -s /sbin/modprobe ${TMPDIR}/sbin ln -s /sbin/depmod ${TMPDIR}/sbin ln -s /sbin/rmmod ${TMPDIR}/sbin +mkdir -p ${TMPDIR}/etc/modprobe.d +ln -s /etc/modprobe.d/aliases ${TMPDIR}/etc/modprobe.d # Raid ln -s /sbin/mdadm ${TMPDIR}/sbin diff --git a/scripts/functions b/scripts/functions index ab23352..73b773a 100644 --- a/scripts/functions +++ b/scripts/functions @@ -127,7 +127,9 @@ load_modules() # Load the modules # FIXME - do module options here - for x in $(cat /conf/modules); do - modprobe -v $x - done + if [ -e /conf/modules ]; then + for x in $(cat /conf/modules); do + modprobe -v $x + done + fi } -- cgit v1.2.3 From f12ad818ffc10d8243cd75d552226273df3d65a0 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Tue, 21 Jun 2005 01:31:54 +0000 Subject: * Default to currently running kernel version. Based on a patch from maximilian attems, thanks! * Handle module arguments in /etc/mkinitramfs/modules * Do hookscripts at generation time. Drop things into /usr/share/initramfs-tools/hooks or /etc/mkinitramfs/hooks * Make sure local-bottom and nfs-bottom get created Thanks to Karl Hegbloom for these three patches! * Prune stray echo from call_scripts * Load raid1 for now so that md setups will work. * Detect ide modules load Thanks to Jeff Waugh for initial testing of this! --- conf/modules | 4 ++++ debian/changelog | 20 ++++++++++++++++++++ debian/dirs | 6 ++++-- mkinitramfs | 38 ++++++++++++++++++++++++++------------ scripts/functions | 49 ++++++++++++++++++++++++++++++++++++++++--------- scripts/local | 2 +- scripts/local-top/md | 3 +++ scripts/nfs | 1 + 8 files changed, 99 insertions(+), 24 deletions(-) (limited to 'debian') diff --git a/conf/modules b/conf/modules index 8f12189..0067831 100644 --- a/conf/modules +++ b/conf/modules @@ -1,4 +1,8 @@ # List of modules that you want to include in your initramfs. +# +# Syntax: module_name [args ...] +# +# # This might be good choices: # # raid1 diff --git a/debian/changelog b/debian/changelog index 07d6a4e..54d3fcd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,31 @@ initramfs-tools (0.12) breezy; urgency=low + "I am not young enough to know everything." - Oscar Wilde + * Don't complain if /etc/mkinitramfs/modules doesn't exist. * Make sure that raid1 is pulled in. * Include /etc/modprobe.d/aliases in the initramfs + * Default to currently running kernel version. + Based on a patch from maximilian attems, thanks! + + * Handle module arguments in /etc/mkinitramfs/modules + + * Do hookscripts at generation time. Drop things into + /usr/share/initramfs-tools/hooks or /etc/mkinitramfs/hooks + + * Make sure local-bottom and nfs-bottom get created + Thanks to Karl Hegbloom for these three patches! + + * Prune stray echo from call_scripts + + * Load raid1 for now so that md setups will work. + + * Detect ide modules load + Thanks to Jeff Waugh for initial testing of this! + -- Jeff Bailey Mon, 20 Jun 2005 23:05:04 +0000 initramfs-tools (0.11) breezy; urgency=low diff --git a/debian/dirs b/debian/dirs index ef40692..94484bb 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,7 +1,9 @@ etc/mkinitramfs/init-bottom etc/mkinitramfs/init-top -etc/mkinitramfs/local-premount etc/mkinitramfs/local-top -etc/mkinitramfs/nfs-premount +etc/mkinitramfs/local-premount +etc/mkinitramfs/local-bottom etc/mkinitramfs/nfs-top +etc/mkinitramfs/nfs-premount +etc/mkinitramfs/nfs-bottom usr/share/initramfs-tools/modules.d diff --git a/mkinitramfs b/mkinitramfs index f06811e..4dabfce 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -1,7 +1,17 @@ #!/bin/sh +# For dependency ordered mkinitramfs hook scripts. +. /usr/share/initramfs-tools/scripts/functions + # Takes a file containing a list of modules to be added as an argument # Figures out dependancies and adds it in. +# +# File syntax: +# +# # comment +# modprobe_module_name [args ...] +# [...] +# manual_add_modules() { # Sanity check @@ -9,8 +19,8 @@ manual_add_modules() return fi - for x in $(sed -e '/^#/d' ${1}); do - for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do + sed -e '/^#/d' ${1} | while read module rest; do + for y in $(modprobe --set-version=${version} --show-depends ${module} | awk '{ print $2 }'); do # Prune duplicates if [ -e ${TMPDIR}/${y} ]; then continue @@ -18,7 +28,7 @@ manual_add_modules() mkdir -p ${TMPDIR}/$(dirname ${y}) ln -s ${y} ${TMPDIR}/$(dirname ${y}) - echo $(basename ${y} .ko) >>${TMPDIR}/conf/modules + echo $(basename ${y} .ko) "${rest}" >>${TMPDIR}/conf/modules done done } @@ -51,7 +61,7 @@ auto_add_modules() copy_modules_dir kernel/fs/xfs # These aren't caught by the above but really need to be there: - for x in mbcache nfs af_packet raid1; do + for x in mbcache nfs af_packet raid1 ide-cd ide-disk ide-generic; do for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do # Prune duplicates if [ -e ${TMPDIR}/${y} ]; then @@ -99,9 +109,6 @@ while getopts "d:ko:r:" flag; do o) outfile="${OPTARG}" ;; - v) - version="${OPTARG}" - ;; k) keep="y" ;; @@ -112,14 +119,18 @@ shift $((${OPTIND} - 1)) . ${CONFDIR}/initramfs.conf -if [ x${outfile} = x ] || [ ${#} -ne 1 ]; then +if [ x${outfile} = x ]; 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} -[ $# -gt 0 ] || unset version +if [ ${#} -ne 1 ]; then + version=$(uname -r) +else + version="${1}" +fi + case ${version} in /lib/modules/*/[!/]*) ;; @@ -136,8 +147,6 @@ case ${version} in ;; esac -version="${version-$(uname -r)}" - if [ -d ${outfile} ]; then echo "${outfile} is a directory" exit 1 @@ -193,6 +202,11 @@ ln -s /etc/modprobe.d/aliases ${TMPDIR}/etc/modprobe.d ln -s /sbin/mdadm ${TMPDIR}/sbin ln -s /sbin/mdrun ${TMPDIR}/sbin +run_scripts /usr/share/initramfs-tools/hooks +run_scripts /etc/mkinitramfs/hooks + +# FIXME catenate extra cpio.gz here >>${outfile} + (cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) if [ "${keep}" = "y" ]; then diff --git a/scripts/functions b/scripts/functions index 73b773a..5fb8c04 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1,3 +1,5 @@ +# -*- shell-script -*- + panic() { echo $@ @@ -92,7 +94,6 @@ reduce_prereqs() call_scripts() { - echo ${runlist} for cs_x in ${runlist}; do ${initdir}/${cs_x} done @@ -106,9 +107,44 @@ run_scripts() call_scripts } +ide_boot_events() { + [ "$(echo /proc/ide/*/media)" = "/proc/ide/*/media" ] && return + + for drive in /proc/ide/*/media; do + # nothing to do if the device has already been took in charge + unit=${drive#/proc/ide/}; unit=${unit%/media} + [ -d /sys/block/$unit ] && continue + + read media < $drive + case "$media" in + disk) MODULE=ide-disk ;; + cdrom) MODULE=ide-cd ;; + tape) MODULE=ide-tape ;; + floppy) MODULE=ide-floppy ;; + *) MODULE=ide-generic ;; + esac + + modprobe -q ${MODULE} + done +} + load_modules() { - depmod + depmod -a + + # Load custom modules first + if [ -e /conf/modules ]; then + cat /conf/modules | while read m; do + if [ -z "$m" ] \ + || expr "$m" : "#" >/dev/null \ + || expr "$m" : "[ \t]+#?" > /dev/null + then + continue; + else + modprobe -v $m + fi + done + fi for x in /sys/bus/pci/devices/*; do if [ -e ${x}/modalias ]; then @@ -125,11 +161,6 @@ load_modules() fi done - # Load the modules - # FIXME - do module options here - if [ -e /conf/modules ]; then - for x in $(cat /conf/modules); do - modprobe -v $x - done - fi + ide_boot_events + } diff --git a/scripts/local b/scripts/local index 99eea77..4a17abb 100644 --- a/scripts/local +++ b/scripts/local @@ -1,4 +1,4 @@ -# Local filesystem mounting +# Local filesystem mounting -*- shell-script -*- # Parameter: Where to mount the filesystem mountroot () diff --git a/scripts/local-top/md b/scripts/local-top/md index 864ffe4..062852f 100644 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -15,4 +15,7 @@ prereqs) ;; esac +# FIXME detect this! +modprobe raid1 + /sbin/mdrun /dev diff --git a/scripts/nfs b/scripts/nfs index 11c61f8..1e2be2c 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -1,3 +1,4 @@ +# NFS filesystem mounting *- shell-script -*- # Paramter: Where the root should be mounted mountroot () -- cgit v1.2.3 From 2c72958bfc090b046e21e9eaad9134235095ad30 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 30 Jun 2005 00:05:01 +0000 Subject: * Use detailed logging now for debian/changelog. We have at least three people hacking now, and details would probably be useful. * debian/TODO: Update * debian/dirs: Sort and add usr/share/initramfs-tools/hooks * debian/initramfs-tools.examples: Add docs/example_hook and docs/example_hook_cpiogz * debian/initramfs-tools.install: Pretty Print. * debian/rules: Ensure that mkinitramfs is executable * docs/example_script: New file * init: Add concept of 'quiet', be verbose if not specified * mkinitramfs: Do not load script functions until needed Clear up comments / documentation Use DESTDIR instead of TMPDIR Add ability to link in extra hunks into the cpio file Cosmetic cleanups * scripts/functions: Add lsb stype log_FOO_msg functions * scripts/local: Add logging * scripts/nfs: Add logging --- debian/TODO | 2 + debian/changelog | 39 +++++++++++++++ debian/dirs | 9 ++-- debian/initramfs-tools.examples | 2 + debian/initramfs-tools.install | 8 +-- debian/rules | 2 +- docs/example_script | 73 ++++++++++++++++++++++++++- mkinitramfs | 106 +++++++++++++++++++++++----------------- scripts/functions | 39 ++++++++++++++- scripts/local | 8 +++ scripts/nfs | 10 +++- 11 files changed, 240 insertions(+), 58 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index bf7e07d..d080de3 100644 --- a/debian/TODO +++ b/debian/TODO @@ -1,6 +1,8 @@ TODO ==== + o Grep for TODO and FIXME and do those. =) + o Get udev compiled against klibc o Integrate hotplug-ng diff --git a/debian/changelog b/debian/changelog index 54d3fcd..6c37206 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,42 @@ +initramfs-tools (0.13) breezy; urgency=low + + "We live in age when unnecessary things are our only necessities." + - Oscar Wilde + + * Use detailed logging now for debian/changelog. We have at least + three people hacking now, and details would probably be useful. + + * debian/TODO: Update + + * debian/dirs: Sort and add usr/share/initramfs-tools/hooks + + * debian/initramfs-tools.examples: Add docs/example_hook and + docs/example_hook_cpiogz + + * debian/initramfs-tools.install: Pretty Print. + + * debian/rules: Ensure that mkinitramfs is executable + + * docs/example_script: New file + + * init: Add concept of 'quiet', be verbose if not specified + + * mkinitramfs: Do not load script functions until needed + Clear up comments / documentation + Use DESTDIR instead of TMPDIR + Add ability to link in extra hunks into the cpio file + Cosmetic cleanups + + * scripts/functions: Add lsb stype log_FOO_msg functions + + * scripts/local: Add logging + + * scripts/nfs: Add logging + + Thanks to Karl Hegbloom for most of these patches! + + -- Jeff Bailey Wed, 29 Jun 2005 23:50:56 +0000 + initramfs-tools (0.12) breezy; urgency=low "I am not young enough to know everything." - Oscar Wilde diff --git a/debian/dirs b/debian/dirs index 94484bb..ac6210e 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,9 +1,10 @@ etc/mkinitramfs/init-bottom etc/mkinitramfs/init-top -etc/mkinitramfs/local-top -etc/mkinitramfs/local-premount etc/mkinitramfs/local-bottom -etc/mkinitramfs/nfs-top -etc/mkinitramfs/nfs-premount +etc/mkinitramfs/local-premount +etc/mkinitramfs/local-top etc/mkinitramfs/nfs-bottom +etc/mkinitramfs/nfs-premount +etc/mkinitramfs/nfs-top +usr/share/initramfs-tools/hooks usr/share/initramfs-tools/modules.d diff --git a/debian/initramfs-tools.examples b/debian/initramfs-tools.examples index 0e8472b..9f67297 100644 --- a/debian/initramfs-tools.examples +++ b/debian/initramfs-tools.examples @@ -1,2 +1,4 @@ conf/modules docs/example_script +docs/example_hook +docs/example_hook_cpiogz diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index e76186f..a2a78f5 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -1,4 +1,4 @@ -mkinitramfs usr/sbin -init usr/share/initramfs-tools -scripts usr/share/initramfs-tools -conf/initramfs.conf etc/mkinitramfs +mkinitramfs usr/sbin +init usr/share/initramfs-tools +scripts usr/share/initramfs-tools +conf/initramfs.conf etc/mkinitramfs diff --git a/debian/rules b/debian/rules index 0a1575f..a1b8695 100644 --- a/debian/rules +++ b/debian/rules @@ -3,4 +3,4 @@ include /usr/share/cdbs/1/rules/debhelper.mk common-build-arch:: - chmod +x init + chmod +x init mkinitramfs diff --git a/docs/example_script b/docs/example_script index 111b0d8..221c888 100644 --- a/docs/example_script +++ b/docs/example_script @@ -1,7 +1,52 @@ #!/bin/sh -# List the soft prerequisites here. So if there's something you know -# should be run first iff it exists. +# +# This script is run inside of the initramfs environment during the +# system boot process. It is installed there by 'mkinitramfs'. The +# package that owns it may opt to install it in either an appropriate +# location under "/usr/share/initramfs-tools/scripts/", or a similar +# location under "/etc/mkinitramfs/scripts/", depending upon whether +# it should be considered to be a user modifiable conffile or not. +# +# TODO: How do we deal with the case where the package that installed +# this has been removed but not purged, if we always arbitrarily +# copy all of these scripts into the initramfs? +# +# * The available toolset is limited inside this environment... +# +# TODO: document that toolset in the man page. +# +# * /dev, /proc, and /sys are already mounted. / is a ?? ro/rw +# filesystem... etc. more documentation. +# +# * It is expected that /proc and /sys will be umounted before +# changing over to the real root file system, so you must not keep +# any files open on them beyond these scripts. +# +# * You may like to strip these documentation comments from this +# example if you take it for a template, to save a little space in +# the initramfs, since nobody will ever read it from inside of +# there anyhow. +# + +# +# The environment contains at least the following variables: +# +# TODO: Decide what environment variables are meaningful and defined +# in this context, then document them as part of the interface. +# +# Because this script will be run as a full separate process, rather +# than sourced inside the context of the driver script, if it needs to +# pass information to another script that may run after it, it must do +# so by writing data to a file location known to both scripts. Simply +# setting an environment variable will not work. +# + +# +# List the soft prerequisites here. This is a space separated list of +# names, of scripts that are in the same directory as this one, that +# must be run before this one can be. +# PREREQ="" prereqs() @@ -18,4 +63,28 @@ prereqs) esac # Do the work here. + echo "Got here!" + +# Handle an error: + +if [ -n "$an_error_occured" ]; +then + # + # TODO: Do we need 'warn()', 'error()', and/or 'fatal()' for this? + # I think we ultimately do, and that they need to be in their own + # well-documented location so that an overlay can override them. + # Think 'usplash' progress updates. + # + echo "An error occured in $0: $an_error_occured" >&2 + exit 1 + # + # TODO: Decide if different error codes are meaningful, what they + # mean, and what the semantics of them are wrt 'init' pass + # or panic. Consider naming the error values with mnemonic + # symbols rather than magic numbers. + # +fi + +exit 0 + diff --git a/mkinitramfs b/mkinitramfs index 4dabfce..c05fa47 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -1,12 +1,9 @@ #!/bin/sh -# For dependency ordered mkinitramfs hook scripts. -. /usr/share/initramfs-tools/scripts/functions - -# Takes a file containing a list of modules to be added as an argument -# Figures out dependancies and adds it in. +# Takes a file containing a list of modules to be added as an +# argument, figures out dependancies, and adds them. # -# File syntax: +# Input file syntax: # # # comment # modprobe_module_name [args ...] @@ -22,13 +19,13 @@ manual_add_modules() sed -e '/^#/d' ${1} | while read module rest; do for y in $(modprobe --set-version=${version} --show-depends ${module} | awk '{ print $2 }'); do # Prune duplicates - if [ -e ${TMPDIR}/${y} ]; then + if [ -e ${DESTDIR}/${y} ]; then continue fi - mkdir -p ${TMPDIR}/$(dirname ${y}) - ln -s ${y} ${TMPDIR}/$(dirname ${y}) - echo $(basename ${y} .ko) "${rest}" >>${TMPDIR}/conf/modules + mkdir -p ${DESTDIR}/$(dirname ${y}) + ln -s ${y} ${DESTDIR}/$(dirname ${y}) + echo $(basename ${y} .ko) "${rest}" >>${DESTDIR}/conf/modules done done } @@ -36,7 +33,7 @@ manual_add_modules() # Copy entire subtrees to the initramfs copy_modules_dir() { - tmpdir_modbase=${TMPDIR}/lib/modules/${version} + tmpdir_modbase=${DESTDIR}/lib/modules/${version} mkdir -p $(dirname ${tmpdir_modbase}/${1}) cp -a /lib/modules/${version}/${1} ${tmpdir_modbase}/${1} } @@ -64,13 +61,13 @@ auto_add_modules() for x in mbcache nfs af_packet raid1 ide-cd ide-disk ide-generic; do for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do # Prune duplicates - if [ -e ${TMPDIR}/${y} ]; then + if [ -e ${DESTDIR}/${y} ]; then continue fi - mkdir -p ${TMPDIR}/$(dirname ${y}) - ln -s ${y} ${TMPDIR}/$(dirname ${y}) - depmod -b ${TMPDIR} ${version} + mkdir -p ${DESTDIR}/$(dirname ${y}) + ln -s ${y} ${DESTDIR}/$(dirname ${y}) + depmod -b ${DESTDIR} ${version} done done } @@ -96,6 +93,8 @@ EOF # Defaults keep="n" CONFDIR="/etc/mkinitramfs" +verbose="n" +errors_to="2>/dev/null" while getopts "d:ko:r:" flag; do case $flag in @@ -117,6 +116,9 @@ done shift $((${OPTIND} - 1)) +# For dependency ordered mkinitramfs hook scripts. +. /usr/share/initramfs-tools/scripts/functions + . ${CONFDIR}/initramfs.conf if [ x${outfile} = x ]; then @@ -157,10 +159,21 @@ if [ ! -e /lib/modules/${version} ]; then exit 1 fi -TMPDIR=$(mktemp -d) || exit 1 -mkdir -p ${TMPDIR}/modules ${TMPDIR}/conf ${TMPDIR}/etc -mkdir -p ${TMPDIR}/bin ${TMPDIR}/lib ${TMPDIR}/scripts -mkdir -p ${TMPDIR}/sbin +DESTDIR=$(mktemp -t -d mkinitramfs_XXXXXX) || exit 1 +__TMPCPIOGZ=$(mktemp -t mkinitramfs-OL_XXXXXX) || exit 1 + +# Export environment for hook scripts. +# +export version +export CONFDIR +export DESTDIR + +# Private, used by 'catenate_cpiogz'. +export __TMPCPIOGZ + +for d in bin conf etc lib modules sbin scripts; do + mkdir -p ${DESTDIR}/${d} +done for x in ${CONFDIR}/modules /usr/share/initramfs-tools/modules.d/*; do manual_add_modules ${x} @@ -171,46 +184,51 @@ auto_add_modules # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. -ln -s /usr/lib/klibc/bin/* ${TMPDIR}/bin -ln -s /usr/lib/klibc/lib/* ${TMPDIR}/lib -ln -s /usr/share/initramfs-tools/init ${TMPDIR}/init -cp -a /usr/share/initramfs-tools/scripts/* ${TMPDIR}/scripts -ln -s ${CONFDIR}/initramfs.conf ${TMPDIR}/conf -ln -s /etc/udev ${TMPDIR}/etc +ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin +ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib +ln -s /usr/share/initramfs-tools/init ${DESTDIR}/init +cp -a /usr/share/initramfs-tools/scripts/* ${DESTDIR}/scripts +ln -s ${CONFDIR}/initramfs.conf ${DESTDIR}/conf +ln -s /etc/udev ${DESTDIR}/etc # Hack until udev is built with klibc -ln -s /sbin/udev ${TMPDIR}/bin -ln -s /sbin/udevstart ${TMPDIR}/bin -ln -s /lib/libc.so.* ${TMPDIR}/lib -ln -s /lib/ld*.so.* ${TMPDIR}/lib -rm ${TMPDIR}/lib/*lsb* +ln -s /sbin/udev ${DESTDIR}/bin +ln -s /sbin/udevstart ${DESTDIR}/bin +ln -s /lib/libc.so.* ${DESTDIR}/lib +ln -s /lib/ld*.so.* ${DESTDIR}/lib +rm ${DESTDIR}/lib/*lsb* # Busybox -rm ${TMPDIR}/bin/sh -ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/sh +rm ${DESTDIR}/bin/sh +ln -s /usr/lib/initramfs-tools/bin/busybox ${DESTDIR}/bin/sh # This is ugly, but needed atm to make the builtins work =( -ln -s /usr/lib/initramfs-tools/bin/busybox ${TMPDIR}/bin/busybox +ln -s /usr/lib/initramfs-tools/bin/busybox ${DESTDIR}/bin/busybox # Modutils -ln -s /sbin/modprobe ${TMPDIR}/sbin -ln -s /sbin/depmod ${TMPDIR}/sbin -ln -s /sbin/rmmod ${TMPDIR}/sbin -mkdir -p ${TMPDIR}/etc/modprobe.d -ln -s /etc/modprobe.d/aliases ${TMPDIR}/etc/modprobe.d +ln -s /sbin/modprobe ${DESTDIR}/sbin +ln -s /sbin/depmod ${DESTDIR}/sbin +ln -s /sbin/rmmod ${DESTDIR}/sbin +mkdir -p ${DESTDIR}/etc/modprobe.d +ln -s /etc/modprobe.d/aliases ${DESTDIR}/etc/modprobe.d # Raid -ln -s /sbin/mdadm ${TMPDIR}/sbin -ln -s /sbin/mdrun ${TMPDIR}/sbin +ln -s /sbin/mdadm ${DESTDIR}/sbin +ln -s /sbin/mdrun ${DESTDIR}/sbin run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks -# FIXME catenate extra cpio.gz here >>${outfile} +(cd ${DESTDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) -(cd ${TMPDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) +if [ -s ${__TMPCPIOGZ} ]; then + cat ${__TMPCPIOGZ} >>${outfile} +fi if [ "${keep}" = "y" ]; then - echo "Working files in ${TMPDIR}" + echo "Working files in ${DESTDIR} and overlay in ${__TMPCPIOGZ}" else - rm -rf "${TMPDIR}" + rm -rf "${DESTDIR}" + rm -rf "${__TMPCPIOGZ}" fi + +exit 0 diff --git a/scripts/functions b/scripts/functions index 5fb8c04..1899a14 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1,9 +1,45 @@ # -*- shell-script -*- +_log_msg() +{ + if [ "$quiet" = "y" ]; then return; fi + echo "$@" +} + +log_success_msg() +{ + _log_msg "Success: $@" +} + +log_failure_msg() +{ + _log_msg "Failure: $@" +} + +log_warning_msg() +{ + _log_msg "Warning: $@" +} + +log_begin_msg() +{ + _log_msg "Begin: $@ ..." +} + +log_end_msg() +{ + _log_msg "Done." +} + +# update_progress() # ToDo: NOP placeholder... what else for usplash? +# { +# : +# } + panic() { echo $@ - FS1='(initramfs) ' exec /bin/sh + FS1='(initramfs) ' exec /bin/sh /dev/console 2>&1 } render() @@ -162,5 +198,4 @@ load_modules() done ide_boot_events - } diff --git a/scripts/local b/scripts/local index 4a17abb..bcc96ad 100644 --- a/scripts/local +++ b/scripts/local @@ -3,7 +3,9 @@ # Parameter: Where to mount the filesystem mountroot () { + log_begin_msg "Running /scripts/local-top" run_scripts /scripts/local-top + log_end_msg # Get the root filesystem type if [ ! -e ${ROOT} ]; then @@ -12,7 +14,9 @@ mountroot () eval $(fstype < ${ROOT}) + log_begin_msg "Running /scripts/local-premount" run_scripts /scripts/local-premount + log_end_msg if [ ${readonly} = y ]; then roflag=-r @@ -20,10 +24,14 @@ mountroot () roflag=-w fi + # FIXME This has no error checking modprobe ${FSTYPE} + # FIXME This has no error checking # Mount root mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt} + log_begin_msg "Running /scripts/log-bottom" run_scripts /scripts/local-bottom + log_end_msg } diff --git a/scripts/nfs b/scripts/nfs index 1e2be2c..8149e86 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -1,9 +1,13 @@ -# NFS filesystem mounting *- shell-script -*- +# NFS filesystem mounting -*- shell-script -*- + +# FIXME This needs error checking # Paramter: Where the root should be mounted mountroot () { + log_begin_msg "Running /scripts/nfs-top" run_scripts /scripts/nfs-top + log_end_msg modprobe nfs # For DHCP @@ -15,7 +19,9 @@ mountroot () NFSROOT=${ROOTSERVER}:${ROOTPATH} fi + log_begin_msg "Running /scripts/nfs-premount" run_scripts /scripts/nfs-premount + log_end_msg if [ ${readonly} = y ]; then roflag="-o ro" @@ -25,6 +31,8 @@ mountroot () nfsmount ${roflag} ${NFSROOT} ${rootmnt} + log_begin_msg "Running /scripts/nfs-bottom" run_scripts /scripts/nfs-bottom + log_end_msg } -- cgit v1.2.3 From 38f6779d4a0aa081412b154bd7cd88ed005678af Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Fri, 15 Jul 2005 02:40:59 +0000 Subject: Add lvm support, update control --- debian/changelog | 17 ++++++++ debian/control | 9 +++- mkinitramfs | 125 +++++++++++++++++++++++++++++++----------------------- scripts/functions | 2 + 4 files changed, 97 insertions(+), 56 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6c37206..ac451da 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,6 +35,23 @@ initramfs-tools (0.13) breezy; urgency=low Thanks to Karl Hegbloom for most of these patches! + * debian/control: Get a much better description + + Thanks to Maximilian Attems for this! + + * scripts/functions: Add copy_exec function that copies a program + and all libraries that it depends on. + + * mkinitramfs: Use it + + * scripts/local-top/lvm: New file + + * mkinitramfs: Specify the modules to copy rather than mass copying + directories + + * scripts/functions: Always load ide-generic to cope with ide subsystem + suckage. + -- Jeff Bailey Wed, 29 Jun 2005 23:50:56 +0000 initramfs-tools (0.12) breezy; urgency=low diff --git a/debian/control b/debian/control index 7222e98..514368c 100644 --- a/debian/control +++ b/debian/control @@ -8,5 +8,10 @@ Standards-Version: 3.6.1 Package: initramfs-tools Architecture: all Depends: klibc-utils, busybox-cvs-initramfs, mdadm -Description: tools for generting an Ubuntu-style initramfs - This package generates an initramfs for an Ubuntu system. +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. + Any boot loader with initrd support is able to load an initramfs archive. diff --git a/mkinitramfs b/mkinitramfs index c05fa47..cbc1f82 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -9,7 +9,7 @@ # modprobe_module_name [args ...] # [...] # -manual_add_modules() +add_modules_from_file() { # Sanity check if [ ! -e ${1} ]; then @@ -17,16 +17,42 @@ manual_add_modules() fi sed -e '/^#/d' ${1} | while read module rest; do - for y in $(modprobe --set-version=${version} --show-depends ${module} | awk '{ print $2 }'); do - # Prune duplicates - if [ -e ${DESTDIR}/${y} ]; then - continue - fi - - mkdir -p ${DESTDIR}/$(dirname ${y}) - ln -s ${y} ${DESTDIR}/$(dirname ${y}) - echo $(basename ${y} .ko) "${rest}" >>${DESTDIR}/conf/modules - done + manual_add_modules ${module} + echo ${module}.ko "${rest}" >>${DESTDIR}/conf/modules + done +} + +manual_add_modules() +{ + for mam_x in $(modprobe --set-version=${version} --show-depends ${1} | awk '{ print $2 }'); do + # Prune duplicates + if [ -e ${DESTDIR}/${mam_x} ]; then + continue + fi + + mkdir -p ${DESTDIR}/$(dirname ${mam_x}) + ln -s ${mam_x} ${DESTDIR}/$(dirname ${mam_x}) + depmod -b ${DESTDIR} ${version} + done +} + +# $1 is source +# $2 is relative destination +copy_exec() { + ln -s ${1} ${DESTDIR}/${2} + + # Copy the dependant libraries + for x in $(ldd ${1} 2>/dev/null | sed -e ' + /\//!d; + /linux-gate/d; + /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; + s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do + libname=$(basename ${x}) + dirname=$(dirname ${x}) + mkdir -p ${DESTDIR}/${dirname} + if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then + ln -s ${x} ${DESTDIR}/${dirname} + fi done } @@ -41,35 +67,26 @@ copy_modules_dir() # Modules that we always add to the initramfs auto_add_modules() { - copy_modules_dir kernel/drivers/net - copy_modules_dir kernel/drivers/scsi - copy_modules_dir kernel/drivers/ide - copy_modules_dir kernel/drivers/md - copy_modules_dir kernel/drivers/usb - copy_modules_dir kernel/drivers/block - copy_modules_dir kernel/drivers/input - copy_modules_dir kernel/fs/ext2 - copy_modules_dir kernel/fs/ext3 - copy_modules_dir kernel/fs/isofs - copy_modules_dir kernel/fs/jbd - copy_modules_dir kernel/fs/jfs - copy_modules_dir kernel/fs/nfs - copy_modules_dir kernel/fs/reiserfs - copy_modules_dir kernel/fs/xfs - - # These aren't caught by the above but really need to be there: - for x in mbcache nfs af_packet raid1 ide-cd ide-disk ide-generic; do - for y in $(modprobe --set-version=${version} --show-depends ${x} | awk '{ print $2 }'); do - # Prune duplicates - if [ -e ${DESTDIR}/${y} ]; then - continue - fi - - mkdir -p ${DESTDIR}/$(dirname ${y}) - ln -s ${y} ${DESTDIR}/$(dirname ${y}) - depmod -b ${DESTDIR} ${version} - done + # base + for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs nfs reiserfs xfs af_packet dm_mod; do + manual_add_modules ${x} + done + + # Ethernet + for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc 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 + manual_add_modules ${x} + done + + # ide + for x in ide-cd ide-disk ide-generic aec62xx cmd64x generic hpt34x hpt366 ns87415 pdc202xx_new pdc202xx_old piix sc1200 siimage slc82c105 trm290 via82cxxx; do + manual_add_modules ${x} + done + + # scsi + for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx atp870u BusLogic ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips lpfc mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc 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 sd_mod sym53c8xx tmscsim; do + manual_add_modules ${x} done + } usage() @@ -176,7 +193,7 @@ for d in bin conf etc lib modules sbin scripts; do done for x in ${CONFDIR}/modules /usr/share/initramfs-tools/modules.d/*; do - manual_add_modules ${x} + add_modules_from_file ${x} done auto_add_modules @@ -186,17 +203,14 @@ auto_add_modules ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib -ln -s /usr/share/initramfs-tools/init ${DESTDIR}/init +copy_exec /usr/share/initramfs-tools/init /init cp -a /usr/share/initramfs-tools/scripts/* ${DESTDIR}/scripts -ln -s ${CONFDIR}/initramfs.conf ${DESTDIR}/conf -ln -s /etc/udev ${DESTDIR}/etc +copy_exec ${CONFDIR}/initramfs.conf /conf +cp -a /etc/udev ${DESTDIR}/etc # Hack until udev is built with klibc -ln -s /sbin/udev ${DESTDIR}/bin -ln -s /sbin/udevstart ${DESTDIR}/bin -ln -s /lib/libc.so.* ${DESTDIR}/lib -ln -s /lib/ld*.so.* ${DESTDIR}/lib -rm ${DESTDIR}/lib/*lsb* +copy_exec /sbin/udev /sbin +copy_exec /sbin/udevstart /sbin # Busybox rm ${DESTDIR}/bin/sh @@ -205,15 +219,18 @@ ln -s /usr/lib/initramfs-tools/bin/busybox ${DESTDIR}/bin/sh ln -s /usr/lib/initramfs-tools/bin/busybox ${DESTDIR}/bin/busybox # Modutils -ln -s /sbin/modprobe ${DESTDIR}/sbin -ln -s /sbin/depmod ${DESTDIR}/sbin -ln -s /sbin/rmmod ${DESTDIR}/sbin +copy_exec /sbin/modprobe /sbin +copy_exec /sbin/depmod /sbin +copy_exec /sbin/rmmod /sbin mkdir -p ${DESTDIR}/etc/modprobe.d -ln -s /etc/modprobe.d/aliases ${DESTDIR}/etc/modprobe.d +copy_exec /etc/modprobe.d/aliases /etc/modprobe.d # Raid -ln -s /sbin/mdadm ${DESTDIR}/sbin -ln -s /sbin/mdrun ${DESTDIR}/sbin +copy_exec /sbin/mdadm /sbin +copy_exec /sbin/mdrun /sbin + +# LVM +copy_exec /lib/lvm-200/vgchange /sbin run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks diff --git a/scripts/functions b/scripts/functions index 1899a14..d4e9ece 100644 --- a/scripts/functions +++ b/scripts/functions @@ -199,3 +199,5 @@ load_modules() ide_boot_events } + + -- cgit v1.2.3 From b3976b14b676feb9481c8dc9204a792dc1199e2a Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Wed, 27 Jul 2005 00:45:38 -0400 Subject: initramfs-tools (0.14) breezy; urgency=low The --- debian/changelog | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ac451da..e083ff1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,24 @@ +initramfs-tools (0.14) breezy; urgency=low + + "The world is a stage, but the play is badly cast." + - Oscar Wilde + + * scripts/functions: Add scsi_boot_events and call it to load sd_mod + + * scripts/local-top/md: Autodetect raid level + + * scripts/local-top/lvm: Only activate the volumegroup required by + the root device. Don't bother with lvm if the root partition isn't + /dev/mapper/FOO. + + * scripts/functions: Fix ide_boot_events. This never worked, even + if I thought it did. + + * init: init variable should be lower case. Exported ROOT variable + should be upper case. + + -- Jeff Bailey Tue, 26 Jul 2005 20:30:57 -0400 + initramfs-tools (0.13) breezy; urgency=low "We live in age when unnecessary things are our only necessities." -- cgit v1.2.3 From 8d797f301d02d933a10e68291f780e3759c89cf4 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Wed, 27 Jul 2005 00:45:44 -0400 Subject: initramfs-tools (0.14) breezy; urgency=low The --- debian/TODO | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index d080de3..e3f93cc 100644 --- a/debian/TODO +++ b/debian/TODO @@ -3,8 +3,22 @@ TODO o Grep for TODO and FIXME and do those. =) - o Get udev compiled against klibc + o Only vgchange -ay the volume needed for the root partition - o Integrate hotplug-ng + o Support raid0, 5 and 6 for / - o Add option to make-kpkg to use mkinitramfs + o Eliminate udev. + + o Support list and dep options + + o Default to dep for PPC - Possibly to detect newworld? + + o Support evms + + o Support cryptroot + + o Trace lilo bug + + o Load scsi modules + + o Capture udev events and pass them to udevsend -- cgit v1.2.3 From e52d7074e9eed3252a86edd634c50ec44c45c968 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Wed, 27 Jul 2005 00:47:30 -0400 Subject: Update TODO List --- debian/TODO | 6 ------ 1 file changed, 6 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index e3f93cc..7c6bc55 100644 --- a/debian/TODO +++ b/debian/TODO @@ -3,10 +3,6 @@ TODO o Grep for TODO and FIXME and do those. =) - o Only vgchange -ay the volume needed for the root partition - - o Support raid0, 5 and 6 for / - o Eliminate udev. o Support list and dep options @@ -19,6 +15,4 @@ TODO o Trace lilo bug - o Load scsi modules - o Capture udev events and pass them to udevsend -- cgit v1.2.3 From 3d319f70b29f804234fa5eb6e93c1168b0d2dddf Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Fri, 5 Aug 2005 11:46:54 -0400 Subject: DSDT, init-premount, and add sata_nv --- debian/changelog | 16 ++++++++++++++++ debian/dirs | 1 + init | 4 ++++ mkinitramfs | 7 ++++++- 4 files changed, 27 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e083ff1..06f40e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +initramfs-tools (0.15) breezy; urgency=low + + "Nothing looks so like innocence as an indiscretion." + - Oscar Wilde + + * mkinitramfs: Handle putting DSDT.aml into the initramfs + Add sata_nv to list of modules to import for main mode. + + * init: New scripts directory, init-premount for generic premount + handling (like usplash) + + * debian/dirs: Make the /etc version of this directory for user + addons. + + -- Jeff Bailey Fri, 5 Aug 2005 11:39:26 -0400 + initramfs-tools (0.14) breezy; urgency=low "The world is a stage, but the play is badly cast." diff --git a/debian/dirs b/debian/dirs index ac6210e..6de384e 100644 --- a/debian/dirs +++ b/debian/dirs @@ -1,4 +1,5 @@ etc/mkinitramfs/init-bottom +etc/mkinitramfs/init-premount etc/mkinitramfs/init-top etc/mkinitramfs/local-bottom etc/mkinitramfs/local-premount diff --git a/init b/init index b2a89e1..e1fee77 100644 --- a/init +++ b/init @@ -64,6 +64,10 @@ if [ x${break} = xyes ]; then panic "Spawning shell within the initramfs" fi +log_begin_msg "Running /scripts/init-premount" +run_scripts /scripts/init-premount +log_end_msg + log_begin_msg "Mounting root file system" mountroot log_end_msg diff --git a/mkinitramfs b/mkinitramfs index cbc1f82..8092a14 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -83,7 +83,7 @@ auto_add_modules() done # scsi - for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx atp870u BusLogic ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips lpfc mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc 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 sd_mod sym53c8xx tmscsim; do + for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx atp870u BusLogic ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips lpfc mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do manual_add_modules ${x} done @@ -235,6 +235,11 @@ copy_exec /lib/lvm-200/vgchange /sbin run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks +# Apply DSDT to initramfs +if [ -e ${CONFDIR}/DSDT.aml ]; then + copy_exec ${CONFDIR}/DSDT.aml / +fi + (cd ${DESTDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) if [ -s ${__TMPCPIOGZ} ]; then -- cgit v1.2.3 From 618760b004d07efb11f05e57d46ed4b5adb2823c Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Tue, 16 Aug 2005 13:34:13 -0400 Subject: Cleanup commit, sorry for the mess --- conf/initramfs.conf | 9 ++- debian/TODO | 2 + debian/changelog | 99 +++++++++++++++++++++++++++++- debian/control | 4 +- debian/dirs | 1 - debian/initramfs-tools.install | 2 + debian/initramfs-tools.postinst | 22 +++++++ debian/initramfs-tools.postrm | 2 +- debian/rules | 2 +- hook-functions | 133 ++++++++++++++++++++++++++++++++++++++++ init | 4 ++ mkinitramfs | 122 +++++------------------------------- scripts/functions | 16 ++++- scripts/local-top/md | 9 ++- 14 files changed, 307 insertions(+), 120 deletions(-) (limited to 'debian') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index a056469..b4a7dba 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -7,7 +7,7 @@ # Use busybox if available. You MUST use the -static version # -BUSYBOX=n +BUSYBOX=y # # BOOT: [ local | nfs ] @@ -28,7 +28,7 @@ BOOT=local # # list - Only include modules from the 'additional modules' list # -MODULES=list +MODULES=most # # NFS Section of the config. @@ -48,3 +48,8 @@ DEVICE=eth0 NFSROOT=auto +# Hardcode partition to resume from so it doesn't have to be specified +# on the command line. The command line will override this setting. + +#RESUME= + diff --git a/debian/TODO b/debian/TODO index 7c6bc55..58f35fd 100644 --- a/debian/TODO +++ b/debian/TODO @@ -16,3 +16,5 @@ TODO o Trace lilo bug o Capture udev events and pass them to udevsend + + o Detect RESUME partition diff --git a/debian/changelog b/debian/changelog index 06f40e3..11f476c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,98 @@ +initramfs-tools (0.19) breezy; urgency=low + + "The basis of optimism is sheer terror." + - Oscar Wilde + + * mkinitramfs: Honour MODULES=list and MODULES=dep. + + * hook-functions: New function dep_add_modules. + + -- Jeff Bailey Wed, 10 Aug 2005 23:20:11 -0400 + +initramfs-tools (0.18) breezy; urgency=low + + "We are all in the gutter, but some of us are looking at the stars." + - Oscar Wilde + + * debian/initramfs-tools.postrm: Use rm -f for removing the modules + file, in case it doesn't exist for some reason. (Ubuntu #13335) + Thanks to Colin Watson for the bug report! + + * mkinitramfs.8: Correct my email address to be jbailey@ubuntu.com + Document /etc/mkinitramfs/DSDT.aml + + * debian/initramfs-tools.postinst: Attempt to inherit RESUME settings + from initrd-tools. Also copy the DSDT from /etc/mkinitrd/DSDT to + /etc/mkinitramfs/DSDT.aml + + -- Jeff Bailey Wed, 10 Aug 2005 13:09:44 -0400 + +initramfs-tools (0.17) breezy; urgency=low + + "The public is wonderfully tolerant. It forgives everything except + genius." + - Oscar Wilde + + * debian/initramfs-tools.postinst: Get the name of the config file + right when seeding RESUME=. Also fix the sed expression. + Thanks to Matthew Garrett for noticing this! + + -- Jeff Bailey Wed, 10 Aug 2005 11:54:07 -0400 + +initramfs-tools (0.16) breezy; urgency=low + + "It is through art, and through art only, that we can realise our + perfection." + - Oscar Wilde + + * mkinitramfs: Make sure all relevant ide modules are included. + Add RESUME= support. + + * scripts/functions: Be silent when adding non-detected modules. + + * conf/mkinitramfs.conf: MODULES=most by default, BUSYBOX=y + (Non-busybox isn't supported now. It's not clear that it ever + will be). Add RESUME line for resuming from suspend-to-disk. + + * scripts/local-premount/suspend: New script for suspend-to-disk. + + * debian/control: Bump depends on busybox-cvs-initramfs to + 20040623-1ubuntu19. Add dependancy on lvm2. + Bump standards version to 3.6.2.0 (no-op) + + * debian/control: + Force version depend on lvm2 (>= 2.01.04-5) to make sure newer kernels + will boot. + Thanks for Andrew Mitchell for discovering this. + + * hooks/: New directory + + * debian/dirs: Move hooks to ... + * debian/initramfs-tools.install: ... here. + + * hooks/acpid: New file. + + * scripts/init-premount/acpid: New file + Thanks for the hint from Matthew Garrett for this. + + * debian/initramfs-tools.postinst: Add RESUME support on first install. + + * debian/mkinitramfs: Move functions to ... + * debian/hook-functions: ... here. + + * debian/initramfs-tools.install: Install hook-functions + + * mkinitramfs.8: New file. + Thanks to Maximilian Attems for contributing this! + + * scripts/local-top/md: Don't try to detect raid on non-existant devices + or on whole devices. Quiet other warning messages. + + * hook-functions: When generating initramfs, don't complain about missing + modules. + + -- Jeff Bailey Tue, 9 Aug 2005 23:35:08 -0400 + initramfs-tools (0.15) breezy; urgency=low "Nothing looks so like innocence as an indiscretion." @@ -12,7 +107,9 @@ initramfs-tools (0.15) breezy; urgency=low * debian/dirs: Make the /etc version of this directory for user addons. - -- Jeff Bailey Fri, 5 Aug 2005 11:39:26 -0400 + * debian/rules: Use prebuild, rather than debian-build-arch. + + -- Jeff Bailey Tue, 9 Aug 2005 11:29:10 -0400 initramfs-tools (0.14) breezy; urgency=low diff --git a/debian/control b/debian/control index 514368c..1c1a6b2 100644 --- a/debian/control +++ b/debian/control @@ -3,11 +3,11 @@ Section: utils Priority: optional Maintainer: Jeff Bailey Build-Depends-Indep: debhelper (>= 4.0.0), cdbs -Standards-Version: 3.6.1 +Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils, busybox-cvs-initramfs, mdadm +Depends: klibc-utils, busybox-cvs-initramfs (>= 20040623-1ubuntu19), mdadm, lvm2 (>= 2.01.04-5) 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 diff --git a/debian/dirs b/debian/dirs index 6de384e..d35ba7c 100644 --- a/debian/dirs +++ b/debian/dirs @@ -7,5 +7,4 @@ etc/mkinitramfs/local-top etc/mkinitramfs/nfs-bottom etc/mkinitramfs/nfs-premount etc/mkinitramfs/nfs-top -usr/share/initramfs-tools/hooks usr/share/initramfs-tools/modules.d diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index a2a78f5..8702d53 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -2,3 +2,5 @@ mkinitramfs usr/sbin init usr/share/initramfs-tools scripts usr/share/initramfs-tools conf/initramfs.conf etc/mkinitramfs +hooks usr/share/initramfs-tools +hook-functions usr/share/initramfs-tools diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index 70be9f6..ea92067 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -2,6 +2,28 @@ set -e +if [ "$1" = configure ]; then + if [ x${2} = x ]; then + + # First time install. Can we autodetect the RESUME partition? + RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') + + # Inhertic initrd-tools settings if possible. + if [ -e /etc/mkinitrd/mkinitrd.conf ]; then + . /etc/mkinitrd/mkinitrd.conf + fi + + if [ -e ${RESUME} ]; then + sed -i -e "s@#RESUME=@RESUME=${RESUME}@" /etc/mkinitramfs/initramfs.conf + fi + + if [ -e /etc/mkinitrd/DSDT ]; then + cp /etc/mkinitrd/DSDT /etc/mkinitramfs/DSDT.aml + fi + + fi +fi + if [ ! -e /etc/mkinitramfs/modules ]; then cp /usr/share/doc/initramfs-tools/examples/modules /etc/mkinitramfs/ fi diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm index 7bea06f..2af9945 100644 --- a/debian/initramfs-tools.postrm +++ b/debian/initramfs-tools.postrm @@ -1,7 +1,7 @@ #!/bin/sh if [ "x${1}" = "xpurge" ]; then - rm /etc/mkinitramfs/modules + rm -f /etc/mkinitramfs/modules fi #DEBHELPER# diff --git a/debian/rules b/debian/rules index a1b8695..6b91c1f 100644 --- a/debian/rules +++ b/debian/rules @@ -2,5 +2,5 @@ include /usr/share/cdbs/1/rules/debhelper.mk -common-build-arch:: +pre-build:: chmod +x init mkinitramfs diff --git a/hook-functions b/hook-functions index 0d79703..5db7d27 100644 --- a/hook-functions +++ b/hook-functions @@ -4,3 +4,136 @@ catenate_cpiogz() { cat "$1" >>${__TMPCPIOGZ} } +add_modules_from_file() +{ + # Sanity check + if [ ! -e ${1} ]; then + return + fi + + sed -e '/^#/d' ${1} | while read module rest; do + manual_add_modules ${module} + echo ${module}.ko "${rest}" >>${DESTDIR}/conf/modules + done +} + +manual_add_modules() +{ + for mam_x in $(modprobe --set-version=${version} --show-depends ${1} 2>/dev/null | awk '{ print $2 }'); do + # Prune duplicates + if [ -e ${DESTDIR}/${mam_x} ]; then + continue + fi + + mkdir -p ${DESTDIR}/$(dirname ${mam_x}) + ln -s ${mam_x} ${DESTDIR}/$(dirname ${mam_x}) + depmod -b ${DESTDIR} ${version} + done +} + +# $1 is source +# $2 is relative destination +copy_exec() { + ln -s ${1} ${DESTDIR}/${2} + + # Copy the dependant libraries + for x in $(ldd ${1} 2>/dev/null | sed -e ' + /\//!d; + /linux-gate/d; + /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; + s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do + libname=$(basename ${x}) + dirname=$(dirname ${x}) + mkdir -p ${DESTDIR}/${dirname} + if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then + ln -s ${x} ${DESTDIR}/${dirname} + fi + done +} + +# Copy entire subtrees to the initramfs +copy_modules_dir() +{ + tmpdir_modbase=${DESTDIR}/lib/modules/${version} + mkdir -p $(dirname ${tmpdir_modbase}/${1}) + cp -a /lib/modules/${version}/${1} ${tmpdir_modbase}/${1} +} + +dep_add_modules() +{ + + # Things that are too hard to autodetect. + for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs nfs reiserfs xfs af_packet dm_mod; do + manual_add_modules ${x} + done + + for x in /sys/bus/pci/devices/*; do + if [ -e ${x}/modalias ]; then + manual_add_modules $(cat ${x}/modalias) + fi + done + + # Give the USB bus a moment to catch up + sleep 2 + + for x in /sys/bus/usb/devices/*; do + if [ -e ${x}/modalias ]; then + manual_add_modules $(cat ${x}/modalias) + fi + done + + if [ -e /proc/ide ]; then + for x in ide-generic ide-disk ide-cd; do + manual_add_modules ${x} + done + fi + + if [ -e /sys/bus/scsi/devices/ ]; then + manual_add_modules sd_mod + fi +} + + +# Modules that we always add to the initramfs +auto_add_modules() +{ + # base + for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs nfs reiserfs xfs af_packet dm_mod; do + manual_add_modules ${x} + done + + # Ethernet + for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc 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 + manual_add_modules ${x} + done + + # ide + for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do + manual_add_modules ${x} + done + + # scsi + for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + manual_add_modules ${x} + done + +} + +usage() +{ + cat >&2 << EOF + +Usage: ${0} [OPTION]... <-o outfile> [version] + +Options: + -d confdir Specify an alternative configuration directory. + -k Keep temporary directory used to make the image. + -o outfile Write to outfile. + -r root Override ROOT setting in mkinitrd.conf. + +See ${0}(8) for further details. +EOF + exit 1 + +} + diff --git a/init b/init index e1fee77..38450da 100644 --- a/init +++ b/init @@ -15,6 +15,7 @@ export init=/sbin/init export quiet=n export readonly=y export ROOT= +export resume=${RESUME} export rootmnt=/root for x in $(cat /proc/cmdline); do case $x in @@ -30,6 +31,9 @@ for x in $(cat /proc/cmdline); do boot=*) BOOT=${x#boot=} ;; + resume=*) + resume=${x#resume=} + ;; quiet) quiet=y ;; diff --git a/mkinitramfs b/mkinitramfs index 8092a14..3257c94 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -1,112 +1,5 @@ #!/bin/sh -# Takes a file containing a list of modules to be added as an -# argument, figures out dependancies, and adds them. -# -# Input file syntax: -# -# # comment -# modprobe_module_name [args ...] -# [...] -# -add_modules_from_file() -{ - # Sanity check - if [ ! -e ${1} ]; then - return - fi - - sed -e '/^#/d' ${1} | while read module rest; do - manual_add_modules ${module} - echo ${module}.ko "${rest}" >>${DESTDIR}/conf/modules - done -} - -manual_add_modules() -{ - for mam_x in $(modprobe --set-version=${version} --show-depends ${1} | awk '{ print $2 }'); do - # Prune duplicates - if [ -e ${DESTDIR}/${mam_x} ]; then - continue - fi - - mkdir -p ${DESTDIR}/$(dirname ${mam_x}) - ln -s ${mam_x} ${DESTDIR}/$(dirname ${mam_x}) - depmod -b ${DESTDIR} ${version} - done -} - -# $1 is source -# $2 is relative destination -copy_exec() { - ln -s ${1} ${DESTDIR}/${2} - - # Copy the dependant libraries - for x in $(ldd ${1} 2>/dev/null | sed -e ' - /\//!d; - /linux-gate/d; - /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; - s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do - libname=$(basename ${x}) - dirname=$(dirname ${x}) - mkdir -p ${DESTDIR}/${dirname} - if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then - ln -s ${x} ${DESTDIR}/${dirname} - fi - done -} - -# Copy entire subtrees to the initramfs -copy_modules_dir() -{ - tmpdir_modbase=${DESTDIR}/lib/modules/${version} - mkdir -p $(dirname ${tmpdir_modbase}/${1}) - cp -a /lib/modules/${version}/${1} ${tmpdir_modbase}/${1} -} - -# Modules that we always add to the initramfs -auto_add_modules() -{ - # base - for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs nfs reiserfs xfs af_packet dm_mod; do - manual_add_modules ${x} - done - - # Ethernet - for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc 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 - manual_add_modules ${x} - done - - # ide - for x in ide-cd ide-disk ide-generic aec62xx cmd64x generic hpt34x hpt366 ns87415 pdc202xx_new pdc202xx_old piix sc1200 siimage slc82c105 trm290 via82cxxx; do - manual_add_modules ${x} - done - - # scsi - for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx atp870u BusLogic ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips lpfc mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do - manual_add_modules ${x} - done - -} - -usage() -{ - cat >&2 << EOF - -Usage: ${0} [OPTION]... <-o outfile> [version] - -Options: - -d confdir Specify an alternative configuration directory. - -k Keep temporary directory used to make the image. - -o outfile Write to outfile. - -r root Override ROOT setting in mkinitrd.conf. - -See ${0}(8) for further details. -EOF - exit 1 - -} - # Defaults keep="n" CONFDIR="/etc/mkinitramfs" @@ -135,6 +28,7 @@ shift $((${OPTIND} - 1)) # For dependency ordered mkinitramfs hook scripts. . /usr/share/initramfs-tools/scripts/functions +. /usr/share/initramfs-tools/hook-functions . ${CONFDIR}/initramfs.conf @@ -150,6 +44,11 @@ else version="${1}" fi +if dpkg --compare-versions "${version}" lt 2.6.12; then + echo "Kernel version too old. initramfs-tools requires at least 2.6.12." + exit 1 +fi + case ${version} in /lib/modules/*/[!/]*) ;; @@ -192,11 +91,18 @@ for d in bin conf etc lib modules sbin scripts; do mkdir -p ${DESTDIR}/${d} done +# MODULES=list case. Always honour. for x in ${CONFDIR}/modules /usr/share/initramfs-tools/modules.d/*; do add_modules_from_file ${x} done -auto_add_modules +if [ "${MODULES}" = "dep" ]; then + dep_add_modules +fi + +if [ "${MODULES}" = "most" ]; then + auto_add_modules +fi # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. diff --git a/scripts/functions b/scripts/functions index cf9f4a7..10918f8 100644 --- a/scripts/functions +++ b/scripts/functions @@ -194,7 +194,7 @@ load_modules() then continue; else - modprobe -v $m + modprobe -q $m fi done fi @@ -219,4 +219,18 @@ load_modules() scsi_boot_events } +parse_numeric() { + case $1 in + *:*) + minor=${1#*:} + major=${1%:*} + ;; + *) + minor=$((0x${1#??})) + major=$((0x${1%??})) + ;; + esac + + mknod /dev/root b ${major} ${minor} +} diff --git a/scripts/local-top/md b/scripts/local-top/md index 48c3ce6..055e109 100644 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -18,9 +18,12 @@ esac unset raidlvl # Detect raid level -for x in /dev/hd* /dev/sd*; do - raidlvl=$(mdadm --examine ${x} | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') - modprobe -q ${raidlvl} +for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do + if [ ! -e ${x} ]; then + continue + fi + raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') + modprobe -q ${raidlvl} 2>/dev/null done [ x${raidlvl} != x ] || return -- cgit v1.2.3 From baab5f5fc3d6cfe4821a82e5b17f0f57bef060b0 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Tue, 16 Aug 2005 13:34:37 -0400 Subject: Cleanup commit, sorry for the mess --- debian/initramfs-tools.manpages | 1 + hooks/acpid | 24 ++++++++++++++ mkinitramfs.8 | 71 +++++++++++++++++++++++++++++++++++++++++ scripts/init-premount/acpid | 19 +++++++++++ scripts/local-premount/suspend | 30 +++++++++++++++++ 5 files changed, 145 insertions(+) create mode 100644 debian/initramfs-tools.manpages create mode 100644 hooks/acpid create mode 100644 mkinitramfs.8 create mode 100644 scripts/init-premount/acpid create mode 100644 scripts/local-premount/suspend (limited to 'debian') diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages new file mode 100644 index 0000000..61d8057 --- /dev/null +++ b/debian/initramfs-tools.manpages @@ -0,0 +1 @@ +mkinitramfs.8 diff --git a/hooks/acpid b/hooks/acpid new file mode 100644 index 0000000..0f3c84c --- /dev/null +++ b/hooks/acpid @@ -0,0 +1,24 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hooks for loading acpi bits into the initramfs + +. /usr/share/initramfs-tools/hook-functions + +for x in fan thermal; do + manual_add_modules ${x} +done diff --git a/mkinitramfs.8 b/mkinitramfs.8 new file mode 100644 index 0000000..cc56915 --- /dev/null +++ b/mkinitramfs.8 @@ -0,0 +1,71 @@ +.TH MKINITRAMFS 8 "$Date: 2005/07/15 $" "" "mkinitramfs manual" + +.SH NAME +mkinitramfs \- generate an initramfs image + +.SH SYNOPSIS +.B mkinitramfs +.RB [ \-d +.IR confdir ] +.RB [ \-k ] +.RB [ \-o +.IR outfile ] +.RB [ \-r +.IR root ] +.RI [ version ] +.SH DESCRIPTION +The +.B mkinitramfs +script generates an initramfs image. 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 \-d \fI confdir +Set an alternate configuration directory. + +.TP +\fB \-k +Keep the temporary directory used to make the image. + +.TP +\fB \-o \fI outfile +Write the image to +.IR outfile . + +.TP +\fB \-r \fI root +Override the +.B ROOT +setting in +.IR mkinitramfs.conf . + +.SH FILES +.TP +.I /etc/mkinitramfs/initramfs.conf +The default configuration file for the script. See +.BR initramfs.conf (8) +for a description of the available configuration parameter. + +.TP +.I /etc/mkinitramfs/modules +Specified modules will be put in the generated image and loaded when the system boots. The format - one per line - is identical to that of +.I /etc/modules, +which is described in +.BR modules (5). + +.TP +.I /etc/mkinitramfs/DSDT.aml +If this file exists, it will be appended to the initramfs in a way that causes +it to be loaded by ACPI. + + +.SH AUTHOR +The initramfs-tools are written by Jeff Bailey . +This manual is maintained by Maximilian Attems . + +.SH SEE ALSO + +.BR initramfs.conf (8) diff --git a/scripts/init-premount/acpid b/scripts/init-premount/acpid new file mode 100644 index 0000000..61d226a --- /dev/null +++ b/scripts/init-premount/acpid @@ -0,0 +1,19 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +modprobe -q fan +modprobe -q thermal diff --git a/scripts/local-premount/suspend b/scripts/local-premount/suspend new file mode 100644 index 0000000..5791123 --- /dev/null +++ b/scripts/local-premount/suspend @@ -0,0 +1,30 @@ +#!/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=$((0x$(stat -c%t ${resume}))) + minor=$((0x$(stat -c%T ${resume}))) + echo ${major}:${minor} >/sys/power/resume +fi -- cgit v1.2.3 From f903a759dea3c85c88bbec151337efd2c64ba3bf Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Tue, 16 Aug 2005 13:38:52 -0400 Subject: Commit colin's changes to initramfs-tools --- debian/changelog | 6 ++++++ debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 11f476c..445d581 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.20) breezy; urgency=low + + * Depend on cpio. + + -- Colin Watson Fri, 12 Aug 2005 10:43:04 +0100 + initramfs-tools (0.19) breezy; urgency=low "The basis of optimism is sheer terror." diff --git a/debian/control b/debian/control index 1c1a6b2..cd47480 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils, busybox-cvs-initramfs (>= 20040623-1ubuntu19), mdadm, lvm2 (>= 2.01.04-5) +Depends: klibc-utils, busybox-cvs-initramfs (>= 20040623-1ubuntu19), cpio, mdadm, lvm2 (>= 2.01.04-5) 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 -- cgit v1.2.3 From 9a9de97229d09d9876575775a080a4056fcffcb5 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Wed, 17 Aug 2005 00:01:51 -0400 Subject: initramfs-tools (0.21) breezy; urgency=low "All that I desire to point out is the general principle that life imitates art far more than art imitates life." - Oscar Wilde * mkinitramfs: Define MODULESDIR and use it. * hook-functions: Use MODULESDIR (add_modules_from_file): Do not add .ko extension to file lists. Call force_load instead of twiddling conf/modules directly. (Ubuntu #13372) (force_load): New function. (copy_exec): Attempt to use non-optimsed libraries if available. (Ubuntu #13470) (auto_add_modules) Include forcedeth (Ubuntu #13448) * hooks/kernelextras: New file. (Ubuntu #13414) * debian/initramfs-tools.postinst: Preserve /etc/mkinitrd/modules if possible on new install. (Ubuntu #13372) -- Jeff Bailey Tue, 16 Aug 2005 15:56:00 -0400 --- debian/changelog | 24 ++++++++++++++++++++++++ debian/initramfs-tools.postinst | 4 ++++ hook-functions | 23 +++++++++++++++++++---- hooks/kernelextras | 39 +++++++++++++++++++++++++++++++++++++++ mkinitramfs | 7 +++++-- 5 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 hooks/kernelextras (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 445d581..aaa2dba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,27 @@ +initramfs-tools (0.21) breezy; urgency=low + + "All that I desire to point out is the general principle that + life imitates art far more than art imitates life." + - Oscar Wilde + + * mkinitramfs: Define MODULESDIR and use it. + + * hook-functions: Use MODULESDIR + (add_modules_from_file): Do not add .ko extension to file lists. + Call force_load instead of twiddling conf/modules directly. + (Ubuntu #13372) + (force_load): New function. + (copy_exec): Attempt to use non-optimsed libraries if available. + (Ubuntu #13470) + (auto_add_modules) Include forcedeth (Ubuntu #13448) + + * hooks/kernelextras: New file. (Ubuntu #13414) + + * debian/initramfs-tools.postinst: Preserve /etc/mkinitrd/modules if + possible on new install. (Ubuntu #13372) + + -- Jeff Bailey Tue, 16 Aug 2005 15:56:00 -0400 + initramfs-tools (0.20) breezy; urgency=low * Depend on cpio. diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index ea92067..fe734cf 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -13,6 +13,10 @@ if [ "$1" = configure ]; then . /etc/mkinitrd/mkinitrd.conf fi + if [ -e /etc/mkinitrd/modules ]; then + cp /etc/mkinitrd/modules /etc/mkinitramfs + fi + if [ -e ${RESUME} ]; then sed -i -e "s@#RESUME=@RESUME=${RESUME}@" /etc/mkinitramfs/initramfs.conf fi diff --git a/hook-functions b/hook-functions index 5db7d27..8642af9 100644 --- a/hook-functions +++ b/hook-functions @@ -4,6 +4,12 @@ catenate_cpiogz() { cat "$1" >>${__TMPCPIOGZ} } +force_load() +{ + manual_add_modules ${module} + echo ${@} >>${DESTDIR}/conf/modules +} + add_modules_from_file() { # Sanity check @@ -12,8 +18,7 @@ add_modules_from_file() fi sed -e '/^#/d' ${1} | while read module rest; do - manual_add_modules ${module} - echo ${module}.ko "${rest}" >>${DESTDIR}/conf/modules + force_load ${module} "${rest}" done } @@ -42,8 +47,18 @@ copy_exec() { /linux-gate/d; /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do + + # Try to use non-optimised libraries where possible. + # We assume that all HWCAP libraries will be in tls. + nonoptlib=$(echo ${x} | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#') + + if [ -e ${nonoptlib} ]; then + x=${nonoptlib} + fi + libname=$(basename ${x}) dirname=$(dirname ${x}) + mkdir -p ${DESTDIR}/${dirname} if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then ln -s ${x} ${DESTDIR}/${dirname} @@ -56,7 +71,7 @@ copy_modules_dir() { tmpdir_modbase=${DESTDIR}/lib/modules/${version} mkdir -p $(dirname ${tmpdir_modbase}/${1}) - cp -a /lib/modules/${version}/${1} ${tmpdir_modbase}/${1} + cp -a ${MODULESDIR}/${1} ${tmpdir_modbase}/${1} } dep_add_modules() @@ -103,7 +118,7 @@ auto_add_modules() done # Ethernet - for x in 3c59x 8139cp 8139too 8390 b44 bmac bnx2 defxx dl2k e1000 e100 epic100 eql fealnx famachi hp100 mace mv643xx_eth natsemi ne2k-pci netconsole ns83820 pcnet32 r8169 s2io sis900 skge slhc 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 + 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 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 manual_add_modules ${x} done diff --git a/hooks/kernelextras b/hooks/kernelextras new file mode 100644 index 0000000..d1b8c34 --- /dev/null +++ b/hooks/kernelextras @@ -0,0 +1,39 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hooks for loading loading extra kernel bits into the initramfs + +. /usr/share/initramfs-tools/hook-functions + +fbcon=n + +for x in ${MODULESDIR}/initrd/*; do + x=${x##*/} + x=${x%.*} + case ${x} in + *fb) + fbcon=y + ;; + esac + + force_load ${x} +done + +if [ ${fbcon} = "y" ]; then + force_load fbcon +fi + diff --git a/mkinitramfs b/mkinitramfs index 3257c94..7344a03 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -70,8 +70,10 @@ if [ -d ${outfile} ]; then exit 1 fi -if [ ! -e /lib/modules/${version} ]; then - echo "Cannot find /lib/modules/${version}" +MODULESDIR="/lib/modules/${version}" + +if [ ! -e ${MODULESDIR} ]; then + echo "Cannot find ${MODULESDIR}" exit 1 fi @@ -80,6 +82,7 @@ __TMPCPIOGZ=$(mktemp -t mkinitramfs-OL_XXXXXX) || exit 1 # Export environment for hook scripts. # +export MODULESDIR export version export CONFDIR export DESTDIR -- cgit v1.2.3 From f0a04306ac01b22e80cbd1d2a7578a1a3efa6e5f Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 25 Aug 2005 16:21:19 -0400 Subject: initramfs-tools (0.23) breezy; urgency=low "This suspense is terrible. I hope it will last." - Oscar Wilde * scripts/local: Quote ${ROOT} so that an empty value causes us to drop to a shell. Thanks to Matt Zimmerman for this fix! - hook-functions (auto_add_modules): Add atiixp and opti621 to the IDE set. - hook-functions (dep_add_modules): Detect i2o and add i2o_block (auto_add_modules): Include i2o_block. - scripts/functions (i2o_boot_events): New function (load_modules): Call it. (Ubuntu# 13806) Thanks to Tollef Fog Heen for the i2o patch! - debian/control: Depend on udev. Thanks to Alexander Butenko for troubleshooting this with me. - init: Move the /dev directory to the root filesystem. Handle all the udev bind mounts as needed. Make sure input and output is associated with dev/console. - scripts/functions (parse_numeric): Exit if we're refering to a path. Otherwise override root setting to be /dev/root. - init: Call parse_numeric when setting the root variable. - scripts/local-top/lvm: When using a numeric root, call vgchange -ay Don't attempt to start LVM on regular partitions. (Ubuntu #13365, #13778, and some of #13399) - scripts/local-top/lvm: Cope with -'s in the Volume Group and logical volume names. (Ubuntu #13387) Thanks to Stephen Shirley for the patch! -- Jeff Bailey Thu, 25 Aug 2005 11:48:15 -0400 initramfs-tools (0.22) breezy; urgency=low * Fix argument handling in force_load hook-function * Add "sleep 3" to scripts/nfs as a nasty hack around bug #12942 -- Matt Zimmerman Fri, 19 Aug 2005 23:50:16 -0700 --- debian/changelog | 48 ++++++++++++++++++++++++++++++++++++++++- debian/control | 2 +- debian/initramfs-tools.postinst | 1 + hook-functions | 13 +++++++++-- init | 12 ++++++++++- scripts/functions | 15 +++++++++++++ scripts/local | 2 +- scripts/local-top/lvm | 17 ++++++++++++--- scripts/nfs | 1 + 9 files changed, 102 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index aaa2dba..09bc345 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,49 @@ +initramfs-tools (0.23) breezy; urgency=low + + "This suspense is terrible. I hope it will last." + - Oscar Wilde + + * scripts/local: Quote ${ROOT} so that an empty value causes us + to drop to a shell. + Thanks to Matt Zimmerman for this fix! + + - hook-functions (auto_add_modules): Add atiixp and opti621 to + the IDE set. + + - hook-functions (dep_add_modules): Detect i2o and add i2o_block + (auto_add_modules): Include i2o_block. + + - scripts/functions (i2o_boot_events): New function + (load_modules): Call it. (Ubuntu# 13806) + Thanks to Tollef Fog Heen for the i2o patch! + + - debian/control: Depend on udev. + Thanks to Alexander Butenko for troubleshooting this with me. + + - init: Move the /dev directory to the root filesystem. + Handle all the udev bind mounts as needed. + Make sure input and output is associated with dev/console. + + - scripts/functions (parse_numeric): Exit if we're refering to a path. + Otherwise override root setting to be /dev/root. + - init: Call parse_numeric when setting the root variable. + - scripts/local-top/lvm: When using a numeric root, call vgchange -ay + Don't attempt to start LVM on regular partitions. + (Ubuntu #13365, #13778, and some of #13399) + + - scripts/local-top/lvm: Cope with -'s in the Volume Group and + logical volume names. (Ubuntu #13387) + Thanks to Stephen Shirley for the patch! + + -- Jeff Bailey Thu, 25 Aug 2005 11:48:15 -0400 + +initramfs-tools (0.22) breezy; urgency=low + + * Fix argument handling in force_load hook-function + * Add "sleep 3" to scripts/nfs as a nasty hack around bug #12942 + + -- Matt Zimmerman Fri, 19 Aug 2005 23:50:16 -0700 + initramfs-tools (0.21) breezy; urgency=low "All that I desire to point out is the general principle that @@ -20,7 +66,7 @@ initramfs-tools (0.21) breezy; urgency=low * debian/initramfs-tools.postinst: Preserve /etc/mkinitrd/modules if possible on new install. (Ubuntu #13372) - -- Jeff Bailey Tue, 16 Aug 2005 15:56:00 -0400 + -- Jeff Bailey Thu, 18 Aug 2005 00:20:11 -0400 initramfs-tools (0.20) breezy; urgency=low diff --git a/debian/control b/debian/control index cd47480..4120074 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils, busybox-cvs-initramfs (>= 20040623-1ubuntu19), cpio, mdadm, lvm2 (>= 2.01.04-5) +Depends: klibc-utils, busybox-cvs-initramfs (>= 20040623-1ubuntu19), cpio, mdadm, lvm2 (>= 2.01.04-5), udev 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 diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index fe734cf..6e61803 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -15,6 +15,7 @@ if [ "$1" = configure ]; then if [ -e /etc/mkinitrd/modules ]; then cp /etc/mkinitrd/modules /etc/mkinitramfs + sed -i -e 's/mkinitrd/mkinitramfs/g' /etc/mkinitramfs/modules fi if [ -e ${RESUME} ]; then diff --git a/hook-functions b/hook-functions index 8642af9..8ff5267 100644 --- a/hook-functions +++ b/hook-functions @@ -6,7 +6,7 @@ catenate_cpiogz() { force_load() { - manual_add_modules ${module} + manual_add_modules ${@} echo ${@} >>${DESTDIR}/conf/modules } @@ -106,6 +106,10 @@ dep_add_modules() if [ -e /sys/bus/scsi/devices/ ]; then manual_add_modules sd_mod fi + + if [ -e /sys/bus/i2o/devices/ ]; then + manual_add_modules i2o_block + fi } @@ -123,7 +127,7 @@ auto_add_modules() done # ide - for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do + for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 opti621 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do manual_add_modules ${x} done @@ -132,6 +136,11 @@ auto_add_modules() manual_add_modules ${x} done + # i2o + for x in i2o_block; do + manual_add_modules ${x} + done + } usage() diff --git a/init b/init index 38450da..f3aa221 100644 --- a/init +++ b/init @@ -61,6 +61,9 @@ log_end_msg # Populate /dev tree log_begin_msg "Initializing /dev" +mount -t ramfs none /dev +touch /dev/.initramfs-tools +parse_numeric ${ROOT} udevstart log_end_msg @@ -80,8 +83,15 @@ log_begin_msg "Running /scripts/init-bottom" run_scripts /scripts/init-bottom log_end_msg +# Move our /dev to the real filesystem. Do the setup that udev otherwise +# would. +mkdir -p /dev/.static/dev +chmod 700 /dev/.static/ +mount -o bind /root/dev /dev/.static/dev +mount -o move /dev /root/dev + umount /sys umount /proc # Chain to real filesystem -exec run-init ${rootmnt} ${init} "$@" +exec run-init ${rootmnt} ${init} "$@" /root/dev/console diff --git a/scripts/functions b/scripts/functions index 10918f8..956b1c3 100644 --- a/scripts/functions +++ b/scripts/functions @@ -181,6 +181,15 @@ scsi_boot_events() } +i2o_boot_events() +{ + [ -e /sys/bus/i2o/devices/ ] || return + + for device in /sys/bus/i2o/devices/*; do + [ -e ${device}/block ] && modprobe i2o_block + done +} + load_modules() { depmod -a @@ -217,10 +226,15 @@ load_modules() ide_boot_events scsi_boot_events + + i2o_boot_events } parse_numeric() { case $1 in + /*) + return + ;; *:*) minor=${1#*:} major=${1%:*} @@ -232,5 +246,6 @@ parse_numeric() { esac mknod /dev/root b ${major} ${minor} + ROOT=/dev/root } diff --git a/scripts/local b/scripts/local index bcc96ad..539a2a4 100644 --- a/scripts/local +++ b/scripts/local @@ -8,7 +8,7 @@ mountroot () log_end_msg # Get the root filesystem type - if [ ! -e ${ROOT} ]; then + if [ ! -e "${ROOT}" ]; then panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" fi diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 4f199de..9307f55 100644 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -15,10 +15,21 @@ prereqs) ;; esac -vg=$(echo ${ROOT} | sed -e 's#/dev/mapper/\(.*\)-.*#\1#') - -[ x${vg} != x ] || return +vg=${ROOT#/dev/mapper/} +case ${vg} in + /dev/root) + unset vg + ;; + /*) + exit 0 + ;; +esac + modprobe -q dm-mod +# Cope with -'s in the volume group and node names. +vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') + vgchange -ay ${vg} + diff --git a/scripts/nfs b/scripts/nfs index 8149e86..10f8f1d 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -29,6 +29,7 @@ mountroot () roflag="-o rw" fi + sleep 3 nfsmount ${roflag} ${NFSROOT} ${rootmnt} log_begin_msg "Running /scripts/nfs-bottom" -- cgit v1.2.3 From 7379c1bbf48cfa9df83dc7e92d169e2db37e3bc8 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Fri, 26 Aug 2005 14:39:14 -0400 Subject: initramfs-tools (0.24) breezy; urgency=low "Experience is simply the name we give out mistakes." - Oscar Wilde * hook-functions (auto_add_modules): Add cciss (Ubuntu #14177) Thanks Fabionne! * scripts/functions (parse_numeric): Noop on empty parameter. Fixes LTSP boot failure. Thanks to Oliver Grawert for testing! * scripts/local-top/md: Don't run modprobe when raidlvl is unset. Run mdadm if raidlvl has ever been set, not just if the most recent device checked was part of the raid setup. Thanks to Jeff Waugh for the bug report! * mkinitramfs: Feed the -o argument through readlink -f to get the canonical pathname. -- Jeff Bailey Fri, 26 Aug 2005 09:35:32 -0400 --- debian/changelog | 40 +++++++++++++++++++++++++++++++--------- hook-functions | 2 +- mkinitramfs | 3 ++- scripts/functions | 4 +++- scripts/local-top/md | 8 ++++++-- 5 files changed, 43 insertions(+), 14 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 09bc345..06292ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +initramfs-tools (0.24) breezy; urgency=low + + "Experience is simply the name we give out mistakes." + - Oscar Wilde + + * hook-functions (auto_add_modules): Add cciss + (Ubuntu #14177) Thanks Fabionne! + + * scripts/functions (parse_numeric): Noop on empty parameter. + Fixes LTSP boot failure. Thanks to Oliver Grawert + for testing! + + * scripts/local-top/md: Don't run modprobe when raidlvl is unset. + Run mdadm if raidlvl has ever been set, not just if the most + recent device checked was part of the raid setup. + Thanks to Jeff Waugh for the bug report! + + * mkinitramfs: Feed the -o argument through readlink -f to + get the canonical pathname. + + -- Jeff Bailey Fri, 26 Aug 2005 09:35:32 -0400 + initramfs-tools (0.23) breezy; urgency=low "This suspense is terrible. I hope it will last." @@ -7,31 +29,31 @@ initramfs-tools (0.23) breezy; urgency=low to drop to a shell. Thanks to Matt Zimmerman for this fix! - - hook-functions (auto_add_modules): Add atiixp and opti621 to + * hook-functions (auto_add_modules): Add atiixp and opti621 to the IDE set. - - hook-functions (dep_add_modules): Detect i2o and add i2o_block + * hook-functions (dep_add_modules): Detect i2o and add i2o_block (auto_add_modules): Include i2o_block. - - scripts/functions (i2o_boot_events): New function + * scripts/functions (i2o_boot_events): New function (load_modules): Call it. (Ubuntu# 13806) Thanks to Tollef Fog Heen for the i2o patch! - - debian/control: Depend on udev. + * debian/control: Depend on udev. Thanks to Alexander Butenko for troubleshooting this with me. - - init: Move the /dev directory to the root filesystem. + * init: Move the /dev directory to the root filesystem. Handle all the udev bind mounts as needed. Make sure input and output is associated with dev/console. - - scripts/functions (parse_numeric): Exit if we're refering to a path. + * scripts/functions (parse_numeric): Exit if we're refering to a path. Otherwise override root setting to be /dev/root. - - init: Call parse_numeric when setting the root variable. - - scripts/local-top/lvm: When using a numeric root, call vgchange -ay + * init: Call parse_numeric when setting the root variable. + * scripts/local-top/lvm: When using a numeric root, call vgchange -ay Don't attempt to start LVM on regular partitions. (Ubuntu #13365, #13778, and some of #13399) - - scripts/local-top/lvm: Cope with -'s in the Volume Group and + * scripts/local-top/lvm: Cope with -'s in the Volume Group and logical volume names. (Ubuntu #13387) Thanks to Stephen Shirley for the patch! diff --git a/hook-functions b/hook-functions index 8ff5267..b189c34 100644 --- a/hook-functions +++ b/hook-functions @@ -132,7 +132,7 @@ auto_add_modules() done # scsi - for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do manual_add_modules ${x} done diff --git a/mkinitramfs b/mkinitramfs index 7344a03..a93f97c 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -16,7 +16,8 @@ while getopts "d:ko:r:" flag; do fi ;; o) - outfile="${OPTARG}" + touch ${OPTARG} + outfile="$(readlink -f ${OPTARG})" ;; k) keep="y" diff --git a/scripts/functions b/scripts/functions index 956b1c3..4b3b7cf 100644 --- a/scripts/functions +++ b/scripts/functions @@ -232,6 +232,9 @@ load_modules() parse_numeric() { case $1 in + "") + return + ;; /*) return ;; @@ -248,4 +251,3 @@ parse_numeric() { mknod /dev/root b ${major} ${minor} ROOT=/dev/root } - diff --git a/scripts/local-top/md b/scripts/local-top/md index 055e109..c7515fe 100644 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -16,6 +16,7 @@ prereqs) esac unset raidlvl +gotraid=n # Detect raid level for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do @@ -23,9 +24,12 @@ for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do continue fi raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') - modprobe -q ${raidlvl} 2>/dev/null + if [ "$raidlvl" ]; then + modprobe -q ${raidlvl} 2>/dev/null + gotraid=y + fi done -[ x${raidlvl} != x ] || return +[ "${gotraid}" = y ] || exit /sbin/mdrun /dev -- cgit v1.2.3 From 841a533b3b11b4a41f2eb8e6849fbd4ace0217fb Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Thu, 1 Sep 2005 00:14:03 -0400 Subject: initramfs-tools (0.25) breezy; urgency=low "If there was less sympathy in the world, there would be less trouble in the world." - Oscar Wilde * init: Module the /dev tmpfs earlier. Make /dev/console, and /dev/null on it at the beginning, just in case. * debian/initramfs-tools.postinst: When copying the modules file over from initrd-tools installations, filter out ext2, ext3, ide-generic and ide-disk. These are leftovers from Warty. (Ubuntu #14242) * hooks/udev: New File (Ubuntu #12915) * init: panic if ${init} doesn't exist on the target filesystem. -- Jeff Bailey Thu, 1 Sep 2005 00:13:47 -0400 --- debian/changelog | 20 ++++++++++++++++++++ debian/initramfs-tools.postinst | 8 +++++++- init | 10 ++++++++-- 3 files changed, 35 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 06292ff..38ec69f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +initramfs-tools (0.25) breezy; urgency=low + + "If there was less sympathy in the world, there would be less + trouble in the world." + - Oscar Wilde + + * init: Module the /dev tmpfs earlier. Make /dev/console, and + /dev/null on it at the beginning, just in case. + + * debian/initramfs-tools.postinst: When copying the modules file over + from initrd-tools installations, filter out ext2, ext3, ide-generic + and ide-disk. These are leftovers from Warty. + (Ubuntu #14242) + + * hooks/udev: New File (Ubuntu #12915) + + * init: panic if ${init} doesn't exist on the target filesystem. + + -- Jeff Bailey Thu, 1 Sep 2005 00:13:47 -0400 + initramfs-tools (0.24) breezy; urgency=low "Experience is simply the name we give out mistakes." diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index 6e61803..7d4eff6 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -15,7 +15,13 @@ if [ "$1" = configure ]; then if [ -e /etc/mkinitrd/modules ]; then cp /etc/mkinitrd/modules /etc/mkinitramfs - sed -i -e 's/mkinitrd/mkinitramfs/g' /etc/mkinitramfs/modules + sed -i \ + -e 's/mkinitrd/mkinitramfs/g' \ + -e '/^ide-generic/d' \ + -e '/^ide-disk/d' \ + -e '/^ext2/d' \ + -e '/^ext3/d' \ + /etc/mkinitramfs/modules fi if [ -e ${RESUME} ]; then diff --git a/init b/init index f3aa221..f11908d 100644 --- a/init +++ b/init @@ -5,6 +5,10 @@ mkdir /proc mkdir /tmp mount -t sysfs sysfs /sys mount -t proc proc /proc +mount -t ramfs none /dev +touch /dev/.initramfs-tools +mknod /dev/console c 5 1 +mknod /dev/null c 1 3 . /conf/initramfs.conf . /scripts/functions @@ -61,8 +65,6 @@ log_end_msg # Populate /dev tree log_begin_msg "Initializing /dev" -mount -t ramfs none /dev -touch /dev/.initramfs-tools parse_numeric ${ROOT} udevstart log_end_msg @@ -93,5 +95,9 @@ mount -o move /dev /root/dev umount /sys umount /proc +if [ ! -x ${rootmnt}${init} ]; then + panic "Target filesystem doesn't have ${init}" +fi + # Chain to real filesystem exec run-init ${rootmnt} ${init} "$@" /root/dev/console -- cgit v1.2.3 From 5582f19f77d283348d946dd4cafcbc2134a3186c Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Sat, 17 Sep 2005 16:45:40 -0400 Subject: initramfs-tools (0.26) breezy; urgency=low "Experience is one thing you can't get for nothing." - Oscar Wilde * scripts/local-top/lvm: Reduce -- to - in VG strings for feeding to vgchange. (Ubuntu: #13387) * update-initramfs: New file * debian/dirs: Add /var/lib/initramfs-tools * hooks/evms: New file * scripts/local-top: New file. * debian/control: Bump klibc depends to 1.0.14-1ubuntu2 for jfs support * hook-scripts (manual_add_modules): Don't do unnecessary depmod (dep_add_modules): No need for a sleep 2 here. Thanks to Matt Zimmmerman for noticing these! * scripts/functions: Attempt resume before loading USB or Network modules to avoid resume issues with USB. Thanks to Matthew Garrett for this patch! * scripts/functions (ide_boot_events): Always load ide-generic before going further. This allows us to catch any hidden IDE controllers that might not otherwise get found. * initramfs.conf.5: New file * debian/initramfs-tools.manpages: Install it. Thanks to maximilian attems for the manpage! * hook-functions (auto_add_modules): Add mptscsih (Ubuntu #15406) Thanks to Jesper Krogh for the bug report! * debian/dirs: Add etc/mkinitramfs/hooks, move all scripts subdirs into etc/mkinitramfs/scripts. * mkinitramfs: Set the umask. Copy the scripts from /etc/mkinitramfs/scripts into the image. Make sure that modules file lists is actually a regular file. * init: Use ${rootmnt} instead of hardcoded /root, use mount -n Fix typo. * hook-functions (catenate_cpiogz): Add sanity check. (add_modules_from_file): Document, quote variable, add warning. * docs/example_hook: Update Thanks to Karl Hegbloom for these previous 5 patches! * init: Create /var/lock on the initramfs Thanks to Jerry Haltom for noticing this! * debian/dirs: rename to ... * debian/initramfs-tools.dirs: ... this. * scripts/functions (scsi_boot_events): Don't attempt to look at ${device}/type if it doesn't actually exist. -- Jeff Bailey Wed, 14 Sep 2005 14:12:24 -0400 --- debian/changelog | 62 +++++++++ debian/control | 2 +- debian/dirs | 10 -- debian/initramfs-tools.dirs | 12 ++ debian/initramfs-tools.install | 1 + debian/initramfs-tools.manpages | 1 + docs/example_hook | 17 ++- hook-functions | 26 +++- hooks/evms | 31 +++++ init | 7 +- initramfs.conf.5 | 62 +++++++++ mkinitramfs | 12 +- scripts/functions | 40 +++++- scripts/local-top/evms | 31 +++++ scripts/local-top/lvm | 4 +- update-initramfs | 281 ++++++++++++++++++++++++++++++++++++++++ 16 files changed, 563 insertions(+), 36 deletions(-) delete mode 100644 debian/dirs create mode 100644 debian/initramfs-tools.dirs create mode 100644 hooks/evms create mode 100644 initramfs.conf.5 create mode 100644 scripts/local-top/evms create mode 100644 update-initramfs (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 38ec69f..7232019 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,65 @@ +initramfs-tools (0.26) breezy; urgency=low + + "Experience is one thing you can't get for nothing." + - Oscar Wilde + + * scripts/local-top/lvm: Reduce -- to - in VG strings for feeding + to vgchange. (Ubuntu: #13387) + + * update-initramfs: New file + * debian/dirs: Add /var/lib/initramfs-tools + + * hooks/evms: New file + * scripts/local-top: New file. + + * debian/control: Bump klibc depends to 1.0.14-1ubuntu2 for jfs support + + * hook-scripts (manual_add_modules): Don't do unnecessary depmod + (dep_add_modules): No need for a sleep 2 here. + Thanks to Matt Zimmmerman for noticing these! + + * scripts/functions: Attempt resume before loading USB or Network + modules to avoid resume issues with USB. + Thanks to Matthew Garrett for this patch! + + * scripts/functions (ide_boot_events): Always load ide-generic + before going further. This allows us to catch any hidden + IDE controllers that might not otherwise get found. + + * initramfs.conf.5: New file + * debian/initramfs-tools.manpages: Install it. + Thanks to maximilian attems for the manpage! + + * hook-functions (auto_add_modules): Add mptscsih (Ubuntu #15406) + Thanks to Jesper Krogh for the bug report! + + * debian/dirs: Add etc/mkinitramfs/hooks, move all scripts subdirs + into etc/mkinitramfs/scripts. + + * mkinitramfs: Set the umask. Copy the scripts from + /etc/mkinitramfs/scripts into the image. + Make sure that modules file lists is actually a regular file. + + * init: Use ${rootmnt} instead of hardcoded /root, use mount -n + Fix typo. + + * hook-functions (catenate_cpiogz): Add sanity check. + (add_modules_from_file): Document, quote variable, add warning. + + * docs/example_hook: Update + Thanks to Karl Hegbloom for these previous 5 patches! + + * init: Create /var/lock on the initramfs + Thanks to Jerry Haltom for noticing this! + + * debian/dirs: rename to ... + * debian/initramfs-tools.dirs: ... this. + + * scripts/functions (scsi_boot_events): Don't attempt to look + at ${device}/type if it doesn't actually exist. + + -- Jeff Bailey Wed, 14 Sep 2005 14:12:24 -0400 + initramfs-tools (0.25) breezy; urgency=low "If there was less sympathy in the world, there would be less diff --git a/debian/control b/debian/control index 4120074..8a1aae1 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils, busybox-cvs-initramfs (>= 20040623-1ubuntu19), cpio, mdadm, lvm2 (>= 2.01.04-5), udev +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox-cvs-initramfs (>= 20040623-1ubuntu19), cpio, mdadm, lvm2 (>= 2.01.04-5), udev 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 diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index d35ba7c..0000000 --- a/debian/dirs +++ /dev/null @@ -1,10 +0,0 @@ -etc/mkinitramfs/init-bottom -etc/mkinitramfs/init-premount -etc/mkinitramfs/init-top -etc/mkinitramfs/local-bottom -etc/mkinitramfs/local-premount -etc/mkinitramfs/local-top -etc/mkinitramfs/nfs-bottom -etc/mkinitramfs/nfs-premount -etc/mkinitramfs/nfs-top -usr/share/initramfs-tools/modules.d diff --git a/debian/initramfs-tools.dirs b/debian/initramfs-tools.dirs new file mode 100644 index 0000000..ba4ac4d --- /dev/null +++ b/debian/initramfs-tools.dirs @@ -0,0 +1,12 @@ +etc/mkinitramfs/scripts/init-bottom +etc/mkinitramfs/scripts/init-premount +etc/mkinitramfs/scripts/init-top +etc/mkinitramfs/scripts/local-bottom +etc/mkinitramfs/scripts/local-premount +etc/mkinitramfs/scripts/local-top +etc/mkinitramfs/scripts/nfs-bottom +etc/mkinitramfs/scripts/nfs-premount +etc/mkinitramfs/scripts/nfs-top +etc/mkinitramfs/hooks +usr/share/initramfs-tools/modules.d +/var/lib/initramfs-tools diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index 8702d53..3a7a503 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -4,3 +4,4 @@ scripts usr/share/initramfs-tools conf/initramfs.conf etc/mkinitramfs hooks usr/share/initramfs-tools hook-functions usr/share/initramfs-tools +update-initramfs usr/sbin diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages index 61d8057..95edfac 100644 --- a/debian/initramfs-tools.manpages +++ b/debian/initramfs-tools.manpages @@ -1 +1,2 @@ mkinitramfs.8 +initramfs.conf.5 diff --git a/docs/example_hook b/docs/example_hook index 27582a7..de5392d 100644 --- a/docs/example_hook +++ b/docs/example_hook @@ -39,6 +39,7 @@ # TODO: Decide what environment variables are meaningful and defined # in this context, then document them as part of the interface. # +# TODO: May need a version_compare function for comparison of VERSION? # @@ -66,18 +67,21 @@ esac # # Source the optional 'hook-functions' scriptlet, if you need the -# functions defined within it: +# functions defined within it. Read it to see what is available to +# you. It contains functions for copying dynamically linked program +# binaries, and kernel modules into the DESTDIR. # -# . /usr/share/initramfs-tools/hook-functions +. /usr/share/initramfs-tools/hook-functions -# If this is a conffile, it must take care to do the right thing when -# the package containing it is removed but not purged. There of +# If this hook script is a conffile (and thus stored in +# /etc/mkinitramfs/hooks), it must take care to do the right thing +# when the package containing it is removed but not purged. There of # course may be other reasons to have custom logic deciding what to -# install. +# install. The version variable may be useful for this. # if [ -x /usr/bin/myprog ]; then - install -D /usr/bin/myprog ${DESTDIR}/usr/bin + copy_exec /usr/bin/myprog usr/bin fi # To accompany this, there should usually be a script for inside the @@ -108,4 +112,3 @@ then fi exit 0 - diff --git a/hook-functions b/hook-functions index b189c34..4371962 100644 --- a/hook-functions +++ b/hook-functions @@ -1,7 +1,13 @@ # -*- shell-script -*- catenate_cpiogz() { - cat "$1" >>${__TMPCPIOGZ} + # Sanity check + if [ ! -e "${1}" ]; then + echo "W:catenate_cpiogz: arg1='${1}' does not exist." >&2 + return + fi + + cat "${1}" >>${__TMPCPIOGZ} } force_load() @@ -10,10 +16,20 @@ force_load() echo ${@} >>${DESTDIR}/conf/modules } +# Takes a file containing a list of modules to be added as an +# argument, figures out dependancies, and adds them. +# +# Input file syntax: +# +# # comment +# modprobe_module_name [args ...] +# [...] +# add_modules_from_file() { # Sanity check - if [ ! -e ${1} ]; then + if [ ! -e "${1}" ]; then + echo "W:add_modules_from_file: arg1='${1}' does not exist." >&2 return fi @@ -32,7 +48,6 @@ manual_add_modules() mkdir -p ${DESTDIR}/$(dirname ${mam_x}) ln -s ${mam_x} ${DESTDIR}/$(dirname ${mam_x}) - depmod -b ${DESTDIR} ${version} done } @@ -88,9 +103,6 @@ dep_add_modules() fi done - # Give the USB bus a moment to catch up - sleep 2 - for x in /sys/bus/usb/devices/*; do if [ -e ${x}/modalias ]; then manual_add_modules $(cat ${x}/modalias) @@ -132,7 +144,7 @@ auto_add_modules() done # scsi - for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do manual_add_modules ${x} done diff --git a/hooks/evms b/hooks/evms new file mode 100644 index 0000000..0981672 --- /dev/null +++ b/hooks/evms @@ -0,0 +1,31 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +if [ ! -x /sbin/evms_activate ]; then + exit 0 +fi + +copy_exec /sbin/evms_activate /sbin + +EVMS_VERSION=$(/usr/sbin/evms_query info | grep "EVMS Version" | awk '{ print $3; }') + +mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION} + +for x in disk lvm2 dos multipath; do + copy_exec /lib/evms/${EVMS_VERSION}/${x}* /lib/evms/${EVMS_VERSION} +done diff --git a/init b/init index f11908d..6bf4be7 100644 --- a/init +++ b/init @@ -3,6 +3,7 @@ mkdir /sys mkdir /proc mkdir /tmp +mkdir -p /var/lock mount -t sysfs sysfs /sys mount -t proc proc /proc mount -t ramfs none /dev @@ -53,7 +54,7 @@ for x in $(cat /proc/cmdline); do esac done -log_begin_msg "Running /script/init-top" +log_begin_msg "Running /scripts/init-top" run_scripts /scripts/init-top log_end_msg @@ -89,8 +90,8 @@ log_end_msg # would. mkdir -p /dev/.static/dev chmod 700 /dev/.static/ -mount -o bind /root/dev /dev/.static/dev -mount -o move /dev /root/dev +mount -n -o bind ${rootmnt}/dev /dev/.static/dev +mount -n -o move /dev ${rootmnt}/dev umount /sys umount /proc diff --git a/initramfs.conf.5 b/initramfs.conf.5 new file mode 100644 index 0000000..24cfff7 --- /dev/null +++ b/initramfs.conf.5 @@ -0,0 +1,62 @@ +.TH INITRAMFS.CONF 5 "$Date: 2005/09/13 $" "" "initramfs.conf manual" + +.SH NAME +initramfs.conf \- configuration file for mkinitramfs + +.SH DESCRIPTION +The behaviour of +.B mkinitramfs +can be modified by its configuration file. + +Each line in the file can be a configuration variable, a blank line, +or a comment. The value of an variable is assigned by an statement +of the form: \fIname\fP=[\fIvalue\fP] + +.SH GENERAL VARIABLES +.TP +\fB MODULES +Specifies the modules for the initramfs image. +The default setting is \fImost\fP. + +\fImost\fP adds all the framebuffer, acpi, file system, ide, sata, scsi and usb drivers. + +\fIdep\fP tries to guess which modules are necessary for the running box. + +\fIlist\fP includes only modules from the additional modules list. + +.TP +\fB RESUME +Optional setting of the swap partition to resume from. +The resume= passed on the command line of your boot loader +will override this setting. + +.TP +\fB BUSYBOX +If this is set to \fIy\fP then \fBbusybox\fP will be included on the +initramfs image. You MUST use the -static version. + +.SH NFS VARIABLES +.TP +\fB BOOT +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. + +.TP +\fB DEVICE +Specifies the network interface, like eth0. + +.TP +\fB NFSROOT +Defaults to \fIauto\fP in order to pick up value from DHCP server. +Otherwise you need to specify \fIHOST:MOUNT\fP. + +.SH SEE ALSO + +.BR mkinitramfs (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. + diff --git a/mkinitramfs b/mkinitramfs index a93f97c..8257b7f 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -1,5 +1,7 @@ #!/bin/sh +umask 0022 + # Defaults keep="n" CONFDIR="/etc/mkinitramfs" @@ -97,7 +99,9 @@ done # MODULES=list case. Always honour. for x in ${CONFDIR}/modules /usr/share/initramfs-tools/modules.d/*; do - add_modules_from_file ${x} + if [ -f "${x}" ]; then + add_modules_from_file ${x} + fi done if [ "${MODULES}" = "dep" ]; then @@ -115,6 +119,12 @@ ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib copy_exec /usr/share/initramfs-tools/init /init cp -a /usr/share/initramfs-tools/scripts/* ${DESTDIR}/scripts +for f in $(cd /etc/mkinitramfs/scripts && \ + find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \ + -o -type f -print); do + mkdir --parents ${DESTDIR}/scripts/$(dirname ${f}) +cp -p /etc/mkinitramfs/scripts/${f} ${DESTDIR}/scripts/$(dirname ${f}) +done copy_exec ${CONFDIR}/initramfs.conf /conf cp -a /etc/udev ${DESTDIR}/etc diff --git a/scripts/functions b/scripts/functions index 4b3b7cf..148dda7 100644 --- a/scripts/functions +++ b/scripts/functions @@ -144,10 +144,11 @@ run_scripts() } ide_boot_events() { - [ -e /proc/ide ] || return modprobe -q ide-generic + [ -e /proc/ide ] || return + for drive in /proc/ide/*; do [ -e ${drive}/media ] || continue # nothing to do if the device has already been took in charge @@ -156,11 +157,11 @@ ide_boot_events() { read media < $drive/media case "$media" in - disk) MODULE=ide-disk ;; - cdrom) MODULE=ide-cd ;; - tape) MODULE=ide-tape ;; - floppy) MODULE=ide-floppy ;; - *) MODULE=ide-generic ;; + disk) MODULE=ide-disk ;; + cdrom) MODULE=ide-cd ;; + tape) MODULE=ide-tape ;; + floppy) MODULE=ide-floppy ;; + *) MODULE=ide-generic ;; esac modprobe -q ${MODULE} @@ -172,6 +173,7 @@ scsi_boot_events() [ -e /sys/bus/scsi/devices/ ] || return for device in /sys/bus/scsi/devices/*; do + [ -e "${device}"/type ] || continue read media < ${device}/type case "$media" in 0) modprobe -q sd_mod; @@ -208,6 +210,32 @@ load_modules() done fi + for x in /sys/bus/pci/devices/*; do + if [ -e ${x}/class ]; then + case $(cat ${x}/class) in + 0x0100*|0x0101*) + if [ -e ${x}/modalias ]; then + modprobe -q $(cat ${x}/modalias) + fi + ;; + esac + fi + done + + ide_boot_events + + scsi_boot_events + + i2o_boot_events + + if [ -e /sys/power/resume ]; then + if [ -e ${resume} ]; then + major=$((0x$(stat -c%t ${resume}))) + minor=$((0x$(stat -c%T ${resume}))) + echo ${major}:${minor} >/sys/power/resume + fi + fi + for x in /sys/bus/pci/devices/*; do if [ -e ${x}/modalias ]; then modprobe -q $(cat ${x}/modalias) diff --git a/scripts/local-top/evms b/scripts/local-top/evms new file mode 100644 index 0000000..2ee7e80 --- /dev/null +++ b/scripts/local-top/evms @@ -0,0 +1,31 @@ +#!/bin/sh + +PREREQ="lvm" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +evms=${ROOT#/dev/evms/} + +case ${evms} in + /dev/root) + unset evms + ;; + /*) + exit 0 + ;; +esac + +modprobe -q dm-mod + +/sbin/evms_activate diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 9307f55..7ac81e6 100644 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -28,8 +28,10 @@ esac modprobe -q dm-mod -# Cope with -'s in the volume group and node names. +# Split volume group from logical volume. vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') +# Reduce padded --'s to -'s +vg=$(echo ${vg} | sed -e 's#--#-#g') vgchange -ay ${vg} diff --git a/update-initramfs b/update-initramfs new file mode 100644 index 0000000..9d7d1bc --- /dev/null +++ b/update-initramfs @@ -0,0 +1,281 @@ +#!/bin/sh + +STATEDIR=/var/lib/initramfs-tools +BOOTDIR=/boot + +set -e + +usage() +{ + if [ -n "${1}" ]; then + printf "${@}\n\n" >&2 + fi + cat >&2 << EOF +Usage: ${0} [OPTION]... + +Options: + -k [version] Specify kernel version or ALL + -c Create a new initramfs + -u Update an existing initramfs + -d Remove an existing initramfs + -t Take over a custom initramfs with this one + -v Be verbose + -h This message + +EOF + exit 1 +} + +mild_panic() +{ + if [ -n "${1}" ]; then + printf "${@}\n" >&2 + fi + exit 0 +} + +panic() +{ + if [ -n "${1}" ]; then + printf "${@}\n" >&2 + fi + exit 1 +} + +verbose() +{ + if [ "${verbose}" = 1 ]; then + printf "${@}\n" + fi +} + +version_exists() +{ + [ -e "${STATEDIR}/${1}" ] + return $? +} + +set_initramfs() +{ + initramfs="${BOOTDIR}/initrd.img-${version}" +} + +generate_initramfs() +{ + verbose "Generating ${initramfs}" + mkinitramfs -o ${initramfs} ${version} + set_sha1 +} + +compare_sha1() +{ + sha1sum ${initramfs} | diff ${STATEDIR}/${version} - >/dev/null 2>&1 + return $? +} + +# Note that this must overwrite so that updates work. +set_sha1() +{ + sha1sum ${initramfs} > ${STATEDIR}/${version} +} + +delete_sha1() +{ + rm -f ${STATEDIR}/${version} +} + +get_sorted_versions() +{ + version_list="" + + for gsv_x in ${STATEDIR}/*; do + gsv_x=$(basename ${gsv_x}) + if [ "${gsv_x}" = '*' ]; then + verbose "Nothing to do, exiting." + exit 0 + fi + worklist="" + for gsv_i in $version_list; do + if dpkg --compare-versions "${gsv_x}" '>' "${gsv_i}"; then + worklist="${worklist} ${gsv_x} ${gsv_i}" + gsv_x="" + else + worklist="${worklist} ${gsv_i}" + fi + done + if [ "${gsv_x}" != "" ]; then + worklist="${worklist} ${gsv_x}" + fi + version_list=${worklist} + done + + verbose "Available versions: ${version_list}" +} + +set_linked_version() +{ + if [ -L /initrd.img ]; then + linktarget=$(readlink /initrd.img) + fi + + if [ -L /boot/initrd.img ]; then + linktarget=$(readlink /boot/initrd.img) + fi + + if [ -z "${linktarget}" ]; then + return + fi + + version="${linktarget##initrd.img-}" +} + +set_highest_version() +{ + get_sorted_versions + set - ${version_list} + version=${1} +} + +create() +{ + if [ -z "${version}" ]; then + usage "Create mode requires a version argument" + fi + + set_initramfs + + if [ "${takeover}" = 0 ]; then + if version_exists ${version}; then + panic "Cannot create version ${version}: already exists" + fi + + if [ -e ${initramfs} ]; then + panic "${initramfs} already exists, cannot create." + fi + fi + + generate_initramfs +} + +update() +{ + if [ -z "${version}" ]; then + set_linked_version + fi + + if [ -z "${version}" ]; then + set_highest_version + fi + + if [ "${version}" = "all" ]; then + : FIXME check for --yes, and if not ask are you sure + get_sorted_versions + 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} ${vflag} -u -k ${u_version} + set -e + done + exit 0 + fi + + set_initramfs + + altered_check + + generate_initramfs + +} + +delete() +{ + if [ -z "${version}" ]; then + usage "Delete mode requires a version argument" + fi + + set_initramfs + + if [ ! -e ${initramfs} ]; then + panic "Cannot delete ${initramfs}, doesn't exist." + fi + + if ! version_exists ${version}; then + panic "Cannot delete version ${version}: Not created by this utility." + fi + + altered_check + + delete_sha1 + + rm -f "${initramfs}" +} + + +altered_check() +{ + if [ "${takeover}" = 0 ]; then + if ! compare_sha1; then + delete_sha1 + mild_panic "${initramfs} was been altered. Cannot update." + fi + fi +} + +# Defaults +verbose=0 +yes=0 +takeover=0 + +## + +while getopts "k:cudyvht" flag; do + case "${flag}" in + k) + version="${OPTARG}" + ;; + c) + mode="c" + ;; + d) + mode="d" + ;; + u) + mode="u" + ;; + v) + verbose="1" + ;; + y) + yes="1" + ;; + t) + takeover="1" + ;; + h) + usage + ;; + esac +done + +# Validate arguments + +if [ -z "${mode}" ]; then + usage "You must specify at least one of -c, -u, or -d." +fi + +case "${mode}" in + c) + create + ;; + d) + delete + ;; + u) + update + ;; +esac + + -- cgit v1.2.3 From 11969599dad064723cad310e021613ae0bb88a20 Mon Sep 17 00:00:00 2001 From: Jeff Bailey Date: Sat, 17 Sep 2005 16:49:37 -0400 Subject: Add thanks to Jerry for helping test and typo fix to changelog --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7232019..de24ee0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,7 +10,8 @@ initramfs-tools (0.26) breezy; urgency=low * debian/dirs: Add /var/lib/initramfs-tools * hooks/evms: New file - * scripts/local-top: New file. + * scripts/local-top/evms: New file. + Thanks to Jerry Haltom for helping test this! * debian/control: Bump klibc depends to 1.0.14-1ubuntu2 for jfs support -- cgit v1.2.3 From 8b2a636d8c7979256c47c192c33477b031361c0c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 19 Sep 2005 15:14:15 +0200 Subject: remove unused BUSYBOX variable --- conf/initramfs.conf | 7 ------- debian/changelog | 6 ++++++ initramfs.conf.5 | 5 ----- 3 files changed, 6 insertions(+), 12 deletions(-) (limited to 'debian') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index b4a7dba..f1b0151 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -2,13 +2,6 @@ # initramfs.conf # -# BUSYBOX: [ y | n ] -# -# Use busybox if available. You MUST use the -static version -# - -BUSYBOX=y - # # BOOT: [ local | nfs ] # diff --git a/debian/changelog b/debian/changelog index de24ee0..ef59e2c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.27) unstable; urgency=low + + * Remove unused BUSYBOX config option as we use busybox anyway. + + -- maximilian attems Mon, 19 Sep 2005 15:09:26 +0200 + initramfs-tools (0.26) breezy; urgency=low "Experience is one thing you can't get for nothing." diff --git a/initramfs.conf.5 b/initramfs.conf.5 index 24cfff7..c1ee3e7 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -30,11 +30,6 @@ Optional setting of the swap partition to resume from. The resume= passed on the command line of your boot loader will override this setting. -.TP -\fB BUSYBOX -If this is set to \fIy\fP then \fBbusybox\fP will be included on the -initramfs image. You MUST use the -static version. - .SH NFS VARIABLES .TP \fB BOOT -- cgit v1.2.3 From f6492f6923910c26951398716f273767a545d1db Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 19 Sep 2005 15:17:17 +0200 Subject: kernel team as maintainer ;) --- debian/changelog | 3 +++ debian/control | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ef59e2c..5aacf84 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ initramfs-tools (0.27) unstable; urgency=low * Remove unused BUSYBOX config option as we use busybox anyway. + * Add Jeff Bailey and myself as Uploaders, Debian kernel team as + MAINTAINER. + -- maximilian attems Mon, 19 Sep 2005 15:09:26 +0200 initramfs-tools (0.26) breezy; urgency=low diff --git a/debian/control b/debian/control index 8a1aae1..16c557d 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,8 @@ Source: initramfs-tools Section: utils Priority: optional -Maintainer: Jeff Bailey +Uploaders: Jeff Bailey , maximilan attems +Maintainer: Debian kernel team Build-Depends-Indep: debhelper (>= 4.0.0), cdbs Standards-Version: 3.6.2.0 -- cgit v1.2.3 From 02914affe8ec60eac7c2f72b1cde38bcb0fe237f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 19 Sep 2005 15:18:40 +0200 Subject: close itp bug --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 5aacf84..b893a18 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ initramfs-tools (0.27) unstable; urgency=low * Add Jeff Bailey and myself as Uploaders, Debian kernel team as MAINTAINER. + * Upload to debian unstable. (Closes: #312561) + -- maximilian attems Mon, 19 Sep 2005 15:09:26 +0200 initramfs-tools (0.26) breezy; urgency=low -- cgit v1.2.3 From e82955072791604c2691fac6ae796fc26b08c8e3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 19 Sep 2005 16:12:02 +0200 Subject: more changelog changes --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b893a18..ddad11a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,8 @@ initramfs-tools (0.27) unstable; urgency=low * Add Jeff Bailey and myself as Uploaders, Debian kernel team as MAINTAINER. - * Upload to debian unstable. (Closes: #312561) + * Upload to debian unstable - allows use of nondevfs kernel >= 2.6.13 + with initramfs image. (Closes: #312561, #315654) -- maximilian attems Mon, 19 Sep 2005 15:09:26 +0200 -- cgit v1.2.3 From d88210509bcd6e79ab77c062ce57d99380d55718 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 19 Sep 2005 18:16:59 +0200 Subject: fix debian busybox dep --- debian/changelog | 4 +++- debian/control | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ddad11a..440bb81 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,9 @@ initramfs-tools (0.27) unstable; urgency=low * Upload to debian unstable - allows use of nondevfs kernel >= 2.6.13 with initramfs image. (Closes: #312561, #315654) - -- maximilian attems Mon, 19 Sep 2005 15:09:26 +0200 + * Fix busybox dependency to the relevant debian package. + + -- maximilian attems Mon, 19 Sep 2005 18:14:59 +0200 initramfs-tools (0.26) breezy; urgency=low diff --git a/debian/control b/debian/control index 16c557d..4182659 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox-cvs-initramfs (>= 20040623-1ubuntu19), cpio, mdadm, lvm2 (>= 2.01.04-5), udev +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox-cvs-static (>= 20040623-1), cpio, mdadm, lvm2 (>= 2.01.04-5), udev 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 -- cgit v1.2.3 From 21555c3e52c0165aa081aec15de5ac4eba3b23fc Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 20 Sep 2005 12:39:37 +0200 Subject: reoder initramfs.conf --- conf/initramfs.conf | 38 ++++++++++++++++++++++---------------- debian/changelog | 2 ++ 2 files changed, 24 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index f1b0151..88728b4 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -1,17 +1,8 @@ # # initramfs.conf +# Configuration file for mkinitramfs(8). See mkinitramfs.conf(5). # -# -# BOOT: [ local | nfs ] -# -# local - Boot off of local media (harddrive, USB stick). -# -# nfs - Boot using an NFS drive as the root of the drive. -# - -BOOT=local - # # MODULES: [ most | dep | list ] # @@ -21,16 +12,36 @@ BOOT=local # # list - Only include modules from the 'additional modules' list # + MODULES=most +# +# RESUME: [ /dev/hda2 | /dev/sdb2 ] +# +# Optionaly set the swap partition to resume from. +# Above are only possible example please costumize. +# The command line of your boot loader will override this setting. + +#RESUME= + # # NFS Section of the config. # +# +# BOOT: [ local | nfs ] +# +# local - Boot off of local media (harddrive, USB stick). +# +# nfs - Boot using an NFS drive as the root of the drive. +# + +BOOT=local + # # DEVICE: ... # -# Specify the network device, like eth0 +# Specify the network interface, like eth0 # DEVICE=eth0 @@ -41,8 +52,3 @@ DEVICE=eth0 NFSROOT=auto -# Hardcode partition to resume from so it doesn't have to be specified -# on the command line. The command line will override this setting. - -#RESUME= - diff --git a/debian/changelog b/debian/changelog index 440bb81..33108a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ initramfs-tools (0.27) unstable; urgency=low * Fix busybox dependency to the relevant debian package. + * Reorder the initramfs.conf variables. + -- maximilian attems Mon, 19 Sep 2005 18:14:59 +0200 initramfs-tools (0.26) breezy; urgency=low -- cgit v1.2.3 From 2299a84b5dfa78e7fc8f89724ab105571095bc9c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 20 Sep 2005 13:32:17 +0200 Subject: add question mark to the getopts --- debian/changelog | 2 ++ update-initramfs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 33108a0..c25c38b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ initramfs-tools (0.27) unstable; urgency=low * Reorder the initramfs.conf variables. + * Add question mark to the getopts for the help message. + -- maximilian attems Mon, 19 Sep 2005 18:14:59 +0200 initramfs-tools (0.26) breezy; urgency=low diff --git a/update-initramfs b/update-initramfs index 9d7d1bc..f93fc97 100644 --- a/update-initramfs +++ b/update-initramfs @@ -231,7 +231,7 @@ takeover=0 ## -while getopts "k:cudyvht" flag; do +while getopts "k:cudyvht?" flag; do case "${flag}" in k) version="${OPTARG}" @@ -254,7 +254,7 @@ while getopts "k:cudyvht" flag; do t) takeover="1" ;; - h) + h|?) usage ;; esac -- cgit v1.2.3 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 --- debian/changelog | 4 ++- debian/initramfs-tools.manpages | 1 + update-initramfs.8 | 60 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 update-initramfs.8 (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c25c38b..d497980 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,7 +14,9 @@ initramfs-tools (0.27) unstable; urgency=low * Add question mark to the getopts for the help message. - -- maximilian attems Mon, 19 Sep 2005 18:14:59 +0200 + * update-initramfs.8 New file install it. + + -- maximilian attems Tue, 20 Sep 2005 13:52:00 +0200 initramfs-tools (0.26) breezy; urgency=low diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages index 95edfac..0f42d94 100644 --- a/debian/initramfs-tools.manpages +++ b/debian/initramfs-tools.manpages @@ -1,2 +1,3 @@ mkinitramfs.8 initramfs.conf.5 +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 b1745fbbd0ca53ce3e47e1a35a100dac9ecf002a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 20 Sep 2005 14:35:14 +0200 Subject: fix typo in Uploaders --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 4182659..c2610db 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: initramfs-tools Section: utils Priority: optional -Uploaders: Jeff Bailey , maximilan attems +Uploaders: Jeff Bailey , maximilian attems Maintainer: Debian kernel team Build-Depends-Indep: debhelper (>= 4.0.0), cdbs Standards-Version: 3.6.2.0 -- cgit v1.2.3 From 2c2d674d922cc0dbc762e96948f741f319fa88fb Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 20 Sep 2005 14:59:24 +0200 Subject: fix bb path --- debian/changelog | 3 +++ mkinitramfs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d497980..30d3c79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,6 +16,9 @@ initramfs-tools (0.27) unstable; urgency=low * update-initramfs.8 New file install it. + * The debian busybox-cvs-static installs into /bin/busybox: + fix pathes vis-à-vis ubuntu version. + -- maximilian attems Tue, 20 Sep 2005 13:52:00 +0200 initramfs-tools (0.26) breezy; urgency=low diff --git a/mkinitramfs b/mkinitramfs index 8257b7f..b8a591a 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -134,9 +134,9 @@ copy_exec /sbin/udevstart /sbin # Busybox rm ${DESTDIR}/bin/sh -ln -s /usr/lib/initramfs-tools/bin/busybox ${DESTDIR}/bin/sh +ln -s /bin/busybox ${DESTDIR}/bin/sh # This is ugly, but needed atm to make the builtins work =( -ln -s /usr/lib/initramfs-tools/bin/busybox ${DESTDIR}/bin/busybox +ln -s /bin/busybox ${DESTDIR}/bin/busybox # Modutils copy_exec /sbin/modprobe /sbin -- cgit v1.2.3 From 14739b596ae27800ae6ce071745cf2da382d73b4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 20 Sep 2005 15:09:16 +0200 Subject: use BUSYBOXDIR variable --- debian/changelog | 2 +- mkinitramfs | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 30d3c79..4591d65 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,7 +17,7 @@ initramfs-tools (0.27) unstable; urgency=low * update-initramfs.8 New file install it. * The debian busybox-cvs-static installs into /bin/busybox: - fix pathes vis-à-vis ubuntu version. + fix pathes vis-à-vis ubuntu version. make that a variable on top. -- maximilian attems Tue, 20 Sep 2005 13:52:00 +0200 diff --git a/mkinitramfs b/mkinitramfs index b8a591a..3866a76 100644 --- a/mkinitramfs +++ b/mkinitramfs @@ -7,6 +7,8 @@ keep="n" CONFDIR="/etc/mkinitramfs" verbose="n" errors_to="2>/dev/null" +# BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" +BUSYBOXDIR="/bin" while getopts "d:ko:r:" flag; do case $flag in @@ -134,9 +136,9 @@ copy_exec /sbin/udevstart /sbin # Busybox rm ${DESTDIR}/bin/sh -ln -s /bin/busybox ${DESTDIR}/bin/sh +ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh # This is ugly, but needed atm to make the builtins work =( -ln -s /bin/busybox ${DESTDIR}/bin/busybox +ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox # Modutils copy_exec /sbin/modprobe /sbin -- cgit v1.2.3 From a893fa82665ee472079292eb84a125ef81009124 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 1 Oct 2005 02:33:30 +0200 Subject: apply all the 0.30 upstream changes. --- HACKING | 19 +++++++++++++++++++ debian/changelog | 41 ++++++++++++++++++++++++++++++++++++++++- debian/initramfs-tools.docs | 1 + debian/rules | 4 ++++ hook-functions | 2 +- init | 11 +++++++++-- scripts/functions | 19 ++++++++++++++++--- scripts/local-premount/suspend | 2 +- update-initramfs | 4 ++-- 9 files changed, 93 insertions(+), 10 deletions(-) create mode 100644 HACKING create mode 100644 debian/initramfs-tools.docs (limited to 'debian') diff --git a/HACKING b/HACKING new file mode 100644 index 0000000..2fd9136 --- /dev/null +++ b/HACKING @@ -0,0 +1,19 @@ +> I am not sure how to modify mkinitramfs to do this automatically, maybe you know? + +I need to document this more clearly, but the initramfs-tools have a collection of hooks that will solve your problem. While there's no way that Breezy could do this in the install, we could certainly include the scripts in the package (Especially if you're willing to test them to make sure they work! *g*) + +There are two phases that need to be accounted for. The first is the install phase for generating the initramfs, the second is run-time phase for actually doing the needed magic. + +To install the components you need, look at the scripts in /usr/share/initramfs-tools/hooks. evms and acpid are good choices. You can see a bunch of header stuff at the top that basically guarantees that things are run in the right order if they need to be. Two functions that will interest you: + +copy_exec copies a binary and any libraries it depends on +manual_add_modules takes bareword module names (like fan, thermal, etc) and installs those modules and any of their dependancies into the initramfs. + +The runtime phase is handled by scripts in /usr/share/initramfs-tools/scripts/ you probably want to start up at about the same point as lvm, md, and evms do, so local-top is a good directory to look in. +You can see the same sort of magic at the top of the script, although lvm and evms each require that md run first. + +I hope this helps. I'll paste this text into a HACKING file on the hopes that someone will see fit to improve it. That person will probably be me, mind you... =) + +Tks, +Jeff Bailey + diff --git a/debian/changelog b/debian/changelog index 4591d65..1ea455b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,42 @@ +initramfs-tools (0.30) unstable; urgency=low + + Apparition Octobre Rouge + + [ maximilian Attems ] + + * Resynconise with latest upstream now we are in unstable. + + [ Jeff Bailey ] + * debian/rules: Make sure hooks and scripts are chmod +x + + * hook-functions (auto_add_modules): Add advansys. + + * debian/init: Add "Loading, please wait..." message. + Don't log for init-top scripts to avoid usplash noise. + + * init: Add start of debug command line option. + + * scripts/functions (log_begin_msg): Call usplash if available + (log_end_msg): Call usplash if available + (panic): Close usplash if available + + * scripts/functions (load_modules): Quote resume variable. + Thanks to Christian Kellner for helping test that! + + * scripts/local-premount/suspend: Quote resume variable. + + * update-initramfs: Use basename on the link target to get the + version number. + + * HACKING: Start of some notes on how this package actually works. + * debian/initramfs-tools.docs: Install it. + + [ Matthew Garrett ] + * scripts/functions (load_modules): Run udevstart after loading block + drivers should fix resume from hibernate on non-LVM systems. + + -- maximilian attems Fri, 30 Sep 2005 19:34:55 +0200 + initramfs-tools (0.27) unstable; urgency=low * Remove unused BUSYBOX config option as we use busybox anyway. @@ -17,7 +56,7 @@ initramfs-tools (0.27) unstable; urgency=low * update-initramfs.8 New file install it. * The debian busybox-cvs-static installs into /bin/busybox: - fix pathes vis-à-vis ubuntu version. make that a variable on top. + fix pathes vis-a-vis ubuntu version. make that a variable on top. -- maximilian attems Tue, 20 Sep 2005 13:52:00 +0200 diff --git a/debian/initramfs-tools.docs b/debian/initramfs-tools.docs new file mode 100644 index 0000000..5c374b1 --- /dev/null +++ b/debian/initramfs-tools.docs @@ -0,0 +1 @@ +HACKING diff --git a/debian/rules b/debian/rules index 6b91c1f..2a5ae55 100644 --- a/debian/rules +++ b/debian/rules @@ -4,3 +4,7 @@ include /usr/share/cdbs/1/rules/debhelper.mk pre-build:: chmod +x init mkinitramfs + chmod +x hooks/* + for x in `find scripts/ -maxdepth 1 -type d | tail -n+2`; do \ + chmod -R +x $$x; \ + done diff --git a/hook-functions b/hook-functions index 4371962..bc21b5f 100644 --- a/hook-functions +++ b/hook-functions @@ -144,7 +144,7 @@ auto_add_modules() done # scsi - for x in 3w-9xxx 3w-xxxx a100u2x aacraid ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do manual_add_modules ${x} done diff --git a/init b/init index 6bf4be7..4193dcd 100644 --- a/init +++ b/init @@ -1,5 +1,7 @@ #!/bin/sh +echo "Loading, please wait..." + mkdir /sys mkdir /proc mkdir /tmp @@ -22,6 +24,7 @@ export readonly=y export ROOT= export resume=${RESUME} export rootmnt=/root +export debug= for x in $(cat /proc/cmdline); do case $x in init=*) @@ -48,15 +51,19 @@ for x in $(cat /proc/cmdline); do rw) readonly=n ;; + debug) + debug=y + exec >/tmp/initramfs.debug 2>&1 + set -x + ;; break) break=yes ;; esac done -log_begin_msg "Running /scripts/init-top" +# Don't do log messages here to avoid confusing usplash run_scripts /scripts/init-top -log_end_msg . /scripts/${BOOT} diff --git a/scripts/functions b/scripts/functions index 148dda7..de2268c 100644 --- a/scripts/functions +++ b/scripts/functions @@ -23,12 +23,18 @@ log_warning_msg() log_begin_msg() { - _log_msg "Begin: $@ ..." + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TEXT $@" + fi + _log_msg "Begin: $@ ..." } log_end_msg() { - _log_msg "Done." + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "SUCCESS ok" + fi + _log_msg "Done." } # update_progress() # ToDo: NOP placeholder... what else for usplash? @@ -38,6 +44,9 @@ log_end_msg() panic() { + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "QUIT" + fi echo $@ FS1='(initramfs) ' exec /bin/sh /dev/console 2>&1 } @@ -228,8 +237,12 @@ load_modules() i2o_boot_events + # FIXME - need to start LVM here + + udevstart + if [ -e /sys/power/resume ]; then - if [ -e ${resume} ]; then + if [ -e "${resume}" ]; then major=$((0x$(stat -c%t ${resume}))) minor=$((0x$(stat -c%T ${resume}))) echo ${major}:${minor} >/sys/power/resume diff --git a/scripts/local-premount/suspend b/scripts/local-premount/suspend index 5791123..6aab596 100644 --- a/scripts/local-premount/suspend +++ b/scripts/local-premount/suspend @@ -19,7 +19,7 @@ if [ "x${resume}" = "x" ]; then exit fi -if [ ! -e ${resume} ]; then +if [ ! -e "${resume}" ]; then exit fi diff --git a/update-initramfs b/update-initramfs index f93fc97..bd5a4ab 100644 --- a/update-initramfs +++ b/update-initramfs @@ -115,11 +115,11 @@ get_sorted_versions() set_linked_version() { if [ -L /initrd.img ]; then - linktarget=$(readlink /initrd.img) + linktarget=$(basename $(readlink /initrd.img)) fi if [ -L /boot/initrd.img ]; then - linktarget=$(readlink /boot/initrd.img) + linktarget=$(basename $(readlink /boot/initrd.img)) fi if [ -z "${linktarget}" ]; then -- cgit v1.2.3 From 402fc00b3d7c55532f6e7408d6245783b909bd77 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 18:11:52 +0200 Subject: new repo format v6 --- debian/rules | 0 hooks/acpid | 0 hooks/evms | 0 hooks/kernelextras | 0 hooks/udev | 0 init | 0 mkinitramfs | 0 scripts/init-premount/acpid | 0 scripts/local-premount/suspend | 0 scripts/local-top/evms | 0 scripts/local-top/lvm | 0 scripts/local-top/md | 0 12 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 debian/rules mode change 100644 => 100755 hooks/acpid mode change 100644 => 100755 hooks/evms mode change 100644 => 100755 hooks/kernelextras mode change 100644 => 100755 hooks/udev mode change 100644 => 100755 init mode change 100644 => 100755 mkinitramfs mode change 100644 => 100755 scripts/init-premount/acpid mode change 100644 => 100755 scripts/local-premount/suspend mode change 100644 => 100755 scripts/local-top/evms mode change 100644 => 100755 scripts/local-top/lvm mode change 100644 => 100755 scripts/local-top/md (limited to 'debian') diff --git a/debian/rules b/debian/rules old mode 100644 new mode 100755 diff --git a/hooks/acpid b/hooks/acpid old mode 100644 new mode 100755 diff --git a/hooks/evms b/hooks/evms old mode 100644 new mode 100755 diff --git a/hooks/kernelextras b/hooks/kernelextras old mode 100644 new mode 100755 diff --git a/hooks/udev b/hooks/udev old mode 100644 new mode 100755 diff --git a/init b/init old mode 100644 new mode 100755 diff --git a/mkinitramfs b/mkinitramfs old mode 100644 new mode 100755 diff --git a/scripts/init-premount/acpid b/scripts/init-premount/acpid old mode 100644 new mode 100755 diff --git a/scripts/local-premount/suspend b/scripts/local-premount/suspend old mode 100644 new mode 100755 diff --git a/scripts/local-top/evms b/scripts/local-top/evms old mode 100644 new mode 100755 diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm old mode 100644 new mode 100755 diff --git a/scripts/local-top/md b/scripts/local-top/md old mode 100644 new mode 100755 -- cgit v1.2.3 From 60417290f1be20067c64431a5249cafe8a9bbc51 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 18:13:32 +0200 Subject: fix the wrong busybox depend, was a bad fix as it needs consequent fixes --- debian/changelog | 9 +++++++++ debian/control | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1ea455b..a44d9a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +initramfs-tools (0.31) unstable; urgency=low + + Quick fix for sluggish dep + + [ Bastian Blank ] + * Use new busybox. (closes: #333755) + + -- maximilian attems Mon, 17 Oct 2005 16:27:31 +0200 + initramfs-tools (0.30) unstable; urgency=low Apparition Octobre Rouge diff --git a/debian/control b/debian/control index c2610db..6dcbbec 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox-cvs-static (>= 20040623-1), cpio, mdadm, lvm2 (>= 2.01.04-5), udev +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev 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 -- cgit v1.2.3 From 347d6ecf62c2b0ce237deb38e7e80988b90fc078 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 18:24:58 +0200 Subject: waldi fixes for newer busybox --- debian/changelog | 13 +++++++++++++ debian/control | 2 +- hook-functions | 30 ------------------------------ hooks/evms | 4 ++-- mkinitramfs | 39 +++++++++++++++++++++------------------ 5 files changed, 37 insertions(+), 51 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a44d9a6..600d835 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +initramfs-tools (0.31) UNRELEASED; urgency=low + + [ Bastian Blank ] + * debian/control: Add mklibs-copy as dependency. + * hook-functions use mklibs-copy: Remove copy_exec. + * hooks/evms: Use cp instead of copy_exec. + * mkinitramfs + - Use cp instead of copy_exec. + - Call mklibs-copy to collect necessary libs. + + + -- Bastian Blank Mon, 10 Oct 2005 18:27:12 +0000 + initramfs-tools (0.31) unstable; urgency=low Quick fix for sluggish dep diff --git a/debian/control b/debian/control index 6dcbbec..68874cf 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev, mklibs-copy 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 diff --git a/hook-functions b/hook-functions index bc21b5f..24be12c 100644 --- a/hook-functions +++ b/hook-functions @@ -51,36 +51,6 @@ manual_add_modules() done } -# $1 is source -# $2 is relative destination -copy_exec() { - ln -s ${1} ${DESTDIR}/${2} - - # Copy the dependant libraries - for x in $(ldd ${1} 2>/dev/null | sed -e ' - /\//!d; - /linux-gate/d; - /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; - s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do - - # Try to use non-optimised libraries where possible. - # We assume that all HWCAP libraries will be in tls. - nonoptlib=$(echo ${x} | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#') - - if [ -e ${nonoptlib} ]; then - x=${nonoptlib} - fi - - libname=$(basename ${x}) - dirname=$(dirname ${x}) - - mkdir -p ${DESTDIR}/${dirname} - if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then - ln -s ${x} ${DESTDIR}/${dirname} - fi - done -} - # Copy entire subtrees to the initramfs copy_modules_dir() { diff --git a/hooks/evms b/hooks/evms index 0981672..456feac 100755 --- a/hooks/evms +++ b/hooks/evms @@ -20,12 +20,12 @@ if [ ! -x /sbin/evms_activate ]; then exit 0 fi -copy_exec /sbin/evms_activate /sbin +cp /sbin/evms_activate ${DESTDIR}/sbin EVMS_VERSION=$(/usr/sbin/evms_query info | grep "EVMS Version" | awk '{ print $3; }') mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION} for x in disk lvm2 dos multipath; do - copy_exec /lib/evms/${EVMS_VERSION}/${x}* /lib/evms/${EVMS_VERSION} + cp /lib/evms/${EVMS_VERSION}/${x}* ${DESTDIR}/lib/evms/${EVMS_VERSION} done diff --git a/mkinitramfs b/mkinitramfs index 3866a76..7e9481a 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -117,9 +117,7 @@ fi # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. -ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin -ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib -copy_exec /usr/share/initramfs-tools/init /init +cp /usr/share/initramfs-tools/init ${DESTDIR}/init cp -a /usr/share/initramfs-tools/scripts/* ${DESTDIR}/scripts for f in $(cd /etc/mkinitramfs/scripts && \ find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \ @@ -127,39 +125,44 @@ for f in $(cd /etc/mkinitramfs/scripts && \ mkdir --parents ${DESTDIR}/scripts/$(dirname ${f}) cp -p /etc/mkinitramfs/scripts/${f} ${DESTDIR}/scripts/$(dirname ${f}) done -copy_exec ${CONFDIR}/initramfs.conf /conf +cp ${CONFDIR}/initramfs.conf ${DESTDIR}/conf cp -a /etc/udev ${DESTDIR}/etc # Hack until udev is built with klibc -copy_exec /sbin/udev /sbin -copy_exec /sbin/udevstart /sbin +cp /sbin/udev ${DESTDIR}/sbin +cp /sbin/udevstart ${DESTDIR}/sbin # Busybox -rm ${DESTDIR}/bin/sh -ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh -# This is ugly, but needed atm to make the builtins work =( -ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox +cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox # Modutils -copy_exec /sbin/modprobe /sbin -copy_exec /sbin/depmod /sbin -copy_exec /sbin/rmmod /sbin +cp /sbin/modprobe ${DESTDIR}/sbin +cp /sbin/depmod ${DESTDIR}/sbin +cp /sbin/rmmod ${DESTDIR}/sbin mkdir -p ${DESTDIR}/etc/modprobe.d -copy_exec /etc/modprobe.d/aliases /etc/modprobe.d +cp /etc/modprobe.d/aliases ${DESTDIR}/etc/modprobe.d # Raid -copy_exec /sbin/mdadm /sbin -copy_exec /sbin/mdrun /sbin +cp /sbin/mdadm ${DESTDIR}/sbin +cp /sbin/mdrun ${DESTDIR}/sbin # LVM -copy_exec /lib/lvm-200/vgchange /sbin +cp /lib/lvm-200/vgchange ${DESTDIR}/sbin + +mklibs-small -d ${DESTDIR}/lib --root=${DESTDIR} $(find ${DESTDIR} -type f -perm +0111 -o -name '*.so') + +ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin +ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib + +rm ${DESTDIR}/bin/sh +ln -s busybox ${DESTDIR}/bin/sh run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks # Apply DSDT to initramfs if [ -e ${CONFDIR}/DSDT.aml ]; then - copy_exec ${CONFDIR}/DSDT.aml / + cp ${CONFDIR}/DSDT.aml ${DESTDIR} fi (cd ${DESTDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) -- cgit v1.2.3 From b96ed45312562bbfc976ce0c6cf32b7e704f1e2f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 18:33:03 +0200 Subject: waldi udev fixes --- debian/changelog | 15 ++++++++++++++- init | 16 ++++++++++++---- mkinitramfs | 6 ++++-- scripts/functions | 22 ---------------------- 4 files changed, 30 insertions(+), 29 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 600d835..832a67d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,20 @@ initramfs-tools (0.31) UNRELEASED; urgency=low * mkinitramfs - Use cp instead of copy_exec. - Call mklibs-copy to collect necessary libs. - + * Use udevsynthesize. + * Add hotplug agents. + + * init udev fixes + - Start and kill udevd. + - Create /dev/.udevdb. + - Use udevsynthesize. + - Call depmod. + * mkinitramfs udev fixes + - Install udevd and udevsynthesize instead of udevstart. + - Install hotplug agents. + * scripts/functions (load_modules) + - Don't call depmod and udevstart. + - Don't crawl pci devices ourself. -- Bastian Blank Mon, 10 Oct 2005 18:27:12 +0000 diff --git a/init b/init index 4193dcd..113a224 100755 --- a/init +++ b/init @@ -67,15 +67,21 @@ run_scripts /scripts/init-top . /scripts/${BOOT} +depmod -a + +# Populate /dev tree +log_begin_msg "Initializing /dev" +mkdir /dev/.udevdb +UDEVD_EXPECTED_SEQNUM=$(($(cat /sys/kernel/hotplug_seqnum) + 1)) udevd --daemon +udevsynthesize +sleep 2 +log_end_msg + log_begin_msg "Loading modules" load_modules log_end_msg -# Populate /dev tree -log_begin_msg "Initializing /dev" parse_numeric ${ROOT} -udevstart -log_end_msg if [ x${break} = xyes ]; then panic "Spawning shell within the initramfs" @@ -85,6 +91,8 @@ log_begin_msg "Running /scripts/init-premount" run_scripts /scripts/init-premount log_end_msg +killall udevd + log_begin_msg "Mounting root file system" mountroot log_end_msg diff --git a/mkinitramfs b/mkinitramfs index 6ff9320..e870489 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -128,9 +128,11 @@ done cp ${CONFDIR}/initramfs.conf ${DESTDIR}/conf cp -a /etc/udev ${DESTDIR}/etc -# Hack until udev is built with klibc +# udev cp /sbin/udev ${DESTDIR}/sbin -cp /sbin/udevstart ${DESTDIR}/sbin +cp /sbin/udevd ${DESTDIR}/sbin +cp /sbin/udevsynthesize ${DESTDIR}/sbin +cp -a /lib/hotplug ${DESTDIR}/lib # Busybox cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox diff --git a/scripts/functions b/scripts/functions index de2268c..68cfcea 100644 --- a/scripts/functions +++ b/scripts/functions @@ -203,8 +203,6 @@ i2o_boot_events() load_modules() { - depmod -a - # Load custom modules first if [ -e /conf/modules ]; then cat /conf/modules | while read m; do @@ -219,18 +217,6 @@ load_modules() done fi - for x in /sys/bus/pci/devices/*; do - if [ -e ${x}/class ]; then - case $(cat ${x}/class) in - 0x0100*|0x0101*) - if [ -e ${x}/modalias ]; then - modprobe -q $(cat ${x}/modalias) - fi - ;; - esac - fi - done - ide_boot_events scsi_boot_events @@ -239,8 +225,6 @@ load_modules() # FIXME - need to start LVM here - udevstart - if [ -e /sys/power/resume ]; then if [ -e "${resume}" ]; then major=$((0x$(stat -c%t ${resume}))) @@ -249,12 +233,6 @@ load_modules() fi fi - for x in /sys/bus/pci/devices/*; do - if [ -e ${x}/modalias ]; then - modprobe -q $(cat ${x}/modalias) - fi - done - # Give the USB bus a moment to catch up sleep 2 -- cgit v1.2.3 From 762c80e985a461a6d37f395696204184ec1f1d64 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 18:35:08 +0200 Subject: waldi: add ibmvscsic module --- debian/changelog | 2 ++ hook-functions | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 832a67d..7288dcf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,8 @@ initramfs-tools (0.31) UNRELEASED; urgency=low - Don't call depmod and udevstart. - Don't crawl pci devices ourself. + * hook-functions: Add ibmvscsic to list of scsi modules. + -- Bastian Blank Mon, 10 Oct 2005 18:27:12 +0000 initramfs-tools (0.31) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 24be12c..c06d3e9 100644 --- a/hook-functions +++ b/hook-functions @@ -114,7 +114,7 @@ auto_add_modules() done # scsi - for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do manual_add_modules ${x} done -- cgit v1.2.3 From bee1355e2c21a86751648b6f0df8a6e4e4e5a45d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 18:38:32 +0200 Subject: added latest upstream fixes :-) --- debian/changelog | 19 ++++++++++++++++++- hook-functions | 4 ++-- init | 4 ++-- scripts/local | 12 ++++++------ scripts/nfs | 18 +++++++++++------- 5 files changed, 39 insertions(+), 18 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7288dcf..00643e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,7 +24,24 @@ initramfs-tools (0.31) UNRELEASED; urgency=low * hook-functions: Add ibmvscsic to list of scsi modules. - -- Bastian Blank Mon, 10 Oct 2005 18:27:12 +0000 + [ maximilian attems ] + * Resynchronise with latest upstream release. + + [ Jeff Bailey ] + * scripts/nfs (mountroot): New variable: NFSOPTS, default to + -o retranfs=10. (Ubuntu 12942) + This can be overridden in the initramfs.conf file. + Thanks to Oliver Grawert for testing this! + + * hook-scripts (auto_add_modules): Add jfs + (dep_add_modules): Ditto. (Ubuntu #16742) + Thanks to Colin Watson for this fix! + + [ Adam Conrad ] + * Make us a bit more silent/tidy by default, unless "quiet" isn't on + the kernel's command line (then we're just as verbose as ever) + + -- maximilian attems Sun, 16 Oct 2005 19:22:55 +0200 initramfs-tools (0.31) unstable; urgency=low diff --git a/hook-functions b/hook-functions index c06d3e9..cb424d4 100644 --- a/hook-functions +++ b/hook-functions @@ -63,7 +63,7 @@ dep_add_modules() { # Things that are too hard to autodetect. - for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs nfs reiserfs xfs af_packet dm_mod; do + for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do manual_add_modules ${x} done @@ -99,7 +99,7 @@ dep_add_modules() auto_add_modules() { # base - for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs nfs reiserfs xfs af_packet dm_mod; do + for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do manual_add_modules ${x} done diff --git a/init b/init index 113a224..18d31ad 100755 --- a/init +++ b/init @@ -97,9 +97,9 @@ log_begin_msg "Mounting root file system" mountroot log_end_msg -log_begin_msg "Running /scripts/init-bottom" +[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom" run_scripts /scripts/init-bottom -log_end_msg +[ "$quiet" != "y" ] && log_end_msg # Move our /dev to the real filesystem. Do the setup that udev otherwise # would. diff --git a/scripts/local b/scripts/local index 539a2a4..aa2cbfb 100644 --- a/scripts/local +++ b/scripts/local @@ -3,9 +3,9 @@ # Parameter: Where to mount the filesystem mountroot () { - log_begin_msg "Running /scripts/local-top" + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-top" run_scripts /scripts/local-top - log_end_msg + [ "$quiet" != "y" ] && log_end_msg # Get the root filesystem type if [ ! -e "${ROOT}" ]; then @@ -14,9 +14,9 @@ mountroot () eval $(fstype < ${ROOT}) - log_begin_msg "Running /scripts/local-premount" + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" run_scripts /scripts/local-premount - log_end_msg + [ "$quiet" != "y" ] && log_end_msg if [ ${readonly} = y ]; then roflag=-r @@ -31,7 +31,7 @@ mountroot () # Mount root mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt} - log_begin_msg "Running /scripts/log-bottom" + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/log-bottom" run_scripts /scripts/local-bottom - log_end_msg + [ "$quiet" != "y" ] && log_end_msg } diff --git a/scripts/nfs b/scripts/nfs index 10f8f1d..7166b08 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -5,9 +5,9 @@ # Paramter: Where the root should be mounted mountroot () { - log_begin_msg "Running /scripts/nfs-top" + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-top" run_scripts /scripts/nfs-top - log_end_msg + [ "$quiet" != "y" ] && log_end_msg modprobe nfs # For DHCP @@ -19,9 +19,13 @@ mountroot () NFSROOT=${ROOTSERVER}:${ROOTPATH} fi - log_begin_msg "Running /scripts/nfs-premount" + if [ "x${NFSOPTS}" = "x" ]; then + NFSOPTS="-o retrans=10" + fi + + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-premount" run_scripts /scripts/nfs-premount - log_end_msg + [ "$quiet" != "y" ] && log_end_msg if [ ${readonly} = y ]; then roflag="-o ro" @@ -30,10 +34,10 @@ mountroot () fi sleep 3 - nfsmount ${roflag} ${NFSROOT} ${rootmnt} + nfsmount ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt} - log_begin_msg "Running /scripts/nfs-bottom" + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom" run_scripts /scripts/nfs-bottom - log_end_msg + [ "$quiet" != "y" ] && log_end_msg } -- cgit v1.2.3 From 46727679e6e5bfdb67268511dc7a91a7a828abd7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 18:50:53 +0200 Subject: jonas: use gnu getopt instead of getopts --- debian/changelog | 5 ++++- mkinitramfs | 40 ++++++++++++++++++++++++++++++---------- 2 files changed, 34 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 00643e0..4b75eec 100644 --- a/debian/changelog +++ b/debian/changelog @@ -41,7 +41,10 @@ initramfs-tools (0.31) UNRELEASED; urgency=low * Make us a bit more silent/tidy by default, unless "quiet" isn't on the kernel's command line (then we're just as verbose as ever) - -- maximilian attems Sun, 16 Oct 2005 19:22:55 +0200 + [ Jonas Smedegaard ] + * Use GNU getopt (instead of bash builtin getopts) for improved handling. + + -- Jonas Smedegaard Tue, 18 Oct 2005 04:03:48 +0200 initramfs-tools (0.31) unstable; urgency=low diff --git a/mkinitramfs b/mkinitramfs index e870489..bcf640b 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -10,27 +10,47 @@ errors_to="2>/dev/null" # BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" BUSYBOXDIR="/bin" -while getopts "d:ko:r:" flag; do - case $flag in - d) - CONFDIR="${OPTAGS}" +OPTIONS=`getopt -o d:ko:r: -n "$0" -- "$@"` + +# Check for non-GNU getopt +if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi + +eval set -- "$OPTIONS" + +while true; do + case "$1" in + -d) + CONFDIR="$2" + shift 2 if [ ! d "${CONFDIR}" ]; then echo "${0}: ${CONFDIR}: Not a directory" >&2 exit 1 fi ;; - o) - touch ${OPTARG} - outfile="$(readlink -f ${OPTARG})" + -o) + touch $2 + shift $2 + outfile="$(readlink -f $2)" ;; - k) + -k) keep="y" + shift + ;; + -r) + # ignore (FIXME: manpage says differently?!?) + shift 2 + ;; + --) + shift + break + ;; + *) + echo "Internal error!" >&2 + exit 1 ;; esac done -shift $((${OPTIND} - 1)) - # For dependency ordered mkinitramfs hook scripts. . /usr/share/initramfs-tools/scripts/functions . /usr/share/initramfs-tools/hook-functions -- cgit v1.2.3 From bbf15576550507c54b3e190ae6eac63ca070e333 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 19:07:51 +0200 Subject: jonas: Quote variables. Use test options -n and -z. --- debian/changelog | 4 ++- hook-functions | 40 ++++++++++++------------ mkinitramfs | 92 ++++++++++++++++++++++++++++---------------------------- update-initramfs | 28 ++++++++--------- 4 files changed, 83 insertions(+), 81 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4b75eec..96efc42 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,8 +43,10 @@ initramfs-tools (0.31) UNRELEASED; urgency=low [ Jonas Smedegaard ] * Use GNU getopt (instead of bash builtin getopts) for improved handling. + * Quote variables. + * Use test options -n and -z. - -- Jonas Smedegaard Tue, 18 Oct 2005 04:03:48 +0200 + -- Jonas Smedegaard Tue, 18 Oct 2005 04:16:30 +0200 initramfs-tools (0.31) unstable; urgency=low diff --git a/hook-functions b/hook-functions index cb424d4..32a7e5f 100644 --- a/hook-functions +++ b/hook-functions @@ -7,13 +7,13 @@ catenate_cpiogz() { return fi - cat "${1}" >>${__TMPCPIOGZ} + cat "${1}" >>"${__TMPCPIOGZ}" } force_load() { manual_add_modules ${@} - echo ${@} >>${DESTDIR}/conf/modules + echo ${@} >>"${DESTDIR}/conf/modules" } # Takes a file containing a list of modules to be added as an @@ -34,7 +34,7 @@ add_modules_from_file() fi sed -e '/^#/d' ${1} | while read module rest; do - force_load ${module} "${rest}" + force_load "${module}" "${rest}" done } @@ -42,21 +42,21 @@ manual_add_modules() { for mam_x in $(modprobe --set-version=${version} --show-depends ${1} 2>/dev/null | awk '{ print $2 }'); do # Prune duplicates - if [ -e ${DESTDIR}/${mam_x} ]; then + if [ -e "${DESTDIR}/${mam_x}" ]; then continue fi - mkdir -p ${DESTDIR}/$(dirname ${mam_x}) - ln -s ${mam_x} ${DESTDIR}/$(dirname ${mam_x}) + mkdir -p "${DESTDIR}/$(dirname "${mam_x}")" + ln -s "${mam_x}" "${DESTDIR}/$(dirname "${mam_x}")" done } # Copy entire subtrees to the initramfs copy_modules_dir() { - tmpdir_modbase=${DESTDIR}/lib/modules/${version} - mkdir -p $(dirname ${tmpdir_modbase}/${1}) - cp -a ${MODULESDIR}/${1} ${tmpdir_modbase}/${1} + tmpdir_modbase="${DESTDIR}/lib/modules/${version}" + mkdir -p "$(dirname "${tmpdir_modbase}/${1}")" + cp -a "${MODULESDIR}/${1}" "${tmpdir_modbase}/${1}" } dep_add_modules() @@ -64,24 +64,24 @@ dep_add_modules() # Things that are too hard to autodetect. for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do - manual_add_modules ${x} + manual_add_modules "${x}" done for x in /sys/bus/pci/devices/*; do - if [ -e ${x}/modalias ]; then - manual_add_modules $(cat ${x}/modalias) + if [ -e "${x}/modalias" ]; then + manual_add_modules $(cat "${x}/modalias") fi done for x in /sys/bus/usb/devices/*; do - if [ -e ${x}/modalias ]; then - manual_add_modules $(cat ${x}/modalias) + if [ -e "${x}/modalias" ]; then + manual_add_modules $(cat "${x}/modalias") fi done if [ -e /proc/ide ]; then for x in ide-generic ide-disk ide-cd; do - manual_add_modules ${x} + manual_add_modules "${x}" done fi @@ -100,27 +100,27 @@ auto_add_modules() { # base for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do - manual_add_modules ${x} + manual_add_modules "${x}" done # Ethernet 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 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 - manual_add_modules ${x} + manual_add_modules "${x}" done # ide for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 opti621 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do - manual_add_modules ${x} + manual_add_modules "${x}" done # scsi for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do - manual_add_modules ${x} + manual_add_modules "${x}" done # i2o for x in i2o_block; do - manual_add_modules ${x} + manual_add_modules "${x}" done } diff --git a/mkinitramfs b/mkinitramfs index bcf640b..874d2ce 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -30,7 +30,7 @@ while true; do -o) touch $2 shift $2 - outfile="$(readlink -f $2)" + outfile="$(readlink -f "$2")" ;; -k) keep="y" @@ -55,17 +55,17 @@ done . /usr/share/initramfs-tools/scripts/functions . /usr/share/initramfs-tools/hook-functions -. ${CONFDIR}/initramfs.conf +. "${CONFDIR}/initramfs.conf" -if [ x${outfile} = x ]; then +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 if [ ${#} -ne 1 ]; then - version=$(uname -r) -else + version="$(uname -r)" +else version="${1}" fi @@ -74,36 +74,36 @@ if dpkg --compare-versions "${version}" lt 2.6.12; then exit 1 fi -case ${version} in +case "${version}" in /lib/modules/*/[!/]*) ;; /lib/modules/[!/]*) - version=${version#/lib/modules/} - version=${version%%/*} + version="${version#/lib/modules/}" + version="${version%%/*}" ;; esac -case ${version} in +case "${version}" in */*) - echo $PROG: ${version} is not a valid kernel version >&2 + echo "$PROG: ${version} is not a valid kernel version" >&2 exit 1 ;; esac -if [ -d ${outfile} ]; then +if [ -d "${outfile}" ]; then echo "${outfile} is a directory" exit 1 fi MODULESDIR="/lib/modules/${version}" -if [ ! -e ${MODULESDIR} ]; then +if [ ! -e "${MODULESDIR}" ]; then echo "Cannot find ${MODULESDIR}" exit 1 fi -DESTDIR=$(mktemp -t -d mkinitramfs_XXXXXX) || exit 1 -__TMPCPIOGZ=$(mktemp -t mkinitramfs-OL_XXXXXX) || exit 1 +DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1 +__TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1 # Export environment for hook scripts. # @@ -116,13 +116,13 @@ export DESTDIR export __TMPCPIOGZ for d in bin conf etc lib modules sbin scripts; do - mkdir -p ${DESTDIR}/${d} + mkdir -p "${DESTDIR}/${d}" done # MODULES=list case. Always honour. -for x in ${CONFDIR}/modules /usr/share/initramfs-tools/modules.d/*; do +for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do if [ -f "${x}" ]; then - add_modules_from_file ${x} + add_modules_from_file "${x}" fi done @@ -137,60 +137,60 @@ fi # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. -cp /usr/share/initramfs-tools/init ${DESTDIR}/init -cp -a /usr/share/initramfs-tools/scripts/* ${DESTDIR}/scripts +cp /usr/share/initramfs-tools/init "${DESTDIR}/init" +cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts" for f in $(cd /etc/mkinitramfs/scripts && \ find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \ -o -type f -print); do - mkdir --parents ${DESTDIR}/scripts/$(dirname ${f}) -cp -p /etc/mkinitramfs/scripts/${f} ${DESTDIR}/scripts/$(dirname ${f}) + mkdir --parents "${DESTDIR}/scripts/$(dirname "${f}")" +cp -p "/etc/mkinitramfs/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" done -cp ${CONFDIR}/initramfs.conf ${DESTDIR}/conf -cp -a /etc/udev ${DESTDIR}/etc +cp "${CONFDIR}/initramfs.conf" "${DESTDIR}/conf" +cp -a /etc/udev "${DESTDIR}/etc" # udev -cp /sbin/udev ${DESTDIR}/sbin -cp /sbin/udevd ${DESTDIR}/sbin -cp /sbin/udevsynthesize ${DESTDIR}/sbin -cp -a /lib/hotplug ${DESTDIR}/lib +cp /sbin/udev "${DESTDIR}/sbin" +cp /sbin/udevd "${DESTDIR}/sbin" +cp /sbin/udevsynthesize "${DESTDIR}/sbin" +cp -a /lib/hotplug "${DESTDIR}/lib" # Busybox -cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox +cp "${BUSYBOXDIR}/busybox" "${DESTDIR}/bin/busybox" # Modutils -cp /sbin/modprobe ${DESTDIR}/sbin -cp /sbin/depmod ${DESTDIR}/sbin -cp /sbin/rmmod ${DESTDIR}/sbin -mkdir -p ${DESTDIR}/etc/modprobe.d -cp /etc/modprobe.d/aliases ${DESTDIR}/etc/modprobe.d +cp /sbin/modprobe "${DESTDIR}/sbin" +cp /sbin/depmod "${DESTDIR}/sbin" +cp /sbin/rmmod "${DESTDIR}/sbin" +mkdir -p "${DESTDIR}/etc/modprobe.d" +cp /etc/modprobe.d/aliases "${DESTDIR}/etc/modprobe.d" # Raid -cp /sbin/mdadm ${DESTDIR}/sbin -cp /sbin/mdrun ${DESTDIR}/sbin +cp /sbin/mdadm "${DESTDIR}/sbin" +cp /sbin/mdrun "${DESTDIR}/sbin" # LVM -cp /lib/lvm-200/vgchange ${DESTDIR}/sbin +cp /lib/lvm-200/vgchange "${DESTDIR}/sbin" -mklibs-copy -d ${DESTDIR}/lib --root=${DESTDIR} $(find ${DESTDIR} -type f -perm +0111 -o -name '*.so') +mklibs-copy -d "${DESTDIR}/lib" --root="${DESTDIR}" $(find "${DESTDIR}" -type f -perm +0111 -o -name '*.so') -ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin -ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib +ln -s /usr/lib/klibc/bin/* "${DESTDIR}/bin" +ln -s /usr/lib/klibc/lib/* "${DESTDIR}/lib" -rm ${DESTDIR}/bin/sh -ln -s busybox ${DESTDIR}/bin/sh +rm "${DESTDIR}/bin/sh" +ln -s busybox "${DESTDIR}/bin/sh" run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks # Apply DSDT to initramfs -if [ -e ${CONFDIR}/DSDT.aml ]; then - cp ${CONFDIR}/DSDT.aml ${DESTDIR} +if [ -e "${CONFDIR}/DSDT.aml" ]; then + cp "${CONFDIR}/DSDT.aml" "${DESTDIR}" fi -(cd ${DESTDIR} && find . | cpio --quiet --dereference -o -H newc | gzip -9 >${outfile}) +(cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}") -if [ -s ${__TMPCPIOGZ} ]; then - cat ${__TMPCPIOGZ} >>${outfile} +if [ -s "${__TMPCPIOGZ}" ]; then + cat "${__TMPCPIOGZ}" >>"${outfile}" fi if [ "${keep}" = "y" ]; then diff --git a/update-initramfs b/update-initramfs index bd5a4ab..644a1aa 100644 --- a/update-initramfs +++ b/update-initramfs @@ -63,33 +63,33 @@ set_initramfs() generate_initramfs() { verbose "Generating ${initramfs}" - mkinitramfs -o ${initramfs} ${version} + mkinitramfs -o "${initramfs}" "${version}" set_sha1 } compare_sha1() { - sha1sum ${initramfs} | diff ${STATEDIR}/${version} - >/dev/null 2>&1 + sha1sum "${initramfs}" | diff "${STATEDIR}/${version}" - >/dev/null 2>&1 return $? } # Note that this must overwrite so that updates work. set_sha1() { - sha1sum ${initramfs} > ${STATEDIR}/${version} + sha1sum "${initramfs}" > "${STATEDIR}/${version}" } delete_sha1() { - rm -f ${STATEDIR}/${version} + rm -f "${STATEDIR}/${version}" } get_sorted_versions() { version_list="" - for gsv_x in ${STATEDIR}/*; do - gsv_x=$(basename ${gsv_x}) + for gsv_x in "${STATEDIR}"/*; do + gsv_x="$(basename "${gsv_x}")" if [ "${gsv_x}" = '*' ]; then verbose "Nothing to do, exiting." exit 0 @@ -106,7 +106,7 @@ get_sorted_versions() if [ "${gsv_x}" != "" ]; then worklist="${worklist} ${gsv_x}" fi - version_list=${worklist} + version_list="${worklist}" done verbose "Available versions: ${version_list}" @@ -115,11 +115,11 @@ get_sorted_versions() set_linked_version() { if [ -L /initrd.img ]; then - linktarget=$(basename $(readlink /initrd.img)) + linktarget="$(basename "$(readlink /initrd.img)")" fi if [ -L /boot/initrd.img ]; then - linktarget=$(basename $(readlink /boot/initrd.img)) + linktarget="$(basename "$(readlink /boot/initrd.img)")" fi if [ -z "${linktarget}" ]; then @@ -145,11 +145,11 @@ create() set_initramfs if [ "${takeover}" = 0 ]; then - if version_exists ${version}; then + if version_exists "${version}"; then panic "Cannot create version ${version}: already exists" fi - if [ -e ${initramfs} ]; then + if [ -e "${initramfs}" ]; then panic "${initramfs} already exists, cannot create." fi fi @@ -176,7 +176,7 @@ update() fi # Don't stop if one version doesn't work. set +e - ${0} ${vflag} -u -k ${u_version} + "${0}" "${vflag}" -u -k "${u_version}" set -e done exit 0 @@ -198,11 +198,11 @@ delete() set_initramfs - if [ ! -e ${initramfs} ]; then + if [ ! -e "${initramfs}" ]; then panic "Cannot delete ${initramfs}, doesn't exist." fi - if ! version_exists ${version}; then + if ! version_exists "${version}"; then panic "Cannot delete version ${version}: Not created by this utility." fi -- cgit v1.2.3 From 198b6acac258faa88345e45593679d54791506f0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 19:08:44 +0200 Subject: fix small stupid bug in newer opts handling. --- debian/changelog | 1 + mkinitramfs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 96efc42..bc526d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,6 +26,7 @@ initramfs-tools (0.31) UNRELEASED; urgency=low [ maximilian attems ] * Resynchronise with latest upstream release. + * Place shift after variable outfile assignment. [ Jeff Bailey ] * scripts/nfs (mountroot): New variable: NFSOPTS, default to diff --git a/mkinitramfs b/mkinitramfs index 874d2ce..63c9b27 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -29,8 +29,8 @@ while true; do ;; -o) touch $2 - shift $2 outfile="$(readlink -f "$2")" + shift $2 ;; -k) keep="y" -- cgit v1.2.3 From 3457af4cd71c889f90fa505ac4f39264dad3be4c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 19:09:46 +0200 Subject: finalize 0.33 --- debian/changelog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bc526d3..e897de8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.31) UNRELEASED; urgency=low +initramfs-tools (0.33) unstable; urgency=low [ Bastian Blank ] * debian/control: Add mklibs-copy as dependency. @@ -27,6 +27,8 @@ initramfs-tools (0.31) UNRELEASED; urgency=low [ maximilian attems ] * Resynchronise with latest upstream release. * Place shift after variable outfile assignment. + * Thanks to Bastian Blank for the fixes concerning the new busybox version. + (Closes: #334467) [ Jeff Bailey ] * scripts/nfs (mountroot): New variable: NFSOPTS, default to -- cgit v1.2.3 From dcd7525c33372c941631a6c6e38c2923a87f75b9 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 19:20:15 +0200 Subject: really finalize that release --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e897de8..6a34902 100644 --- a/debian/changelog +++ b/debian/changelog @@ -49,7 +49,7 @@ initramfs-tools (0.33) unstable; urgency=low * Quote variables. * Use test options -n and -z. - -- Jonas Smedegaard Tue, 18 Oct 2005 04:16:30 +0200 + -- maximilian attems Fri, 21 Oct 2005 19:19:06 +0200 initramfs-tools (0.31) unstable; urgency=low -- cgit v1.2.3 From 58fa8de0d0a4ab01326623978ed200b1ad429d3b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 19:28:24 +0200 Subject: waldi: pump udev dep --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6a34902..fae7fff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ initramfs-tools (0.33) unstable; urgency=low * Use udevsynthesize. * Add hotplug agents. + * Bump udev dependency to a working version. * init udev fixes - Start and kill udevd. - Create /dev/.udevdb. diff --git a/debian/control b/debian/control index 68874cf..7b5918a 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev, mklibs-copy +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev (>= 0.070-3), mklibs-copy 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 -- cgit v1.2.3 From 90d305d4e462a4dcbd6d213a9ccad6413b42bd80 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 21 Oct 2005 20:05:42 +0200 Subject: upload without the .bzr.backup dirs, there for pumped version. --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index fae7fff..c9dc563 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.33) unstable; urgency=low +initramfs-tools (0.34) unstable; urgency=low [ Bastian Blank ] * debian/control: Add mklibs-copy as dependency. @@ -30,6 +30,7 @@ initramfs-tools (0.33) unstable; urgency=low * Place shift after variable outfile assignment. * Thanks to Bastian Blank for the fixes concerning the new busybox version. (Closes: #334467) + * Dont upload with .bzr.backup dirs. [ Jeff Bailey ] * scripts/nfs (mountroot): New variable: NFSOPTS, default to @@ -50,7 +51,7 @@ initramfs-tools (0.33) unstable; urgency=low * Quote variables. * Use test options -n and -z. - -- maximilian attems Fri, 21 Oct 2005 19:19:06 +0200 + -- maximilian attems Fri, 21 Oct 2005 19:54:27 +0200 initramfs-tools (0.31) unstable; urgency=low -- cgit v1.2.3 From 17fed79e0dfb4fb5625a8195188d3d47da93391a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Oct 2005 08:44:19 +0200 Subject: merge the thing waldi uploaded as 0.32. it has the changes vorlon asked for so that 2.4 systems that use the ramdisk value in /etc/kernel-img.conf don't use the wrong tool. --- debian/changelog | 40 +++++++++++++--------------------------- debian/control | 1 + mkinitramfs | 23 ++++++++++++++++++++++- mkinitramfs.8 | 16 ++++++++++++++++ 4 files changed, 52 insertions(+), 28 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c9dc563..3e5c166 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,36 +1,21 @@ -initramfs-tools (0.34) unstable; urgency=low +initramfs-tools (0.32) unstable; urgency=low [ Bastian Blank ] - * debian/control: Add mklibs-copy as dependency. - * hook-functions use mklibs-copy: Remove copy_exec. - * hooks/evms: Use cp instead of copy_exec. - * mkinitramfs - - Use cp instead of copy_exec. - - Call mklibs-copy to collect necessary libs. - * Use udevsynthesize. - * Add hotplug agents. - - * Bump udev dependency to a working version. - * init udev fixes - - Start and kill udevd. - - Create /dev/.udevdb. - - Use udevsynthesize. - - Call depmod. - * mkinitramfs udev fixes - - Install udevd and udevsynthesize instead of udevstart. - - Install hotplug agents. - * scripts/functions (load_modules) - - Don't call depmod and udevstart. - - Don't crawl pci devices ourself. - - * hook-functions: Add ibmvscsic to list of scsi modules. + * Use mklibs-copy. + * Use udevsynthesize instead of udevstart. + * hook-functions: Add ibmvscsic to list of scsi modules. + + [ Sven Luther ] + * Added --supported-(host|target)-version support for the new post-2.6.13 + ramdisk-tool policy. Added linux-ramdisk-tool virtual package too. + (Closes: #333856) [ maximilian attems ] * Resynchronise with latest upstream release. * Place shift after variable outfile assignment. + * Fix strange chars in the Depends line resulting in no depends at all. * Thanks to Bastian Blank for the fixes concerning the new busybox version. (Closes: #334467) - * Dont upload with .bzr.backup dirs. [ Jeff Bailey ] * scripts/nfs (mountroot): New variable: NFSOPTS, default to @@ -47,11 +32,12 @@ initramfs-tools (0.34) unstable; urgency=low the kernel's command line (then we're just as verbose as ever) [ Jonas Smedegaard ] - * Use GNU getopt (instead of bash builtin getopts) for improved handling. + * Use GNU getopt (instead of bash builtin getopts) for improved long- + opts handling. * Quote variables. * Use test options -n and -z. - -- maximilian attems Fri, 21 Oct 2005 19:54:27 +0200 + -- maximilian attems Wed, 19 Oct 2005 17:42:08 +0200 initramfs-tools (0.31) unstable; urgency=low diff --git a/debian/control b/debian/control index 7b5918a..dbff057 100644 --- a/debian/control +++ b/debian/control @@ -9,6 +9,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev (>= 0.070-3), mklibs-copy +Provides: linux-ramdisk-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 diff --git a/mkinitramfs b/mkinitramfs index 58d42e1..3f0d79b 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -10,7 +10,7 @@ errors_to="2>/dev/null" # BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" BUSYBOXDIR="/bin" -OPTIONS=`getopt -o d:ko:r: -n "$0" -- "$@"` +OPTIONS=`getopt -o d:ko:r: --long supported-host-version:,supported-target-version: -n "$0" -- "$@"` # Check for non-GNU getopt if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi @@ -40,6 +40,14 @@ while true; do # ignore (FIXME: manpage says differently?!?) shift 2 ;; + --supported-host-version) + supported_host_version="$2" + shift 2 + ;; + --supported-target-version) + supported_target_version="$2" + shift 2 + ;; --) shift break @@ -51,6 +59,19 @@ while true; do 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 1 + fi + fi + exit 0 +fi + # For dependency ordered mkinitramfs hook scripts. . /usr/share/initramfs-tools/scripts/functions . /usr/share/initramfs-tools/hook-functions diff --git a/mkinitramfs.8 b/mkinitramfs.8 index a4b1530..0918767 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -13,6 +13,12 @@ mkinitramfs \- generate an initramfs image .RB [ \-r .IR root ] .RI [ version ] +.B mkinitramfs +.RB [ \-\-supported-host-version= +.IR hversion ] +.RB [ \-\-supported-target-version= +.IR tversion ] + .SH DESCRIPTION The .B mkinitramfs @@ -42,6 +48,16 @@ Override the setting in .IR mkinitramfs.conf . +.TP +\fB\-\-supported-host-version=\fIhversion +This option queries if mkinitramfs can create ramdisks on a running kernel of version +.IR hversion . + +.TP +\fB\-\-supported-target-version=\fItversion +This option queries if mkinitramfs can create ramdisks for kernel version +.IR tversion . + .SH FILES .TP .I /etc/mkinitramfs/initramfs.conf -- cgit v1.2.3 From 4fa9959b55e1d5047eb27c6dbe4fd843f93118a4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Oct 2005 09:00:59 +0200 Subject: fix the lib deps of the hooks, run them before mklibs-copy. --- debian/changelog | 9 +++++++++ mkinitramfs | 8 ++++---- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3e5c166..8d38141 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +initramfs-tools (0.35) unstable; urgency=low + + * mkinitramfs: Return 2 for failure path of --supported-(host|target)-version. + + * mkinitramfs: Run the hooks before mklibs-copy, broke evms. + thanks to Steinar H. Gunderson + + -- maximilian attems Mon, 24 Oct 2005 08:57:55 +0200 + initramfs-tools (0.32) unstable; urgency=low [ Bastian Blank ] diff --git a/mkinitramfs b/mkinitramfs index 3f0d79b..d03c346 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -66,7 +66,7 @@ if [ -n "$supported_host_version" ] || [ -n "$supported_target_version" ]; then 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 1 + exit 2 fi fi exit 0 @@ -192,6 +192,9 @@ cp /sbin/mdrun "${DESTDIR}/sbin" # LVM cp /lib/lvm-200/vgchange "${DESTDIR}/sbin" +run_scripts /usr/share/initramfs-tools/hooks +run_scripts /etc/mkinitramfs/hooks + mklibs-copy -d "${DESTDIR}/lib" --root="${DESTDIR}" $(find "${DESTDIR}" -type f -perm +0111 -o -name '*.so') ln -s /usr/lib/klibc/bin/* "${DESTDIR}/bin" @@ -200,9 +203,6 @@ ln -s /usr/lib/klibc/lib/* "${DESTDIR}/lib" rm "${DESTDIR}/bin/sh" ln -s busybox "${DESTDIR}/bin/sh" -run_scripts /usr/share/initramfs-tools/hooks -run_scripts /etc/mkinitramfs/hooks - # Apply DSDT to initramfs if [ -e "${CONFDIR}/DSDT.aml" ]; then cp "${CONFDIR}/DSDT.aml" "${DESTDIR}" -- cgit v1.2.3 From a568d07a67b52e9f3176edac16000604bef49846 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Oct 2005 09:18:52 +0200 Subject: change virtual package providen. --- debian/changelog | 4 +++- debian/control | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8d38141..3c8fe88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,9 @@ initramfs-tools (0.35) unstable; urgency=low * mkinitramfs: Run the hooks before mklibs-copy, broke evms. thanks to Steinar H. Gunderson - -- maximilian attems Mon, 24 Oct 2005 08:57:55 +0200 + * Change name of virtual package that is provided into linux-initramfs-tool. + + -- maximilian attems Mon, 24 Oct 2005 09:08:48 +0200 initramfs-tools (0.32) unstable; urgency=low diff --git a/debian/control b/debian/control index dbff057..c1d9b7e 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev (>= 0.070-3), mklibs-copy -Provides: linux-ramdisk-tool +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 -- cgit v1.2.3 From 3c777488c38d22c88ca9ca0547e48173aeee1fa7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Oct 2005 09:44:04 +0200 Subject: move the lvm bits to hooks/lvm. allows to remove dependency on lvm as requested by several users. --- debian/changelog | 4 +++- hook-functions | 4 ++-- hooks/lvm | 27 +++++++++++++++++++++++++++ mkinitramfs | 3 --- 4 files changed, 32 insertions(+), 6 deletions(-) create mode 100755 hooks/lvm (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3c8fe88..37b3509 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,9 @@ initramfs-tools (0.35) unstable; urgency=low * Change name of virtual package that is provided into linux-initramfs-tool. - -- maximilian attems Mon, 24 Oct 2005 09:08:48 +0200 + * Add hooks/lvm, those remove dependency on lvm2. + + -- maximilian attems Mon, 24 Oct 2005 09:38:41 +0200 initramfs-tools (0.32) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 189db2e..0eab2a2 100644 --- a/hook-functions +++ b/hook-functions @@ -63,7 +63,7 @@ dep_add_modules() { # Things that are too hard to autodetect. - for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do + for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do manual_add_modules "${x}" done @@ -99,7 +99,7 @@ dep_add_modules() auto_add_modules() { # base - for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet dm_mod; do + for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do manual_add_modules "${x}" done diff --git a/hooks/lvm b/hooks/lvm new file mode 100755 index 0000000..fa4f8af --- /dev/null +++ b/hooks/lvm @@ -0,0 +1,27 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +if [ ! -x /sbin/vgchange ]; then + exit 0 +fi + +. /usr/share/initramfs-tools/hook-functions + +cp /lib/lvm-200/vgchange "${DESTDIR}/sbin" + +for x in dm_mod; do + manual_add_modules ${x} +done diff --git a/mkinitramfs b/mkinitramfs index d03c346..5b48a9d 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -189,9 +189,6 @@ cp /etc/modprobe.d/aliases "${DESTDIR}/etc/modprobe.d" cp /sbin/mdadm "${DESTDIR}/sbin" cp /sbin/mdrun "${DESTDIR}/sbin" -# LVM -cp /lib/lvm-200/vgchange "${DESTDIR}/sbin" - run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks -- cgit v1.2.3 From ab1f8ff4ccf955184a61d1dde6a5891c790b864e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Oct 2005 10:06:15 +0200 Subject: add hooks/md with the needed bits. next step will be to remove deps. --- debian/changelog | 6 ++++-- hook-functions | 4 ++-- hooks/md | 28 ++++++++++++++++++++++++++++ mkinitramfs | 4 ---- 4 files changed, 34 insertions(+), 8 deletions(-) create mode 100755 hooks/md (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 37b3509..399560d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,9 +7,11 @@ initramfs-tools (0.35) unstable; urgency=low * Change name of virtual package that is provided into linux-initramfs-tool. - * Add hooks/lvm, those remove dependency on lvm2. + * Add hooks/lvm allowing to remove dependency on lvm2. - -- maximilian attems Mon, 24 Oct 2005 09:38:41 +0200 + * Add hooks/md allowing to remove dependency on mdadm. + + -- maximilian attems Mon, 24 Oct 2005 09:49:48 +0200 initramfs-tools (0.32) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 0eab2a2..d222d97 100644 --- a/hook-functions +++ b/hook-functions @@ -63,7 +63,7 @@ dep_add_modules() { # Things that are too hard to autodetect. - for x in md raid0 raid1 raid5 raid6 ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do + for x in ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do manual_add_modules "${x}" done @@ -99,7 +99,7 @@ dep_add_modules() auto_add_modules() { # base - for x in md raid0 raid1 raid5 raid6 ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do + for x in ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do manual_add_modules "${x}" done diff --git a/hooks/md b/hooks/md new file mode 100755 index 0000000..c06b46b --- /dev/null +++ b/hooks/md @@ -0,0 +1,28 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +if [ ! -x /sbin/mdadm ]; then + exit 0 +fi + +. /usr/share/initramfs-tools/hook-functions + +cp /sbin/mdadm "${DESTDIR}/sbin" +cp /sbin/mdrun "${DESTDIR}/sbin" + +for x in md raid0 raid1 raid5 raid6; do + manual_add_modules ${x} +done diff --git a/mkinitramfs b/mkinitramfs index 5b48a9d..41f45a7 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -185,10 +185,6 @@ cp /sbin/rmmod "${DESTDIR}/sbin" mkdir -p "${DESTDIR}/etc/modprobe.d" cp /etc/modprobe.d/aliases "${DESTDIR}/etc/modprobe.d" -# Raid -cp /sbin/mdadm "${DESTDIR}/sbin" -cp /sbin/mdrun "${DESTDIR}/sbin" - run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks -- cgit v1.2.3 From 496ba1a67c18ad88e66534566819b8e6a89a0c6b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Oct 2005 19:19:07 +0200 Subject: remove the mdadm and lvm2 dep. --- debian/changelog | 8 ++++++-- debian/control | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 399560d..7042008 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,7 @@ initramfs-tools (0.35) unstable; urgency=low * mkinitramfs: Return 2 for failure path of --supported-(host|target)-version. * mkinitramfs: Run the hooks before mklibs-copy, broke evms. - thanks to Steinar H. Gunderson + Thanks for fix and testing to Steinar H. Gunderson * Change name of virtual package that is provided into linux-initramfs-tool. @@ -11,7 +11,11 @@ initramfs-tools (0.35) unstable; urgency=low * Add hooks/md allowing to remove dependency on mdadm. - -- maximilian attems Mon, 24 Oct 2005 09:49:48 +0200 + * Remove the mdadm and lvm dependencies, they work as hooks when present. + The lvm2 version in sarge is good enough to address issues mentioned in + 0.16. A woody backport will need newer lvm2 although.. + + -- maximilian attems Mon, 24 Oct 2005 19:16:14 +0200 initramfs-tools (0.32) unstable; urgency=low diff --git a/debian/control b/debian/control index c1d9b7e..2ff1be9 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, mdadm, lvm2 (>= 2.01.04-5), udev (>= 0.070-3), mklibs-copy +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.070-3), mklibs-copy Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged -- cgit v1.2.3 From 2002749a483fabac4b0ee32256bd937a1d9effd6 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 24 Oct 2005 19:55:46 +0200 Subject: Sesse wanted to have all the changes documented that i did relative to latest version in debian unstable. ;-) --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7042008..6a608d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +initramfs-tools (0.36) unstable; urgency=low + + "Sunny Autumn Release" + + * Minor cleanups in mkiniramfs. + + * Remove manpage section about return values. Needs to be rephrased. + Not sure if it's important for the enduser. + + -- maximilian attems Mon, 24 Oct 2005 19:51:51 +0200 + initramfs-tools (0.35) unstable; urgency=low * mkinitramfs: Return 2 for failure path of --supported-(host|target)-version. -- cgit v1.2.3 From a62c8eadea176cc83f83cf1eeeca4aabe59e5a95 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 26 Oct 2005 09:05:53 +0200 Subject: fix stat usage, which is no longer available in newer busybox. use awk instead for determinig major_minor. great patch cures a hang observed on one of my laptops. :-) patch from Adrian Bridgett , #335801. --- debian/changelog | 8 ++++++++ scripts/functions | 6 +++--- scripts/local-premount/suspend | 5 ++--- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6a608d1..b6eddfa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.37) unstable; urgency=low + + * scripts/functions, scripts/local-premount/suspend: Use of "stat" + which isn' any more provided by busybox (1.01-3). + Thanks to Adrian Bridgett for the patch using awk. + + -- maximilian attems Wed, 26 Oct 2005 08:43:36 +0200 + initramfs-tools (0.36) unstable; urgency=low "Sunny Autumn Release" diff --git a/scripts/functions b/scripts/functions index 68cfcea..8e82896 100644 --- a/scripts/functions +++ b/scripts/functions @@ -227,9 +227,9 @@ load_modules() if [ -e /sys/power/resume ]; then if [ -e "${resume}" ]; then - major=$((0x$(stat -c%t ${resume}))) - minor=$((0x$(stat -c%T ${resume}))) - echo ${major}:${minor} >/sys/power/resume + major_minor=$(ls -l ${resume} | \ + awk '{printf "0x%x:0x%x", $5, $6}') + echo $major_minor >/sys/power/resume fi fi diff --git a/scripts/local-premount/suspend b/scripts/local-premount/suspend index 6aab596..2e0b43f 100755 --- a/scripts/local-premount/suspend +++ b/scripts/local-premount/suspend @@ -24,7 +24,6 @@ if [ ! -e "${resume}" ]; then fi if [ -e /sys/power/resume ]; then - major=$((0x$(stat -c%t ${resume}))) - minor=$((0x$(stat -c%T ${resume}))) - echo ${major}:${minor} >/sys/power/resume + major_minor=$(ls -l ${resume} | awk '{printf "0x%x:0x%x", $5, $6}') + echo $major_minor >/sys/power/resume fi -- cgit v1.2.3 From 429cd75b35cf6c08aff80aec2aee9fab40eb42a5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 26 Oct 2005 09:22:31 +0200 Subject: Check for dir ${MODULESDIR}/initrd/, exit if it doesn't exist. --- debian/changelog | 7 ++++++- hooks/kernelextras | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b6eddfa..2a673d1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,13 @@ initramfs-tools (0.37) unstable; urgency=low * scripts/functions, scripts/local-premount/suspend: Use of "stat" which isn' any more provided by busybox (1.01-3). Thanks to Adrian Bridgett for the patch using awk. + (Closes: #335801) - -- maximilian attems Wed, 26 Oct 2005 08:43:36 +0200 + * hooks/kernelextras: Check for existence of ${MODULESDIR}/initrd/: + Exit if it doesn't exist before including current dir. + Thanks to Jean Charles Delepine (Closes: #335505) + + -- maximilian attems Wed, 26 Oct 2005 09:07:39 +0200 initramfs-tools (0.36) unstable; urgency=low diff --git a/hooks/kernelextras b/hooks/kernelextras index d1b8c34..df38884 100755 --- a/hooks/kernelextras +++ b/hooks/kernelextras @@ -19,6 +19,10 @@ esac . /usr/share/initramfs-tools/hook-functions +if [ ! -d ${MODULESDIR}/initrd ]; then + exit 0 +fi + fbcon=n for x in ${MODULESDIR}/initrd/*; do -- cgit v1.2.3 From 4e0954f5e95073cc881a138d3f649b9b0fcfb449 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 26 Oct 2005 09:24:38 +0200 Subject: cleanup some useless FIXME's. --- debian/changelog | 5 ++++- hooks/lvm | 1 - hooks/md | 1 - 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2a673d1..1895572 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,7 +9,10 @@ initramfs-tools (0.37) unstable; urgency=low Exit if it doesn't exist before including current dir. Thanks to Jean Charles Delepine (Closes: #335505) - -- maximilian attems Wed, 26 Oct 2005 09:07:39 +0200 + * 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 initramfs-tools (0.36) unstable; urgency=low diff --git a/hooks/lvm b/hooks/lvm index 7410b26..fa4f8af 100755 --- a/hooks/lvm +++ b/hooks/lvm @@ -14,7 +14,6 @@ prereqs) ;; esac -# FIXME: check /sys/block/dm-0/dev if [ ! -x /sbin/vgchange ]; then exit 0 fi diff --git a/hooks/md b/hooks/md index be8a55a..c06b46b 100755 --- a/hooks/md +++ b/hooks/md @@ -14,7 +14,6 @@ prereqs) ;; esac -# FIXME: check /proc/mdstat if [ ! -x /sbin/mdadm ]; then exit 0 fi -- cgit v1.2.3 From 0abf7fae2bed74f635cad52f39d00b922aef69bf Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 2 Nov 2005 07:10:28 +0100 Subject: fix reference to manpage. --- conf/initramfs.conf | 2 +- debian/changelog | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index 88728b4..93554c1 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -1,6 +1,6 @@ # # initramfs.conf -# Configuration file for mkinitramfs(8). See mkinitramfs.conf(5). +# Configuration file for mkinitramfs(8). See initramfs.conf(5). # # diff --git a/debian/changelog b/debian/changelog index 1895572..0c4b918 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.38) unstable; urgency=low + + [ dann frazier ] + + * Reference correct manpage in initramfs.conf. Closes: #336095 + + -- maximilian attems Wed, 2 Nov 2005 06:58:17 +0100 + initramfs-tools (0.37) unstable; urgency=low * scripts/functions, scripts/local-premount/suspend: Use of "stat" -- cgit v1.2.3 From 32b804ba08c6d1bbc08491bcb0d50c6e84a75b98 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 2 Nov 2005 07:15:49 +0100 Subject: fix suspend to disk: use decimal numbers. --- debian/changelog | 10 ++++++++-- scripts/functions | 2 +- scripts/local-premount/suspend | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0c4b918..fea4793 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,9 +2,15 @@ initramfs-tools (0.38) unstable; urgency=low [ dann frazier ] - * Reference correct manpage in initramfs.conf. Closes: #336095 + * initramfs.conf: Reference correct manpage. Closes: #336095 - -- maximilian attems Wed, 2 Nov 2005 06:58:17 +0100 + [ maximilian attems ] + + * scripts/functions, scripts/local-premount/suspend: Fix suspend to disk + by using decimal numbers. Thanks to Adrian Bridgett + for the patch. (Closes: #336936) + + -- maximilian attems Wed, 2 Nov 2005 07:10:45 +0100 initramfs-tools (0.37) unstable; urgency=low diff --git a/scripts/functions b/scripts/functions index 8e82896..5147009 100644 --- a/scripts/functions +++ b/scripts/functions @@ -228,7 +228,7 @@ load_modules() if [ -e /sys/power/resume ]; then if [ -e "${resume}" ]; then major_minor=$(ls -l ${resume} | \ - awk '{printf "0x%x:0x%x", $5, $6}') + awk '{printf "%d:%d", $5, $6}') echo $major_minor >/sys/power/resume fi fi diff --git a/scripts/local-premount/suspend b/scripts/local-premount/suspend index 2e0b43f..0c88ccc 100755 --- a/scripts/local-premount/suspend +++ b/scripts/local-premount/suspend @@ -24,6 +24,6 @@ if [ ! -e "${resume}" ]; then fi if [ -e /sys/power/resume ]; then - major_minor=$(ls -l ${resume} | awk '{printf "0x%x:0x%x", $5, $6}') + major_minor=$(ls -l ${resume} | awk '{printf "%d:%d", $5, $6}') echo $major_minor >/sys/power/resume fi -- cgit v1.2.3 From 53cd915c489b5a5fd8be4a8cb532c2986859ba9b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 2 Nov 2005 07:24:30 +0100 Subject: fix evms root by adding dm_mod module to the initramfs image. --- debian/changelog | 9 +++++++-- hooks/evms | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index fea4793..70ac2ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ initramfs-tools (0.38) unstable; urgency=low [ dann frazier ] - * initramfs.conf: Reference correct manpage. Closes: #336095 + * initramfs.conf: Reference correct manpage. (Closes: #336095) [ maximilian attems ] @@ -10,7 +10,12 @@ initramfs-tools (0.38) unstable; urgency=low by using decimal numbers. Thanks to Adrian Bridgett for the patch. (Closes: #336936) - -- maximilian attems Wed, 2 Nov 2005 07:10:45 +0100 + * hooks/evms: manual_add_module dm_mod, now we no longer pull it in by + default. Thanks to Steinar H. Gunderson + (Closes: #336617) + + + -- maximilian attems Wed, 2 Nov 2005 07:21:29 +0100 initramfs-tools (0.37) unstable; urgency=low diff --git a/hooks/evms b/hooks/evms index 456feac..21dc562 100755 --- a/hooks/evms +++ b/hooks/evms @@ -29,3 +29,7 @@ mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION} for x in disk lvm2 dos multipath; do cp /lib/evms/${EVMS_VERSION}/${x}* ${DESTDIR}/lib/evms/${EVMS_VERSION} done + +for x in dm_mod; do + manual_add_modules ${x} +done -- cgit v1.2.3 From 32b031319c9696f35246b482c23d8d060cb5c6c8 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 2 Nov 2005 09:50:58 +0100 Subject: whitespace cleanup --- debian/changelog | 1 - 1 file changed, 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 70ac2ae..05a67bb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,7 +14,6 @@ initramfs-tools (0.38) unstable; urgency=low default. Thanks to Steinar H. Gunderson (Closes: #336617) - -- maximilian attems Wed, 2 Nov 2005 07:21:29 +0100 initramfs-tools (0.37) unstable; urgency=low -- cgit v1.2.3 From aa1e3cb6e0a9ab2d8a34676b719d278caea1bc17 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 17 Nov 2005 19:59:00 +0100 Subject: revert usage of mklibs-copy - reduces python dep. --- debian/changelog | 8 ++++++++ debian/control | 2 +- hook-functions | 30 ++++++++++++++++++++++++++++++ hooks/evms | 4 ++-- hooks/lvm | 2 +- hooks/md | 4 ++-- mkinitramfs | 37 ++++++++++++++++--------------------- 7 files changed, 60 insertions(+), 27 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 05a67bb..637e896 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.39) unstable; urgency=low + + * Revert the mklibs-small usage patch - reduces needed dependencies: + hook-fuctions: Readds copy_exec. + mkinitramfs, hooks/{evms,lvm,md}: Use copy_exec. + + -- maximilian attems Thu, 17 Nov 2005 18:43:19 +0100 + initramfs-tools (0.38) unstable; urgency=low [ dann frazier ] diff --git a/debian/control b/debian/control index 2ff1be9..de0181f 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.070-3), mklibs-copy +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.070-3) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/hook-functions b/hook-functions index d222d97..c715df5 100644 --- a/hook-functions +++ b/hook-functions @@ -51,6 +51,36 @@ manual_add_modules() done } +# $1 is source +# $2 is relative destination +copy_exec() { + ln -s ${1} ${DESTDIR}/${2} + + # Copy the dependant libraries + for x in $(ldd ${1} 2>/dev/null | sed -e ' + /\//!d; + /linux-gate/d; + /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; + s/[[:blank:]]*\([^[:blank:]]*\) (.*)/\1/' 2>/dev/null); do + + # Try to use non-optimised libraries where possible. + # We assume that all HWCAP libraries will be in tls. + nonoptlib=$(echo ${x} | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#') + + if [ -e ${nonoptlib} ]; then + x=${nonoptlib} + fi + + libname=$(basename ${x}) + dirname=$(dirname ${x}) + + mkdir -p ${DESTDIR}/${dirname} + if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then + ln -s ${x} ${DESTDIR}/${dirname} + fi + done +} + # Copy entire subtrees to the initramfs copy_modules_dir() { diff --git a/hooks/evms b/hooks/evms index 21dc562..5affeef 100755 --- a/hooks/evms +++ b/hooks/evms @@ -20,14 +20,14 @@ if [ ! -x /sbin/evms_activate ]; then exit 0 fi -cp /sbin/evms_activate ${DESTDIR}/sbin +copy_exec /sbin/evms_activate /sbin EVMS_VERSION=$(/usr/sbin/evms_query info | grep "EVMS Version" | awk '{ print $3; }') mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION} for x in disk lvm2 dos multipath; do - cp /lib/evms/${EVMS_VERSION}/${x}* ${DESTDIR}/lib/evms/${EVMS_VERSION} + copy_exec /lib/evms/${EVMS_VERSION}/${x}* /lib/evms/${EVMS_VERSION} done for x in dm_mod; do diff --git a/hooks/lvm b/hooks/lvm index fa4f8af..9022dce 100755 --- a/hooks/lvm +++ b/hooks/lvm @@ -20,7 +20,7 @@ fi . /usr/share/initramfs-tools/hook-functions -cp /lib/lvm-200/vgchange "${DESTDIR}/sbin" +copy_exec /lib/lvm-200/vgchange /sbin for x in dm_mod; do manual_add_modules ${x} diff --git a/hooks/md b/hooks/md index c06b46b..64b8f9e 100755 --- a/hooks/md +++ b/hooks/md @@ -20,8 +20,8 @@ fi . /usr/share/initramfs-tools/hook-functions -cp /sbin/mdadm "${DESTDIR}/sbin" -cp /sbin/mdrun "${DESTDIR}/sbin" +copy_exec /sbin/mdadm /sbin +copy_exec /sbin/mdrun /sbin for x in md raid0 raid1 raid5 raid6; do manual_add_modules ${x} diff --git a/mkinitramfs b/mkinitramfs index 41f45a7..d7bc38b 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -158,7 +158,9 @@ fi # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. -cp /usr/share/initramfs-tools/init "${DESTDIR}/init" +ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin +ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib +copy_exec /usr/share/initramfs-tools/init /init cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts" for f in $(cd /etc/mkinitramfs/scripts && \ find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \ @@ -166,39 +168,32 @@ for f in $(cd /etc/mkinitramfs/scripts && \ mkdir --parents "${DESTDIR}/scripts/$(dirname "${f}")" cp -p "/etc/mkinitramfs/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" done -cp "${CONFDIR}/initramfs.conf" "${DESTDIR}/conf" +copy_exec "${CONFDIR}/initramfs.conf" /conf cp -a /etc/udev "${DESTDIR}/etc" -# udev -cp /sbin/udev "${DESTDIR}/sbin" -cp /sbin/udevd "${DESTDIR}/sbin" -cp /sbin/udevsynthesize "${DESTDIR}/sbin" -cp -a /lib/hotplug "${DESTDIR}/lib" +# Hack until udev is built with klibc +copy_exec /sbin/udev /sbin +copy_exec /sbin/udevd /sbin +copy_exec /sbin/udevsynthesize /sbin # Busybox -cp "${BUSYBOXDIR}/busybox" "${DESTDIR}/bin/busybox" +rm ${DESTDIR}/bin/sh +copy_exec ${BUSYBOXDIR}/busybox /bin/busybox +ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh # Modutils -cp /sbin/modprobe "${DESTDIR}/sbin" -cp /sbin/depmod "${DESTDIR}/sbin" -cp /sbin/rmmod "${DESTDIR}/sbin" +copy_exec /sbin/modprobe /sbin +copy_exec /sbin/depmod /sbin +copy_exec /sbin/rmmod /sbin mkdir -p "${DESTDIR}/etc/modprobe.d" -cp /etc/modprobe.d/aliases "${DESTDIR}/etc/modprobe.d" +copy_exec /etc/modprobe.d/aliases /etc/modprobe.d run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks -mklibs-copy -d "${DESTDIR}/lib" --root="${DESTDIR}" $(find "${DESTDIR}" -type f -perm +0111 -o -name '*.so') - -ln -s /usr/lib/klibc/bin/* "${DESTDIR}/bin" -ln -s /usr/lib/klibc/lib/* "${DESTDIR}/lib" - -rm "${DESTDIR}/bin/sh" -ln -s busybox "${DESTDIR}/bin/sh" - # Apply DSDT to initramfs if [ -e "${CONFDIR}/DSDT.aml" ]; then - cp "${CONFDIR}/DSDT.aml" "${DESTDIR}" + copy_exec "${CONFDIR}/DSDT.aml" / fi (cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}") -- cgit v1.2.3 From 57bc760c182d013bd656abe0b7cefda67e80986b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 17 Nov 2005 20:30:47 +0100 Subject: fixes for newer udev. --- debian/changelog | 7 ++++++- debian/control | 2 +- mkinitramfs | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 637e896..0bc4e36 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,12 @@ initramfs-tools (0.39) unstable; urgency=low hook-fuctions: Readds copy_exec. mkinitramfs, hooks/{evms,lvm,md}: Use copy_exec. - -- maximilian attems Thu, 17 Nov 2005 18:43:19 +0100 + * mkinitramfs: Newer udev no longer uses /sbin/udev - remove usage. + (Closes: #339568, #339365, #338814) + + * Pump udev dependency. + + -- maximilian attems Thu, 17 Nov 2005 19:59:47 +0100 initramfs-tools (0.38) unstable; urgency=low diff --git a/debian/control b/debian/control index de0181f..b959cfd 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.070-3) +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.072-2) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/mkinitramfs b/mkinitramfs index d7bc38b..529defc 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -172,7 +172,6 @@ copy_exec "${CONFDIR}/initramfs.conf" /conf cp -a /etc/udev "${DESTDIR}/etc" # Hack until udev is built with klibc -copy_exec /sbin/udev /sbin copy_exec /sbin/udevd /sbin copy_exec /sbin/udevsynthesize /sbin -- cgit v1.2.3 From b69379d8aba5cb2cf30f1786c547385e1d401cd8 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 17 Nov 2005 20:45:34 +0100 Subject: use higher timeout, so that lesser people ends without devices. future udevd should have condition to test against so that this timeout is no longer needed. --- debian/changelog | 4 ++++ init | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0bc4e36..1cf51c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,10 @@ initramfs-tools (0.39) unstable; urgency=low * Pump udev dependency. + * init: Pump timeout as there is currently no way to check which udevd + processes are still running and why. Cures hopefully breakage of missing + devices. + -- maximilian attems Thu, 17 Nov 2005 19:59:47 +0100 initramfs-tools (0.38) unstable; urgency=low diff --git a/init b/init index 18d31ad..a1d6923 100755 --- a/init +++ b/init @@ -74,7 +74,8 @@ log_begin_msg "Initializing /dev" mkdir /dev/.udevdb UDEVD_EXPECTED_SEQNUM=$(($(cat /sys/kernel/hotplug_seqnum) + 1)) udevd --daemon udevsynthesize -sleep 2 +# FIXME: future udevd should have condition to test against +sleep 5 log_end_msg log_begin_msg "Loading modules" -- cgit v1.2.3 From 6c4e2850f0bc8c554a0faf9b9becc879a8dc53c5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 17 Nov 2005 21:04:24 +0100 Subject: sync with latest ubuntu: * typo in mkinitramfs -d handling * only cp klibc-*.so file --- debian/changelog | 19 +++++++++++++++++-- mkinitramfs | 4 ++-- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1cf51c0..398378d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,11 +10,26 @@ initramfs-tools (0.39) unstable; urgency=low * Pump udev dependency. * init: Pump timeout as there is currently no way to check which udevd - processes are still running and why. Cures hopefully breakage of missing - devices. + processes are still running and why. + Cures hopefully breakage of missing devices on boot. + + * Sync with latest Ubuntu. -- maximilian attems Thu, 17 Nov 2005 19:59:47 +0100 +initramfs-tools (0.36ubuntu3) dapper; urgency=low + + * mkinitramfs: only copy the klibc-*.so file, and not the development + pieces that happen to sit alongside it. + + -- Scott James Remnant Thu, 10 Nov 2005 16:44:08 -0500 + +initramfs-tools (0.36ubuntu2) dapper; urgency=low + + * Fix typos in the handling of the mkinitramfs -d option (thanks, Colin). + + -- Adam Conrad Thu, 10 Nov 2005 12:12:32 -0500 + initramfs-tools (0.38) unstable; urgency=low [ dann frazier ] diff --git a/mkinitramfs b/mkinitramfs index 529defc..8e390cd 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -22,7 +22,7 @@ while true; do -d) CONFDIR="$2" shift 2 - if [ ! d "${CONFDIR}" ]; then + if [ ! -d "${CONFDIR}" ]; then echo "${0}: ${CONFDIR}: Not a directory" >&2 exit 1 fi @@ -159,7 +159,7 @@ fi # symlinks. ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin -ln -s /usr/lib/klibc/lib/* ${DESTDIR}/lib +ln -s /usr/lib/klibc/lib/klibc-*.so ${DESTDIR}/lib copy_exec /usr/share/initramfs-tools/init /init cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts" for f in $(cd /etc/mkinitramfs/scripts && \ -- cgit v1.2.3 From b270bb806236c50163f5d4139d92ba36c1b20846 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 23 Nov 2005 09:55:38 +0100 Subject: medium priority upload --- debian/changelog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 398378d..2742915 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,7 @@ -initramfs-tools (0.39) unstable; urgency=low +initramfs-tools (0.39) unstable; urgency=medium + + * Setting urgency to medium to get this into testing. This + will make life easier for d-i. * Revert the mklibs-small usage patch - reduces needed dependencies: hook-fuctions: Readds copy_exec. -- cgit v1.2.3 From 08319e643dc6743bc4f366942e15ea2cf4000c9e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 23 Nov 2005 10:12:17 +0100 Subject: resynch with ubuntu: use $CONFDIR everywhere in mkinitramfs --- debian/changelog | 8 ++++++++ mkinitramfs | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2742915..79d36ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,14 @@ initramfs-tools (0.39) unstable; urgency=medium -- maximilian attems Thu, 17 Nov 2005 19:59:47 +0100 +initramfs-tools (0.36ubuntu4) dapper; urgency=low + + * Replace all occurances of /etc/mkinitramfs in mkinitramfs with $CONFDIR, + so -d can be used to point at a completely alternate tree (for example, + when installing into a chroot). + + -- Scott James Remnant Mon, 21 Nov 2005 08:34:03 +0000 + initramfs-tools (0.36ubuntu3) dapper; urgency=low * mkinitramfs: only copy the klibc-*.so file, and not the development diff --git a/mkinitramfs b/mkinitramfs index 8e390cd..612f2d7 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -162,11 +162,11 @@ ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin ln -s /usr/lib/klibc/lib/klibc-*.so ${DESTDIR}/lib copy_exec /usr/share/initramfs-tools/init /init cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts" -for f in $(cd /etc/mkinitramfs/scripts && \ +for f in $(cd ${CONFDIR}/scripts && \ find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \ -o -type f -print); do mkdir --parents "${DESTDIR}/scripts/$(dirname "${f}")" -cp -p "/etc/mkinitramfs/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" +cp -p "${CONFDIR}/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" done copy_exec "${CONFDIR}/initramfs.conf" /conf cp -a /etc/udev "${DESTDIR}/etc" -- cgit v1.2.3 From 759dd419abdc2ee4408e4cc3e9daf2ac410c1178 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 23 Nov 2005 10:31:48 +0100 Subject: fixes for latest udev 0.074-3 --- debian/changelog | 11 +++++++++++ debian/control | 2 +- mkinitramfs | 5 ++++- 3 files changed, 16 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 79d36ea..eac527c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +initramfs-tools (0.40) unstable; urgency=high + + * High urgency upload as udev changed under our feet. Fix RC bugs. + + * Add needed bits under /lib/udev: udevsynthesize, udev_run_devd, + udev_run_hotplugd. + + * Pump udev dep on 0.074-3. + + -- maximilian attems Wed, 23 Nov 2005 10:12:40 +0100 + initramfs-tools (0.39) unstable; urgency=medium * Setting urgency to medium to get this into testing. This diff --git a/debian/control b/debian/control index b959cfd..70c2641 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.072-2) +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.074-3) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/mkinitramfs b/mkinitramfs index 612f2d7..505d480 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -173,7 +173,10 @@ cp -a /etc/udev "${DESTDIR}/etc" # Hack until udev is built with klibc copy_exec /sbin/udevd /sbin -copy_exec /sbin/udevsynthesize /sbin +mkdir "${DESTDIR}/lib/udev" +copy_exec /lib/udev/udevsynthesize /lib/udev +cp /sbin/udevsynthesize "${DESTDIR}/sbin" +cp /lib/udev/udev_* "${DESTDIR}/lib/udev" # Busybox rm ${DESTDIR}/bin/sh -- cgit v1.2.3 From ab06eb34e1a911432aa7c048927eb7e53b0571ee Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 23 Nov 2005 10:45:29 +0100 Subject: fix evms hook --- debian/changelog | 6 ++++-- hooks/evms | 5 +++-- scripts/local-top/evms | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index eac527c..8c92cc0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,11 +3,13 @@ initramfs-tools (0.40) unstable; urgency=high * High urgency upload as udev changed under our feet. Fix RC bugs. * Add needed bits under /lib/udev: udevsynthesize, udev_run_devd, - udev_run_hotplugd. + udev_run_hotplugd. * Pump udev dep on 0.074-3. - -- maximilian attems Wed, 23 Nov 2005 10:12:40 +0100 + * Fix evms hooks properly until they get merged into the evms itself. + + -- maximilian attems Wed, 23 Nov 2005 10:31:57 +0100 initramfs-tools (0.39) unstable; urgency=medium diff --git a/hooks/evms b/hooks/evms index 5affeef..1cbc832 100755 --- a/hooks/evms +++ b/hooks/evms @@ -21,15 +21,16 @@ if [ ! -x /sbin/evms_activate ]; then fi copy_exec /sbin/evms_activate /sbin +cp /etc/evms.conf ${DESTDIR}/etc EVMS_VERSION=$(/usr/sbin/evms_query info | grep "EVMS Version" | awk '{ print $3; }') mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION} -for x in disk lvm2 dos multipath; do +for x in bbr bbr_seg bsd disk dos drivelink gpt lvm2 mac md multipath; do copy_exec /lib/evms/${EVMS_VERSION}/${x}* /lib/evms/${EVMS_VERSION} done -for x in dm_mod; do +for x in dm_mod linear raid0 raid1 raid10 raid5 raid6; do manual_add_modules ${x} done diff --git a/scripts/local-top/evms b/scripts/local-top/evms index 2ee7e80..8a99549 100755 --- a/scripts/local-top/evms +++ b/scripts/local-top/evms @@ -1,6 +1,6 @@ #!/bin/sh -PREREQ="lvm" +PREREQ="" prereqs() { @@ -26,6 +26,8 @@ case ${evms} in ;; esac -modprobe -q dm-mod +for module in dm-mod linear raid0 raid1 raid10 raid5 raid6; do + modprobe -q $module +done /sbin/evms_activate -- cgit v1.2.3 From 07c254898028943d647a523c0cfa66df75eb8695 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 23 Nov 2005 10:59:44 +0100 Subject: fix changelog, add bug nrs. --- debian/changelog | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8c92cc0..f8f3ba1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,13 +3,16 @@ initramfs-tools (0.40) unstable; urgency=high * High urgency upload as udev changed under our feet. Fix RC bugs. * Add needed bits under /lib/udev: udevsynthesize, udev_run_devd, - udev_run_hotplugd. + udev_run_hotplugd. (Closes: #340257) * Pump udev dep on 0.074-3. * Fix evms hooks properly until they get merged into the evms itself. + (Closes: #337704) - -- maximilian attems Wed, 23 Nov 2005 10:31:57 +0100 + * Sync with Ubuntu (0.36ubuntu4). + + -- maximilian attems Wed, 23 Nov 2005 10:31:57 +0100 initramfs-tools (0.39) unstable; urgency=medium -- cgit v1.2.3 From 6da3bae23dc4843a543e02ca57ec26f2d77455a3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 23 Nov 2005 22:59:56 +0100 Subject: only include needed udev bits, also move them to hooks/udev from mkinitramfs. --- debian/changelog | 4 ++-- hooks/udev | 8 ++++++++ mkinitramfs | 9 --------- 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f8f3ba1..ee6a61f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,8 @@ initramfs-tools (0.40) unstable; urgency=high * High urgency upload as udev changed under our feet. Fix RC bugs. - * Add needed bits under /lib/udev: udevsynthesize, udev_run_devd, - udev_run_hotplugd. (Closes: #340257) + * hooks/udev: Add needed bits: udevsynthesize. (Closes: #340257) + Move good bits from global mkinitramfs. * Pump udev dep on 0.074-3. diff --git a/hooks/udev b/hooks/udev index 41c96fe..4776d85 100755 --- a/hooks/udev +++ b/hooks/udev @@ -25,3 +25,11 @@ esac force_load unix +cp -a /etc/udev ${DESTDIR}/etc + +# Hack until udev is built with klibc +copy_exec /sbin/udevd /sbin +copy_exec /sbin/udevsynthesize /sbin + +mkdir "${DESTDIR}/lib/udev" +copy_exec /lib/udev/udevsynthesize /lib/udev diff --git a/mkinitramfs b/mkinitramfs index c97b575..1cba5d5 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -169,15 +169,6 @@ for f in $(cd ${CONFDIR}/scripts && \ cp -p "${CONFDIR}/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" done copy_exec "${CONFDIR}/initramfs.conf" /conf -cp -a /etc/udev "${DESTDIR}/etc" - -# Hack until udev is built with klibc -copy_exec /sbin/udevd /sbin -mkdir "${DESTDIR}/lib/udev" -copy_exec /lib/udev/udevsynthesize /lib/udev -cp /sbin/udevsynthesize "${DESTDIR}/sbin" -copy_exec /lib/udev/udev_run_devd /lib/udev -copy_exec /lib/udev/udev_run_hotplugd /lib/udev # Busybox rm ${DESTDIR}/bin/sh -- cgit v1.2.3 From 5952a2fe8e6484b1813faaab93783764ff9026e8 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 28 Nov 2005 17:47:23 +0100 Subject: fix for newest upstream udev: udev has no a queue, which we can test (loop) against. :) --- debian/changelog | 13 +++++++++++++ debian/control | 2 +- init | 15 +++++++++++---- 3 files changed, 25 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ee6a61f..099c3a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +initramfs-tools (0.41) unstable; urgency=low + + "Una mattina mi sono svegliato" + + * High urgency upload to cope with newer udev upstream - bonus: + condition to test against when udev is ready. (Closes: #341014) + + * Pump udev dep on 0.076-2. + + * Special thanks to Paul Traina for previous udev / emvs work. + + -- maximilian attems Mon, 28 Nov 2005 17:26:40 +0100 + initramfs-tools (0.40) unstable; urgency=high * High urgency upload as udev changed under our feet. Fix RC bugs. diff --git a/debian/control b/debian/control index 70c2641..2a90d0d 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.074-3) +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.076-2) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/init b/init index a1d6923..8b00234 100755 --- a/init +++ b/init @@ -71,11 +71,18 @@ depmod -a # Populate /dev tree log_begin_msg "Initializing /dev" -mkdir /dev/.udevdb -UDEVD_EXPECTED_SEQNUM=$(($(cat /sys/kernel/hotplug_seqnum) + 1)) udevd --daemon +udevd_timeout=30 +echo > /proc/sys/kernel/hotplug +mkdir /dev/.udev /dev/.udev/db/ /dev/.udev/queue/ +udevd --daemon udevsynthesize -# FIXME: future udevd should have condition to test against -sleep 5 +while [ -d /dev/.udev/queue/ ]; do + sleep 1 + udevd_timeout=$(($udevd_timeout - 1)) + if [ $udevd_timeout -eq 0 ]; then + break + fi +done log_end_msg log_begin_msg "Loading modules" -- cgit v1.2.3 From 57732aa03ef035c09cfcea98086fff11670e7470 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 28 Nov 2005 17:50:24 +0100 Subject: sync ubuntu: breaknow --- debian/changelog | 16 ++++++++++++++++ init | 3 +++ 2 files changed, 19 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 099c3a8..aa337a8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ initramfs-tools (0.41) unstable; urgency=low * Special thanks to Paul Traina for previous udev / emvs work. + * Sync with Ubuntu (0.36ubuntu6). + -- maximilian attems Mon, 28 Nov 2005 17:26:40 +0100 initramfs-tools (0.40) unstable; urgency=high @@ -49,6 +51,20 @@ initramfs-tools (0.39) unstable; urgency=medium -- maximilian attems Thu, 17 Nov 2005 19:59:47 +0100 +initramfs-tools (0.36ubuntu6) dapper; urgency=low + + * Rename "panic" to "breaknow" + + -- Scott James Remnant Wed, 23 Nov 2005 10:23:54 +0000 + +initramfs-tools (0.36ubuntu5) dapper; urgency=low + + * Abort the boot sequence as early as possible if "panic" is placed on the + kernel command-line, allowing debugging of scripts in init-top. + + -- Scott James Remnant Mon, 21 Nov 2005 08:40:20 +0000 + + initramfs-tools (0.36ubuntu4) dapper; urgency=low * Replace all occurances of /etc/mkinitramfs in mkinitramfs with $CONFDIR, diff --git a/init b/init index 8b00234..2d9683e 100755 --- a/init +++ b/init @@ -59,6 +59,9 @@ for x in $(cat /proc/cmdline); do break) break=yes ;; + breaknow) + panic "Spawning shell within the initramfs" + ;; esac done -- cgit v1.2.3 From 31cb69967fcd2cb034b0ef68e648e9a43fdd32a3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 28 Nov 2005 17:54:12 +0100 Subject: kill udev as late as possible. --- debian/changelog | 7 +++++-- init | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index aa337a8..323affc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ initramfs-tools (0.41) unstable; urgency=low - "Una mattina mi sono svegliato" + "Una mattina mi sono svegliato" * High urgency upload to cope with newer udev upstream - bonus: condition to test against when udev is ready. (Closes: #341014) @@ -11,7 +11,10 @@ initramfs-tools (0.41) unstable; urgency=low * Sync with Ubuntu (0.36ubuntu6). - -- maximilian attems Mon, 28 Nov 2005 17:26:40 +0100 + * Kill udevd as late as possible. Thanks David Härdeman + for the patch. (Closes: #339093) + + -- maximilian attems Mon, 28 Nov 2005 17:53:24 +0100 initramfs-tools (0.40) unstable; urgency=high diff --git a/init b/init index 2d9683e..f8853b1 100755 --- a/init +++ b/init @@ -102,8 +102,6 @@ log_begin_msg "Running /scripts/init-premount" run_scripts /scripts/init-premount log_end_msg -killall udevd - log_begin_msg "Mounting root file system" mountroot log_end_msg @@ -114,6 +112,7 @@ run_scripts /scripts/init-bottom # Move our /dev to the real filesystem. Do the setup that udev otherwise # would. +killall udevd mkdir -p /dev/.static/dev chmod 700 /dev/.static/ mount -n -o bind ${rootmnt}/dev /dev/.static/dev -- cgit v1.2.3 From 3bfff7852627e577d0a5efe97b842934044873ef Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 28 Nov 2005 18:57:22 +0100 Subject: 0.076-3 has all the fixes we want!! with 0.076-2 we have missing mousedev stories resulting in missing /dev/input dir -> no xorg.. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 2a90d0d..132693a 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.076-2) +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.076-3) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged -- cgit v1.2.3 From 928f3367583b19162a58e837906b64e0adab95ef Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 28 Nov 2005 19:01:19 +0100 Subject: fix changelog mention, add credits --- debian/changelog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 323affc..4becc2e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,13 @@ -initramfs-tools (0.41) unstable; urgency=low +initramfs-tools (0.41) unstable; urgency=high "Una mattina mi sono svegliato" * High urgency upload to cope with newer udev upstream - bonus: condition to test against when udev is ready. (Closes: #341014) + Thanks Marco d'Itri for guidance and + Heikki Henriksen for double check. - * Pump udev dep on 0.076-2. + * Pump udev dep on 0.076-3. * Special thanks to Paul Traina for previous udev / emvs work. -- cgit v1.2.3 From bfd7efb29d7e706d6378ad2b91d2be9d21f8b8ee Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 1 Dec 2005 16:54:49 +0100 Subject: add mptspi to the scsi modules list --- debian/changelog | 8 ++++++++ hook-functions | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4becc2e..a76d5bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.42) unstable; urgency=low + + * hook-functions: The mptspi module is required for at least some machines + that use the mptscsih. Thanks dann frazier for the patch. + (Closes: #341162) + + -- maximilian attems Thu, 1 Dec 2005 16:42:12 +0100 + initramfs-tools (0.41) unstable; urgency=high "Una mattina mi sono svegliato" diff --git a/hook-functions b/hook-functions index c715df5..9d0bc29 100644 --- a/hook-functions +++ b/hook-functions @@ -144,7 +144,7 @@ auto_add_modules() done # scsi - for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih mptspi nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do manual_add_modules "${x}" done -- cgit v1.2.3 From efc90bbb5f64353714175bb4b2225422f3de86b2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Dec 2005 17:19:00 +0100 Subject: resync with latest ubuntu, split udev done by hand. --- break.txt | 4 ++ debian/changelog | 87 +++++++++++++++++++++++++++++++++++++- debian/initramfs-tools.postinst | 5 +++ hooks/acpid | 24 ----------- hooks/thermal | 28 +++++++++++++ hooks/udev | 35 ---------------- init | 69 +++++++++++-------------------- mkinitramfs | 1 + scripts/functions | 92 +++++++---------------------------------- scripts/init-premount/acpid | 19 --------- scripts/init-premount/thermal | 23 +++++++++++ scripts/local | 11 ++++- scripts/nfs | 1 - 13 files changed, 195 insertions(+), 204 deletions(-) create mode 100644 break.txt delete mode 100755 hooks/acpid create mode 100755 hooks/thermal delete mode 100755 hooks/udev delete mode 100755 scripts/init-premount/acpid create mode 100755 scripts/init-premount/thermal (limited to 'debian') diff --git a/break.txt b/break.txt new file mode 100644 index 0000000..ff26d5b --- /dev/null +++ b/break.txt @@ -0,0 +1,4 @@ +if [ x${break} = xyes ]; then + panic "Spawning shell within the initramfs" +fi + diff --git a/debian/changelog b/debian/changelog index a76d5bd..6a95f20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,92 @@ initramfs-tools (0.42) unstable; urgency=low that use the mptscsih. Thanks dann frazier for the patch. (Closes: #341162) - -- maximilian attems Thu, 1 Dec 2005 16:42:12 +0100 + * Resync with 0.40ubuntu7. + - Do the udev split by hand as we have a different udev invocation + supporting linux < 2.6.15. Increment udev dep to the version with + initramfs hooks. + - Debian's klibc hasn't yet the nanosleep, waiting for unbroken + linux-headers. + - Don't remove resume support from /etc/mkinitramfs/initramfs.conf + even if bootloader setting is preferred. + + -- maximilian attems Mon, 5 Dec 2005 12:59:59 +0100 + +initramfs-tools (0.40ubuntu7) dapper; urgency=low + + * remove "sleep 3" from the nfs script before the nfsmount command, + its a leftover from debugging in breezy and slows down thin client + booting unnecessary + + -- Oliver Grawert Fri, 2 Dec 2005 11:45:05 +0100 + +initramfs-tools (0.40ubuntu6) dapper; urgency=low + + * When panicking, fork an interactive subshell rather than execing it, so + that if the user fixes things up and exits, we continue rather than + panic the kernel. + * Call update-initramfs in postinst to regenerate the latest initramfs on + upgrades + + -- Matt Zimmerman Thu, 1 Dec 2005 22:23:09 -0800 + +initramfs-tools (0.40ubuntu5) dapper; urgency=low + + * Wait up to 10 seconds for the root device to appear before failing, + allowing SCSI and USB controllers time to settle. There's almost + certainly a more elegant way to do this generically for all mountroot + functions, but for now this will suffice. + + -- Scott James Remnant Thu, 1 Dec 2005 21:28:55 +0000 + +initramfs-tools (0.40ubuntu4) dapper; urgency=low + + * Mount /dev with mode 0755. + + -- Scott James Remnant Thu, 1 Dec 2005 19:30:06 +0000 + +initramfs-tools (0.40ubuntu3) dapper; urgency=low + + "A true friend stabs you in the front." + - Oscar Wilde + + * hooks/acpid: Rename to ... + * hooks/thermal: ... this. Add therm_pm72 for ppc64 systems. + + -- Jeff Bailey Wed, 30 Nov 2005 22:25:01 -0500 + +initramfs-tools (0.40ubuntu2) dapper; urgency=low + + * Rename scripts/init-premount/acpid to scripts/init-premount/thermal + and add therm_pm72 to avoid "vaccum cleaner mode" on ppc64 systems. + + -- Adam Conrad Thu, 1 Dec 2005 12:37:27 +1100 + +initramfs-tools (0.40ubuntu1) dapper; urgency=low + + * Use tmpfs for /dev, instead of ramfs; as tmpfs is swappable. + * Move /proc and /sys to the real filesystem, rather than unmounting them; + slightly reduces workload. + * Replace /root with ${rootmnt} in final usage of /dev/console + * Copy across modprobe blacklist as well as aliases + + * Change the panic/breaknow thing *again*. There's now a break= option + which can be any of top, modules, premount, mount, bottom, init and + causes the initramfs to break at that point. panic/breaknow is now + break=top, without an argument is equivalent to break=premount. + * Run depmod at the top of the init script, so init-top scripts can use + modprobe. + + * Remove udev-specific code: + - depend on the version of udev that includes all of these things itself + - remove udevstart from init + - remove code to move /dev to the real filesystem from init + - remove /sys-based module loading from load_modules + - remove boot_events functions from load_modules + - remove udev copy from mkinitramfs + - remove udev hook script + + -- Scott James Remnant Thu, 24 Nov 2005 21:21:12 +0000 initramfs-tools (0.41) unstable; urgency=high diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index 7d4eff6..c6025e5 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -39,5 +39,10 @@ if [ ! -e /etc/mkinitramfs/modules ]; then cp /usr/share/doc/initramfs-tools/examples/modules /etc/mkinitramfs/ fi +# Regenerate initramfs on upgrade +if [ "$1" = "configure" -a -n "$2" ]; then + update-initramfs -u +fi + #DEBHELPER# diff --git a/hooks/acpid b/hooks/acpid deleted file mode 100755 index 0f3c84c..0000000 --- a/hooks/acpid +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# Hooks for loading acpi bits into the initramfs - -. /usr/share/initramfs-tools/hook-functions - -for x in fan thermal; do - manual_add_modules ${x} -done diff --git a/hooks/thermal b/hooks/thermal new file mode 100755 index 0000000..4426de3 --- /dev/null +++ b/hooks/thermal @@ -0,0 +1,28 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hooks for loading thermal bits into the initramfs + +. /usr/share/initramfs-tools/hook-functions + +# ACPI Systems +for x in fan thermal; do + manual_add_modules ${x} +done + +# PPC64 Systems +manual_add_modules therm_pm72 diff --git a/hooks/udev b/hooks/udev deleted file mode 100755 index 4776d85..0000000 --- a/hooks/udev +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# udev really wants to be able to do socket communications to udevd -# This means that there's a bit of a race condition as the events come -# flooding in and the kernels ability to autoload the 'unix' module. - -# We solve the problem thusly. Hopefully RIP Ubuntu# 12915 - -. /usr/share/initramfs-tools/hook-functions - -force_load unix - -cp -a /etc/udev ${DESTDIR}/etc - -# Hack until udev is built with klibc -copy_exec /sbin/udevd /sbin -copy_exec /sbin/udevsynthesize /sbin - -mkdir "${DESTDIR}/lib/udev" -copy_exec /lib/udev/udevsynthesize /lib/udev diff --git a/init b/init index f8853b1..1f6c732 100755 --- a/init +++ b/init @@ -6,9 +6,12 @@ mkdir /sys mkdir /proc mkdir /tmp mkdir -p /var/lock -mount -t sysfs sysfs /sys -mount -t proc proc /proc -mount -t ramfs none /dev +mount -t sysfs none /sys +mount -t proc none /proc + +# Note that this only becomes /dev on the real filesystem if udev's scripts +# are used; which they will be, but it's worth pointing out +mount -t tmpfs -o mode=0755 udev /dev touch /dev/.initramfs-tools mknod /dev/console c 5 1 mknod /dev/null c 1 3 @@ -56,74 +59,52 @@ for x in $(cat /proc/cmdline); do exec >/tmp/initramfs.debug 2>&1 set -x ;; - break) - break=yes + break=*) + break=${x#break=} ;; - breaknow) - panic "Spawning shell within the initramfs" + break) + break=premount ;; esac done +depmod -a +maybe_break top + # Don't do log messages here to avoid confusing usplash run_scripts /scripts/init-top . /scripts/${BOOT} +parse_numeric ${ROOT} -depmod -a - -# Populate /dev tree -log_begin_msg "Initializing /dev" -udevd_timeout=30 -echo > /proc/sys/kernel/hotplug -mkdir /dev/.udev /dev/.udev/db/ /dev/.udev/queue/ -udevd --daemon -udevsynthesize -while [ -d /dev/.udev/queue/ ]; do - sleep 1 - udevd_timeout=$(($udevd_timeout - 1)) - if [ $udevd_timeout -eq 0 ]; then - break - fi -done -log_end_msg - +maybe_break modules log_begin_msg "Loading modules" load_modules log_end_msg -parse_numeric ${ROOT} - -if [ x${break} = xyes ]; then - panic "Spawning shell within the initramfs" -fi - +maybe_break premount log_begin_msg "Running /scripts/init-premount" run_scripts /scripts/init-premount log_end_msg +maybe_break mount log_begin_msg "Mounting root file system" mountroot log_end_msg +maybe_break mount [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom" run_scripts /scripts/init-bottom [ "$quiet" != "y" ] && log_end_msg -# Move our /dev to the real filesystem. Do the setup that udev otherwise -# would. -killall udevd -mkdir -p /dev/.static/dev -chmod 700 /dev/.static/ -mount -n -o bind ${rootmnt}/dev /dev/.static/dev -mount -n -o move /dev ${rootmnt}/dev +# Move virtual filesystems over to the real filesystem +mount -n -o move /sys ${rootmnt}/sys +mount -n -o move /proc ${rootmnt}/proc -umount /sys -umount /proc - -if [ ! -x ${rootmnt}${init} ]; then +while [ ! -x ${rootmnt}${init} ]; do panic "Target filesystem doesn't have ${init}" -fi +done # Chain to real filesystem -exec run-init ${rootmnt} ${init} "$@" /root/dev/console +maybe_break init +exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console diff --git a/mkinitramfs b/mkinitramfs index 1cba5d5..9892a36 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -181,6 +181,7 @@ copy_exec /sbin/depmod /sbin copy_exec /sbin/rmmod /sbin mkdir -p "${DESTDIR}/etc/modprobe.d" copy_exec /etc/modprobe.d/aliases /etc/modprobe.d +copy_exec /etc/modprobe.d/blacklist /etc/modprobe.d run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks diff --git a/scripts/functions b/scripts/functions index 5147009..8a49c8e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -48,7 +48,14 @@ panic() /sbin/usplash_write "QUIT" fi echo $@ - FS1='(initramfs) ' exec /bin/sh /dev/console 2>&1 + FS1='(initramfs) ' /bin/sh /dev/console 2>&1 +} + +maybe_break() +{ + if [ x$1 = x${break} ]; then + panic "Spawning shell within the initramfs" + fi } render() @@ -152,58 +159,9 @@ run_scripts() call_scripts } -ide_boot_events() { - - modprobe -q ide-generic - - [ -e /proc/ide ] || return - - for drive in /proc/ide/*; do - [ -e ${drive}/media ] || continue - # nothing to do if the device has already been took in charge - unit=${drive#/proc/ide/} - [ -d /sys/block/$unit ] && continue - - read media < $drive/media - case "$media" in - disk) MODULE=ide-disk ;; - cdrom) MODULE=ide-cd ;; - tape) MODULE=ide-tape ;; - floppy) MODULE=ide-floppy ;; - *) MODULE=ide-generic ;; - esac - - modprobe -q ${MODULE} - done -} - -scsi_boot_events() -{ - [ -e /sys/bus/scsi/devices/ ] || return - - for device in /sys/bus/scsi/devices/*; do - [ -e "${device}"/type ] || continue - read media < ${device}/type - case "$media" in - 0) modprobe -q sd_mod; - esac - - done - -} - -i2o_boot_events() -{ - [ -e /sys/bus/i2o/devices/ ] || return - - for device in /sys/bus/i2o/devices/*; do - [ -e ${device}/block ] && modprobe i2o_block - done -} - +# Load custom modules first load_modules() { - # Load custom modules first if [ -e /conf/modules ]; then cat /conf/modules | while read m; do if [ -z "$m" ] \ @@ -216,37 +174,15 @@ load_modules() fi done fi - - ide_boot_events - - scsi_boot_events - - i2o_boot_events - - # FIXME - need to start LVM here - + + # FIXME: wrong place, but it gets done ;) if [ -e /sys/power/resume ]; then if [ -e "${resume}" ]; then - major_minor=$(ls -l ${resume} | \ - awk '{printf "%d:%d", $5, $6}') - echo $major_minor >/sys/power/resume + major=$((0x$(stat -c%t ${resume}))) + minor=$((0x$(stat -c%T ${resume}))) + echo ${major}:${minor} >/sys/power/resume fi fi - - # Give the USB bus a moment to catch up - sleep 2 - - for x in /sys/bus/usb/devices/*; do - if [ -e ${x}/modalias ]; then - modprobe -q $(cat ${x}/modalias) - fi - done - - ide_boot_events - - scsi_boot_events - - i2o_boot_events } parse_numeric() { diff --git a/scripts/init-premount/acpid b/scripts/init-premount/acpid deleted file mode 100755 index 61d226a..0000000 --- a/scripts/init-premount/acpid +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -modprobe -q fan -modprobe -q thermal diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal new file mode 100755 index 0000000..e0d79c3 --- /dev/null +++ b/scripts/init-premount/thermal @@ -0,0 +1,23 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# For ACPI systems +modprobe -q fan +modprobe -q thermal + +# For ppc64 systems +modprobe -q therm_pm72 diff --git a/scripts/local b/scripts/local index aa2cbfb..df09298 100644 --- a/scripts/local +++ b/scripts/local @@ -7,10 +7,17 @@ mountroot () run_scripts /scripts/local-top [ "$quiet" != "y" ] && log_end_msg + # Wait for SCSI/USB/etc. devices for a bit + slumber=10 + while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do + /bin/sleep 1 + slumber=$(( ${slumber} - 1 )) + done + # Get the root filesystem type - if [ ! -e "${ROOT}" ]; then + while [ ! -e "${ROOT}" ]; do panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" - fi + done eval $(fstype < ${ROOT}) diff --git a/scripts/nfs b/scripts/nfs index 7166b08..a2f6c3e 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -33,7 +33,6 @@ mountroot () roflag="-o rw" fi - sleep 3 nfsmount ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt} [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom" -- cgit v1.2.3 From 3b5cba6582b27a688d11ea5bc961470869bb6061 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Dec 2005 17:26:23 +0100 Subject: missed the newer udev depend on previous change. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 132693a..ee26d30 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.076-3) +Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.076-5) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged -- cgit v1.2.3 From c4163d08f4517cf0aebee2350b5e1b2c23bd7c37 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Dec 2005 17:43:22 +0100 Subject: fix wording in initramfs.conf regarding resume option. --- conf/initramfs.conf | 6 +++--- debian/changelog | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index 93554c1..079fe47 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -18,9 +18,9 @@ MODULES=most # # RESUME: [ /dev/hda2 | /dev/sdb2 ] # -# Optionaly set the swap partition to resume from. -# Above are only possible example please costumize. -# The command line of your boot loader will override this setting. +# optional - set the swap partition to resume from. +# "cat /proc/swaps | egrep ^/dev" should show possible candidates. +# The command line of your boot loader will override this setting. #RESUME= diff --git a/debian/changelog b/debian/changelog index 6a95f20..52ac5da 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.43) unstable; urgency=low + + * initramfs.conf: Fix wording choice for resume option. (Closes: #337575) + + -- maximilian attems Mon, 5 Dec 2005 17:38:50 +0100 + initramfs-tools (0.42) unstable; urgency=low * hook-functions: The mptspi module is required for at least some machines -- cgit v1.2.3 From 94cdc6efb0303ed4d3db0c7ebd15d08dd935957c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Dec 2005 17:56:44 +0100 Subject: activate all lvm volumes --- debian/changelog | 5 ++++- scripts/local-top/lvm | 7 +------ 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 52ac5da..48fd54b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,10 @@ initramfs-tools (0.43) unstable; urgency=low * initramfs.conf: Fix wording choice for resume option. (Closes: #337575) - -- maximilian attems Mon, 5 Dec 2005 17:38:50 +0100 + * local-top/lvm: Activate all lvm groups for future support of + lvm-crypt roots. (Closes: #339087) + + -- maximilian attems Mon, 5 Dec 2005 17:49:43 +0100 initramfs-tools (0.42) unstable; urgency=low diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 7ac81e6..9f608af 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -28,10 +28,5 @@ esac modprobe -q dm-mod -# Split volume group from logical volume. -vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') -# Reduce padded --'s to -'s -vg=$(echo ${vg} | sed -e 's#--#-#g') - -vgchange -ay ${vg} +vgchange -ay -- cgit v1.2.3 From de53fe8336d09076a1330b7d5793689e587bcd1c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Dec 2005 01:19:57 +0100 Subject: fix hooks/kernelextras not include current dir with wildcard. break out of loop on the '*' case. --- debian/changelog | 5 ++++- hooks/kernelextras | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 48fd54b..6a87941 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,10 @@ initramfs-tools (0.43) unstable; urgency=low * local-top/lvm: Activate all lvm groups for future support of lvm-crypt roots. (Closes: #339087) - -- maximilian attems Mon, 5 Dec 2005 17:49:43 +0100 + * hooks/kernelextras: Really fix #335505. + Don't expand wildcase to current dir. (Closes: #342153) + + -- maximilian attems Tue, 6 Dec 2005 01:16:41 +0100 initramfs-tools (0.42) unstable; urgency=low diff --git a/hooks/kernelextras b/hooks/kernelextras index df38884..33e6cb0 100755 --- a/hooks/kernelextras +++ b/hooks/kernelextras @@ -19,16 +19,16 @@ esac . /usr/share/initramfs-tools/hook-functions -if [ ! -d ${MODULESDIR}/initrd ]; then - exit 0 -fi - fbcon=n +set -x for x in ${MODULESDIR}/initrd/*; do x=${x##*/} x=${x%.*} case ${x} in + '*') + break + ;; *fb) fbcon=y ;; -- 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 'debian') 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 7131aa52d493fb25413b092d1e0a9f1625c0a8cd Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Dec 2005 12:27:21 +0100 Subject: update TODO to current state. --- debian/TODO | 12 +++--------- debian/changelog | 6 ++++-- 2 files changed, 7 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index 58f35fd..1f187ae 100644 --- a/debian/TODO +++ b/debian/TODO @@ -3,18 +3,12 @@ TODO o Grep for TODO and FIXME and do those. =) - o Eliminate udev. + o Eliminate ?udev?, klibc. o Support list and dep options o Default to dep for PPC - Possibly to detect newworld? - o Support evms + o External hooks support for evms - o Support cryptroot - - o Trace lilo bug - - o Capture udev events and pass them to udevsend - - o Detect RESUME partition + o Support cryptoroot diff --git a/debian/changelog b/debian/changelog index 3aa7509..07c6537 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,10 +12,12 @@ initramfs-tools (0.43) unstable; urgency=low and how to use them. Thanks David Härdeman for the patch. (Closes: #339091) - * initramfs.conf.5, mkinitramfs.8, update-initramfs.8: Update + * 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 + * TODO: update to current state. + + -- maximilian attems Tue, 6 Dec 2005 12:25:48 +0100 initramfs-tools (0.42) unstable; urgency=low -- cgit v1.2.3 From edfcf7ea648bc07435064df4d8c603db7d26aa56 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 7 Dec 2005 13:27:57 +0100 Subject: remove dup suspend code --- debian/changelog | 4 +++- scripts/functions | 9 --------- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 07c6537..6080b93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,7 +17,9 @@ initramfs-tools (0.43) unstable; urgency=low * TODO: update to current state. - -- maximilian attems Tue, 6 Dec 2005 12:25:48 +0100 + * scripts/functions: remove old duplicate suspend support. + + -- maximilian attems Wed, 7 Dec 2005 13:26:33 +0100 initramfs-tools (0.42) unstable; urgency=low diff --git a/scripts/functions b/scripts/functions index 8a49c8e..cde870d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -174,15 +174,6 @@ load_modules() fi done fi - - # FIXME: wrong place, but it gets done ;) - if [ -e /sys/power/resume ]; then - if [ -e "${resume}" ]; then - major=$((0x$(stat -c%t ${resume}))) - minor=$((0x$(stat -c%T ${resume}))) - echo ${major}:${minor} >/sys/power/resume - fi - fi } parse_numeric() { -- cgit v1.2.3 From 7c5923bbc4ec57eb144b773c0abc8711ffda292a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 12 Dec 2005 11:21:27 +0100 Subject: merge ubuntu modprobe silence stuff and cp all /etc/modprobe.d :) --- debian/changelog | 14 ++++++++++++++ mkinitramfs | 3 +-- scripts/functions | 2 +- scripts/init-premount/thermal | 6 +++--- scripts/local | 9 +-------- scripts/local-top/evms | 2 +- scripts/local-top/lvm | 2 +- scripts/local-top/md | 2 +- scripts/nfs | 4 ++-- 9 files changed, 25 insertions(+), 19 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6080b93..8683c70 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ initramfs-tools (0.43) unstable; urgency=low * scripts/functions: remove old duplicate suspend support. + * Sync with 0.40ubuntu8. (Closes: #337318) + -- maximilian attems Wed, 7 Dec 2005 13:26:33 +0100 initramfs-tools (0.42) unstable; urgency=low @@ -38,6 +40,18 @@ initramfs-tools (0.42) unstable; urgency=low -- maximilian attems Mon, 5 Dec 2005 12:59:59 +0100 +initramfs-tools (0.40ubuntu8) dapper; urgency=low + + * Call modprobe everywhere with "-Qb" to silence messages and allow user + blacklisting. + * Copy the entire /etc/modprobe.d directory to the initramfs, so we can + pick up all user blacklists and options. + * Remove the slumber for SCSI/USB devices from the local filesystem mount + script, udev's init-premount script will take care of this when + necessary. + + -- Scott James Remnant Wed, 7 Dec 2005 16:18:12 +0000 + initramfs-tools (0.40ubuntu7) dapper; urgency=low * remove "sleep 3" from the nfs script before the nfsmount command, diff --git a/mkinitramfs b/mkinitramfs index 9892a36..6855ff3 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -180,8 +180,7 @@ copy_exec /sbin/modprobe /sbin copy_exec /sbin/depmod /sbin copy_exec /sbin/rmmod /sbin mkdir -p "${DESTDIR}/etc/modprobe.d" -copy_exec /etc/modprobe.d/aliases /etc/modprobe.d -copy_exec /etc/modprobe.d/blacklist /etc/modprobe.d +cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d" run_scripts /usr/share/initramfs-tools/hooks run_scripts /etc/mkinitramfs/hooks diff --git a/scripts/functions b/scripts/functions index cde870d..da77542 100644 --- a/scripts/functions +++ b/scripts/functions @@ -170,7 +170,7 @@ load_modules() then continue; else - modprobe -q $m + modprobe -Qb $m fi done fi diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index e0d79c3..64858af 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -16,8 +16,8 @@ prereqs) esac # For ACPI systems -modprobe -q fan -modprobe -q thermal +modprobe -Qb fan +modprobe -Qb thermal # For ppc64 systems -modprobe -q therm_pm72 +modprobe -Qb therm_pm72 diff --git a/scripts/local b/scripts/local index df09298..6c08f39 100644 --- a/scripts/local +++ b/scripts/local @@ -7,13 +7,6 @@ mountroot () run_scripts /scripts/local-top [ "$quiet" != "y" ] && log_end_msg - # Wait for SCSI/USB/etc. devices for a bit - slumber=10 - while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do - /bin/sleep 1 - slumber=$(( ${slumber} - 1 )) - done - # Get the root filesystem type while [ ! -e "${ROOT}" ]; do panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" @@ -32,7 +25,7 @@ mountroot () fi # FIXME This has no error checking - modprobe ${FSTYPE} + modprobe -Qb ${FSTYPE} # FIXME This has no error checking # Mount root diff --git a/scripts/local-top/evms b/scripts/local-top/evms index 46fca5d..563a9ae 100755 --- a/scripts/local-top/evms +++ b/scripts/local-top/evms @@ -26,7 +26,7 @@ esac unset evms for module in dm-mod linear raid0 raid1 raid10 raid5 raid6; do - modprobe -q $module + modprobe -Qb $module done /sbin/evms_activate diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 9f608af..40c4e9b 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -26,7 +26,7 @@ case ${vg} in ;; esac -modprobe -q dm-mod +modprobe -Qb dm-mod vgchange -ay diff --git a/scripts/local-top/md b/scripts/local-top/md index c7515fe..4132159 100755 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -25,7 +25,7 @@ for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do fi raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') if [ "$raidlvl" ]; then - modprobe -q ${raidlvl} 2>/dev/null + modprobe -Qb ${raidlvl} 2>/dev/null gotraid=y fi done diff --git a/scripts/nfs b/scripts/nfs index a2f6c3e..0205047 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -9,9 +9,9 @@ mountroot () run_scripts /scripts/nfs-top [ "$quiet" != "y" ] && log_end_msg - modprobe nfs + modprobe -Qb nfs # For DHCP - modprobe af_packet + modprobe -Qb af_packet ipconfig ${DEVICE} . /tmp/net-${DEVICE}.conf -- cgit v1.2.3 From 98bc2119723c77cdcdd5c0a4bfa4e823c334c146 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 12 Dec 2005 11:26:09 +0100 Subject: set urgency=high --- debian/changelog | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8683c70..b04358b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,8 @@ -initramfs-tools (0.43) unstable; urgency=low +initramfs-tools (0.43) unstable; urgency=high + + "O partigiano portami via" + + * Urgency high upload to stay in sync with udev for testing. * initramfs.conf: Fix wording choice for resume option. (Closes: #337575) @@ -21,7 +25,7 @@ initramfs-tools (0.43) unstable; urgency=low * Sync with 0.40ubuntu8. (Closes: #337318) - -- maximilian attems Wed, 7 Dec 2005 13:26:33 +0100 + -- maximilian attems Mon, 12 Dec 2005 11:22:15 +0100 initramfs-tools (0.42) unstable; urgency=low -- cgit v1.2.3 From 1c8330542d7a5d35c10e02db4e210352517176b3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 12 Dec 2005 11:52:57 +0100 Subject: debian's module-init-tools of testing doesn't have yet the modprobe -Qb interface, keep the change for next time. :( --- debian/changelog | 2 ++ scripts/functions | 2 +- scripts/init-premount/thermal | 6 +++--- scripts/local | 2 +- scripts/local-top/evms | 2 +- scripts/local-top/lvm | 2 +- scripts/local-top/md | 2 +- scripts/nfs | 4 ++-- 8 files changed, 12 insertions(+), 10 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b04358b..1a61807 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,8 @@ initramfs-tools (0.43) unstable; urgency=high * scripts/functions: remove old duplicate suspend support. * Sync with 0.40ubuntu8. (Closes: #337318) + - Revert the modprobe changes for now as modules-init-tools of + testing doesn't have yet the wanted interface. -- maximilian attems Mon, 12 Dec 2005 11:22:15 +0100 diff --git a/scripts/functions b/scripts/functions index da77542..cde870d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -170,7 +170,7 @@ load_modules() then continue; else - modprobe -Qb $m + modprobe -q $m fi done fi diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index 64858af..e0d79c3 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -16,8 +16,8 @@ prereqs) esac # For ACPI systems -modprobe -Qb fan -modprobe -Qb thermal +modprobe -q fan +modprobe -q thermal # For ppc64 systems -modprobe -Qb therm_pm72 +modprobe -q therm_pm72 diff --git a/scripts/local b/scripts/local index 6c08f39..979f07d 100644 --- a/scripts/local +++ b/scripts/local @@ -25,7 +25,7 @@ mountroot () fi # FIXME This has no error checking - modprobe -Qb ${FSTYPE} + modprobe ${FSTYPE} # FIXME This has no error checking # Mount root diff --git a/scripts/local-top/evms b/scripts/local-top/evms index 563a9ae..46fca5d 100755 --- a/scripts/local-top/evms +++ b/scripts/local-top/evms @@ -26,7 +26,7 @@ esac unset evms for module in dm-mod linear raid0 raid1 raid10 raid5 raid6; do - modprobe -Qb $module + modprobe -q $module done /sbin/evms_activate diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 40c4e9b..9f608af 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -26,7 +26,7 @@ case ${vg} in ;; esac -modprobe -Qb dm-mod +modprobe -q dm-mod vgchange -ay diff --git a/scripts/local-top/md b/scripts/local-top/md index 4132159..c7515fe 100755 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -25,7 +25,7 @@ for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do fi raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') if [ "$raidlvl" ]; then - modprobe -Qb ${raidlvl} 2>/dev/null + modprobe -q ${raidlvl} 2>/dev/null gotraid=y fi done diff --git a/scripts/nfs b/scripts/nfs index 0205047..a2f6c3e 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -9,9 +9,9 @@ mountroot () run_scripts /scripts/nfs-top [ "$quiet" != "y" ] && log_end_msg - modprobe -Qb nfs + modprobe nfs # For DHCP - modprobe -Qb af_packet + modprobe af_packet ipconfig ${DEVICE} . /tmp/net-${DEVICE}.conf -- cgit v1.2.3 From 05982a63b2425a309325ba7a945a4bb11fd6146d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 12 Dec 2005 16:03:17 +0100 Subject: revert activate all vg, may leed to data loss. --- debian/changelog | 5 +---- scripts/local-top/lvm | 7 ++++++- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1a61807..8b14a93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.43) unstable; urgency=high +initramfs-tools (0.44) unstable; urgency=high "O partigiano portami via" @@ -6,9 +6,6 @@ initramfs-tools (0.43) unstable; urgency=high * initramfs.conf: Fix wording choice for resume option. (Closes: #337575) - * local-top/lvm: Activate all lvm groups for future support of - lvm-crypt roots. (Closes: #339087) - * hooks/kernelextras: Really fix #335505. Don't expand wildcase to current dir. (Closes: #342153) diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 9f608af..7ac81e6 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -28,5 +28,10 @@ esac modprobe -q dm-mod -vgchange -ay +# Split volume group from logical volume. +vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') +# Reduce padded --'s to -'s +vg=$(echo ${vg} | sed -e 's#--#-#g') + +vgchange -ay ${vg} -- cgit v1.2.3 From e0de055ba1a1c32acb70f92ec65bf23139b73b8f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 28 Dec 2005 01:28:31 +0100 Subject: fix passing of the debug param to init. --- debian/changelog | 6 ++++++ init | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8b14a93..b53ff18 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.45) unstable; urgency=low + + * Unset debug before calling init, confuses /etc/init.d/rc. + + -- maximilian attems Tue, 27 Dec 2005 19:12:31 +0100 + initramfs-tools (0.44) unstable; urgency=high "O partigiano portami via" diff --git a/init b/init index 1f6c732..db18f15 100755 --- a/init +++ b/init @@ -105,6 +105,11 @@ while [ ! -x ${rootmnt}${init} ]; do panic "Target filesystem doesn't have ${init}" done +# Confuses /etc/init.d/rc +if [ -n ${debug} ]; then + unset debug +fi + # Chain to real filesystem maybe_break init exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console -- cgit v1.2.3 From 0f9b079738bd9e63896735b80d1768e34fc0b8ea Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 29 Dec 2005 10:30:39 +0100 Subject: add hook ide depending on udev loads ide-disk and ide-generic on all needed ide cases. --- debian/changelog | 10 ++++++++-- scripts/init-premount/ide | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 scripts/init-premount/ide (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b53ff18..e054662 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ -initramfs-tools (0.45) unstable; urgency=low +initramfs-tools (0.45) unstable; urgency=high + + "Che mi sento di morir." * Unset debug before calling init, confuses /etc/init.d/rc. - -- maximilian attems Tue, 27 Dec 2005 19:12:31 +0100 + * scripts/init-premount/ide: Load uncondionally for ide boots ide-generic + and also ide-disk, as udev ignores them. High urgency upload for rc bugs. + (Closes: #332824, #342925, #344754, #337045, #338406) + + -- maximilian attems Thu, 29 Dec 2005 10:28:11 +0100 initramfs-tools (0.44) unstable; urgency=high diff --git a/scripts/init-premount/ide b/scripts/init-premount/ide new file mode 100644 index 0000000..03a3fdf --- /dev/null +++ b/scripts/init-premount/ide @@ -0,0 +1,38 @@ +#!/bin/sh + +PREREQ="udev" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +modprobe -q ide-generic + +[ -e /proc/ide ] || return + +for drive in /proc/ide/*; do + [ -e ${drive}/media ] || continue + # nothing to do if the device has already been took in charge + unit=${drive#/proc/ide/} + [ -d /sys/block/$unit ] && continue + + read media < $drive/media + case "$media" in + disk) MODULE=ide-disk ;; + cdrom) MODULE=ide-cd ;; + tape) MODULE=ide-tape ;; + floppy) MODULE=ide-floppy ;; + *) MODULE=ide-generic ;; + esac + + modprobe -q ${MODULE} +done -- cgit v1.2.3 From 8c914c8ced50b1eb8c62353bb73101347212a862 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 29 Dec 2005 14:12:28 +0100 Subject: upps had included the .bzr files due to newer dev machine. --- debian/changelog | 12 ++++++++++-- scripts/init-premount/ide | 0 2 files changed, 10 insertions(+), 2 deletions(-) mode change 100644 => 100755 scripts/init-premount/ide (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e054662..cef2ae6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.46) unstable; urgency=low + + * Don't include .bzr dirs in source upload. + Thanks Frederik Schüler + + -- maximilian attems Thu, 29 Dec 2005 14:07:07 +0100 + initramfs-tools (0.45) unstable; urgency=high "Che mi sento di morir." @@ -6,9 +13,10 @@ initramfs-tools (0.45) unstable; urgency=high * scripts/init-premount/ide: Load uncondionally for ide boots ide-generic and also ide-disk, as udev ignores them. High urgency upload for rc bugs. - (Closes: #332824, #342925, #344754, #337045, #338406) + Thanks Frans Pop and Joey Hess for + testing! (Closes: #332824, #342925, #344754, #337045, #338406) - -- maximilian attems Thu, 29 Dec 2005 10:28:11 +0100 + -- maximilian attems Thu, 29 Dec 2005 10:34:32 +0100 initramfs-tools (0.44) unstable; urgency=high diff --git a/scripts/init-premount/ide b/scripts/init-premount/ide old mode 100644 new mode 100755 -- cgit v1.2.3 From bc24e84988f7cf998091d3e2602b34523068ce81 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 29 Dec 2005 15:14:36 +0100 Subject: dch char changes + fs email --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index cef2ae6..2d3ae93 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ initramfs-tools (0.46) unstable; urgency=low * Don't include .bzr dirs in source upload. - Thanks Frederik Schüler + Thanks Frederik Schüler - -- maximilian attems Thu, 29 Dec 2005 14:07:07 +0100 + -- maximilian attems Thu, 29 Dec 2005 14:23:46 +0100 initramfs-tools (0.45) unstable; urgency=high -- cgit v1.2.3 From 3632a55d4a4ebc581a557600dc6e3dfad6ad5269 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 4 Jan 2006 12:02:15 +0100 Subject: small quick fix for klibc 1.1.14 /bin/sh no longer build don't complain about missing it. --- debian/changelog | 7 +++++++ mkinitramfs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2d3ae93..67d3b59 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.47) unstable; urgency=low + + * mkinitramfs: Don't complain about missing /bin/sh - use rm -f. + Minor cleanup for the newer packaging of klibc 1.1.14. + + -- maximilian attems Sat, 31 Dec 2005 14:17:31 +0100 + initramfs-tools (0.46) unstable; urgency=low * Don't include .bzr dirs in source upload. diff --git a/mkinitramfs b/mkinitramfs index 6855ff3..0004dbc 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -171,7 +171,7 @@ done copy_exec "${CONFDIR}/initramfs.conf" /conf # Busybox -rm ${DESTDIR}/bin/sh +rm -f ${DESTDIR}/bin/sh copy_exec ${BUSYBOXDIR}/busybox /bin/busybox ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh -- cgit v1.2.3 From 795eab98a8e317ba9a1252c8389517a216f830b7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 4 Jan 2006 16:12:21 +0100 Subject: /lib/klibc-*.so moved from /usr/lib/klibc/lib/klibc-*.so --- debian/changelog | 8 ++++++++ debian/control | 2 +- mkinitramfs | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 67d3b59..d201cff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.48) unstable; urgency=low + + * mkinitramfs: klibc 1.1.14 moved from /usr/lib/klibc/lib to /lib + Bonus: You can now execute any klibc bin directly. + Cope with the move and pump dep. (Closes: 345949) + + -- maximilian attems Wed, 4 Jan 2006 16:11:25 +0100 + initramfs-tools (0.47) unstable; urgency=low * mkinitramfs: Don't complain about missing /bin/sh - use rm -f. diff --git a/debian/control b/debian/control index ee26d30..463307a 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.0.14-1ubuntu2), busybox (>= 1:1.01-3), cpio, udev (>= 0.076-5) +Depends: klibc-utils (>= 1.1.14-2), busybox (>= 1:1.01-3), cpio, udev (>= 0.076-5) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/mkinitramfs b/mkinitramfs index 0004dbc..5a89213 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -159,7 +159,7 @@ fi # symlinks. ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin -ln -s /usr/lib/klibc/lib/klibc-*.so ${DESTDIR}/lib +ln -s /lib/klibc-*.so ${DESTDIR}/lib copy_exec /usr/share/initramfs-tools/init /init cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts" for f in $(cd ${CONFDIR}/scripts && \ -- cgit v1.2.3 From 11a02f5b0266ef6e4816e92561dbb5ca0f3579dc Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 4 Jan 2006 16:40:22 +0100 Subject: pump debhelper dep as pointed out by linda --- debian/changelog | 6 ++++++ debian/control | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d201cff..4f6cca9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.49) unstable; urgency=low + + * Pump dephelper to 4.1.0 dependency as pointed out by linda. + + -- maximilian attems Wed, 4 Jan 2006 16:39:00 +0100 + initramfs-tools (0.48) unstable; urgency=low * mkinitramfs: klibc 1.1.14 moved from /usr/lib/klibc/lib to /lib diff --git a/debian/control b/debian/control index 463307a..bf50d66 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: utils Priority: optional Uploaders: Jeff Bailey , maximilian attems Maintainer: Debian kernel team -Build-Depends-Indep: debhelper (>= 4.0.0), cdbs +Build-Depends-Indep: debhelper (>= 4.1.0), cdbs Standards-Version: 3.6.2.0 Package: initramfs-tools -- cgit v1.2.3 From b8a9c0fbd0830aa536882d2047c7df0472a9faf5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 11 Jan 2006 03:37:57 +0100 Subject: add first DEBUG section to initramfs-tools.8 --- debian/changelog | 4 +++- initramfs-tools.8 | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4f6cca9..aee598d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,9 @@ initramfs-tools (0.49) unstable; urgency=low * Pump dephelper to 4.1.0 dependency as pointed out by linda. - -- maximilian attems Wed, 4 Jan 2006 16:39:00 +0100 + * initramfs-tools.8: Add DEBUG section, cheat how to check the initramfs. + + -- maximilian attems Wed, 11 Jan 2006 03:33:24 +0100 initramfs-tools (0.48) unstable; urgency=low diff --git a/initramfs-tools.8 b/initramfs-tools.8 index a23372e..a08ef1b 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -385,6 +385,19 @@ exit 0 .fi .RE +.SH DEBUG +It is easy to check the generated initramfs for its content. One may need +to double-check if it contains the relevant binaries, libs or modules: +.RS +.nf +mkdir tmp/initramfs +cd tmp/initramfs +gunzip -c -9 /boot/initrd.img-2.6.15-1-686 | \\ +cpio -i -d -H newc --no-absolute-filenames +.fi +.RE + + .SH AUTHOR The initramfs-tools are written by Jeff Bailey . .PP -- cgit v1.2.3 From bce0c73e77b777ef03894d703c727dbf4b0f4298 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 14 Jan 2006 17:34:00 +0100 Subject: evms took their own hooks. :) --- debian/changelog | 7 +++++++ hooks/evms | 36 ------------------------------------ scripts/local-top/evms | 32 -------------------------------- 3 files changed, 7 insertions(+), 68 deletions(-) delete mode 100755 hooks/evms delete mode 100755 scripts/local-top/evms (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index aee598d..79b7c9e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.50) unstable; urgency=low + + * EVMS takes care of it's own hooks, rm: hooks/evms, scripts/local-top/evms. + Thanks Steinar H. Gunderson . (Closes: 340258) + + -- maximilian attems Sat, 14 Jan 2006 17:26:24 +0100 + initramfs-tools (0.49) unstable; urgency=low * Pump dephelper to 4.1.0 dependency as pointed out by linda. diff --git a/hooks/evms b/hooks/evms deleted file mode 100755 index a58b2a4..0000000 --- a/hooks/evms +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /usr/share/initramfs-tools/hook-functions - -if [ ! -x /sbin/evms_activate ]; then - exit 0 -fi - -copy_exec /sbin/evms_activate /sbin -cp /etc/evms.conf ${DESTDIR}/etc - -EVMS_VERSION=$(/usr/sbin/evms_query info | grep "EVMS Version" | awk '{ print $3; }') - -mkdir -p ${DESTDIR}/lib/evms/${EVMS_VERSION} - -for x in bbr bbr_seg bsd disk dos drivelink gpt lvm2 mac md multipath; do - copy_exec /lib/evms/${EVMS_VERSION}/${x}-*.so /lib/evms/${EVMS_VERSION} -done - -for x in dm_mod linear raid0 raid1 raid10 raid5 raid6; do - manual_add_modules ${x} -done diff --git a/scripts/local-top/evms b/scripts/local-top/evms deleted file mode 100755 index 46fca5d..0000000 --- a/scripts/local-top/evms +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -evms=${ROOT#/dev/evms/} - -case ${evms} in - /*) - exit 0 - ;; -esac - -unset evms - -for module in dm-mod linear raid0 raid1 raid10 raid5 raid6; do - modprobe -q $module -done - -/sbin/evms_activate -- cgit v1.2.3 From 51aeb44deb330033ad26ffcb1494136a4d0fd159 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 14 Jan 2006 17:40:23 +0100 Subject: fix MODULES=dep due to modprobe --show-depends printing not only insmod commands but also the install ones. --- debian/changelog | 8 ++++++-- hook-functions | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 79b7c9e..6b63420 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,13 @@ initramfs-tools (0.50) unstable; urgency=low - * EVMS takes care of it's own hooks, rm: hooks/evms, scripts/local-top/evms. + * hook-functions: Fix MODULES=dep as `modprobe --show-depends' prints not + only the insmod commands, but also the install ones. Thanks for the patch + to Jean Charles Delepine . (Closes: #342616) + + * hooks/evms, scripts/local-top/evms: EVMS takes care of it's own hooks, rm. Thanks Steinar H. Gunderson . (Closes: 340258) - -- maximilian attems Sat, 14 Jan 2006 17:26:24 +0100 + -- maximilian attems Sat, 14 Jan 2006 17:38:08 +0100 initramfs-tools (0.49) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 9d0bc29..d3fe0a3 100644 --- a/hook-functions +++ b/hook-functions @@ -40,7 +40,7 @@ add_modules_from_file() manual_add_modules() { - for mam_x in $(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '{ print $2 }'); do + for mam_x in $(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '/^insmod/ { print $2 }'); do # Prune duplicates if [ -e "${DESTDIR}/${mam_x}" ]; then continue -- cgit v1.2.3 From 389869941448db6563146be8e7eb3fe20612a6f7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 14 Jan 2006 18:29:35 +0100 Subject: add latest changelog --- debian/changelog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6b63420..db92821 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,13 +1,15 @@ initramfs-tools (0.50) unstable; urgency=low - * hook-functions: Fix MODULES=dep as `modprobe --show-depends' prints not + "E so io muoio da partigiano" + + * hook-functions: Fix MODULES=dep as `modprobe --show-depends' prints not only the insmod commands, but also the install ones. Thanks for the patch to Jean Charles Delepine . (Closes: #342616) * hooks/evms, scripts/local-top/evms: EVMS takes care of it's own hooks, rm. Thanks Steinar H. Gunderson . (Closes: 340258) - -- maximilian attems Sat, 14 Jan 2006 17:38:08 +0100 + -- maximilian attems Sat, 14 Jan 2006 17:40:48 +0100 initramfs-tools (0.49) unstable; urgency=low -- cgit v1.2.3 From af11b6a4f24b46cce5a46ddafa5e3d98f79f0403 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 14 Jan 2006 18:32:45 +0100 Subject: uuh removed a revision with shelve from previous 0.49 --- debian/changelog | 4 +++- debian/control | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index db92821..a1a029e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,7 +17,9 @@ initramfs-tools (0.49) unstable; urgency=low * initramfs-tools.8: Add DEBUG section, cheat how to check the initramfs. - -- maximilian attems Wed, 11 Jan 2006 03:33:24 +0100 + * Add optional sarge busybox-cvs-static dep to ease backport. + + -- maximilian attems Thu, 12 Jan 2006 17:28:42 +0100 initramfs-tools (0.48) unstable; urgency=low diff --git a/debian/control b/debian/control index bf50d66..4e06b8e 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.1.14-2), busybox (>= 1:1.01-3), cpio, udev (>= 0.076-5) +Depends: klibc-utils (>= 1.1.14-2), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, udev (>= 0.076-5) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged -- cgit v1.2.3 From 4857b243fc2c8b1148041320fd923fab4b1d7a6e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 16 Jan 2006 10:38:37 +0100 Subject: another changelog fix --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a1a029e..4d3195f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.50) unstable; urgency=low +initramfs-tools (0.50c) unstable; urgency=low "E so io muoio da partigiano" @@ -19,7 +19,7 @@ initramfs-tools (0.49) unstable; urgency=low * Add optional sarge busybox-cvs-static dep to ease backport. - -- maximilian attems Thu, 12 Jan 2006 17:28:42 +0100 + -- maximilian attems Thu, 12 Jan 2006 17:28:42 +0100 initramfs-tools (0.48) unstable; urgency=low -- cgit v1.2.3 From 270657ae007b35223c57829bfa6ed2e331eed851 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 23 Jan 2006 21:39:16 +0100 Subject: Call panic on circular deps to get rescue shell. --- debian/changelog | 6 ++++++ scripts/functions | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4d3195f..f354777 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.51) unstable; urgency=low + + * scripts/functions: Call panic on circular deps to get rescue shell. + + -- maximilian attems Mon, 23 Jan 2006 21:37:45 +0100 + initramfs-tools (0.50c) unstable; urgency=low "E so io muoio da partigiano" diff --git a/scripts/functions b/scripts/functions index cde870d..f9cad01 100644 --- a/scripts/functions +++ b/scripts/functions @@ -138,8 +138,7 @@ reduce_prereqs() fi done if [ ${i} -eq ${oldi} ]; then - echo "PANIC: Circular dependancy. Exiting." >&2 - exit 1 + panic "PANIC: Circular dependancy. Exiting." fi done } -- cgit v1.2.3 From f2688cc18d0e0420ad4ad069ed6bb32b2869badb Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 23 Jan 2006 21:47:26 +0100 Subject: use CONFDIR everywhere --- debian/changelog | 4 +++- mkinitramfs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f354777..1308f23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,9 @@ initramfs-tools (0.51) unstable; urgency=low * scripts/functions: Call panic on circular deps to get rescue shell. - -- maximilian attems Mon, 23 Jan 2006 21:37:45 +0100 + * mkinitramfs: Use ${CONFDIR} everywhere. + + -- maximilian attems Mon, 23 Jan 2006 21:46:45 +0100 initramfs-tools (0.50c) unstable; urgency=low diff --git a/mkinitramfs b/mkinitramfs index 5a89213..9b9e734 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -183,7 +183,7 @@ mkdir -p "${DESTDIR}/etc/modprobe.d" cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d" run_scripts /usr/share/initramfs-tools/hooks -run_scripts /etc/mkinitramfs/hooks +run_scripts "${CONFDIR}"/hooks # Apply DSDT to initramfs if [ -e "${CONFDIR}/DSDT.aml" ]; then -- cgit v1.2.3 From 5ac8871bdc5093eb2b570937dcc37167b904cb8e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 24 Jan 2006 12:27:42 +0100 Subject: sync 0.40ubuntu16 --- debian/changelog | 72 ++++++++++++++++++++++++++++++++++++++++++- debian/control | 2 +- hook-functions | 10 +++++- hooks/thermal | 17 +++++----- init | 6 ++++ mkinitramfs | 4 +++ scripts/functions | 18 ++++++++--- scripts/init-premount/thermal | 16 ++++++---- update-initramfs | 12 ++++++++ 9 files changed, 137 insertions(+), 20 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1308f23..b82a343 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,12 @@ initramfs-tools (0.51) unstable; urgency=low * mkinitramfs: Use ${CONFDIR} everywhere. - -- maximilian attems Mon, 23 Jan 2006 21:46:45 +0100 + * Sync with 0.40ubuntu16: + - skip 0.40ubuntu15 udev gets fixed to only call update-initramfs + when /etc/mkinitramfs/initramfs.conf is there. + - 0.40ubuntu13 don't take over all initramfs images in Debian. + + -- maximilian attems Tue, 24 Jan 2006 11:12:18 +0100 initramfs-tools (0.50c) unstable; urgency=low @@ -109,6 +114,71 @@ initramfs-tools (0.42) unstable; urgency=low -- maximilian attems Mon, 5 Dec 2005 12:59:59 +0100 +initramfs-tools (0.40ubuntu16) dapper; urgency=low + + * Bump klibc-utils dependency to (>= 1.1.16-1), for hppa and ia64. + + -- Adam Conrad Thu, 19 Jan 2006 04:00:39 +1100 + +initramfs-tools (0.40ubuntu15) dapper; urgency=low + + * Drop the udev dependency, so we always get configured before udev. + We can get away with this now that udev hooks/scripts have been split + into the udev package proper. This should close Malone bug #28808. + + -- Adam Conrad Wed, 18 Jan 2006 22:50:27 +1100 + +initramfs-tools (0.40ubuntu14) dapper; urgency=low + + * If copy_exec is asked to copy to the same location twice, check if + we're copying the same file again. If so, do nothing and carry on, if + not, warn that we asked it for an impossibility, and don't overwrite. + + -- Adam Conrad Thu, 12 Jan 2006 18:00:12 +1100 + +initramfs-tools (0.40ubuntu13) dapper; urgency=low + + * Default to taking over other initramfs images in Ubuntu, as this is + more consistent with what our packaging expects to be able to do. + * Make "update-initramfs -u" try to find the running kernel before it + attempts to search the symbolic link list and its own sha1 list. + + -- Adam Conrad Wed, 11 Jan 2006 16:25:20 +1100 + +initramfs-tools (0.40ubuntu12) dapper; urgency=low + + * Oops, move the progress state file into the new directory too. + + -- Adam Conrad Mon, 9 Jan 2006 21:26:44 +1100 + +initramfs-tools (0.40ubuntu11) dapper; urgency=low + + * Move the state directory from /dev/initramfs to /dev/.initramfs + + -- Adam Conrad Mon, 9 Jan 2006 21:17:50 +1100 + +initramfs-tools (0.40ubuntu10) dapper; urgency=low + + * Create the /dev/initramfs directory as soon as we mount /dev, so other + packages that need a playground in /dev can do so in a uniform location. + * Update the usplash progress bar every time we are asked to output a + success or failure value from an init action, and write our progress to + /dev/initramfs for sysv-init to gather up and pick up where we left off. + * Export $DPKG_ARCH in both mkinitramfs (for use by hooks) and initramfs. + * Use $DPKG_ARCH in the thermal hook/script to divide the x86 stuff from + the powerpc stuff, not because we have to, but as an example to others. + + -- Adam Conrad Mon, 9 Jan 2006 10:51:51 +1100 + +initramfs-tools (0.40ubuntu9) dapper; urgency=low + + * Make some changes to cope with the new and improved klibc packaging: + - Add a force to the deletion of ${DESTDIR}/bin/sh, to avoid errors. + - Cope with libklibc moving from /usr/lib/klibc/lib to /lib. + - Bump dependency on klibc-utils to one new enough for the above. + + -- Adam Conrad Thu, 5 Jan 2006 15:13:15 +1100 + initramfs-tools (0.40ubuntu8) dapper; urgency=low * Call modprobe everywhere with "-Qb" to silence messages and allow user diff --git a/debian/control b/debian/control index 4e06b8e..b4124ab 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.1.14-2), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, udev (>= 0.076-5) +Depends: klibc-utils (>= 1.1.16-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, udev (>= 0.076-5) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/hook-functions b/hook-functions index d3fe0a3..000c701 100644 --- a/hook-functions +++ b/hook-functions @@ -54,7 +54,15 @@ manual_add_modules() # $1 is source # $2 is relative destination copy_exec() { - ln -s ${1} ${DESTDIR}/${2} + final_destination=${DESTDIR}/${2}/`basename ${1}` + if [ -L "$final_destination" ]; then + if ! [ `readlink ${final_destination}` = "${1}" ]; then + echo "W:copy_exec: Not copying ${1} to \$DESTDIR${2}/`basename ${1}`, which is already a copy of `readlink ${final_destination}`" >&2 + return + fi + else + ln -s ${1} ${DESTDIR}/${2} + fi # Copy the dependant libraries for x in $(ldd ${1} 2>/dev/null | sed -e ' diff --git a/hooks/thermal b/hooks/thermal index 4426de3..c27c957 100755 --- a/hooks/thermal +++ b/hooks/thermal @@ -19,10 +19,13 @@ esac . /usr/share/initramfs-tools/hook-functions -# ACPI Systems -for x in fan thermal; do - manual_add_modules ${x} -done - -# PPC64 Systems -manual_add_modules therm_pm72 +case "$DPKG_ARCH" in +# copy the right modules +powerpc|ppc64) + manual_add_modules therm_pm72 + ;; +i386|amd64|ia64) + manual_add_modules fan + manual_add_modules thermal + ;; +esac diff --git a/init b/init index db18f15..e983534 100755 --- a/init +++ b/init @@ -13,9 +13,15 @@ mount -t proc none /proc # are used; which they will be, but it's worth pointing out mount -t tmpfs -o mode=0755 udev /dev touch /dev/.initramfs-tools +mkdir /dev/.initramfs mknod /dev/console c 5 1 mknod /dev/null c 1 3 +# Export the dpkg architecture +export DPKG_ARCH= +. /conf/arch.conf + +# Bring in the main config . /conf/initramfs.conf . /scripts/functions diff --git a/mkinitramfs b/mkinitramfs index 9b9e734..d3d6504 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -126,12 +126,15 @@ fi DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1 __TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1 +DPKG_ARCH=`dpkg --print-installation-architecture` + # Export environment for hook scripts. # export MODULESDIR export version export CONFDIR export DESTDIR +export DPKG_ARCH # Private, used by 'catenate_cpiogz'. export __TMPCPIOGZ @@ -168,6 +171,7 @@ for f in $(cd ${CONFDIR}/scripts && \ mkdir --parents "${DESTDIR}/scripts/$(dirname "${f}")" cp -p "${CONFDIR}/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" done +echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf copy_exec "${CONFDIR}/initramfs.conf" /conf # Busybox diff --git a/scripts/functions b/scripts/functions index f9cad01..7f8fa3c 100644 --- a/scripts/functions +++ b/scripts/functions @@ -35,12 +35,22 @@ log_end_msg() /sbin/usplash_write "SUCCESS ok" fi _log_msg "Done." + update_progress } -# update_progress() # ToDo: NOP placeholder... what else for usplash? -# { -# : -# } +update_progress() +{ + if [ -z "$PROGRESS_STATE" ]; then + export PROGRESS_STATE=0 + fi + + PROGRESS_STATE=$(($PROGRESS_STATE + 1)) + echo "PROGRESS_STATE=${PROGRESS_STATE}" > /dev/.initramfs/progress_state + + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "PROGRESS $PROGRESS_STATE" + fi +} panic() { diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index e0d79c3..a41f6f3 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -15,9 +15,13 @@ prereqs) ;; esac -# For ACPI systems -modprobe -q fan -modprobe -q thermal - -# For ppc64 systems -modprobe -q therm_pm72 +case "$DPKG_ARCH" in +# load the right modules +powerpc|ppc64) + modprobe -q therm_pm72 + ;; +i386|amd64|ia64) + modprobe -q fan + modprobe -q thermal + ;; +esac diff --git a/update-initramfs b/update-initramfs index 644a1aa..0d757b1 100644 --- a/update-initramfs +++ b/update-initramfs @@ -112,6 +112,13 @@ get_sorted_versions() verbose "Available versions: ${version_list}" } +set_current_version() +{ + if [ -f /boot/vmlinu?-`uname -r` ]; then + version=`uname -r` + fi +} + set_linked_version() { if [ -L /initrd.img ]; then @@ -159,6 +166,10 @@ create() update() { + if [ -z "${version}" ]; then + set_current_version + fi + if [ -z "${version}" ]; then set_linked_version fi @@ -227,6 +238,7 @@ altered_check() # Defaults verbose=0 yes=0 +# We default to takeover=1 in Ubuntu, but not Debian takeover=0 ## -- cgit v1.2.3 From e31be60a62406ef81d949eb67ac2bc64e90bf4ad Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 24 Jan 2006 13:10:56 +0100 Subject: take care of modular atkb and i8042. seen on the Debian ppc .config!? --- debian/changelog | 7 ++++++- hook-functions | 2 +- scripts/functions | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b82a343..9704e27 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,13 @@ initramfs-tools (0.51) unstable; urgency=low - skip 0.40ubuntu15 udev gets fixed to only call update-initramfs when /etc/mkinitramfs/initramfs.conf is there. - 0.40ubuntu13 don't take over all initramfs images in Debian. + + * hook-functions: auto_add_modules atkb and i8042. + + * scripts/functions: on panic modprobe atkb and i8042 - work around for + broken configs, where those are not build in. (Closes: #337497) - -- maximilian attems Tue, 24 Jan 2006 11:12:18 +0100 + -- maximilian attems Tue, 24 Jan 2006 13:04:40 +0100 initramfs-tools (0.50c) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 000c701..bb44d9e 100644 --- a/hook-functions +++ b/hook-functions @@ -137,7 +137,7 @@ dep_add_modules() auto_add_modules() { # base - for x in ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do + for x in ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet atkbd i8042; do manual_add_modules "${x}" done diff --git a/scripts/functions b/scripts/functions index 7f8fa3c..2113745 100644 --- a/scripts/functions +++ b/scripts/functions @@ -57,6 +57,8 @@ panic() if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "QUIT" fi + modprobe -q i8042 + modprobe -q atkbd echo $@ FS1='(initramfs) ' /bin/sh /dev/console 2>&1 } -- cgit v1.2.3 From 0403b8bc09e6a4e499e3489ac24359a24e20d16a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 24 Jan 2006 13:13:56 +0100 Subject: check for /dev/.initramfs/ before writing into it, seen on an testboot with "break=init". --- debian/changelog | 7 +++++-- scripts/functions | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9704e27..fb9f4ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,13 +8,16 @@ initramfs-tools (0.51) unstable; urgency=low - skip 0.40ubuntu15 udev gets fixed to only call update-initramfs when /etc/mkinitramfs/initramfs.conf is there. - 0.40ubuntu13 don't take over all initramfs images in Debian. - + * hook-functions: auto_add_modules atkb and i8042. * scripts/functions: on panic modprobe atkb and i8042 - work around for broken configs, where those are not build in. (Closes: #337497) - -- maximilian attems Tue, 24 Jan 2006 13:04:40 +0100 + * scripts/functions: update_progress check if /dev/.initramfs/ exists + before writing into it. + + -- maximilian attems Tue, 24 Jan 2006 13:11:24 +0100 initramfs-tools (0.50c) unstable; urgency=low diff --git a/scripts/functions b/scripts/functions index 2113745..c550123 100644 --- a/scripts/functions +++ b/scripts/functions @@ -44,8 +44,11 @@ update_progress() export PROGRESS_STATE=0 fi - PROGRESS_STATE=$(($PROGRESS_STATE + 1)) - echo "PROGRESS_STATE=${PROGRESS_STATE}" > /dev/.initramfs/progress_state + if [ -d /dev/.initramfs ]; then + PROGRESS_STATE=$(($PROGRESS_STATE + 1)) + echo "PROGRESS_STATE=${PROGRESS_STATE}" \ + > /dev/.initramfs/progress_state + fi if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "PROGRESS $PROGRESS_STATE" -- cgit v1.2.3 From 3776f7f89abae55a448e008cf268385e119eb9ff Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 24 Jan 2006 19:44:11 +0100 Subject: add dm_snapshot to the modules for booting on lvm snapshots --- debian/changelog | 7 +++++++ hooks/lvm | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index fb9f4ac..e783755 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.52) unstable; urgency=low + + * hooks/lvm: manual_add_modules dm_snapshot, allows to boot from a snapshot + of your root device. (ubuntu: #3842) + + -- maximilian attems Tue, 24 Jan 2006 19:40:25 +0100 + initramfs-tools (0.51) unstable; urgency=low * scripts/functions: Call panic on circular deps to get rescue shell. diff --git a/hooks/lvm b/hooks/lvm index 9022dce..63316e5 100755 --- a/hooks/lvm +++ b/hooks/lvm @@ -22,6 +22,6 @@ fi copy_exec /lib/lvm-200/vgchange /sbin -for x in dm_mod; do +for x in dm_mod dm_snapshot; do manual_add_modules ${x} done -- cgit v1.2.3 From 9c19e494cea61a5b89ab0ef87ba5cbc1da362c81 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 30 Jan 2006 00:57:15 +0100 Subject: fix stage checking --- debian/changelog | 4 +++- init | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e783755..ccc9223 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,9 @@ initramfs-tools (0.52) unstable; urgency=low * hooks/lvm: manual_add_modules dm_snapshot, allows to boot from a snapshot of your root device. (ubuntu: #3842) - -- maximilian attems Tue, 24 Jan 2006 19:40:25 +0100 + * init: Fix maybe_break test for the bottom stage. + + -- maximilian attems Mon, 30 Jan 2006 00:56:04 +0100 initramfs-tools (0.51) unstable; urgency=low diff --git a/init b/init index e983534..61a8379 100755 --- a/init +++ b/init @@ -98,7 +98,7 @@ log_begin_msg "Mounting root file system" mountroot log_end_msg -maybe_break mount +maybe_break bottom [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom" run_scripts /scripts/init-bottom [ "$quiet" != "y" ] && log_end_msg -- cgit v1.2.3 From 8281a8acd88b580a75585e254c068c01e70404a1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 6 Feb 2006 00:48:57 +0100 Subject: rename ide -> udev-helper as this is an debian udev workaround and will need more. --- debian/changelog | 8 +++++--- scripts/init-premount/ide | 38 -------------------------------------- scripts/init-premount/udev-helper | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 41 deletions(-) delete mode 100755 scripts/init-premount/ide create mode 100755 scripts/init-premount/udev-helper (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ccc9223..67daa85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,13 @@ initramfs-tools (0.52) unstable; urgency=low - * hooks/lvm: manual_add_modules dm_snapshot, allows to boot from a snapshot - of your root device. (ubuntu: #3842) + * hooks/lvm: manual_add_modules dm_snapshot, will allow boot from lvm + snapshot. (ubuntu: #3842) * init: Fix maybe_break test for the bottom stage. + + * scripts/init-premount/udev-helper: Renamed from scripts/init-premount/ide. - -- maximilian attems Mon, 30 Jan 2006 00:56:04 +0100 + -- maximilian attems Mon, 6 Feb 2006 00:47:53 +0100 initramfs-tools (0.51) unstable; urgency=low diff --git a/scripts/init-premount/ide b/scripts/init-premount/ide deleted file mode 100755 index 03a3fdf..0000000 --- a/scripts/init-premount/ide +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -PREREQ="udev" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -modprobe -q ide-generic - -[ -e /proc/ide ] || return - -for drive in /proc/ide/*; do - [ -e ${drive}/media ] || continue - # nothing to do if the device has already been took in charge - unit=${drive#/proc/ide/} - [ -d /sys/block/$unit ] && continue - - read media < $drive/media - case "$media" in - disk) MODULE=ide-disk ;; - cdrom) MODULE=ide-cd ;; - tape) MODULE=ide-tape ;; - floppy) MODULE=ide-floppy ;; - *) MODULE=ide-generic ;; - esac - - modprobe -q ${MODULE} -done diff --git a/scripts/init-premount/udev-helper b/scripts/init-premount/udev-helper new file mode 100755 index 0000000..03a3fdf --- /dev/null +++ b/scripts/init-premount/udev-helper @@ -0,0 +1,38 @@ +#!/bin/sh + +PREREQ="udev" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +modprobe -q ide-generic + +[ -e /proc/ide ] || return + +for drive in /proc/ide/*; do + [ -e ${drive}/media ] || continue + # nothing to do if the device has already been took in charge + unit=${drive#/proc/ide/} + [ -d /sys/block/$unit ] && continue + + read media < $drive/media + case "$media" in + disk) MODULE=ide-disk ;; + cdrom) MODULE=ide-cd ;; + tape) MODULE=ide-tape ;; + floppy) MODULE=ide-floppy ;; + *) MODULE=ide-generic ;; + esac + + modprobe -q ${MODULE} +done -- cgit v1.2.3 From 57bae4e1d5de2dceaf2c08937fceb6a5879075c2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 13 Feb 2006 11:19:33 +0100 Subject: s/was/has/ been altered --- debian/changelog | 6 ++++-- update-initramfs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 67daa85..31ed427 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,10 +4,12 @@ initramfs-tools (0.52) unstable; urgency=low snapshot. (ubuntu: #3842) * init: Fix maybe_break test for the bottom stage. - + * scripts/init-premount/udev-helper: Renamed from scripts/init-premount/ide. - -- maximilian attems Mon, 6 Feb 2006 00:47:53 +0100 + * update-initramfs: s/was/has/ been altered. (closes: #351939) + + -- maximilian attems Mon, 13 Feb 2006 11:18:11 +0100 initramfs-tools (0.51) unstable; urgency=low diff --git a/update-initramfs b/update-initramfs index 0d757b1..ddb6877 100644 --- a/update-initramfs +++ b/update-initramfs @@ -230,7 +230,7 @@ altered_check() if [ "${takeover}" = 0 ]; then if ! compare_sha1; then delete_sha1 - mild_panic "${initramfs} was been altered. Cannot update." + mild_panic "${initramfs} has been altered. Cannot update." fi fi } -- 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 'debian') 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 'debian') 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 'debian') 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 70610d50c1815295a8bbe2c580738808b34034dc Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 20 Feb 2006 13:32:23 +0100 Subject: set takeover=1 in debian too, removes the need of a stupid wrapper package --- debian/changelog | 15 ++++--- debian/initramfs-tools.install | 1 - debian/initramfs-tools.manpages | 1 - mkinitramfs-kpkg | 94 ----------------------------------------- mkinitramfs-kpkg.8 | 49 --------------------- update-initramfs | 4 +- 6 files changed, 11 insertions(+), 153 deletions(-) delete mode 100644 mkinitramfs-kpkg delete mode 100644 mkinitramfs-kpkg.8 (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 720c344..033943e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.52b) unstable; urgency=high + + * update-initramfs: Set takeover=1. This allows hooks to regenerate the + latest initramfs per default. No need for an kpkg wrapper, as + kernel-package doesn't call update-initramfs, but mkinitramfs. + + -- maximilian attems Mon, 20 Feb 2006 13:30:54 +0100 + initramfs-tools (0.52) unstable; urgency=low * hooks/lvm: manual_add_modules dm_snapshot, will allow boot from lvm @@ -8,17 +16,12 @@ initramfs-tools (0.52) unstable; urgency=low * scripts/init-premount/udev-helper: Renamed from scripts/init-premount/ide. * update-initramfs: s/was/has/ been altered. - (closes: #351939, #352633, #353087) + (closes: #351939, #352633, #353087, #353668) * update-initramfs(8), mkinitramfs(8): The point of the first is to be used on your local box. Highlight its mode of operations. The second cmd is only needed for advanced usage. - * 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 b722d90..3a7a503 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -1,5 +1,4 @@ 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 f127e99..8a27566 100644 --- a/debian/initramfs-tools.manpages +++ b/debian/initramfs-tools.manpages @@ -1,5 +1,4 @@ mkinitramfs.8 -mkinitramfs-kpkg.8 initramfs.conf.5 initramfs-tools.8 update-initramfs.8 diff --git a/mkinitramfs-kpkg b/mkinitramfs-kpkg deleted file mode 100644 index d36710a..0000000 --- a/mkinitramfs-kpkg +++ /dev/null @@ -1,94 +0,0 @@ -#!/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 deleted file mode 100644 index 34f76db..0000000 --- a/mkinitramfs-kpkg.8 +++ /dev/null @@ -1,49 +0,0 @@ -.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/update-initramfs b/update-initramfs index ddb6877..9ab4607 100644 --- a/update-initramfs +++ b/update-initramfs @@ -238,8 +238,8 @@ altered_check() # Defaults verbose=0 yes=0 -# We default to takeover=1 in Ubuntu, but not Debian -takeover=0 +# We default to takeover=1 to allow hooks to update latest initramfs +takeover=1 ## -- cgit v1.2.3 From a563d25cc42346ba18a43c2a37896316c245d922 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 20 Feb 2006 22:55:01 +0100 Subject: fix adding initrd against newer handbuild kernels. --- debian/changelog | 8 ++++++++ update-initramfs | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 033943e..a20ff37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.52c) unstable; urgency=high + + * update-initramfs: set_current_version needs to check against + /boot/initrd-`uname -r` and not /boot/vmlinu?-`uname -r`. + Otherwise this builds initramfs for newer handbuild trees too. + + -- maximilian attems Mon, 20 Feb 2006 15:46:54 +0100 + initramfs-tools (0.52b) unstable; urgency=high * update-initramfs: Set takeover=1. This allows hooks to regenerate the diff --git a/update-initramfs b/update-initramfs index 9ab4607..0c7b9e7 100644 --- a/update-initramfs +++ b/update-initramfs @@ -114,7 +114,7 @@ get_sorted_versions() set_current_version() { - if [ -f /boot/vmlinu?-`uname -r` ]; then + if [ -f /boot/initrd.img-`uname -r` ]; then version=`uname -r` fi } -- cgit v1.2.3 From 830fd3fa51658cf0398cbb037a8485439ae4ce2d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 27 Feb 2006 00:20:17 +0100 Subject: sync with ubuntu22 + some handmerges --- conf/initramfs.conf | 4 ++- debian/changelog | 63 ++++++++++++++++++++++++++++++++++++++++--- hook-functions | 59 +++++++++++++++++++++++----------------- init | 12 +++++++-- initramfs.conf.5 | 2 ++ mkinitramfs | 5 ++++ scripts/functions | 9 +++---- scripts/init-premount/thermal | 1 + scripts/nfs | 4 +-- 9 files changed, 121 insertions(+), 38 deletions(-) (limited to 'debian') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index 38a0594..a9cadf7 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -4,12 +4,14 @@ # # -# MODULES: [ most | dep | list ] +# MODULES: [ most | netboot | dep | list ] # # most - Add all framebuffer, acpi, filesystem, and harddrive drivers. # # dep - Try and guess which modules to load. # +# netboot - Add the base modules, network modules, but skip block devices. +# # list - Only include modules from the 'additional modules' list # diff --git a/debian/changelog b/debian/changelog index a20ff37..74facf0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,20 @@ -initramfs-tools (0.52c) unstable; urgency=high +initramfs-tools (0.53) unstable; urgency=high * update-initramfs: set_current_version needs to check against - /boot/initrd-`uname -r` and not /boot/vmlinu?-`uname -r`. + /boot/initrd-`uname -r` and not /boot/vmlinu?-`uname -r`. Otherwise this builds initramfs for newer handbuild trees too. - -- maximilian attems Mon, 20 Feb 2006 15:46:54 +0100 + * Resync with 0.40ubuntu22: + - mptspi already included + - keep nfsmount for now, we don't want to add further busybox deps. + * Further reduce ubuntudiff: + - scripts/functions: remove duplicate dir check. + - scripts/nfs: add quiet to modules loading. + + * Add kernel-package compat stuff, behaves like mkinitramfs, + but adds the sha1sum for update-initramfs. + + -- maximilian attems Thu, 23 Feb 2006 16:59:56 +0100 initramfs-tools (0.52b) unstable; urgency=high @@ -155,6 +165,53 @@ initramfs-tools (0.42) unstable; urgency=low even if bootloader setting is preferred. -- maximilian attems Mon, 5 Dec 2005 12:59:59 +0100 +initramfs-tools (0.40ubuntu22) dapper; urgency=low + + * Add mptspi to the list of SCSI modules put in the initramfs by default, + which is required for some LSI Logic controllers and for the VMware SCSI + controller in recent VMware versions (See launchpad.net/{27187,31229}) + * Fix typo of /dev/disk/by-*, which I wrote as /dev/disks/by-{uuid,label} + * Load i2c-keywest before loading therm_pm72 in the PowerPC thermal hook, + since the latter sometimes needs the former (Closes launchpad.net/27269) + + -- Adam Conrad Tue, 14 Feb 2006 23:28:35 +1100 + +initramfs-tools (0.40ubuntu21) dapper; urgency=low + + * Don't update the progress bar once udev has taken /dev away; + after all, we can't contact usplash anyway at this point. + + -- Scott James Remnant Wed, 8 Feb 2006 14:34:10 +0000 + +initramfs-tools (0.40ubuntu20) dapper; urgency=low + + * Add ... to end of strings to match main boot sequence. + + -- Scott James Remnant Tue, 7 Feb 2006 11:07:50 +0000 + +initramfs-tools (0.40ubuntu19) dapper; urgency=low + + * Change the first of many "Loading modules" to "Loading essential drivers" + to improve debugging when people say it breaks at that stage. + + -- Scott James Remnant Tue, 7 Feb 2006 11:05:15 +0000 + +initramfs-tools (0.40ubuntu18) dapper; urgency=low + + * Add support for selecting root by UUID or LABEL with syntax such as: + root=LABEL=myrootfs or root=UUID=92addf34-0f02-4a0e-bfb2-cbaa1e907b77 + + -- Adam Conrad Fri, 3 Feb 2006 15:55:01 +0000 + +initramfs-tools (0.40ubuntu17) dapper; urgency=low + + * Make auto_add_modules take an argument, so you can use it to add only + some of the auto* modules (like "net" or "ide"), and create a "netboot" + option that only includes base and net (Closes launchpad.net/26426) + * Change the nfs script to use "mount -o nolock" instead of "nfsmount", + to fix some timeouts for ltsp NFS roots (Closes launchpad.net/19196) + + -- Adam Conrad Tue, 31 Jan 2006 11:55:11 +0000 initramfs-tools (0.40ubuntu16) dapper; urgency=low diff --git a/hook-functions b/hook-functions index bb44d9e..51e0a8d 100644 --- a/hook-functions +++ b/hook-functions @@ -136,31 +136,40 @@ dep_add_modules() # Modules that we always add to the initramfs auto_add_modules() { - # base - for x in ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet atkbd i8042; do - manual_add_modules "${x}" - done - - # Ethernet - 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 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 - manual_add_modules "${x}" - done - - # ide - for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 opti621 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do - manual_add_modules "${x}" - done - - # scsi - for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih mptspi nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do - manual_add_modules "${x}" - done - - # i2o - for x in i2o_block; do - manual_add_modules "${x}" - done - + case "$1" in + base) + for x in ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet atkbd i8042; do + manual_add_modules "${x}" + done + ;; + 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 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 + manual_add_modules "${x}" + done + ;; + ide) + for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 opti621 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do + manual_add_modules "${x}" + done + ;; + scsi) + for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih mptspi nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + manual_add_modules "${x}" + done + ;; + i2o) + for x in i2o_block; do + manual_add_modules "${x}" + done + ;; + *) + auto_add_modules base + auto_add_modules net + auto_add_modules ide + auto_add_modules scsi + auto_add_modules i2o + ;; + esac } usage() diff --git a/init b/init index 61a8379..f4ec157 100755 --- a/init +++ b/init @@ -41,6 +41,14 @@ for x in $(cat /proc/cmdline); do ;; root=*) ROOT=${x#root=} + case $ROOT in + LABEL=*) + ROOT="/dev/disk/by-label/${ROOT#LABEL=}" + ;; + UUID=*) + ROOT="/dev/disk/by-uuid/${ROOT#UUID=}" + ;; + esac ;; nfsroot=*) NFSROOT=${x#nfsroot=} @@ -84,7 +92,7 @@ run_scripts /scripts/init-top parse_numeric ${ROOT} maybe_break modules -log_begin_msg "Loading modules" +log_begin_msg "Loading essential drivers..." load_modules log_end_msg @@ -94,7 +102,7 @@ run_scripts /scripts/init-premount log_end_msg maybe_break mount -log_begin_msg "Mounting root file system" +log_begin_msg "Mounting root file system..." mountroot log_end_msg diff --git a/initramfs.conf.5 b/initramfs.conf.5 index a1cb341..c289ee2 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -22,6 +22,8 @@ The default setting is \fImost\fP. \fIdep\fP tries to guess which modules are necessary for the running box. +\fInetboot\fP adds the base modules, network modules, but skips block devices. + \fIlist\fP includes only modules from the additional modules list. .TP diff --git a/mkinitramfs b/mkinitramfs index d3d6504..6c2be32 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -158,6 +158,11 @@ if [ "${MODULES}" = "most" ]; then auto_add_modules fi +if [ "${MODULES}" = "netboot" ]; then + auto_add_modules base + auto_add_modules net +fi + # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. diff --git a/scripts/functions b/scripts/functions index c550123..6825519 100644 --- a/scripts/functions +++ b/scripts/functions @@ -40,15 +40,14 @@ log_end_msg() update_progress() { + [ -d /dev/.initramfs ] || return + if [ -z "$PROGRESS_STATE" ]; then export PROGRESS_STATE=0 fi - if [ -d /dev/.initramfs ]; then - PROGRESS_STATE=$(($PROGRESS_STATE + 1)) - echo "PROGRESS_STATE=${PROGRESS_STATE}" \ - > /dev/.initramfs/progress_state - fi + PROGRESS_STATE=$(($PROGRESS_STATE + 1)) + echo "PROGRESS_STATE=${PROGRESS_STATE}" > /dev/.initramfs/progress_state if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "PROGRESS $PROGRESS_STATE" diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index a41f6f3..d59af8a 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -18,6 +18,7 @@ esac case "$DPKG_ARCH" in # load the right modules powerpc|ppc64) + modprobe -q i2c-keywest modprobe -q therm_pm72 ;; i386|amd64|ia64) diff --git a/scripts/nfs b/scripts/nfs index a2f6c3e..89b5c20 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -9,9 +9,9 @@ mountroot () run_scripts /scripts/nfs-top [ "$quiet" != "y" ] && log_end_msg - modprobe nfs + modprobe -q nfs # For DHCP - modprobe af_packet + modprobe -q af_packet ipconfig ${DEVICE} . /tmp/net-${DEVICE}.conf -- cgit v1.2.3 From b32ee94abe4682241d1b00f430858c5f1ac5d955 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 27 Feb 2006 01:08:13 +0100 Subject: resync ubuntu24 aka nice conf.d --- debian/changelog | 25 +++++++++++++++++++++++-- debian/initramfs-tools.dirs | 1 + debian/initramfs-tools.postinst | 2 +- debian/initramfs-tools.postrm | 1 + debian/initramfs-tools.preinst | 14 ++++++++++++++ hook-functions | 2 +- init | 3 +++ initramfs.conf.5 | 9 ++++++++- mkinitramfs | 12 +++++++++++- 9 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 debian/initramfs-tools.preinst (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 74facf0..bef47a5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,15 +4,18 @@ initramfs-tools (0.53) unstable; urgency=high /boot/initrd-`uname -r` and not /boot/vmlinu?-`uname -r`. Otherwise this builds initramfs for newer handbuild trees too. - * Resync with 0.40ubuntu22: + * Resync with 0.40ubuntu24: - mptspi already included - keep nfsmount for now, we don't want to add further busybox deps. + - adds mptfc and mptsas modules (closes: #341930) + - adds MODULES=netboot support (closes: #352669) * Further reduce ubuntudiff: - scripts/functions: remove duplicate dir check. - scripts/nfs: add quiet to modules loading. * Add kernel-package compat stuff, behaves like mkinitramfs, - but adds the sha1sum for update-initramfs. + but adds the sha1sum for update-initramfs. Reset takeover=0. + (closes: #353809) -- maximilian attems Thu, 23 Feb 2006 16:59:56 +0100 @@ -165,6 +168,24 @@ initramfs-tools (0.42) unstable; urgency=low even if bootloader setting is preferred. -- maximilian attems Mon, 5 Dec 2005 12:59:59 +0100 + +initramfs-tools (0.40ubuntu24) dapper; urgency=low + + * Add support for LSI Logic's Fusion MPT SAS and FC controllers as well. + + -- Adam Conrad Thu, 23 Feb 2006 23:27:16 +1100 + +initramfs-tools (0.40ubuntu23) dapper; urgency=low + + * Grow a conf.d directory for config snippets, and toss the RESUME option + in there, to stop editing our own conffile in our maintainer scripts. + * Add a cleverly hackish preinst that will pull the RESUME setting from + old config files, migrate it to conf.d/resume, and reset that part of the + conffile to a factory fresh state. This should fix the unwanted conffile + prompt in breezy->dapper upgrades for people who made no local changes. + + -- Adam Conrad Fri, 17 Feb 2006 15:34:53 +1100 + initramfs-tools (0.40ubuntu22) dapper; urgency=low * Add mptspi to the list of SCSI modules put in the initramfs by default, diff --git a/debian/initramfs-tools.dirs b/debian/initramfs-tools.dirs index ba4ac4d..9325057 100644 --- a/debian/initramfs-tools.dirs +++ b/debian/initramfs-tools.dirs @@ -8,5 +8,6 @@ etc/mkinitramfs/scripts/nfs-bottom etc/mkinitramfs/scripts/nfs-premount etc/mkinitramfs/scripts/nfs-top etc/mkinitramfs/hooks +etc/mkinitramfs/conf.d usr/share/initramfs-tools/modules.d /var/lib/initramfs-tools diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index c6025e5..63ceef8 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -25,7 +25,7 @@ if [ "$1" = configure ]; then fi if [ -e ${RESUME} ]; then - sed -i -e "s@#RESUME=@RESUME=${RESUME}@" /etc/mkinitramfs/initramfs.conf + echo "RESUME=${RESUME}" > /etc/mkinitramfs/conf.d/resume fi if [ -e /etc/mkinitrd/DSDT ]; then diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm index 2af9945..0c2d39a 100644 --- a/debian/initramfs-tools.postrm +++ b/debian/initramfs-tools.postrm @@ -2,6 +2,7 @@ if [ "x${1}" = "xpurge" ]; then rm -f /etc/mkinitramfs/modules + rm -f /etc/mkinitramfs/conf.d/resume fi #DEBHELPER# diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst new file mode 100644 index 0000000..3582290 --- /dev/null +++ b/debian/initramfs-tools.preinst @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +[ -f /etc/mkinitramfs/initramfs.conf ] && . /etc/mkinitramfs/initramfs.conf +if [ -z ${RESUME} ]; then + exit 0 +else + mkdir -p /etc/mkinitramfs/conf.d + echo "RESUME=${RESUME}" > /etc/mkinitramfs/conf.d/resume + sed -i -e "s/RESUME=.*/#RESUME=/" /etc/mkinitramfs/initramfs.conf +fi + +#DEBHELPER# diff --git a/hook-functions b/hook-functions index 51e0a8d..9b0d949 100644 --- a/hook-functions +++ b/hook-functions @@ -153,7 +153,7 @@ auto_add_modules() done ;; scsi) - for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm mesh mptscsih mptspi nsp32 osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 qlogicfas408 qlogicfc sata_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain 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_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do manual_add_modules "${x}" done ;; diff --git a/init b/init index f4ec157..1e4e2fd 100755 --- a/init +++ b/init @@ -23,6 +23,9 @@ export DPKG_ARCH= # Bring in the main config . /conf/initramfs.conf +for i in conf/conf.d/*; do + [ -f ${i} ] && . ${i} +done . /scripts/functions # Parse command line options diff --git a/initramfs.conf.5 b/initramfs.conf.5 index c289ee2..7fb79b1 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -12,6 +12,12 @@ Each line in the file can be a configuration variable, a blank line, or a comment. The value of an variable is assigned by an statement of the form: \fIname\fP=[\fIvalue\fP] +Configuration options can be broken out into configuration snippets and +placed in individual files in the /etc/mkinitramfs/conf.d directory. Files +in this directory are always read \fBafter\fP the main configuration file, +so you can override the settings in the main config file without editing it +directly. + .SH GENERAL VARIABLES .TP \fB MODULES @@ -30,7 +36,8 @@ The default setting is \fImost\fP. \fB RESUME Optional setting of the swap partition to resume from. The resume= passed on the command line of your boot loader -will override this setting. +will override this setting. By default, this is set in +/etc/mkinitramfs/conf.d/resume. .SH NFS VARIABLES .TP diff --git a/mkinitramfs b/mkinitramfs index 6c2be32..06e892d 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -77,6 +77,13 @@ fi . /usr/share/initramfs-tools/hook-functions . "${CONFDIR}/initramfs.conf" +EXTRA_CONF='' +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} +done if [ -z "${outfile}" ]; then usage @@ -139,7 +146,7 @@ export DPKG_ARCH # Private, used by 'catenate_cpiogz'. export __TMPCPIOGZ -for d in bin conf etc lib modules sbin scripts; do +for d in bin conf/conf.d etc lib modules sbin scripts; do mkdir -p "${DESTDIR}/${d}" done @@ -178,6 +185,9 @@ cp -p "${CONFDIR}/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" done echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf copy_exec "${CONFDIR}/initramfs.conf" /conf +for i in ${EXTRA_CONF}; do + copy_exec ${CONFDIR}/conf.d/${i} /conf/conf.d +done # Busybox rm -f ${DESTDIR}/bin/sh -- cgit v1.2.3 From 236d8183a72e0de357a743bc909ea25e8bd1995e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 27 Feb 2006 09:39:30 +0100 Subject: hardcoded root support --- debian/changelog | 11 +++++++++-- init | 4 +++- mkinitramfs | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bef47a5..d4858ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,8 @@ initramfs-tools (0.53) unstable; urgency=high Otherwise this builds initramfs for newer handbuild trees too. * Resync with 0.40ubuntu24: - - mptspi already included + - New conf.d dir for config snippet. + - mptspi already included. - keep nfsmount for now, we don't want to add further busybox deps. - adds mptfc and mptsas modules (closes: #341930) - adds MODULES=netboot support (closes: #352669) @@ -17,7 +18,13 @@ initramfs-tools (0.53) unstable; urgency=high but adds the sha1sum for update-initramfs. Reset takeover=0. (closes: #353809) - -- maximilian attems Thu, 23 Feb 2006 16:59:56 +0100 + * init: Move the ROOT export up, so we actually source the hardcoded device + in initramfs.conf. (closes: #352958) + + * mkinitramfs: When invoked with -r switch pass the hardcoded root device to + /etc/mkinitramfs/conf.d/root inside the initramfs. + + -- maximilian attems Mon, 27 Feb 2006 01:45:56 +0100 initramfs-tools (0.52b) unstable; urgency=high diff --git a/init b/init index 1e4e2fd..f69b3e8 100755 --- a/init +++ b/init @@ -21,6 +21,9 @@ mknod /dev/null c 1 3 export DPKG_ARCH= . /conf/arch.conf +# Export it for root hardcoding +export ROOT= + # Bring in the main config . /conf/initramfs.conf for i in conf/conf.d/*; do @@ -33,7 +36,6 @@ export break= export init=/sbin/init export quiet=n export readonly=y -export ROOT= export resume=${RESUME} export rootmnt=/root export debug= diff --git a/mkinitramfs b/mkinitramfs index 06e892d..a72865b 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -37,7 +37,7 @@ while true; do shift ;; -r) - # ignore (FIXME: manpage says differently?!?) + ROOT="$2" shift 2 ;; --supported-host-version) @@ -188,6 +188,7 @@ copy_exec "${CONFDIR}/initramfs.conf" /conf for i in ${EXTRA_CONF}; do copy_exec ${CONFDIR}/conf.d/${i} /conf/conf.d done +echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root # Busybox rm -f ${DESTDIR}/bin/sh -- cgit v1.2.3 From 308b8323da7e00ae42953152682172e2d3ca1e08 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 27 Feb 2006 09:50:19 +0100 Subject: initial ieee1394 support --- debian/changelog | 4 +++- hook-functions | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d4858ff..8094038 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,7 +24,9 @@ initramfs-tools (0.53) unstable; urgency=high * mkinitramfs: When invoked with -r switch pass the hardcoded root device to /etc/mkinitramfs/conf.d/root inside the initramfs. - -- maximilian attems Mon, 27 Feb 2006 01:45:56 +0100 + * hook-functions: First shot at IEEE1394 support - add ohci1394 and sbp2. + + -- maximilian attems Mon, 27 Feb 2006 09:45:54 +0100 initramfs-tools (0.52b) unstable; urgency=high diff --git a/hook-functions b/hook-functions index 9b0d949..040aea2 100644 --- a/hook-functions +++ b/hook-functions @@ -157,6 +157,11 @@ auto_add_modules() manual_add_modules "${x}" done ;; + ieee1394) + for x in ohci1394 sbp2; do + manual_add_modules "${x}" + done + ;; i2o) for x in i2o_block; do manual_add_modules "${x}" -- cgit v1.2.3 From 75b6694d4359db60f73416d1fe0c9e5bfb3ba812 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 27 Feb 2006 10:21:35 +0100 Subject: really install those compat scripts. changelog nitpicking --- debian/changelog | 6 +++--- debian/initramfs-tools.install | 1 + debian/initramfs-tools.manpages | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8094038..b4cbb08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,9 +14,9 @@ initramfs-tools (0.53) unstable; urgency=high - scripts/functions: remove duplicate dir check. - scripts/nfs: add quiet to modules loading. - * Add kernel-package compat stuff, behaves like mkinitramfs, + * mkinitramfs-kpkg: Add kernel-package compat stuff, behaves like mkinitramfs, but adds the sha1sum for update-initramfs. Reset takeover=0. - (closes: #353809) + (closes: #353809) Add small mkinitramf-kpkg.8. * init: Move the ROOT export up, so we actually source the hardcoded device in initramfs.conf. (closes: #352958) @@ -26,7 +26,7 @@ initramfs-tools (0.53) unstable; urgency=high * hook-functions: First shot at IEEE1394 support - add ohci1394 and sbp2. - -- maximilian attems Mon, 27 Feb 2006 09:45:54 +0100 + -- maximilian attems Mon, 27 Feb 2006 10:20:03 +0100 initramfs-tools (0.52b) unstable; urgency=high 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 -- cgit v1.2.3 From d6bcfac2500607902f76bcead5517e8ae80f5d01 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 28 Feb 2006 17:40:38 +0100 Subject: don't stumble on lvm10 leftovers, explicitly check for lvm2 --- debian/changelog | 7 +++++++ hooks/lvm | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b4cbb08..3ccc474 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.54) unstable; urgency=low + + * hooks/lvm: lvm10 has also an vgchange - exit if no lvm2 libs. + (closes: #354708) + + -- maximilian attems Tue, 28 Feb 2006 17:34:14 +0100 + initramfs-tools (0.53) unstable; urgency=high * update-initramfs: set_current_version needs to check against diff --git a/hooks/lvm b/hooks/lvm index 63316e5..e29215e 100755 --- a/hooks/lvm +++ b/hooks/lvm @@ -14,7 +14,7 @@ prereqs) ;; esac -if [ ! -x /sbin/vgchange ]; then +if [ ! -x /sbin/vgchange -a ! -d /lib/lvm-200 ]; then exit 0 fi -- cgit v1.2.3 From 8e676d49ba216a80ca3294c9d1deb2c1cbb873af Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 28 Feb 2006 17:47:18 +0100 Subject: update copyright info --- debian/changelog | 4 +++- debian/copyright | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3ccc474..7872991 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,9 @@ initramfs-tools (0.54) unstable; urgency=low * hooks/lvm: lvm10 has also an vgchange - exit if no lvm2 libs. (closes: #354708) - -- maximilian attems Tue, 28 Feb 2006 17:34:14 +0100 + * debian/copyright: Meniton current bzr archive. (closes: #352738) + + -- maximilian attems Tue, 28 Feb 2006 17:43:57 +0100 initramfs-tools (0.53) unstable; urgency=high diff --git a/debian/copyright b/debian/copyright index a40b722..d495248 100644 --- a/debian/copyright +++ b/debian/copyright @@ -5,9 +5,15 @@ Copyright: Author: Jeff Bailey -The source code can be found by using "bzr" at: +The source code up to 0.31 can be found by using "bzr" at: http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools +The current ubuntu release can be found at: +http://archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/ + +The Debian tree is maintained with "bzr" at: +http://debian.stro.at/bzr-test/initramfs-tools/ + License: PUBLIC DOMAIN -- cgit v1.2.3 From 17ffd2765842d306dd1b7c996adf839b6a23d6ab Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 4 Mar 2006 00:06:59 +0100 Subject: add dac960 for alpha --- debian/changelog | 4 +++- hook-functions | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7872991..1f673bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,9 @@ initramfs-tools (0.54) unstable; urgency=low * debian/copyright: Meniton current bzr archive. (closes: #352738) - -- maximilian attems Tue, 28 Feb 2006 17:43:57 +0100 + * hook-function: Add dac960 scsi driver for alpha arch. (closes: #355162) + + -- maximilian attems Sat, 4 Mar 2006 00:05:35 +0100 initramfs-tools (0.53) unstable; urgency=high diff --git a/hook-functions b/hook-functions index 040aea2..bdb657a 100644 --- a/hook-functions +++ b/hook-functions @@ -156,6 +156,12 @@ auto_add_modules() for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain 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_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do manual_add_modules "${x}" done + case "${DPKG_ARCH}" in + alpha) + for x in dac960; do + manual_add_modules "${x}" + done + esac ;; ieee1394) for x in ohci1394 sbp2; do -- cgit v1.2.3 From 0d1c081c48fbfb69cbf6932e358971e7d29c45e1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 4 Mar 2006 00:20:03 +0100 Subject: merge ubunut udev hook. --- debian/changelog | 9 +++- scripts/init-premount/udev-helper | 38 ---------------- scripts/local-top/udev-helper | 95 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 39 deletions(-) delete mode 100755 scripts/init-premount/udev-helper create mode 100755 scripts/local-top/udev-helper (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1f673bc..e2a24de 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,14 @@ initramfs-tools (0.54) unstable; urgency=low * hook-function: Add dac960 scsi driver for alpha arch. (closes: #355162) - -- maximilian attems Sat, 4 Mar 2006 00:05:35 +0100 + * scripts/local-top/udev-helper: moved from + scripts/init-premount/udev-helper, add code by Scott James Remnant + from the ubuntu udev hook. We now wait on scsi + and usb devices to settle, load ide-generic on ide boot only if + no root device appeared. + The udev hook is adding ide.agent so no longer duplicate that code. + + -- maximilian attems Sat, 4 Mar 2006 00:14:00 +0100 initramfs-tools (0.53) unstable; urgency=high diff --git a/scripts/init-premount/udev-helper b/scripts/init-premount/udev-helper deleted file mode 100755 index 03a3fdf..0000000 --- a/scripts/init-premount/udev-helper +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -PREREQ="udev" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -modprobe -q ide-generic - -[ -e /proc/ide ] || return - -for drive in /proc/ide/*; do - [ -e ${drive}/media ] || continue - # nothing to do if the device has already been took in charge - unit=${drive#/proc/ide/} - [ -d /sys/block/$unit ] && continue - - read media < $drive/media - case "$media" in - disk) MODULE=ide-disk ;; - cdrom) MODULE=ide-cd ;; - tape) MODULE=ide-tape ;; - floppy) MODULE=ide-floppy ;; - *) MODULE=ide-generic ;; - esac - - modprobe -q ${MODULE} -done diff --git a/scripts/local-top/udev-helper b/scripts/local-top/udev-helper new file mode 100755 index 0000000..8ae47d2 --- /dev/null +++ b/scripts/local-top/udev-helper @@ -0,0 +1,95 @@ +#!/bin/sh + +PREREQ="udev" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Our job now is to make the block device for the root filesystem available. +# This is actually a bit trickier than it first appears because we first need +# to figure out which driver needs it, and to do that, we need to know what +# type of bus it's on. Fortunately we have all that information, this still +# feels like an ungodly hack though. +case "${ROOT}" in +/dev/root) + # An interesting case, this root device was specified as a + # major/minor pair. Fortunately we have that information + case "${major}" in + 3|22|33|34|56|57|88|89|90|91) + # traditional ide + root_type=ide + ;; + 80|81|82|83|84|85|86|87) + # ide on i2o + root_type=ide + ;; + 8|11|65|66|67|68|69|70|71|128|129|130|131|132|133|134|135) + # scsi + root_type=scsi + ;; + esac + ;; +/dev/hd*) + # Ahh, plain-old traditional ide + root_type=ide + ;; +/dev/sd*) + # SCSI, or an IDE controller dressed up in drag + root_type=scsi + ;; +/dev/disk/*) + # Specified by label; sadly there's no way to tell what bus + # this is on, so we'll just declare that we only support it + # for SCSI and removable devices + root_type=scsi + ;; +esac + +case "${root_type}" in +ide) + # If we're booting from IDE, it might not be a PCI controller, + # 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 + /sbin/modprobe -Qb ide-generic + fi + ;; + +scsi) + # If we're booting from SCSI we should have done all we need, + # now it's just a matter of waiting for the devices to appear + # which could take a while... + [ -e "${ROOT}" ] || log_begin_msg "Waiting for root file system" + + if type usplash_write >/dev/null 2>&1; then + usplash_write "TIMEOUT 30" || true + fi + + slumber=300 + while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do + /bin/sleep 0.1 + slumber=$(( ${slumber} - 1 )) + done + + if type usplash_write >/dev/null 2>&1; then + usplash_write "TIMEOUT 15" || true + fi + + if [ ${slumber} -gt 0 ]; then + log_end_msg 0 + else + log_end_msg 1 || true + fi + ;; +esac +;; -- cgit v1.2.3 From 493677ae27c577d0a78fc23ea644a680b0968b54 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Mar 2006 17:33:40 +0100 Subject: split up the long lines in audo_add_modules add a bunch of needed modules --- debian/changelog | 23 ++++++++++++++++++----- hook-functions | 38 +++++++++++++++++++++++++++----------- 2 files changed, 45 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e2a24de..b83cd21 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,20 +1,33 @@ initramfs-tools (0.54) unstable; urgency=low - * hooks/lvm: lvm10 has also an vgchange - exit if no lvm2 libs. + * hooks/lvm: lvm10 has also an vgchange - exit if no lvm2 libs. (closes: #354708) * debian/copyright: Meniton current bzr archive. (closes: #352738) - * hook-function: Add dac960 scsi driver for alpha arch. (closes: #355162) + * hook-function: Add dac960 scsi driver. (closes: #355162) - * scripts/local-top/udev-helper: moved from - scripts/init-premount/udev-helper, add code by Scott James Remnant + * scripts/local-top/udev_helper: moved from + scripts/init-premount/udev_helper, add code by Scott James Remnant from the ubuntu udev hook. We now wait on scsi and usb devices to settle, load ide-generic on ide boot only if no root device appeared. The udev hook is adding ide.agent so no longer duplicate that code. - -- maximilian attems Sat, 4 Mar 2006 00:14:00 +0100 + * hook-function: auto_add_modules, split 1000 char wide lines up. + Should allow better diffing. Splitting them out in proper files with + each modules / line costs too much initramfs generation time. + Should allow easier diffing. + + * modules.d/scsi: Add sata_mv thanks Kenshi Muto . + (closes: #355486) + + * hook-function: Add dasd class to auto_add_modules and dd zfcp module. + Thanks to s390 support Bastian Blank . (closes: #355595) + + * modules.d/ide: Add it821x. (closes #352460) + + -- maximilian attems Tue, 7 Mar 2006 00:49:46 +0100 initramfs-tools (0.53) unstable; urgency=high diff --git a/hook-functions b/hook-functions index bdb657a..90986cb 100644 --- a/hook-functions +++ b/hook-functions @@ -133,35 +133,50 @@ dep_add_modules() } -# Modules that we always add to the initramfs +# The modules "most" classes added per default to the initramfs auto_add_modules() { case "$1" in base) - for x in ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 ext3 isofs jfs nfs reiserfs xfs af_packet atkbd i8042; do + for x in ehci-hcd ohci-hcd uhci-hcd usbhid usb-storage ext2 \ + ext3 isofs jfs nfs reiserfs xfs af_packet atkbd i8042; do manual_add_modules "${x}" done ;; 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 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 + 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 \ + 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 manual_add_modules "${x}" done ;; ide) - for x in ide-cd ide-disk ide-generic aec62xx alim15x3 amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 generic hpt34x hpt366 ns87415 opti621 pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks siimage sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do + for x in ide-cd ide-disk ide-generic aec62xx alim15x3 \ + amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 \ + generic hpt34x hpt366 it821x ns87415 opti621 pdc202xx_new \ + pdc202xx_old piix rz1000 sc1200 serverworks siimage \ + sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do manual_add_modules "${x}" done ;; scsi) - for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic cciss ch dc395x dmx3191d dpt_i2o eata fdomain 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_promise sata_nv 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 sd_mod sym53c8xx tmscsim; do + for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci \ + aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic \ + cciss ch dac960 dc395x dmx3191d dpt_i2o eata fdomain \ + 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 \ + sd_mod sym53c8xx tmscsim zfcp; do manual_add_modules "${x}" done - case "${DPKG_ARCH}" in - alpha) - for x in dac960; do - manual_add_modules "${x}" - done - esac ;; ieee1394) for x in ohci1394 sbp2; do @@ -179,6 +194,7 @@ auto_add_modules() auto_add_modules ide auto_add_modules scsi auto_add_modules i2o + auto_add_modules dasd ;; esac } -- cgit v1.2.3 From 65391c38c52dcbc0fab11340fd59ed83089d5cd5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Mar 2006 17:36:52 +0100 Subject: add the 0.53[bc] changesets: where takeover=0 and no '-' in script names --- debian/changelog | 15 ++++++- scripts/local-top/udev-helper | 95 ------------------------------------------- scripts/local-top/udev_helper | 95 +++++++++++++++++++++++++++++++++++++++++++ update-initramfs | 2 +- 4 files changed, 110 insertions(+), 97 deletions(-) delete mode 100755 scripts/local-top/udev-helper create mode 100755 scripts/local-top/udev_helper (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b83cd21..f6db559 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,7 +27,20 @@ initramfs-tools (0.54) unstable; urgency=low * modules.d/ide: Add it821x. (closes #352460) - -- maximilian attems Tue, 7 Mar 2006 00:49:46 +0100 + -- maximilian attems Wed, 8 Mar 2006 17:34:25 +0100 + +initramfs-tools (0.53c) unstable; urgency=low + + * update-initramfs: Really reset takeover to zero. + + -- maximilian attems Mon, 6 Mar 2006 07:59:34 +0100 + +initramfs-tools (0.53b) unstable; urgency=low + + * scripts/init-premount/udev_helper: Renamed from udev-helper. + Thanks to Tollef Fog Heen (closes: #355235) + + -- maximilian attems Sat, 4 Mar 2006 15:26:13 +0100 initramfs-tools (0.53) unstable; urgency=high diff --git a/scripts/local-top/udev-helper b/scripts/local-top/udev-helper deleted file mode 100755 index 8ae47d2..0000000 --- a/scripts/local-top/udev-helper +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/sh - -PREREQ="udev" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# Our job now is to make the block device for the root filesystem available. -# This is actually a bit trickier than it first appears because we first need -# to figure out which driver needs it, and to do that, we need to know what -# type of bus it's on. Fortunately we have all that information, this still -# feels like an ungodly hack though. -case "${ROOT}" in -/dev/root) - # An interesting case, this root device was specified as a - # major/minor pair. Fortunately we have that information - case "${major}" in - 3|22|33|34|56|57|88|89|90|91) - # traditional ide - root_type=ide - ;; - 80|81|82|83|84|85|86|87) - # ide on i2o - root_type=ide - ;; - 8|11|65|66|67|68|69|70|71|128|129|130|131|132|133|134|135) - # scsi - root_type=scsi - ;; - esac - ;; -/dev/hd*) - # Ahh, plain-old traditional ide - root_type=ide - ;; -/dev/sd*) - # SCSI, or an IDE controller dressed up in drag - root_type=scsi - ;; -/dev/disk/*) - # Specified by label; sadly there's no way to tell what bus - # this is on, so we'll just declare that we only support it - # for SCSI and removable devices - root_type=scsi - ;; -esac - -case "${root_type}" in -ide) - # If we're booting from IDE, it might not be a PCI controller, - # 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 - /sbin/modprobe -Qb ide-generic - fi - ;; - -scsi) - # If we're booting from SCSI we should have done all we need, - # now it's just a matter of waiting for the devices to appear - # which could take a while... - [ -e "${ROOT}" ] || log_begin_msg "Waiting for root file system" - - if type usplash_write >/dev/null 2>&1; then - usplash_write "TIMEOUT 30" || true - fi - - slumber=300 - while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do - /bin/sleep 0.1 - slumber=$(( ${slumber} - 1 )) - done - - if type usplash_write >/dev/null 2>&1; then - usplash_write "TIMEOUT 15" || true - fi - - if [ ${slumber} -gt 0 ]; then - log_end_msg 0 - else - log_end_msg 1 || true - fi - ;; -esac -;; diff --git a/scripts/local-top/udev_helper b/scripts/local-top/udev_helper new file mode 100755 index 0000000..8ae47d2 --- /dev/null +++ b/scripts/local-top/udev_helper @@ -0,0 +1,95 @@ +#!/bin/sh + +PREREQ="udev" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Our job now is to make the block device for the root filesystem available. +# This is actually a bit trickier than it first appears because we first need +# to figure out which driver needs it, and to do that, we need to know what +# type of bus it's on. Fortunately we have all that information, this still +# feels like an ungodly hack though. +case "${ROOT}" in +/dev/root) + # An interesting case, this root device was specified as a + # major/minor pair. Fortunately we have that information + case "${major}" in + 3|22|33|34|56|57|88|89|90|91) + # traditional ide + root_type=ide + ;; + 80|81|82|83|84|85|86|87) + # ide on i2o + root_type=ide + ;; + 8|11|65|66|67|68|69|70|71|128|129|130|131|132|133|134|135) + # scsi + root_type=scsi + ;; + esac + ;; +/dev/hd*) + # Ahh, plain-old traditional ide + root_type=ide + ;; +/dev/sd*) + # SCSI, or an IDE controller dressed up in drag + root_type=scsi + ;; +/dev/disk/*) + # Specified by label; sadly there's no way to tell what bus + # this is on, so we'll just declare that we only support it + # for SCSI and removable devices + root_type=scsi + ;; +esac + +case "${root_type}" in +ide) + # If we're booting from IDE, it might not be a PCI controller, + # 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 + /sbin/modprobe -Qb ide-generic + fi + ;; + +scsi) + # If we're booting from SCSI we should have done all we need, + # now it's just a matter of waiting for the devices to appear + # which could take a while... + [ -e "${ROOT}" ] || log_begin_msg "Waiting for root file system" + + if type usplash_write >/dev/null 2>&1; then + usplash_write "TIMEOUT 30" || true + fi + + slumber=300 + while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do + /bin/sleep 0.1 + slumber=$(( ${slumber} - 1 )) + done + + if type usplash_write >/dev/null 2>&1; then + usplash_write "TIMEOUT 15" || true + fi + + if [ ${slumber} -gt 0 ]; then + log_end_msg 0 + else + log_end_msg 1 || true + fi + ;; +esac +;; diff --git a/update-initramfs b/update-initramfs index 2093220..2e39ed0 100644 --- a/update-initramfs +++ b/update-initramfs @@ -239,7 +239,7 @@ altered_check() verbose=0 yes=0 # We default to takeover=1 in Ubuntu, but not Debian -takeover=1 +takeover=0 ## -- cgit v1.2.3 From ff26ba49cc41fae343e9acc9af486ee8d3e6b1ba Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 14 Mar 2006 10:19:55 +0100 Subject: fix wrong modprobe args --- debian/changelog | 7 +++++++ scripts/local-top/udev_helper | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f6db559..d18c9d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.55) unstable; urgency=low + + * scripts/local-top/udev_helper: Fix modprobe args. + Thanks Frans Pop . + + -- maximilian attems Fri, 10 Mar 2006 01:13:33 +0100 + initramfs-tools (0.54) unstable; urgency=low * hooks/lvm: lvm10 has also an vgchange - exit if no lvm2 libs. diff --git a/scripts/local-top/udev_helper b/scripts/local-top/udev_helper index b501ec0..8abcb2b 100755 --- a/scripts/local-top/udev_helper +++ b/scripts/local-top/udev_helper @@ -61,7 +61,7 @@ ide) # 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 - /sbin/modprobe -Qb ide-generic + modprobe -q ide-generic fi ;; -- cgit v1.2.3 From 161cd9fd2df641037edf53d72d096b0f87dd06f1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 14 Mar 2006 10:21:02 +0100 Subject: use quiet for fs module loading --- debian/changelog | 4 +++- scripts/local | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d18c9d0..eec885d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,9 @@ initramfs-tools (0.55) unstable; urgency=low * scripts/local-top/udev_helper: Fix modprobe args. Thanks Frans Pop . - -- maximilian attems Fri, 10 Mar 2006 01:13:33 +0100 + * scripts/local: Use quiet to load the fs. (closes: #339092) + + -- maximilian attems Tue, 14 Mar 2006 10:20:03 +0100 initramfs-tools (0.54) unstable; urgency=low diff --git a/scripts/local b/scripts/local index 979f07d..917528a 100644 --- a/scripts/local +++ b/scripts/local @@ -25,7 +25,7 @@ mountroot () fi # FIXME This has no error checking - modprobe ${FSTYPE} + modprobe -q ${FSTYPE} # FIXME This has no error checking # Mount root -- cgit v1.2.3 From c4a1c8838be207397a4c676db729ed9de416bbba Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 14 Mar 2006 10:32:48 +0100 Subject: fix firewire booting --- debian/changelog | 5 ++++- hook-functions | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index eec885d..24506a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,10 @@ initramfs-tools (0.55) unstable; urgency=low * scripts/local: Use quiet to load the fs. (closes: #339092) - -- maximilian attems Tue, 14 Mar 2006 10:20:03 +0100 + * hook-functions: Really add the ieee1394 modules. + Thanks to Michael Prokop for testing the fix. + + -- maximilian attems Tue, 14 Mar 2006 10:21:34 +0100 initramfs-tools (0.54) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 03eb87d..859f1c6 100644 --- a/hook-functions +++ b/hook-functions @@ -200,6 +200,7 @@ auto_add_modules() auto_add_modules scsi auto_add_modules i2o auto_add_modules dasd + auto_add_modules ieee1394 ;; esac } -- cgit v1.2.3 From 9c42241824afb2759d22d2cf7962fb2ce534e0dd Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 14 Mar 2006 10:43:28 +0100 Subject: udev stuff needs to be in scripts/init-premount only do the block device hacks on local boot --- debian/changelog | 3 +- scripts/init-premount/udev_helper | 103 ++++++++++++++++++++++++++++++++++++++ scripts/local-top/udev_helper | 94 ---------------------------------- 3 files changed, 104 insertions(+), 96 deletions(-) create mode 100755 scripts/init-premount/udev_helper delete mode 100755 scripts/local-top/udev_helper (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 24506a6..8f2f7ea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,7 @@ initramfs-tools (0.54) unstable; urgency=low * hook-function: Add dac960 scsi driver. (closes: #355162) - * scripts/local-top/udev_helper: moved from - scripts/init-premount/udev_helper, add code by Scott James Remnant + * scripts/init-premount/udev_helper: add code by Scott James Remnant from the ubuntu udev hook. We now wait on scsi and usb devices to settle, load ide-generic on ide boot only if no root device appeared. diff --git a/scripts/init-premount/udev_helper b/scripts/init-premount/udev_helper new file mode 100755 index 0000000..f2bc204 --- /dev/null +++ b/scripts/init-premount/udev_helper @@ -0,0 +1,103 @@ +#!/bin/sh + +PREREQ="udev" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Nothing todo for nfs boot +case "${BOOT}" in +local) + ;; +*) + exit 0 + ;; +esac + +# Our job now is to make the block device for the root filesystem available. +# This is actually a bit trickier than it first appears because we first need +# to figure out which driver needs it, and to do that, we need to know what +# type of bus it's on. Fortunately we have all that information, this still +# feels like an ungodly hack though. +case "${ROOT}" in +/dev/root) + # An interesting case, this root device was specified as a + # major/minor pair. Fortunately we have that information + case "${major}" in + 3|22|33|34|56|57|88|89|90|91) + # traditional ide + root_type=ide + ;; + 80|81|82|83|84|85|86|87) + # ide on i2o + root_type=ide + ;; + 8|11|65|66|67|68|69|70|71|128|129|130|131|132|133|134|135) + # scsi + root_type=scsi + ;; + esac + ;; +/dev/hd*) + # Ahh, plain-old traditional ide + root_type=ide + ;; +/dev/sd*) + # SCSI, or an IDE controller dressed up in drag + root_type=scsi + ;; +/dev/disk/*) + # Specified by label; sadly there's no way to tell what bus + # this is on, so we'll just declare that we only support it + # for SCSI and removable devices + root_type=scsi + ;; +esac + +case "${root_type}" in +ide) + # If we're booting from IDE, it might not be a PCI controller, + # 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 + fi + ;; + +scsi) + # If we're booting from SCSI we should have done all we need, + # now it's just a matter of waiting for the devices to appear + # which could take a while... + [ -e "${ROOT}" ] || log_begin_msg "Waiting for root file system" + + if type usplash_write >/dev/null 2>&1; then + usplash_write "TIMEOUT 30" || true + fi + + slumber=300 + while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do + /bin/sleep 0.1 + slumber=$(( ${slumber} - 1 )) + done + + if type usplash_write >/dev/null 2>&1; then + usplash_write "TIMEOUT 15" || true + fi + + if [ ${slumber} -gt 0 ]; then + log_end_msg 0 + else + log_end_msg 1 || true + fi + ;; +esac diff --git a/scripts/local-top/udev_helper b/scripts/local-top/udev_helper deleted file mode 100755 index 8abcb2b..0000000 --- a/scripts/local-top/udev_helper +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# Our job now is to make the block device for the root filesystem available. -# This is actually a bit trickier than it first appears because we first need -# to figure out which driver needs it, and to do that, we need to know what -# type of bus it's on. Fortunately we have all that information, this still -# feels like an ungodly hack though. -case "${ROOT}" in -/dev/root) - # An interesting case, this root device was specified as a - # major/minor pair. Fortunately we have that information - case "${major}" in - 3|22|33|34|56|57|88|89|90|91) - # traditional ide - root_type=ide - ;; - 80|81|82|83|84|85|86|87) - # ide on i2o - root_type=ide - ;; - 8|11|65|66|67|68|69|70|71|128|129|130|131|132|133|134|135) - # scsi - root_type=scsi - ;; - esac - ;; -/dev/hd*) - # Ahh, plain-old traditional ide - root_type=ide - ;; -/dev/sd*) - # SCSI, or an IDE controller dressed up in drag - root_type=scsi - ;; -/dev/disk/*) - # Specified by label; sadly there's no way to tell what bus - # this is on, so we'll just declare that we only support it - # for SCSI and removable devices - root_type=scsi - ;; -esac - -case "${root_type}" in -ide) - # If we're booting from IDE, it might not be a PCI controller, - # 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 - fi - ;; - -scsi) - # If we're booting from SCSI we should have done all we need, - # now it's just a matter of waiting for the devices to appear - # which could take a while... - [ -e "${ROOT}" ] || log_begin_msg "Waiting for root file system" - - if type usplash_write >/dev/null 2>&1; then - usplash_write "TIMEOUT 30" || true - fi - - slumber=300 - while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do - /bin/sleep 0.1 - slumber=$(( ${slumber} - 1 )) - done - - if type usplash_write >/dev/null 2>&1; then - usplash_write "TIMEOUT 15" || true - fi - - if [ ${slumber} -gt 0 ]; then - log_end_msg 0 - else - log_end_msg 1 || true - fi - ;; -esac -- cgit v1.2.3 From b34fe26dd06da3daa40a75a853a96c2013fcfc18 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 15 Mar 2006 09:58:00 +0100 Subject: run lilo if no grub is around. --- debian/changelog | 8 ++++++-- update-initramfs | 16 ++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8f2f7ea..1571265 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,10 +5,14 @@ initramfs-tools (0.55) unstable; urgency=low * scripts/local: Use quiet to load the fs. (closes: #339092) - * hook-functions: Really add the ieee1394 modules. + * hook-functions: Really add the ieee1394 modules. Thanks to Michael Prokop for testing the fix. - -- maximilian attems Tue, 14 Mar 2006 10:21:34 +0100 + * update-initramfs: Run lilo on updates if no grub is around. + Thanks Adeodato Simó for finding the issue. + (Closes: #356850) + + -- maximilian attems Wed, 15 Mar 2006 09:55:22 +0100 initramfs-tools (0.54) unstable; urgency=low diff --git a/update-initramfs b/update-initramfs index 2e39ed0..08a2f3a 100644 --- a/update-initramfs +++ b/update-initramfs @@ -67,6 +67,20 @@ generate_initramfs() set_sha1 } +# only run lilo if no grub is around +run_bootloader() +{ + if [ -x /sbin/grub -o -e /boot/grub/menu.lst ]; then + return 0 + fi + if [ -e /etc/lilo.conf ]; then + lilo -t > /dev/null + if [ $? -eq 0 ]; then + lilo + fi + fi +} + compare_sha1() { sha1sum "${initramfs}" | diff "${STATEDIR}/${version}" - >/dev/null 2>&1 @@ -199,6 +213,8 @@ update() generate_initramfs + run_bootloader + } delete() -- cgit v1.2.3 From 64a2b7212bd6f2cddf29b465cf3ced6f2e0fc807 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 15 Mar 2006 11:42:52 +0100 Subject: fix changelog for 0.55 release --- debian/changelog | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1571265..3edb850 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ initramfs-tools (0.55) unstable; urgency=low - * scripts/local-top/udev_helper: Fix modprobe args. - Thanks Frans Pop . + * scripts/init-premount/udev_helper: Fix modprobe args. + Thanks Frans Pop for testing 0.54. * scripts/local: Use quiet to load the fs. (closes: #339092) @@ -12,7 +12,7 @@ initramfs-tools (0.55) unstable; urgency=low Thanks Adeodato Simó for finding the issue. (Closes: #356850) - -- maximilian attems Wed, 15 Mar 2006 09:55:22 +0100 + -- maximilian attems Wed, 15 Mar 2006 11:29:12 +0100 initramfs-tools (0.54) unstable; urgency=low @@ -21,7 +21,7 @@ initramfs-tools (0.54) unstable; urgency=low * debian/copyright: Meniton current bzr archive. (closes: #352738) - * hook-function: Add dac960 scsi driver. (closes: #355162) + * hook-functions: Add dac960 scsi driver. (closes: #355162) * scripts/init-premount/udev_helper: add code by Scott James Remnant from the ubuntu udev hook. We now wait on scsi @@ -29,18 +29,18 @@ initramfs-tools (0.54) unstable; urgency=low no root device appeared. The udev hook is adding ide.agent so no longer duplicate that code. - * hook-function: auto_add_modules, split 1000 char wide lines up. + * hook-functions: auto_add_modules, split 1000 char wide lines up. Should allow better diffing. Splitting them out in proper files with each modules / line costs too much initramfs generation time. Should allow easier diffing. - * modules.d/scsi: Add sata_mv thanks Kenshi Muto . + * hook-functions: Add sata_mv thanks Kenshi Muto . (closes: #355486) - * hook-function: Add dasd class to auto_add_modules and dd zfcp module. + * hook-functions: Add dasd class to auto_add_modules and dd zfcp module. Thanks to s390 support Bastian Blank . (closes: #355595) - * modules.d/ide: Add it821x. (closes #352460) + * hook-functions: Add it821x. (closes #352460) -- maximilian attems Wed, 8 Mar 2006 17:34:25 +0100 -- 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 'debian') 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 41f695c8066c3d4955049d547b16aaf06273c20f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 19 Mar 2006 23:54:27 +0100 Subject: fix bug nr. --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c67e009..8abea21 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,7 +12,7 @@ initramfs-tools (0.56) unstable; urgency=low * scripts/init-premount/udev_helper: Source the relevant definition to get it really run. Thanks to Maurice Massar . - (closes: #354458) + (closes: #357450) -- maximilian attems Fri, 17 Mar 2006 19:09:11 +0100 -- cgit v1.2.3 From 0318bb9b8e61f0a4c9d89ec678a75f6f7ea8c5d5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 21 Mar 2006 12:25:50 +0100 Subject: add verbose mode for mkinitramfs, use it when calling it display which modules gets added, we might want to have even more verbose info, but that is a nice start. add cpqarray module document `-' filename restriction don't exit succesfully if root fs full --- debian/changelog | 17 +++++++++++++++++ hook-functions | 5 ++++- initramfs-tools.8 | 6 +++++- mkinitramfs | 11 ++++++++--- update-initramfs | 6 +++++- 5 files changed, 39 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8abea21..bfbd682 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +initramfs-tools (0.57) unstable; urgency=low + + * mkinitramfs, update-initramfs, hook-functions: + On verbose mode show, which modules gets added to the initramfs. + + * hook-functions: Add cpqarray to the scsi modules - thanks for the patch + to Petter Reinholdtsen . (closes: #357980) + + * initramfs-tools.8: Document that `-' is not allowed to be used in a script + filename - the filenames get used as shell variable. (closes: #355235) + + * mkinitramfs: Don't exit succesfully in a case of a full fs. Leaves the + linux-image unconfigured. Thanks martin f krafft + for pointing to that potential boot failure. (closes: #350875) + + -- maximilian attems Tue, 21 Mar 2006 11:56:29 +0100 + initramfs-tools (0.56) unstable; urgency=low * hooks/md: Add linear module - thanks to Moshe Yudkowsky . diff --git a/hook-functions b/hook-functions index 859f1c6..efce32d 100644 --- a/hook-functions +++ b/hook-functions @@ -48,6 +48,9 @@ manual_add_modules() mkdir -p "${DESTDIR}/$(dirname "${mam_x}")" ln -s "${mam_x}" "${DESTDIR}/$(dirname "${mam_x}")" + if [ -n "${verbose}" -a "${verbose}" = "y" ]; then + echo "Adding module ${mam_x}" + fi done } @@ -166,7 +169,7 @@ auto_add_modules() scsi) for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci \ aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic \ - cciss ch dac960 dc395x dmx3191d dpt_i2o eata fdomain \ + cciss ch cpqarray dac960 dc395x dmx3191d dpt_i2o eata fdomain \ 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 \ diff --git a/initramfs-tools.8 b/initramfs-tools.8 index a08ef1b..991cff9 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -16,7 +16,11 @@ 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. +mounted. + +initramfs-tools uses shell variable names for handling dependencies. +Notice that `-' is not a valid shell variable name and thus should +not be used as script filename. .SH INIT SCRIPT The script which is executed first and is in charge of running all other diff --git a/mkinitramfs b/mkinitramfs index a72865b..b7de71b 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -10,7 +10,7 @@ errors_to="2>/dev/null" # BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" BUSYBOXDIR="/bin" -OPTIONS=`getopt -o d:ko:r: --long supported-host-version:,supported-target-version: -n "$0" -- "$@"` +OPTIONS=`getopt -o d:ko:r:v --long supported-host-version:,supported-target-version: -n "$0" -- "$@"` # Check for non-GNU getopt if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi @@ -40,6 +40,10 @@ while true; do ROOT="$2" shift 2 ;; + -v) + verbose="y" + shift + ;; --supported-host-version) supported_host_version="$2" shift 2 @@ -142,6 +146,7 @@ export version export CONFDIR export DESTDIR export DPKG_ARCH +export verbose # Private, used by 'catenate_cpiogz'. export __TMPCPIOGZ @@ -210,10 +215,10 @@ if [ -e "${CONFDIR}/DSDT.aml" ]; then copy_exec "${CONFDIR}/DSDT.aml" / fi -(cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}") +(cd "${DESTDIR}" && find . | cpio --quiet --dereference -o -H newc | gzip -9 >"${outfile}") || exit 1 if [ -s "${__TMPCPIOGZ}" ]; then - cat "${__TMPCPIOGZ}" >>"${outfile}" + cat "${__TMPCPIOGZ}" >>"${outfile}" || exit 1 fi if [ "${keep}" = "y" ]; then diff --git a/update-initramfs b/update-initramfs index 08a2f3a..9b69981 100644 --- a/update-initramfs +++ b/update-initramfs @@ -63,7 +63,11 @@ set_initramfs() generate_initramfs() { verbose "Generating ${initramfs}" - mkinitramfs -o "${initramfs}" "${version}" + OPTS="-o" + if [ "${verbose}" = 1 ]; then + OPTS="-v $OPTS" + fi + mkinitramfs $OPTS "${initramfs}" "${version}" set_sha1 } -- cgit v1.2.3 From 4b5cc6ce7567a7075802dd8c3e47dd7cf8e84627 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 26 Mar 2006 21:09:50 +0200 Subject: fix copyright module-init-tools dep gdth lilo minor parsing fixes --- debian/changelog | 28 ++++++++++++++++++++++++++-- debian/control | 2 +- debian/copyright | 13 ++++++++++--- hook-functions | 4 ++-- mkinitramfs-kpkg | 3 ++- scripts/functions | 7 ++++++- 6 files changed, 47 insertions(+), 10 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bfbd682..a2e8cef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,28 @@ -initramfs-tools (0.57) unstable; urgency=low +initramfs-tools (0.59) unstable; urgency=low + + * debian/copyright: Add years of copyright and authors. + + -- maximilian attems Sun, 26 Mar 2006 21:04:28 +0200 + +initramfs-tools (0.58) unstable; urgency=low + + * hook-functions: Be more carefull about the minor parsing. The fix of + #357332 works for 3 digit roots, but not for hdc6 aka root=1606. + Thanks Martijn Pieters for report + (closes: #358354, #358740). + + * hook-functions: Add gdth to the scsi modules. + + * mkinitramfs-kpkg: Use set -eu to capture full /boot. + Really (closes: #350875) + + * Add dependency on module-init-tools. (closes: #358632) + + * Don't include full path for man page reference. (closes: #358371) + + -- maximilian attems Sun, 26 Mar 2006 16:39:37 +0200 + +initramfs-tools (0.57b) unstable; urgency=low * mkinitramfs, update-initramfs, hook-functions: On verbose mode show, which modules gets added to the initramfs. @@ -7,7 +31,7 @@ initramfs-tools (0.57) unstable; urgency=low to Petter Reinholdtsen . (closes: #357980) * initramfs-tools.8: Document that `-' is not allowed to be used in a script - filename - the filenames get used as shell variable. (closes: #355235) + filename - the filenames get used as shell variable. (closes: #344639) * mkinitramfs: Don't exit succesfully in a case of a full fs. Leaves the linux-image unconfigured. Thanks martin f krafft diff --git a/debian/control b/debian/control index b4124ab..01ddf3b 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.6.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.1.16-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, udev (>= 0.076-5) +Depends: klibc-utils (>= 1.1.16-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.076-5) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/debian/copyright b/debian/copyright index d495248..3a3bc5b 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,9 +1,7 @@ This package was debianized by Jeff Bailey on Thu, 27 Jan 2005 15:23:52 -0500. -Copyright: - -Author: Jeff Bailey +The current Debian maintainer is maximilian attems The source code up to 0.31 can be found by using "bzr" at: http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools @@ -14,6 +12,15 @@ http://archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/ The Debian tree is maintained with "bzr" at: http://debian.stro.at/bzr-test/initramfs-tools/ +Authors: Jeff Bailey , Adam Conrad , + Scott James Remnant , + maximilian attems + +Copyright: 2005 Jeff Bailey + 2005 - 2006 Adam Conrad + 2005 - 2006 Scott James Remnant + 2005 - 2006 maximilian attems + License: PUBLIC DOMAIN diff --git a/hook-functions b/hook-functions index efce32d..874d55f 100644 --- a/hook-functions +++ b/hook-functions @@ -170,7 +170,7 @@ auto_add_modules() for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci \ aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic \ cciss ch cpqarray dac960 dc395x dmx3191d dpt_i2o eata fdomain \ - ibmvscsic initio ipr ips isp1020 lpfc max_scsi mac53c94 \ + 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 \ @@ -220,7 +220,7 @@ Options: -o outfile Write to outfile. -r root Override ROOT setting in mkinitrd.conf. -See ${0}(8) for further details. +See mkinitramfs(8) for further details. EOF exit 1 diff --git a/mkinitramfs-kpkg b/mkinitramfs-kpkg index d36710a..8d32005 100644 --- a/mkinitramfs-kpkg +++ b/mkinitramfs-kpkg @@ -1,4 +1,5 @@ #!/bin/sh +set -eu STATEDIR=/var/lib/initramfs-tools @@ -10,7 +11,7 @@ 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. +See mkinitramfs-kpkg(8) for further details. EOF exit 1 } diff --git a/scripts/functions b/scripts/functions index 05b7779..8cf6ddc 100644 --- a/scripts/functions +++ b/scripts/functions @@ -189,6 +189,7 @@ load_modules() fi } +# lilo compatibility parse_numeric() { case $1 in "") @@ -201,10 +202,14 @@ parse_numeric() { minor=${1#*:} major=${1%:*} ;; - *) + [0-9][0-9][0-9]) minor=$((0x${1#?})) major=$((0x${1%??})) ;; + *) + minor=$((0x${1#??})) + major=$((0x${1%??})) + ;; esac mknod /dev/root b ${major} ${minor} -- cgit v1.2.3 From fac756fddb6da3efbbfe99c3c9b0644346ecc695 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 26 Mar 2006 22:37:51 +0200 Subject: Resynch with 0.40ubuntu28 add raid10 module move the loop waiting code to mountroot() leaves only ide-generic from scripts/local-top/udev_helper md pre-requesites the udev one --- debian/changelog | 12 ++++- hooks/md | 2 +- scripts/init-premount/udev_helper | 107 -------------------------------------- scripts/local | 26 ++++++++- scripts/local-top/md | 2 +- scripts/local-top/udev_helper | 23 ++++++++ 6 files changed, 61 insertions(+), 111 deletions(-) delete mode 100755 scripts/init-premount/udev_helper create mode 100755 scripts/local-top/udev_helper (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a2e8cef..93b55c4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,17 @@ initramfs-tools (0.59) unstable; urgency=low * debian/copyright: Add years of copyright and authors. - -- maximilian attems Sun, 26 Mar 2006 21:04:28 +0200 + * Resync with 0.40ubuntu28: + - hooks/md: Add raid10 module. + - scripts/local: Move the "loop waiting for the root filesystem" code from + the udev premount script to the local mountroot() function where it truly + belongs. + - scripts/local-top/udev_helper: Leave the remaining ide-generic part + there, should be taken over by udev itself. + - make the md local-top scripts pre-requisite the udev one. + thanks Scott James Remnant + + -- maximilian attems Sun, 26 Mar 2006 22:35:15 +0200 initramfs-tools (0.58) unstable; urgency=low diff --git a/hooks/md b/hooks/md index c020c3a..becaba1 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 linear raid0 raid1 raid5 raid6; do +for x in md linear raid0 raid1 raid5 raid6 raid10; do manual_add_modules ${x} done diff --git a/scripts/init-premount/udev_helper b/scripts/init-premount/udev_helper deleted file mode 100755 index d2ef579..0000000 --- a/scripts/init-premount/udev_helper +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/sh - -PREREQ="udev" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# Source the relevant scripts for later decisions -. /conf/initramfs.conf -. /scripts/functions - -# Nothing todo for nfs boot -case "${BOOT}" in -local) - ;; -*) - exit 0 - ;; -esac - -# Our job now is to make the block device for the root filesystem available. -# This is actually a bit trickier than it first appears because we first need -# to figure out which driver needs it, and to do that, we need to know what -# type of bus it's on. Fortunately we have all that information, this still -# feels like an ungodly hack though. -case "${ROOT}" in -/dev/root) - # An interesting case, this root device was specified as a - # major/minor pair. Fortunately we have that information - case "${major}" in - 3|22|33|34|56|57|88|89|90|91) - # traditional ide - root_type=ide - ;; - 80|81|82|83|84|85|86|87) - # ide on i2o - root_type=ide - ;; - 8|11|65|66|67|68|69|70|71|128|129|130|131|132|133|134|135) - # scsi - root_type=scsi - ;; - esac - ;; -/dev/hd*) - # Ahh, plain-old traditional ide - root_type=ide - ;; -/dev/sd*) - # SCSI, or an IDE controller dressed up in drag - root_type=scsi - ;; -/dev/disk/*) - # Specified by label; sadly there's no way to tell what bus - # this is on, so we'll just declare that we only support it - # for SCSI and removable devices - root_type=scsi - ;; -esac - -case "${root_type}" in -ide) - # If we're booting from IDE, it might not be a PCI controller, - # 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 - fi - ;; - -scsi) - # If we're booting from SCSI we should have done all we need, - # now it's just a matter of waiting for the devices to appear - # which could take a while... - [ -e "${ROOT}" ] || log_begin_msg "Waiting for root file system" - - if type usplash_write >/dev/null 2>&1; then - usplash_write "TIMEOUT 30" || true - fi - - slumber=300 - while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do - /bin/sleep 0.1 - slumber=$(( ${slumber} - 1 )) - done - - if type usplash_write >/dev/null 2>&1; then - usplash_write "TIMEOUT 15" || true - fi - - if [ ${slumber} -gt 0 ]; then - log_end_msg 0 - else - log_end_msg 1 || true - fi - ;; -esac diff --git a/scripts/local b/scripts/local index 917528a..dd5924d 100644 --- a/scripts/local +++ b/scripts/local @@ -7,7 +7,31 @@ mountroot () run_scripts /scripts/local-top [ "$quiet" != "y" ] && log_end_msg - # Get the root filesystem type + # If the root device hasn't shown up yet, give it a little while + # to deal with removable devices + if [ ! -e "${ROOT}" ]; then + log_begin_msg "Waiting for root file system..." + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TIMEOUT 180" || true + fi + + slumber=1800 + while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do + /bin/sleep 0.1 + slumber=$(( ${slumber} - 1 )) + done + + if [ ${slumber} -gt 0 ]; then + log_end_msg 0 + else + log_end_msg 1 || true + fi + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TIMEOUT 15" || true + fi + fi + + # We've given up, but we'll let the user fix matters if they can while [ ! -e "${ROOT}" ]; do panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" done diff --git a/scripts/local-top/md b/scripts/local-top/md index c7515fe..aa48474 100755 --- a/scripts/local-top/md +++ b/scripts/local-top/md @@ -1,6 +1,6 @@ #!/bin/sh -PREREQ="" +PREREQ="udev_helper" prereqs() { diff --git a/scripts/local-top/udev_helper b/scripts/local-top/udev_helper new file mode 100755 index 0000000..5a747ba --- /dev/null +++ b/scripts/local-top/udev_helper @@ -0,0 +1,23 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# If we're booting from IDE, it might not be a PCI controller, +# 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 +fi -- cgit v1.2.3 From 7f7832004e1fe8b9a13afb2ac765f4f611ffc6ed Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 28 Mar 2006 18:36:16 +0200 Subject: fix not initialized variables --- debian/changelog | 7 +++++++ mkinitramfs-kpkg | 3 +++ 2 files changed, 10 insertions(+) mode change 100644 => 100755 mkinitramfs-kpkg (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 93b55c4..757a015 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.59b) unstable; urgency=low + + * mkinitramfs-kpkg: Intialialize the variables. + (closes: #359355, #359620, #359613, #359666, #359681) + + -- maximilian attems Tue, 28 Mar 2006 16:30:59 +0200 + initramfs-tools (0.59) unstable; urgency=low * debian/copyright: Add years of copyright and authors. diff --git a/mkinitramfs-kpkg b/mkinitramfs-kpkg old mode 100644 new mode 100755 index 8d32005..437b0ac --- a/mkinitramfs-kpkg +++ b/mkinitramfs-kpkg @@ -2,6 +2,9 @@ set -eu STATEDIR=/var/lib/initramfs-tools +supported_host_version="" +supported_target_version="" +outfile="" usage() { -- cgit v1.2.3 From c29d49d84418075e1887c965d978c7cc0e07a95f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 18 Apr 2006 13:44:02 +0200 Subject: 0.60: - bug script - cryptoroot support - change exported variables - nfsopts, rootflags support - warn lilo+grub install - doc fixes --- debian/bug | 3 +++ debian/changelog | 32 ++++++++++++++++++++++++++++++++ debian/initramfs-tools.install | 1 + init | 18 ++++++++++++++---- initramfs-tools.8 | 9 ++++++++- mkinitramfs-kpkg.8 | 5 +++-- scripts/functions | 4 ++++ scripts/local | 2 +- update-initramfs | 11 +++++++++-- 9 files changed, 75 insertions(+), 10 deletions(-) create mode 100755 debian/bug mode change 100644 => 100755 update-initramfs (limited to 'debian') diff --git a/debian/bug b/debian/bug new file mode 100755 index 0000000..fda2017 --- /dev/null +++ b/debian/bug @@ -0,0 +1,3 @@ +cat /proc/cmdline >&3 +grep -v nodev /proc/filesystems >&3 +lsmod >&3 diff --git a/debian/changelog b/debian/changelog index 757a015..4c773aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,35 @@ +initramfs-tools (0.60) unstable; urgency=low + + "E ho trovato l'invasor" + + * scripts/functions: Allow boot scripts to modify exported boot parameters. + Thanks David Härdeman for the patch. (closes: 348147) + This allows the inclusion of cryptoroot hooks to cryptsetup! + + * init: add cryptopts parsing and export. + + * init: Move parse_numeric down to the "mounting root" block. + + * init, scripts/local: Allow rootflags to be passed in kernel cmdline. + Thanks Thomas Luzat for the patch. (closes: #358917) + + * init: Allow passing nfs root mount option in kernel cmdline. Thanks + Brian Brunswick for the patch. (closes: #358649) + + * update-initramfs: s/ALL/all/, fix it to actually run on update in non + verbose mode. (closes: #362568) + + * update-initramfs: Warn in big letters about grub and lilo installs. + (closes: #362816) + + * debian/bug: Add reportbug script with info about cmdline, fs and lsmod. + + * initramfs-tools(8): Document the /conf/param.conf feature. + + * mkinitramfs-kpkg(8): Spell out, why the wrapper script is needed. + + -- maximilian attems Tue, 18 Apr 2006 13:33:18 +0200 + initramfs-tools (0.59b) unstable; urgency=low * mkinitramfs-kpkg: Intialialize the variables. diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index b722d90..9a4f31e 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -6,3 +6,4 @@ conf/initramfs.conf etc/mkinitramfs hooks usr/share/initramfs-tools hook-functions usr/share/initramfs-tools update-initramfs usr/sbin +debian/bug usr/share/bug/initramfs-tools diff --git a/init b/init index f69b3e8..04b7602 100755 --- a/init +++ b/init @@ -39,6 +39,8 @@ export readonly=y export resume=${RESUME} export rootmnt=/root export debug= +export cryptopts=${CRYPTOPTS} + for x in $(cat /proc/cmdline); do case $x in init=*) @@ -55,8 +57,17 @@ for x in $(cat /proc/cmdline); do ;; esac ;; + rootflags=*) + ROOTFLAGS="-o ${x#rootflags=}" + ;; + cryptopts=*) + cryptopts="${x#cryptopts=}" + ;; nfsroot=*) - NFSROOT=${x#nfsroot=} + NFSROOT="${x#nfsroot=}" + ;; + nfsopts=*) + NFSOPTS="-o ${x#nfsopts=}" ;; boot=*) BOOT=${x#boot=} @@ -93,9 +104,6 @@ maybe_break top # Don't do log messages here to avoid confusing usplash run_scripts /scripts/init-top -. /scripts/${BOOT} -parse_numeric ${ROOT} - maybe_break modules log_begin_msg "Loading essential drivers..." load_modules @@ -108,6 +116,8 @@ log_end_msg maybe_break mount log_begin_msg "Mounting root file system..." +. /scripts/${BOOT} +parse_numeric ${ROOT} mountroot log_end_msg diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 991cff9..f0077ec 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -118,7 +118,7 @@ adds a module (and any modules which it depends on) to the initramfs image. .RS .PP .B Example: -manual_add_modules reiserfs +manual_add_modules isofs .RE .TP @@ -314,6 +314,13 @@ are the last scripts to be executed before procfs and sysfs are moved to the real rootfs and execution is turned over to the init binary which should now be found in the mounted rootfs. +.SS Boot parameters +.TP +\fB \fI +/conf/param.conf +allows boot scripts to change exported variables that are listed on top of init. Write the new values to it. It will be sourced after an boot script run if it exists. + + .SH EXAMPLES .SS Hook script diff --git a/mkinitramfs-kpkg.8 b/mkinitramfs-kpkg.8 index 34f76db..0bdc1dc 100644 --- a/mkinitramfs-kpkg.8 +++ b/mkinitramfs-kpkg.8 @@ -19,9 +19,10 @@ The .B mkinitramfs-kpkg script calls .B mkinitramfs -for kernel-package. It's usage is not recommended. +as wrapper script for kernel-package. It preservers the old mkinitrd calling +conventions. It's usage is not recommended. See -.B update-initramfs +.B update-initramfs (8) for an better alternative. .SH OPTIONS diff --git a/scripts/functions b/scripts/functions index 8cf6ddc..96a5577 100644 --- a/scripts/functions +++ b/scripts/functions @@ -161,6 +161,10 @@ call_scripts() { for cs_x in ${runlist}; do ${initdir}/${cs_x} + # allow boot scripts to modify exported boot paramaters + if [ -e /conf/param.conf ]; then + . /conf/param.conf + fi done } diff --git a/scripts/local b/scripts/local index dd5924d..25aca70 100644 --- a/scripts/local +++ b/scripts/local @@ -53,7 +53,7 @@ mountroot () # FIXME This has no error checking # Mount root - mount ${roflag} -t ${FSTYPE} ${ROOT} ${rootmnt} + mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt} [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/log-bottom" run_scripts /scripts/local-bottom diff --git a/update-initramfs b/update-initramfs old mode 100644 new mode 100755 index 9b69981..488806f --- a/update-initramfs +++ b/update-initramfs @@ -14,7 +14,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 @@ -75,6 +75,13 @@ generate_initramfs() run_bootloader() { if [ -x /sbin/grub -o -e /boot/grub/menu.lst ]; then + if [ -e /etc/lilo.conf ]; then + 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 if [ -e /etc/lilo.conf ]; then @@ -205,7 +212,7 @@ update() fi # Don't stop if one version doesn't work. set +e - "${0}" "${vflag}" -u -k "${u_version}" + "${0}" -u -k "${u_version}" ${vflag} set -e done exit 0 -- cgit v1.2.3 From 02b32f0a24c8e0724bca66ef57f144c4d708dce2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 20 May 2006 12:14:44 +0200 Subject: - mv /etc/mkinitramfs /etc/initramfs-tools upgrade handling on preinst - update TODO - update bug script --- debian/TODO | 6 +++--- debian/bug | 18 +++++++++++++++--- debian/changelog | 32 ++++++++++++++++++++++++++++++++ debian/control | 4 ++-- debian/initramfs-tools.dirs | 22 +++++++++++----------- debian/initramfs-tools.install | 2 +- debian/initramfs-tools.postinst | 12 ++++++------ debian/initramfs-tools.postrm | 4 ++-- debian/initramfs-tools.preinst | 25 +++++++++++++++++++++---- init | 6 +++++- initramfs-tools.8 | 20 ++++++++++---------- mkinitramfs | 2 +- mkinitramfs.8 | 6 +++--- 13 files changed, 112 insertions(+), 47 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index 1f187ae..2c2edc0 100644 --- a/debian/TODO +++ b/debian/TODO @@ -3,12 +3,12 @@ TODO o Grep for TODO and FIXME and do those. =) - o Eliminate ?udev?, klibc. + o Eliminate ?udev?, ?klibc?, busybox (-> glibc). o Support list and dep options o Default to dep for PPC - Possibly to detect newworld? - o External hooks support for evms + o lilo timeouts handling - o Support cryptoroot + o mdadm + lvm2 hooks to their respective packages diff --git a/debian/bug b/debian/bug index fda2017..b1b477d 100755 --- a/debian/bug +++ b/debian/bug @@ -1,3 +1,15 @@ -cat /proc/cmdline >&3 -grep -v nodev /proc/filesystems >&3 -lsmod >&3 +#!/bin/sh + +exec >&3 + +echo "-- /proc/cmdline" +cat /proc/cmdline +echo + +echo "-- /proc/filesystems" +grep -v nodev /proc/filesystems +echo + +echo "-- lsmod" +lsmod +echo diff --git a/debian/changelog b/debian/changelog index 4c773aa..4a02bdc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,35 @@ +initramfs-tools (0.61) unstable; urgency=low + + Release "O partigiano portami via" + + * debian/TODO: update to latest state. + + * debian/bug: Fix reportbug script shebang line, add some descriptive echos. + + * debian/control: Pump to 3.7.2 standard version without changes. + + * init: Use 10M as tmpfs_size for the udev /dev. (closes: #352434) + + * /etc/initramfs-tools: Use the much more intituive conf dir location. + Thanks for the idea to Andres Salomon . + + * debian/initramfs-tools.preinst: mv /etc/mkinitramfs /etc/initramfs-tools + on upgrade as this should work even with drive space issues. + Thanks to Jeff Bailey for the posix atomic + mv hint and Daniel Blaschke for testing. + + * mkinitramfs: Set CONFDIR to /etc/initramfs-tools. + + * mkinitramfs.8, initramfs-tools.8: Document the new pathes. + + * debian/control: Change Build-depends-indep to Build-depends as we need + debhelper and cdbs for the clean target, fulfills policy 7.6. + + * debian/initramfs-tools.preinst: Warn and bail out if /etc/initramfs-tools + already exists. + + -- maximilian attems Thu, 18 May 2006 17:27:44 +0200 + initramfs-tools (0.60) unstable; urgency=low "E ho trovato l'invasor" diff --git a/debian/control b/debian/control index 01ddf3b..bf022d9 100644 --- a/debian/control +++ b/debian/control @@ -3,8 +3,8 @@ Section: utils Priority: optional Uploaders: Jeff Bailey , maximilian attems Maintainer: Debian kernel team -Build-Depends-Indep: debhelper (>= 4.1.0), cdbs -Standards-Version: 3.6.2.0 +Build-Depends: debhelper (>= 4.1.0), cdbs +Standards-Version: 3.7.2.0 Package: initramfs-tools Architecture: all diff --git a/debian/initramfs-tools.dirs b/debian/initramfs-tools.dirs index 9325057..0a807a5 100644 --- a/debian/initramfs-tools.dirs +++ b/debian/initramfs-tools.dirs @@ -1,13 +1,13 @@ -etc/mkinitramfs/scripts/init-bottom -etc/mkinitramfs/scripts/init-premount -etc/mkinitramfs/scripts/init-top -etc/mkinitramfs/scripts/local-bottom -etc/mkinitramfs/scripts/local-premount -etc/mkinitramfs/scripts/local-top -etc/mkinitramfs/scripts/nfs-bottom -etc/mkinitramfs/scripts/nfs-premount -etc/mkinitramfs/scripts/nfs-top -etc/mkinitramfs/hooks -etc/mkinitramfs/conf.d +etc/initramfs-tools/scripts/init-bottom +etc/initramfs-tools/scripts/init-premount +etc/initramfs-tools/scripts/init-top +etc/initramfs-tools/scripts/local-bottom +etc/initramfs-tools/scripts/local-premount +etc/initramfs-tools/scripts/local-top +etc/initramfs-tools/scripts/nfs-bottom +etc/initramfs-tools/scripts/nfs-premount +etc/initramfs-tools/scripts/nfs-top +etc/initramfs-tools/hooks +etc/initramfs-tools/conf.d usr/share/initramfs-tools/modules.d /var/lib/initramfs-tools diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index 9a4f31e..a5b87df 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -2,7 +2,7 @@ mkinitramfs usr/sbin mkinitramfs-kpkg usr/sbin init usr/share/initramfs-tools scripts usr/share/initramfs-tools -conf/initramfs.conf etc/mkinitramfs +conf/initramfs.conf 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 63ceef8..94c5c1b 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -14,29 +14,29 @@ if [ "$1" = configure ]; then fi if [ -e /etc/mkinitrd/modules ]; then - cp /etc/mkinitrd/modules /etc/mkinitramfs + cp /etc/mkinitrd/modules /etc/initramfs-tools sed -i \ -e 's/mkinitrd/mkinitramfs/g' \ -e '/^ide-generic/d' \ -e '/^ide-disk/d' \ -e '/^ext2/d' \ -e '/^ext3/d' \ - /etc/mkinitramfs/modules + /etc/initramfs-tools/modules fi if [ -e ${RESUME} ]; then - echo "RESUME=${RESUME}" > /etc/mkinitramfs/conf.d/resume + echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume fi if [ -e /etc/mkinitrd/DSDT ]; then - cp /etc/mkinitrd/DSDT /etc/mkinitramfs/DSDT.aml + cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml fi fi fi -if [ ! -e /etc/mkinitramfs/modules ]; then - cp /usr/share/doc/initramfs-tools/examples/modules /etc/mkinitramfs/ +if [ ! -e /etc/initramfs-tools/modules ]; then + cp /usr/share/doc/initramfs-tools/examples/modules /etc/initramfs-tools/ fi # Regenerate initramfs on upgrade diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm index 0c2d39a..b711f2c 100644 --- a/debian/initramfs-tools.postrm +++ b/debian/initramfs-tools.postrm @@ -1,8 +1,8 @@ #!/bin/sh if [ "x${1}" = "xpurge" ]; then - rm -f /etc/mkinitramfs/modules - rm -f /etc/mkinitramfs/conf.d/resume + rm -f /etc/initramfs-tools/modules + rm -f /etc/initramfs-tools/conf.d/resume fi #DEBHELPER# diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 3582290..3ec83c6 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -2,13 +2,30 @@ set -e -[ -f /etc/mkinitramfs/initramfs.conf ] && . /etc/mkinitramfs/initramfs.conf +case "$1" in + upgrade) + if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.61"; then + if [ -d /etc/initramfs-tools ]; then + echo + echo "Warning: /etc/initramfs-tools already exists." + echo " Please remove it for upgrade." + echo + exit 1 + fi + if [ -d /etc/mkinitramfs ]; then + mv /etc/mkinitramfs /etc/initramfs-tools + fi + fi + ;; +esac + +[ -f /etc/initramfs-tools/initramfs.conf ] && . /etc/initramfs-tools/initramfs.conf if [ -z ${RESUME} ]; then exit 0 else - mkdir -p /etc/mkinitramfs/conf.d - echo "RESUME=${RESUME}" > /etc/mkinitramfs/conf.d/resume - sed -i -e "s/RESUME=.*/#RESUME=/" /etc/mkinitramfs/initramfs.conf + mkdir -p /etc/initramfs-tools/conf.d + echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume + sed -i -e "s/RESUME=.*/#RESUME=/" /etc/initramfs-tools/initramfs.conf fi #DEBHELPER# diff --git a/init b/init index 04b7602..5e2084f 100755 --- a/init +++ b/init @@ -11,7 +11,11 @@ mount -t proc none /proc # Note that this only becomes /dev on the real filesystem if udev's scripts # are used; which they will be, but it's worth pointing out -mount -t tmpfs -o mode=0755 udev /dev +tmpfs_size="10M" +if [ -e /etc/udev/udev.conf ]; then + . /etc/udev/udev.conf +fi +mount -t tmpfs -o size=$tmpfs_size,mode=0755 udev /dev touch /dev/.initramfs-tools mkdir /dev/.initramfs mknod /dev/console c 5 1 diff --git a/initramfs-tools.8 b/initramfs-tools.8 index f0077ec..b0a9f32 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -75,7 +75,7 @@ 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 +/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. @@ -174,9 +174,9 @@ 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. +/usr/share/initramfs-tools/scripts/ and /etc/initramfs-tools/scripts/. There +are a number of subdirectories to these two directories which control the boot +stage at which the scripts are executed. .SS Header Like for hook scripts, there are no guarantees as to the order in which the @@ -271,8 +271,8 @@ panic "Frobnication failed" .RE .SS Subdirectories -Both /usr/share/initramfs-tools/scripts and /etc/mkinitramfs/scripts contains -the following subdirectories. +Both /usr/share/initramfs-tools/scripts and /etc/initramfs-tools/scripts +contains the following subdirectories. .TP \fB \fI @@ -285,8 +285,8 @@ No other device files are present yet. \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. +init-bottom) after modules specified by hooks and /etc/initramfs-tools/modules +have been loaded. .TP \fB \fI @@ -325,7 +325,7 @@ allows boot scripts to change exported variables that are listed on top of init. .SS Hook script An example hook script would look something like this (and would usually be -placed in /etc/mkinitramfs/hooks/frobnicate): +placed in /etc/initramfs-tools/hooks/frobnicate): .RS .nf @@ -359,7 +359,7 @@ exit 0 .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): +An example boot script would look something like this (and would usually be placed in /etc/initramfs-tools/scripts/local-top/frobnicate): .RS .nf diff --git a/mkinitramfs b/mkinitramfs index b7de71b..05800bb 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -4,7 +4,7 @@ umask 0022 # Defaults keep="n" -CONFDIR="/etc/mkinitramfs" +CONFDIR="/etc/initramfs-tools" verbose="n" errors_to="2>/dev/null" # BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 539c4c0..49b606f 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -67,20 +67,20 @@ This option queries if mkinitramfs can create ramdisks for kernel version .SH FILES .TP -.I /etc/mkinitramfs/initramfs.conf +.I /etc/initramfs-tools/initramfs.conf The default configuration file for the script. See .BR initramfs.conf (5) for a description of the available configuration parameter. .TP -.I /etc/mkinitramfs/modules +.I /etc/initramfs-tools/modules Specified modules will be put in the generated image and loaded when the system boots. The format - one per line - is identical to that of .I /etc/modules, which is described in .BR modules (5). .TP -.I /etc/mkinitramfs/DSDT.aml +.I /etc/initramfs-tools/DSDT.aml If this file exists, it will be appended to the initramfs in a way that causes it to be loaded by ACPI. -- cgit v1.2.3 From d471f025bf9e5ff0217cc387250be4a410a90aba Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 21 Jun 2006 09:48:23 +0200 Subject: - News entry for the confdir mv - check for doc befor copying modules - add arcmsr to scsi module - tighten udev dep --- debian/NEWS | 11 +++++++++++ debian/changelog | 16 ++++++++++++++++ debian/control | 2 +- debian/initramfs-tools.postinst | 7 ++++++- hook-functions | 2 +- 5 files changed, 35 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/NEWS b/debian/NEWS index e755806..d4647d4 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,14 @@ +initramfs-tools (0.61) unstable; urgency=low + + * This release moves the initramfs-tools confdir from /etc/mkinitramfs to + /etc/initramfs-tools. Packages are encouraged to ship files as scripts + under /usr/share/initramfs-tools. + + Local tests behaved fine, but be warned that this could potentially + cause boot troubles on upgrade. + + -- maximilian attems Wed, 21 Jun 2006 09:16:01 +0200 + initramfs-tools (0.10) breezy; urgency=low * This release includes hardware auto detection in the initramfs. diff --git a/debian/changelog b/debian/changelog index 4a02bdc..ba0fe4f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +initramfs-tools (0.62) unstable; urgency=low + + * 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) + + * debian/initramfs-tools.postinst: Check if modules example is available + under doc before copying if not touch $CONFDIR/modules. + (closes: #368043) + + * hook-functions: Add arcmsr to the scsi modules list. + + * debian/NEWS: Add Notice about confdir mv as version 0.61. + + -- maximilian attems Wed, 21 Jun 2006 09:22:23 +0200 + initramfs-tools (0.61) unstable; urgency=low Release "O partigiano portami via" diff --git a/debian/control b/debian/control index bf022d9..6c59d5e 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.7.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.1.16-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.076-5) +Depends: klibc-utils (>= 1.1.16-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index 94c5c1b..f1cfcfa 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -36,7 +36,12 @@ if [ "$1" = configure ]; then fi if [ ! -e /etc/initramfs-tools/modules ]; then - cp /usr/share/doc/initramfs-tools/examples/modules /etc/initramfs-tools/ + 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 diff --git a/hook-functions b/hook-functions index 874d55f..6d41f2e 100644 --- a/hook-functions +++ b/hook-functions @@ -168,7 +168,7 @@ auto_add_modules() ;; scsi) for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci \ - aic79xx aic7xxx ata_piix atari_scsi atp870u BusLogic \ + 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 \ -- 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 'debian') 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 16d9f24976ebbb165e5e8aae17a17ddaeca90a8d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 24 Jun 2006 11:15:58 +0200 Subject: lvm script patch activate root and resume volume group lvm script root on lilo woraround lvm hook add dm-mirror mkinitramfs cleanup old make-kpkg args update-initramfs show what's going on --- debian/changelog | 21 +++++++++++++++++++++ hooks/lvm | 2 +- mkinitramfs | 23 +---------------------- scripts/local-top/lvm | 48 +++++++++++++++++++++++++++++++++--------------- update-initramfs | 2 +- 5 files changed, 57 insertions(+), 39 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 83c5a46..2e939e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,24 @@ +initramfs-tools (0.65) unstable; urgency=low + + * scripts/local-top/lvm: Activate root and resume volume group. + The initialization got refractored in an function. (closes: #374891) + Thanks for the patch to David Härdeman . + + * scripts/local-top/lvm: Be carefull to activate volume group on lilo boot + too. Although in that case we don't know the precise volume group, we + activate them all. Matches behaviour of previous hook. + + * hooks/lvm: Add dm-mirror, allows to boot from an unfinished pvmove. + (closes: #374378) + + * mkinitramfs: Remove old kernel-package supported long param. + kernel-package uses since month make-kpkg. + + * update-initramfs: Show by default which initramfs gets generated. + (closes: #364301) + + -- maximilian attems Sat, 24 Jun 2006 10:46:40 +0200 + initramfs-tools (0.64) unstable; urgency=low RELEASE o bella, ciao! bella, ciao! diff --git a/hooks/lvm b/hooks/lvm index e29215e..98c0e0a 100755 --- a/hooks/lvm +++ b/hooks/lvm @@ -22,6 +22,6 @@ fi copy_exec /lib/lvm-200/vgchange /sbin -for x in dm_mod dm_snapshot; do +for x in dm_mod dm_snapshot dm_mirror; do manual_add_modules ${x} done diff --git a/mkinitramfs b/mkinitramfs index 05800bb..5fcc1fd 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -10,7 +10,7 @@ errors_to="2>/dev/null" # BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" BUSYBOXDIR="/bin" -OPTIONS=`getopt -o d:ko:r:v --long supported-host-version:,supported-target-version: -n "$0" -- "$@"` +OPTIONS=`getopt -o d:ko:r:v -n "$0" -- "$@"` # Check for non-GNU getopt if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi @@ -44,14 +44,6 @@ while true; do verbose="y" shift ;; - --supported-host-version) - supported_host_version="$2" - shift 2 - ;; - --supported-target-version) - supported_target_version="$2" - shift 2 - ;; --) shift break @@ -63,19 +55,6 @@ while true; do 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 - # For dependency ordered mkinitramfs hook scripts. . /usr/share/initramfs-tools/scripts/functions . /usr/share/initramfs-tools/hook-functions diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 7ac81e6..8ff3b98 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -15,23 +15,41 @@ prereqs) ;; esac -vg=${ROOT#/dev/mapper/} +activate_vg() +{ + local vg="$1" + + # Make sure that we have a non-empty argument + if [ -z "${vg}" ]; then + return 0 + fi -case ${vg} in - /dev/root) - unset vg - ;; - /*) + # Take care of lilo boot arg, risky activating of all vg + vg_lilo=${vg:0:2} + if [ "${vg_lilo}" = fe ]; then + vgchange -ay exit 0 - ;; -esac - -modprobe -q dm-mod + fi + + # Make sure that we have a d-m path + vg=${vg#/dev/mapper/} + if [ "$vg" = "$1" ]; then + return 0 + fi -# Split volume group from logical volume. -vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') -# Reduce padded --'s to -'s -vg=$(echo ${vg} | sed -e 's#--#-#g') + # Split volume group from logical volume. + vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') + # Reduce padded --'s to -'s + vg=$(echo ${vg} | sed -e 's#--#-#g') -vgchange -ay ${vg} + vgchange -ay ${vg} +} + +if [ ! -e /sbin/vgchange ]; then + exit 0 +fi + +modprobe -q dm-mod +activate_vg "$ROOT" +activate_vg "$resume" diff --git a/update-initramfs b/update-initramfs index 488806f..03bf5cf 100755 --- a/update-initramfs +++ b/update-initramfs @@ -62,7 +62,7 @@ set_initramfs() generate_initramfs() { - verbose "Generating ${initramfs}" + echo "update-initramfs: Generating ${initramfs}" OPTS="-o" if [ "${verbose}" = 1 ]; then OPTS="-v $OPTS" -- cgit v1.2.3 From b7618c8e038c6e9a671ef62578bf79327fbc00be Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 24 Jun 2006 13:22:44 +0200 Subject: - no longer need to remove initramfs-tools/modules on postrm ubuntu sync: - change prereqs policy - add check_minver - use it in update-initramfs - fix version to use in update-initramfs --- debian/changelog | 23 ++++++++++++++++++++++- debian/initramfs-tools.postrm | 1 - scripts/functions | 39 +++++++++++++++++++++++++++++++++++++++ update-initramfs | 19 ++++++++++++++----- 4 files changed, 75 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2e939e9..82983ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,7 +17,28 @@ initramfs-tools (0.65) unstable; urgency=low * update-initramfs: Show by default which initramfs gets generated. (closes: #364301) - -- maximilian attems Sat, 24 Jun 2006 10:46:40 +0200 + * Resync with 0.40ubuntu32: + - Make prereqs conditional on the script/hook actually existing. From + now on, this means that 'PREREQ="udev"' means "run udev first, iff it + happens to be installed". Having the files exist on the filesystem if + you have a HARD dependency should be enforced with package dependencies. + (closes: #369617) + - Make "update-initramfs -u" try to find the running kernel *after* it + attempts to search the symbolic link list and its own sha1 list. + Using this as a fallback, rather than the default, should solve most + upgrade issues, where people found their initramfs was half-baked. + - Abstract out the kernel minversion checking stuff into the function + library, so we can reuse it to check minversion requirements for hook + scripts as well (such as udev, which requires >= 2.6.15 in dapper) + - Bump the kernel minversion to 2.6.15 on hppa and ia64, since they used + initrd-tools with their 2.6.12 kernels in breezy, not initramfs-tools. + - If mkinitramfs fails due to minversion not being met, don't bail out + of update-initramfs, but just exit 0, so upgrades don't halt on it. + + * debian/initramfs-tools.postrm: We no longer need to explicitly remove + /etc/initramfs-tools/modules. + + -- maximilian attems Sat, 24 Jun 2006 11:42:07 +0200 initramfs-tools (0.64) unstable; urgency=low diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm index b711f2c..b2f40bd 100644 --- a/debian/initramfs-tools.postrm +++ b/debian/initramfs-tools.postrm @@ -1,7 +1,6 @@ #!/bin/sh if [ "x${1}" = "xpurge" ]; then - rm -f /etc/initramfs-tools/modules rm -f /etc/initramfs-tools/conf.d/resume fi diff --git a/scripts/functions b/scripts/functions index 96a5577..35485c6 100644 --- a/scripts/functions +++ b/scripts/functions @@ -91,6 +91,14 @@ set_initlist() reduce_satisfied() { deplist="$(render array_${1})" + unset tmpdeplist + for rs_y in ${deplist}; do + if [ ! -f ${initdir}/${rs_y} ]; then + continue + fi + tmpdeplist="${tmpdeplist} ${rs_y}" + done + deplist=${tmpdeplist} for rs_x in ${runlist}; do pop_list_item ${rs_x} ${deplist} deplist=${tmppop} @@ -176,6 +184,37 @@ run_scripts() call_scripts } +check_minkver() +{ + curversion=${1} + initdir=${2} + set_initlist + if [ -z ${initdir} ]; then + DPKG_ARCH=`dpkg --print-installation-architecture` + case ${DPKG_ARCH} in + ia64|hppa) + minversion="2.6.15" + ;; + *) + minversion="2.6.12" + ;; + esac + if dpkg --compare-versions "${curversion}" lt "${minversion}"; then + echo "W: kernerl ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + fi + [ -z ${initdir} ] || 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 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + done +} + # Load custom modules first load_modules() { diff --git a/update-initramfs b/update-initramfs index 03bf5cf..2f3ebcf 100755 --- a/update-initramfs +++ b/update-initramfs @@ -67,8 +67,17 @@ generate_initramfs() if [ "${verbose}" = 1 ]; then OPTS="-v $OPTS" fi - mkinitramfs $OPTS "${initramfs}" "${version}" - set_sha1 + if mkinitramfs $OPTS "${initramfs}" "${version}"; then + set_sha1 + else + mkinitramfs_return="$?" + if [ "$mkinitramfs_return" = "2" ]; then + # minversion wasn't met, exit 0 + exit 0 + fi + verbose "mkinitramfs failed for ${initramfs}" + exit $mkinitramfs_return + fi } # only run lilo if no grub is around @@ -192,15 +201,15 @@ create() update() { if [ -z "${version}" ]; then - set_current_version + set_linked_version fi if [ -z "${version}" ]; then - set_linked_version + set_highest_version fi if [ -z "${version}" ]; then - set_highest_version + set_current_version fi if [ "${version}" = "all" ]; then -- cgit v1.2.3 From 6fc7a6092aa2fdd3006d99941ac774b5e4e0577c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 25 Jun 2006 01:20:05 +0200 Subject: minor changelog polishing --- debian/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 82983ae..ad677f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,7 @@ initramfs-tools (0.65) unstable; urgency=low The initialization got refractored in an function. (closes: #374891) Thanks for the patch to David Härdeman . - * scripts/local-top/lvm: Be carefull to activate volume group on lilo boot + * scripts/local-top/lvm: Be careful to activate volume group on lilo boot too. Although in that case we don't know the precise volume group, we activate them all. Matches behaviour of previous hook. @@ -12,7 +12,7 @@ initramfs-tools (0.65) unstable; urgency=low (closes: #374378) * mkinitramfs: Remove old kernel-package supported long param. - kernel-package uses since month make-kpkg. + kernel-package uses since 10.036 mkinitramfs-kpkg. * update-initramfs: Show by default which initramfs gets generated. (closes: #364301) @@ -38,7 +38,7 @@ initramfs-tools (0.65) unstable; urgency=low * debian/initramfs-tools.postrm: We no longer need to explicitly remove /etc/initramfs-tools/modules. - -- maximilian attems Sat, 24 Jun 2006 11:42:07 +0200 + -- maximilian attems Sat, 24 Jun 2006 13:27:49 +0200 initramfs-tools (0.64) unstable; urgency=low -- cgit v1.2.3 From c7ad939852fedfe308a643805df3d7e3a6549755 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 27 Jun 2006 12:02:38 +0200 Subject: fix lvm root load mirror and snapshot --- debian/changelog | 9 +++++++++ scripts/local-top/lvm | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ad677f3..c39e1b5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +initramfs-tools (0.65b) unstable; urgency=low + + * scripts/local-top/lvm: Load snapshot and mirror modules. (Closes: #375342) + + * scripts/local-top/lvm: Fix a wrong substitution for the lilo test. + (Closes: #375442) + + -- maximilian attems Mon, 26 Jun 2006 14:54:30 +0200 + initramfs-tools (0.65) unstable; urgency=low * scripts/local-top/lvm: Activate root and resume volume group. diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 8ff3b98..3b012ec 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -25,11 +25,12 @@ activate_vg() fi # Take care of lilo boot arg, risky activating of all vg - vg_lilo=${vg:0:2} - if [ "${vg_lilo}" = fe ]; then + case $vg in + fe[0-9]*) vgchange -ay exit 0 - fi + ;; + esac # Make sure that we have a d-m path vg=${vg#/dev/mapper/} @@ -50,6 +51,8 @@ if [ ! -e /sbin/vgchange ]; then fi modprobe -q dm-mod +modprobe -q dm-snapshot +modprobe -q dm-mirror activate_vg "$ROOT" activate_vg "$resume" -- cgit v1.2.3 From 42579f456b1a87627a1416b3f80c51d9f15fb09a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 27 Jun 2006 14:11:25 +0200 Subject: - fix typo on panic call - load the right i2c module for ppc g5 (windfarm needs more work) --- debian/changelog | 12 ++++++++++++ hooks/thermal | 1 + scripts/functions | 2 +- scripts/init-premount/thermal | 2 +- 4 files changed, 15 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c39e1b5..ed11e31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +initramfs-tools (0.66) unstable; urgency=low + + * hooks/thermal: Add i2c-powermac. + + * scripts/init-premount/thermal: Load i2c-powermac on ppc boot. + Fixes fan noises for Sven Luther + + * scripts/function: Fix typo s/FS1/PS1/ on panic call. (closes: #375624) + Thanks to Tim Phipps for the report. + + -- maximilian attems Tue, 27 Jun 2006 14:04:17 +0200 + initramfs-tools (0.65b) unstable; urgency=low * scripts/local-top/lvm: Load snapshot and mirror modules. (Closes: #375342) diff --git a/hooks/thermal b/hooks/thermal index c27c957..9bfd323 100755 --- a/hooks/thermal +++ b/hooks/thermal @@ -23,6 +23,7 @@ case "$DPKG_ARCH" in # copy the right modules powerpc|ppc64) manual_add_modules therm_pm72 + manual_add_modules i2c-powermac ;; i386|amd64|ia64) manual_add_modules fan diff --git a/scripts/functions b/scripts/functions index 35485c6..a4faaa8 100644 --- a/scripts/functions +++ b/scripts/functions @@ -62,7 +62,7 @@ panic() modprobe -q i8042 modprobe -q atkbd echo $@ - FS1='(initramfs) ' /bin/sh /dev/console 2>&1 + PS1='(initramfs) ' /bin/sh /dev/console 2>&1 } maybe_break() diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index d59af8a..3518e7c 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -18,7 +18,7 @@ esac case "$DPKG_ARCH" in # load the right modules powerpc|ppc64) - modprobe -q i2c-keywest + modprobe -q i2c-powermac modprobe -q therm_pm72 ;; i386|amd64|ia64) -- cgit v1.2.3 From 09276c4c9f7deb9a46cf162747b5749f94738c2b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 29 Jun 2006 21:42:45 +0200 Subject: refix lilo root on lvm boot --- debian/changelog | 5 ++++- scripts/local-top/lvm | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ed11e31..b1e3272 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,10 @@ initramfs-tools (0.66) unstable; urgency=low * scripts/function: Fix typo s/FS1/PS1/ on panic call. (closes: #375624) Thanks to Tim Phipps for the report. - -- maximilian attems Tue, 27 Jun 2006 14:04:17 +0200 + * scripts/local-top/lvm: Refix lilo check. (closes: #375786) + Thanks to the patch from Christian Weeks . + + -- maximilian attems Wed, 28 Jun 2006 12:11:49 +0200 initramfs-tools (0.65b) unstable; urgency=low diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 3b012ec..fc1036e 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -30,6 +30,11 @@ activate_vg() vgchange -ay exit 0 ;; + # FIXME: check major + /dev/root) + vgchange -ay + exit 0 + ;; esac # Make sure that we have a d-m path -- cgit v1.2.3 From 0d341b8d32810844ce035e89a9e60fb7a7dde4b6 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 2 Jul 2006 18:57:07 +0200 Subject: woow pile of stuff turned up: - cleanup of activate_vg() in lvm boot script - use less of busybox utilities - conf.d for BUSYBOX=y usage for the packages - don't poke on conffile for RESUME - use printf instead of expr (ooh ash and dash are *fun*) - fix update-initramfs to use current_version when no other version exists around --- conf/initramfs.conf | 9 --------- debian/changelog | 37 +++++++++++++++++++++++++++++++++++++ debian/initramfs-tools.dirs | 1 + debian/initramfs-tools.preinst | 9 --------- initramfs-tools.8 | 5 +++-- initramfs.conf.5 | 7 ------- mkinitramfs | 2 +- scripts/functions | 16 +++++++++------- scripts/local | 2 +- scripts/local-top/lvm | 11 +++++++++-- update-initramfs | 12 ++++++++++-- 11 files changed, 71 insertions(+), 40 deletions(-) (limited to 'debian') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index a9cadf7..84d3b24 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -17,15 +17,6 @@ MODULES=most -# -# RESUME: [ /dev/hda2 | /dev/sdb2 ] -# -# optional - set the swap partition to resume from. -# "cat /proc/swaps | egrep ^/dev" should show possible candidates. -# The command line of your boot loader will override this setting. - -#RESUME= - # # NFS Section of the config. # diff --git a/debian/changelog b/debian/changelog index b1e3272..05140ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,40 @@ +initramfs-tools (0.67) unstable; urgency=high + + Release bella, ciao, ciao, ciao! + + * scripts/local: Fix typo in log_begin_msg. (closes: #375880) + + * update-initramfs: Generate initramfs for current version if there is no + sha1sum and no initrd exists yet - regression from 0.65. (closes: #375671) + Thanks martin f krafft for report. + + * conf/initramfs.conf, initramfs.conf(5): Drop RESUME section. + + * debian/initramfs-tools.preinst: Don't modify conffile initramfs.tools - + drop the corresponding code. (closes: #376008) + + * initramfs-tools(8): Document that RESUME is tried to be autodected and + written to /etc/initramfs-tools/conf.d/resume on install. + + * scripts/functions: Replace expr use with printf for skipping comments on + /etc/modules. Works on both busybox ash and klibc dash. Prefix space is + ignored by both. + + * scripts/local-top/lvm: Remove harmless warnings if a volumegroup is under + /dev/mapper but not an lvm device. (closes: 376311) + Thanks David Härdeman for the patch. + + * scripts/local-top/lvm: Change activate_vg() to return 1 if no volumegroup + is found. + + * debian/initramfs-tools.dirs: Add usr/share/initramfs-tools/conf.d entry. + + * mkinitramfs: Add stuff to the conf.d directory also from aboves directory. + + * Set urgency to high to get the RC bugfix into testing. + + -- maximilian attems Sun, 2 Jul 2006 18:35:34 +0200 + initramfs-tools (0.66) unstable; urgency=low * hooks/thermal: Add i2c-powermac. diff --git a/debian/initramfs-tools.dirs b/debian/initramfs-tools.dirs index 0a807a5..2c6a83a 100644 --- a/debian/initramfs-tools.dirs +++ b/debian/initramfs-tools.dirs @@ -9,5 +9,6 @@ etc/initramfs-tools/scripts/nfs-premount etc/initramfs-tools/scripts/nfs-top etc/initramfs-tools/hooks etc/initramfs-tools/conf.d +usr/share/initramfs-tools/conf.d usr/share/initramfs-tools/modules.d /var/lib/initramfs-tools diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 3ec83c6..f2b667e 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -19,13 +19,4 @@ case "$1" in ;; esac -[ -f /etc/initramfs-tools/initramfs.conf ] && . /etc/initramfs-tools/initramfs.conf -if [ -z ${RESUME} ]; then - exit 0 -else - mkdir -p /etc/initramfs-tools/conf.d - echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume - sed -i -e "s/RESUME=.*/#RESUME=/" /etc/initramfs-tools/initramfs.conf -fi - #DEBHELPER# diff --git a/initramfs-tools.8 b/initramfs-tools.8 index eb46827..5d7c105 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -48,8 +48,9 @@ either local or NFS (affects which initramfs scripts are run, see the "Subdirect .TP \fB \fI resume -device node which holds the result of a previous suspension using swsusp -(usually the swap partition). +On install initramfs-tools tries to autodetect the resume partition. On success +the RESUME variable is written to /etc/initramfs-tools/conf.d/resume. +The boot variable overrides it. .TP \fB \fI quiet diff --git a/initramfs.conf.5 b/initramfs.conf.5 index 7fb79b1..2874fdb 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -32,13 +32,6 @@ The default setting is \fImost\fP. \fIlist\fP includes only modules from the additional modules list. -.TP -\fB RESUME -Optional setting of the swap partition to resume from. -The resume= passed on the command line of your boot loader -will override this setting. By default, this is set in -/etc/mkinitramfs/conf.d/resume. - .SH NFS VARIABLES .TP \fB BOOT diff --git a/mkinitramfs b/mkinitramfs index 5fcc1fd..f0ba606 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -61,7 +61,7 @@ done . "${CONFDIR}/initramfs.conf" EXTRA_CONF='' -for i in ${CONFDIR}/conf.d/*; do +for i in ${CONFDIR}/conf.d/* /usr/share/initramfs-tools/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 diff --git a/scripts/functions b/scripts/functions index a4faaa8..fea6956 100644 --- a/scripts/functions +++ b/scripts/functions @@ -220,14 +220,16 @@ load_modules() { if [ -e /conf/modules ]; then cat /conf/modules | while read m; do - if [ -z "$m" ] \ - || expr "$m" : "#" >/dev/null \ - || expr "$m" : "[ \t]+#?" > /dev/null - then - continue; - else - modprobe -q $m + # Skip empty lines + if [ -z "$m" ]; then + continue fi + # Skip comments - d?ash removes whitespace prefix + com=$(printf "%.1s" "${m}") + if [ "$com" = "#" ]; then + continue + fi + modprobe -q $m done fi } diff --git a/scripts/local b/scripts/local index 25aca70..a565885 100644 --- a/scripts/local +++ b/scripts/local @@ -55,7 +55,7 @@ mountroot () # Mount root mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt} - [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/log-bottom" + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom" run_scripts /scripts/local-bottom [ "$quiet" != "y" ] && log_end_msg } diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index fc1036e..5323a7d 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -21,7 +21,7 @@ activate_vg() # Make sure that we have a non-empty argument if [ -z "${vg}" ]; then - return 0 + return 1 fi # Take care of lilo boot arg, risky activating of all vg @@ -40,7 +40,12 @@ activate_vg() # Make sure that we have a d-m path vg=${vg#/dev/mapper/} if [ "$vg" = "$1" ]; then - return 0 + return 1 + fi + + # Make sure that the device includes at least one dash + if [ "$(echo -n "$vg" | tr -d -)" = "$vg" ]; then + return 1 fi # Split volume group from logical volume. @@ -61,3 +66,5 @@ modprobe -q dm-mirror activate_vg "$ROOT" activate_vg "$resume" + +exit 0 diff --git a/update-initramfs b/update-initramfs index 2f3ebcf..1826233 100755 --- a/update-initramfs +++ b/update-initramfs @@ -125,8 +125,7 @@ get_sorted_versions() for gsv_x in "${STATEDIR}"/*; do gsv_x="$(basename "${gsv_x}")" if [ "${gsv_x}" = '*' ]; then - verbose "Nothing to do, exiting." - exit 0 + return 0 fi worklist="" for gsv_i in $version_list; do @@ -212,9 +211,18 @@ update() set_current_version fi + if [ -z "${version}" ]; then + verbose "Nothing to do, exiting." + 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" -- cgit v1.2.3 From af6f5f475221846f88a2bbda39a2a93d67556d07 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 2 Jul 2006 19:45:38 +0200 Subject: - move check_minkver() to hook-functions --- debian/changelog | 7 +++++++ hook-functions | 31 +++++++++++++++++++++++++++++++ scripts/functions | 31 ------------------------------- 3 files changed, 38 insertions(+), 31 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 05140ed..5035086 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.68) unstable; urgency=low + + * script/functions, hook-functions: Move check_minkver() to the second + file as it uses dpkg and is run by mkinitramfs and not on boot. + + -- maximilian attems Sun, 2 Jul 2006 19:44:45 +0200 + initramfs-tools (0.67) unstable; urgency=high Release bella, ciao, ciao, ciao! diff --git a/hook-functions b/hook-functions index 6d41f2e..fe10cfe 100644 --- a/hook-functions +++ b/hook-functions @@ -226,3 +226,34 @@ EOF } +# minimal supported kernel version +check_minkver() +{ + curversion=${1} + initdir=${2} + set_initlist + if [ -z ${initdir} ]; then + DPKG_ARCH=`dpkg --print-installation-architecture` + case ${DPKG_ARCH} in + ia64|hppa) + minversion="2.6.15" + ;; + *) + minversion="2.6.12" + ;; + esac + if dpkg --compare-versions "${curversion}" lt "${minversion}"; then + echo "W: kernerl ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + fi + [ -z ${initdir} ] || 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 + echo "W: not generating requested initramfs for kernel ${curversion}" >&2 + exit 2 + fi + done +} diff --git a/scripts/functions b/scripts/functions index fea6956..c3a3e16 100644 --- a/scripts/functions +++ b/scripts/functions @@ -184,37 +184,6 @@ run_scripts() call_scripts } -check_minkver() -{ - curversion=${1} - initdir=${2} - set_initlist - if [ -z ${initdir} ]; then - DPKG_ARCH=`dpkg --print-installation-architecture` - case ${DPKG_ARCH} in - ia64|hppa) - minversion="2.6.15" - ;; - *) - minversion="2.6.12" - ;; - esac - if dpkg --compare-versions "${curversion}" lt "${minversion}"; then - echo "W: kernerl ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 - echo "W: not generating requested initramfs for kernel ${curversion}" >&2 - exit 2 - fi - fi - [ -z ${initdir} ] || 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 - echo "W: not generating requested initramfs for kernel ${curversion}" >&2 - exit 2 - fi - done -} - # Load custom modules first load_modules() { -- cgit v1.2.3 From f82a46fac97eee643cbd8600657f533a6e31665f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 7 Jul 2006 12:05:34 +0200 Subject: - mkinitramfs take care of eventual missing depmod run - do the migration from mkinitramfs in preinst - sed the modules file so that it looks pretty some than ours - polish modules file - allow BUSYBOX=n --- conf/modules | 3 ++- debian/changelog | 24 ++++++++++++++++++++++-- debian/initramfs-tools.postinst | 33 --------------------------------- debian/initramfs-tools.preinst | 35 +++++++++++++++++++++++++++++++++++ mkinitramfs | 14 +++++++++++--- 5 files changed, 70 insertions(+), 39 deletions(-) (limited to 'debian') diff --git a/conf/modules b/conf/modules index 0067831..9aa4646 100644 --- a/conf/modules +++ b/conf/modules @@ -2,8 +2,9 @@ # # Syntax: module_name [args ...] # +# You must run update-initramfs(8) to effect this change. # -# This might be good choices: +# Examples: # # raid1 # sd_mod diff --git a/debian/changelog b/debian/changelog index 5035086..bbc2944 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,29 @@ -initramfs-tools (0.68) unstable; urgency=low +initramfs-tools (0.68) 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. - -- maximilian attems Sun, 2 Jul 2006 19:44:45 +0200 + * mkinitramfs: Check if ${BUSYBOX} is set to n before adding it. + Add a big fat warning that this not yet supported. Helps to do the + klibc-utils work. + + * mkinitramfs: Run depmod if no /lib/modules/${version}/modules.dep exists. + Solves initramfs creation for handbuild upstream Xen targets. + Thanks to Klaus Ita for the report. + + * debian/initramfs-tools.preinst, debian/initramfs-tools.postinst: Do the + migration of the mkinitrd settings in the preinst. (closes: #376604) Thanks + for the checks to Justin Pryzby . + + * debian/initramfs-tools.preinst: Reorder. Generate an modules file similar + to the one we ship. This should minimize Sarge upgrade prompting if no + relevant modules where added to /etc/mkinitrd/modules. + + * conf/initramfs.conf: Make it more similar to /etc/mkinitrd/modules. + + * Set urgency high for RC fixes upload. + + -- maximilian attems Fri, 7 Jul 2006 11:45:56 +0200 initramfs-tools (0.67) unstable; urgency=high diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index 9a0b555..a8df95e 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -2,39 +2,6 @@ set -e -if [ "$1" = configure ]; then - if [ x${2} = x ]; then - - # First time install. Can we autodetect the RESUME partition? - RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') - - # Inhertic initrd-tools settings if possible. - if [ -e /etc/mkinitrd/mkinitrd.conf ]; then - . /etc/mkinitrd/mkinitrd.conf - fi - - if [ -e /etc/mkinitrd/modules ]; then - cp /etc/mkinitrd/modules /etc/initramfs-tools - sed -i \ - -e 's/mkinitrd/mkinitramfs/g' \ - -e '/^ide-generic/d' \ - -e '/^ide-disk/d' \ - -e '/^ext2/d' \ - -e '/^ext3/d' \ - /etc/initramfs-tools/modules - fi - - if [ -e ${RESUME} ]; then - echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume - fi - - if [ -e /etc/mkinitrd/DSDT ]; then - cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml - fi - - fi -fi - # Regenerate initramfs on upgrade if [ "$1" = "configure" -a -n "$2" ]; then update-initramfs -u diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index f2b667e..dca832f 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -3,6 +3,41 @@ set -e case "$1" in + configure) + if [ -n "$2" ]; then + # First time install. Can we autodetect the RESUME partition? + RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') + + # Inhertic initrd-tools settings if possible. + if [ -e /etc/mkinitrd/mkinitrd.conf ]; then + . /etc/mkinitrd/mkinitrd.conf + fi + if [ -e ${RESUME} ]; then + echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume + fi + + # Add initrd-tools modules, while trying to minimize prompting + if [ -e /etc/mkinitrd/modules ]; then + cp /etc/mkinitrd/modules /etc/initramfs-tools + sed -i \ + -e 's/\/etc\/mkinitrd\/modules: Kernel modules to load for initrd./List of modules that you want to include in your initramfs./g' \ + -e 's/mkinitrd/update-initramfs/g' \ + -e '/# This file should/,/one per line\./d' \ + -e 's/Comments begin with.*/Syntax: module_name [args ...]/' \ + -e 's/^# ext2$/# raid1/' \ + -e 's/^# wd io=0x300$/# sd_mod/' + -e '/^ide-generic/d' \ + -e '/^ide-disk/d' \ + -e '/^ext2/d' \ + -e '/^ext3/d' \ + /etc/initramfs-tools/modules + fi + + if [ -e /etc/mkinitrd/DSDT ]; then + cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml + fi + fi + ;; upgrade) if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.61"; then if [ -d /etc/initramfs-tools ]; then diff --git a/mkinitramfs b/mkinitramfs index f0ba606..f532228 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -112,6 +112,9 @@ if [ ! -e "${MODULESDIR}" ]; then echo "Cannot find ${MODULESDIR}" exit 1 fi +if [ ! -e "${MODULESDIR}/modules.depmod" ]; then + depmod ${version} +fi DESTDIR="$(mktemp -t -d mkinitramfs_XXXXXX)" || exit 1 __TMPCPIOGZ="$(mktemp -t mkinitramfs-OL_XXXXXX)" || exit 1 @@ -175,9 +178,14 @@ done echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root # Busybox -rm -f ${DESTDIR}/bin/sh -copy_exec ${BUSYBOXDIR}/busybox /bin/busybox -ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh +if [ "x${BUSYBOX}" = "xn" ]; then + ln -s ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh + echo "Warning: Busybox is required for successful boot!" +else + rm -f ${DESTDIR}/bin/sh + copy_exec ${BUSYBOXDIR}/busybox /bin/busybox + ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh +fi # Modutils copy_exec /sbin/modprobe /sbin -- 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 'debian') 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 62bb60b509b62e6ce68d067b7f293019ed102b9a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 13 Jul 2006 23:33:32 +0200 Subject: - fix noresume exporting - readd plain upgly kernel-package interface to mkinitramfs with depreciation warning - nice fixes in preinst by Kamion --- debian/changelog | 15 +++++++++++++++ debian/initramfs-tools.preinst | 4 +++- init | 2 +- mkinitramfs | 24 +++++++++++++++++++++++- 4 files changed, 42 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9623ae4..056ccb2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,18 @@ +initramfs-tools (0.69b) unstable; urgency=high + + * debian/initramfs-tools.preinst: Don't depend upon shipped directories + to be existing. Thanks Colin Watson for patch. + Add trailing slash to copy command. (closes: 378089) + + * mkinitramfs: Revert the removal of kernel-package supported lonng param + of 0.65. Readd that plain ugly interface. Warn users they should use + ramdisk=mkinitramfs-kpkg. As kernel-package doesn't yet support + update-initramfs. Thanks Frans Pop for report. + + * Thus high urgency upload. + + -- maximilian attems Thu, 13 Jul 2006 23:20:49 +0200 + initramfs-tools (0.69) unstable; urgency=low * scripts/local-premount/suspend, scripts/local-premount/resume: Rename diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index dca832f..b92d393 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -5,6 +5,8 @@ set -e case "$1" in configure) if [ -n "$2" ]; then + mkdir -p /etc/initramfs-tools/conf.d + # First time install. Can we autodetect the RESUME partition? RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') @@ -18,7 +20,7 @@ case "$1" in # Add initrd-tools modules, while trying to minimize prompting if [ -e /etc/mkinitrd/modules ]; then - cp /etc/mkinitrd/modules /etc/initramfs-tools + cp /etc/mkinitrd/modules /etc/initramfs-tools/ sed -i \ -e 's/\/etc\/mkinitrd\/modules: Kernel modules to load for initrd./List of modules that you want to include in your initramfs./g' \ -e 's/mkinitrd/update-initramfs/g' \ diff --git a/init b/init index 427b964..2beb597 100755 --- a/init +++ b/init @@ -104,7 +104,7 @@ for x in $(cat /proc/cmdline); do esac done -if [ -n ${NORESUME} ]; then +if [ -z ${NORESUME} ]; then export resume=${RESUME} fi diff --git a/mkinitramfs b/mkinitramfs index f532228..a0bec9e 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -10,7 +10,7 @@ errors_to="2>/dev/null" # BUSYBOXDIR="/usr/lib/initramfs-tools/bin/" BUSYBOXDIR="/bin" -OPTIONS=`getopt -o d:ko:r:v -n "$0" -- "$@"` +OPTIONS=`getopt -o d:ko:r:v --long supported-host-version:,supported-target-version: -n "$0" -- "$@"` # Check for non-GNU getopt if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi @@ -44,6 +44,14 @@ while true; do verbose="y" shift ;; + --supported-host-version) + supported_host_version="$2" + shift 2 + ;; + --supported-target-version) + supported_target_version="$2" + shift 2 + ;; --) shift break @@ -55,6 +63,20 @@ while true; do 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 + echo "Depreciation warning: use ramdisk=mkinitramfs-kpkg." + exit 0 +fi + # For dependency ordered mkinitramfs hook scripts. . /usr/share/initramfs-tools/scripts/functions . /usr/share/initramfs-tools/hook-functions -- cgit v1.2.3 From 7b658ecddad7e848e6c3c5d347c46d3b11aa1988 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 14 Jul 2006 00:34:42 +0200 Subject: - rename debian/bug to debian/script fix according install target gets the info really added by reportbug --- debian/bug | 15 --------------- debian/changelog | 5 ++++- debian/initramfs-tools.install | 2 +- debian/script | 15 +++++++++++++++ 4 files changed, 20 insertions(+), 17 deletions(-) delete mode 100755 debian/bug create mode 100755 debian/script (limited to 'debian') diff --git a/debian/bug b/debian/bug deleted file mode 100755 index b1b477d..0000000 --- a/debian/bug +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -exec >&3 - -echo "-- /proc/cmdline" -cat /proc/cmdline -echo - -echo "-- /proc/filesystems" -grep -v nodev /proc/filesystems -echo - -echo "-- lsmod" -lsmod -echo diff --git a/debian/changelog b/debian/changelog index 056ccb2..ddecf2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,9 +9,12 @@ initramfs-tools (0.69b) unstable; urgency=high ramdisk=mkinitramfs-kpkg. As kernel-package doesn't yet support update-initramfs. Thanks Frans Pop for report. + * debian/bug: Rename to script so that it shows up in reportbug. + Fix debian/initramfs-tools.install accordingly. + * Thus high urgency upload. - -- maximilian attems Thu, 13 Jul 2006 23:20:49 +0200 + -- maximilian attems Fri, 14 Jul 2006 00:31:30 +0200 initramfs-tools (0.69) unstable; urgency=low diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index 84cde80..add5a7f 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -7,4 +7,4 @@ conf/modules etc/initramfs-tools hooks usr/share/initramfs-tools hook-functions usr/share/initramfs-tools update-initramfs usr/sbin -debian/bug usr/share/bug/initramfs-tools +debian/script usr/share/bug/initramfs-tools diff --git a/debian/script b/debian/script new file mode 100755 index 0000000..b1b477d --- /dev/null +++ b/debian/script @@ -0,0 +1,15 @@ +#!/bin/sh + +exec >&3 + +echo "-- /proc/cmdline" +cat /proc/cmdline +echo + +echo "-- /proc/filesystems" +grep -v nodev /proc/filesystems +echo + +echo "-- lsmod" +lsmod +echo -- cgit v1.2.3 From 8e9ecf2b5f9ced135e29d12fbe53c727a248934d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 16 Jul 2006 21:14:42 +0200 Subject: big ubuntu merge: - changelog - typos + whitespace + comments + quoting - vga16fb --- debian/changelog | 150 +++++++++++++++++++++++++++++++++++++++- debian/initramfs-tools.install | 2 +- debian/initramfs-tools.postinst | 4 ++ hook-functions | 2 +- hooks/kernelextras | 5 +- init | 8 +-- mkinitramfs | 13 ++-- scripts/local | 13 ++-- update-initramfs | 6 +- 9 files changed, 180 insertions(+), 23 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ddecf2d..8a519b4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +initramfs-tools (0.70) unstable; urgency=low + + * Reduce diff against 0.69ubuntu3: + - hook-functions: Fix kernel typo. + - hooks/kernelextras: Fix comment and add vga16fb too. + - init: Whitespace cleanup, add one more quiet check. + - mkinitramfs: Use check_minkver instead of dpkg itself. Whitespace + cleanup and add quoting. + - scripts/local: Whitespace cleanup and add a comment. + - update-initramfs: Add quoting + whitespace fix. + - changelog: for noise reduction add 0.69ubuntu{1,2,3}, all 0.40ubuntu*, + 0.36ubuntu1 and missing 0.29 + 0.28 entries. + - initramfs-tools.install, initramfs-tools.postinst and + initramfs-tools.preinst merge 0.69ubuntu3. + + -- maximilian attems Sun, 16 Jul 2006 20:23:41 +0200 + initramfs-tools (0.69b) unstable; urgency=high * debian/initramfs-tools.preinst: Don't depend upon shipped directories @@ -16,6 +33,30 @@ initramfs-tools (0.69b) unstable; urgency=high -- maximilian attems Fri, 14 Jul 2006 00:31:30 +0200 +initramfs-tools (0.69ubuntu3) edgy; urgency=low + + * debian/initramfs-tools.install, debian/initramfs-tools.preinst, + debian/initramfs-tools.postinst: Copy default modules file in the + postinst (when it's actually available) rather than in the preinst (when + it isn't). Copy it from /usr/share/initramfs-tools/ rather than from + /usr/share/doc/initramfs-tools/examples/, per policy. + + -- Colin Watson Thu, 13 Jul 2006 10:04:26 +0100 + +initramfs-tools (0.69ubuntu2) edgy; urgency=low + + * debian/initramfs-tools.preinst: Make sure /etc/initramfs-tools and + /etc/initramfs-tools/conf.d exist before trying to write to them. + + -- Colin Watson Thu, 13 Jul 2006 09:19:05 +0100 + +initramfs-tools (0.69ubuntu1) edgy; urgency=low + + [ Jeff Bailey ] + * Merge from debian unstable. + + -- Jeff Bailey Wed, 12 Jul 2006 19:22:22 -0400 + initramfs-tools (0.69) unstable; urgency=low * scripts/local-premount/suspend, scripts/local-premount/resume: Rename @@ -590,6 +631,84 @@ initramfs-tools (0.42) unstable; urgency=low -- maximilian attems Mon, 5 Dec 2005 12:59:59 +0100 +initramfs-tools (0.40ubuntu32) dapper; urgency=low + + * Revert 0.40ubuntu31. This isn't as trivial as it should be. + + -- Matt Zimmerman Sun, 21 May 2006 10:17:50 -0700 + +initramfs-tools (0.40ubuntu31) dapper; urgency=low + + * scripts/local-premount/resume: Print a message when a resume is about to + begin (LP#41137) + + -- Matt Zimmerman Fri, 19 May 2006 15:14:53 -0700 + +initramfs-tools (0.40ubuntu30) dapper; urgency=low + + * This release brought to you by Fujitsu hard drives, which have forced + me to rewrite all my most recent initramfs-tools changes from memory. + * Include arcmsr module in the scsi module list (launchpad.net/40075) + * Abstract out the kernel minversion checking stuff into the function + library, so we can reuse it to check minversion requirements for hook + scripts as well (such as udev, which requires >= 2.6.15 in dapper) + * Bump the kernel minversion to 2.6.15 on hppa and ia64, since they used + initrd-tools with their 2.6.12 kernels in breezy, not initramfs-tools. + * If mkinitramfs fails due to minversion not being met, don't bail out + of update-initramfs, but just exit 0, so upgrades don't halt on it. + * Conditionalise the use of lvm and md in mkinitramfs so it's a no-op if + you don't have those packages installed, but allows for smooth upgrades + if you have older versions that don't ship their own hooks yet. + * Make prereqs conditional on the script/hook actually existing. From + now on, this means that 'PREREQ="udev"' means "run udev first, iff it + happens to be installed". Having the files exist on the filesystem if + you have a HARD dependency should be enforced with package dependencies. + * Add ohci1394 and sbp2 to the scsi module list (launchpad.net/37479) + * Move framebuffer setup from usplash to scripts/local-top/framebuffer + so that people booting with vga=1234 but no splash will still get a + framebuffer instead of a useless black console (launchpad.net/27669) + + -- Adam Conrad Tue, 16 May 2006 19:51:08 +1000 + +initramfs-tools (0.40ubuntu29) dapper; urgency=low + + * Make "update-initramfs -u" try to find the running kernel *after* it + attempts to search the symbolic link list and its own sha1 list. + Using this as a fallback, rather than the default, should solve most + upgrade issues, where people found their initramfs was half-baked. + + -- Adam Conrad Wed, 19 Apr 2006 13:51:35 +1000 + +initramfs-tools (0.40ubuntu28) dapper; urgency=low + + * Add raid10 module to the generic module list (launchpad.net/28028) + * Add cpqarray to the scsi module list (launchpad.net/{26632,35202}) + * Unset debug before we run the real init (launchpad.net/24095) + * Add the gdth module to the default scsi list (launchpad.net/31542) + + -- Adam Conrad Fri, 24 Mar 2006 04:33:44 +1100 + +initramfs-tools (0.40ubuntu27) dapper; urgency=low + + * Drop the evms, lvm and md local-top scripts; they're all provided by + their own packages now. This makes the depdencies rather nicer. + + -- Scott James Remnant Thu, 23 Mar 2006 18:04:48 +0000 + +initramfs-tools (0.40ubuntu26) dapper; urgency=low + + * Make the md and evms local-top scripts pre-requisite the udev one. + + -- Scott James Remnant Thu, 23 Mar 2006 17:54:32 +0000 + +initramfs-tools (0.40ubuntu25) dapper; urgency=low + + * Move the "loop waiting for the root filesystem" code from the udev + premount script to the local mountroot() function where it truly + belongs. + + -- Scott James Remnant Wed, 22 Mar 2006 16:28:46 +0000 + initramfs-tools (0.40ubuntu24) dapper; urgency=low * Add support for LSI Logic's Fusion MPT SAS and FC controllers as well. @@ -879,7 +998,6 @@ initramfs-tools (0.36ubuntu5) dapper; urgency=low -- Scott James Remnant Mon, 21 Nov 2005 08:40:20 +0000 - initramfs-tools (0.36ubuntu4) dapper; urgency=low * Replace all occurances of /etc/mkinitramfs in mkinitramfs with $CONFDIR, @@ -935,6 +1053,15 @@ initramfs-tools (0.37) unstable; urgency=low -- maximilian attems Wed, 26 Oct 2005 09:22:58 +0200 +initramfs-tools (0.36ubuntu1) dapper; urgency=low + + * Forced version bump to minimise the scary until I have a chance to dig + through the ubuntu:debian diffs and do a proper merge of their changes. + * Remove the "Loading, please wait..." message from the top of init, as + we now have other fairly early visual feedback, and this is just ugly. + + -- Adam Conrad Wed, 26 Oct 2005 11:27:36 +1000 + initramfs-tools (0.36) unstable; urgency=low "Sunny Autumn Release" @@ -1054,6 +1181,27 @@ initramfs-tools (0.30) unstable; urgency=low -- maximilian attems Fri, 30 Sep 2005 19:34:55 +0200 +initramfs-tools (0.29) breezy; urgency=low + + "Beauty is a form of genius - is higher, indeed, than genius, as it + needs no explanation." + - Oscar Wilde + + * hook-functions (auto_add_modules): Add advansys. + + * debian/rules: Make sure hooks and scripts are chmod +x + + * init: Add start of debug command line option. + + -- Jeff Bailey Tue, 20 Sep 2005 15:47:42 -0400 + +initramfs-tools (0.28) breezy; urgency=low + + * Run udevstart after loading block drivers - should fix resume from + hibernate on non-LVM systems. + + -- Matthew Garrett Tue, 20 Sep 2005 01:13:31 +0100 + initramfs-tools (0.27) unstable; urgency=low * Remove unused BUSYBOX config option as we use busybox anyway. diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index add5a7f..5514c2e 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -3,8 +3,8 @@ 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 +conf/modules usr/share/initramfs-tools update-initramfs usr/sbin debian/script usr/share/bug/initramfs-tools diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index a8df95e..5f46777 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -2,6 +2,10 @@ set -e +if [ ! -e /etc/initramfs-tools/modules ]; then + cp /usr/share/initramfs-tools/modules /etc/initramfs-tools/ +fi + # Regenerate initramfs on upgrade if [ "$1" = "configure" -a -n "$2" ]; then update-initramfs -u diff --git a/hook-functions b/hook-functions index fe10cfe..9b1bd24 100644 --- a/hook-functions +++ b/hook-functions @@ -243,7 +243,7 @@ check_minkver() ;; esac if dpkg --compare-versions "${curversion}" lt "${minversion}"; then - echo "W: kernerl ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 + echo "W: kernel ${curversion} too old for initramfs on ${DPKG_ARCH}" >&2 echo "W: not generating requested initramfs for kernel ${curversion}" >&2 exit 2 fi diff --git a/hooks/kernelextras b/hooks/kernelextras index 815dd25..6bbd6b9 100755 --- a/hooks/kernelextras +++ b/hooks/kernelextras @@ -15,7 +15,7 @@ prereqs) ;; esac -# Hooks for loading loading extra kernel bits into the initramfs +# Hooks for loading extra kernel bits into the initramfs . /usr/share/initramfs-tools/hook-functions @@ -36,6 +36,9 @@ for x in ${MODULESDIR}/initrd/*; do force_load ${x} done +# And add vga16fb for usplash to use as well +manual_add_modules vga16fb + if [ ${fbcon} = "y" ]; then force_load fbcon fi diff --git a/init b/init index 2beb597..f66281c 100755 --- a/init +++ b/init @@ -31,7 +31,7 @@ export ROOT= # Bring in the main config . /conf/initramfs.conf for i in conf/conf.d/*; do - [ -f ${i} ] && . ${i} + [ -f ${i} ] && . ${i} done . /scripts/functions @@ -105,7 +105,7 @@ for x in $(cat /proc/cmdline); do done if [ -z ${NORESUME} ]; then - export resume=${RESUME} + export resume=${RESUME} fi depmod -a @@ -120,9 +120,9 @@ load_modules log_end_msg maybe_break premount -log_begin_msg "Running /scripts/init-premount" +[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-premount" run_scripts /scripts/init-premount -log_end_msg +[ "$quiet" != "y" ] && log_end_msg maybe_break mount log_begin_msg "Mounting root file system..." diff --git a/mkinitramfs b/mkinitramfs index a0bec9e..6c048df 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -84,7 +84,7 @@ fi . "${CONFDIR}/initramfs.conf" EXTRA_CONF='' for i in ${CONFDIR}/conf.d/* /usr/share/initramfs-tools/conf.d/*; do - EXTRA_CONF="${EXTRA_CONF} $(basename $i | grep '^[a-z0-9][a-z0-9\._-]*$' | grep -v '\.dpkg-.*$')"; + 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} @@ -102,10 +102,11 @@ else version="${1}" fi -if dpkg --compare-versions "${version}" lt 2.6.12; then - echo "Kernel version too old. initramfs-tools requires at least 2.6.12." - exit 1 -fi +# Check that we're using a new enough kernel version, first for ourselves, +# then for each of the hooks, which can have a MINKVER variable defined +check_minkver ${version} +check_minkver ${version} /usr/share/initramfs-tools/hooks +check_minkver ${version} ${CONFDIR}/hooks case "${version}" in /lib/modules/*/[!/]*) @@ -195,7 +196,7 @@ done echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf copy_exec "${CONFDIR}/initramfs.conf" /conf for i in ${EXTRA_CONF}; do - copy_exec ${CONFDIR}/conf.d/${i} /conf/conf.d + copy_exec "${CONFDIR}/conf.d/${i}" /conf/conf.d done echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root diff --git a/scripts/local b/scripts/local index a565885..8510088 100644 --- a/scripts/local +++ b/scripts/local @@ -25,17 +25,18 @@ mountroot () log_end_msg 0 else log_end_msg 1 || true - fi - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "TIMEOUT 15" || true - fi - fi + fi + if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TIMEOUT 15" || true + fi + fi - # We've given up, but we'll let the user fix matters if they can + # We've given up, but we'll let the user fix matters if they can while [ ! -e "${ROOT}" ]; do panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" done + # Get the root filesystem type eval $(fstype < ${ROOT}) [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" diff --git a/update-initramfs b/update-initramfs index 71cc90d..866609e 100755 --- a/update-initramfs +++ b/update-initramfs @@ -68,7 +68,7 @@ generate_initramfs() if [ "${verbose}" = 1 ]; then OPTS="-v $OPTS" fi - if mkinitramfs $OPTS "${initramfs}" "${version}"; then + if mkinitramfs "${OPTS}" "${initramfs}" "${version}"; then set_sha1 else mkinitramfs_return="$?" @@ -312,8 +312,8 @@ while getopts "k:cudyvtb:h?" flag; do takeover="1" ;; b) - BOOTDIR="${OPTARG}" - if [ ! -d $BOOTDIR ]; then + BOOTDIR="${OPTARG}" + if [ ! -d "${BOOTDIR}" ]; then echo "Error: ${BOOTDIR} is not a directory." exit 1 fi -- 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 'debian') 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 475bcbc9d6eefe90de6efe424bfb5bcca999fbc7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 20 Jul 2006 17:41:31 +0200 Subject: - drop md scripts - pump klibc dep - use resume klibc-utils bin - remove some klibc binaries - use nfsmount --- debian/changelog | 26 +++++++++++++++++++++++--- debian/control | 2 +- hooks/md | 28 ---------------------------- mkinitramfs | 3 +++ scripts/local-premount/resume | 3 +-- scripts/local-top/md | 35 ----------------------------------- scripts/nfs | 2 +- 7 files changed, 29 insertions(+), 70 deletions(-) delete mode 100755 hooks/md delete mode 100755 scripts/local-top/md (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b48be87..faaf90a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,16 @@ +initramfs-tools (0.70b) unstable; urgency=low + + * Be more careful about vi dot files, removed. + Thanks Frederik Schüler for review. + + -- maximilian attems Wed, 19 Jul 2006 16:00:47 +0200 + initramfs-tools (0.70) unstable; urgency=low + * mkinitramfs: Don't include static kinit, nor gzip. They are the biggest + klibc-utils binaries and we don't use them. Keep static gunzip, zcat and + shared kinit for now. + * Reduce diff against 0.69ubuntu3: - hook-functions: Fix kernel typo. - hooks/kernelextras: Fix comment and add vga16fb too. @@ -7,6 +18,8 @@ initramfs-tools (0.70) unstable; urgency=low - mkinitramfs: Use check_minkver instead of dpkg itself. Whitespace cleanup and add quoting. - scripts/local: Whitespace cleanup and add a comment. + - scripts/nfs: Use mount with nolock instead of nfsmount. + (closes: 359926) - update-initramfs: Add quoting + whitespace fix. - changelog: for noise reduction add 0.69ubuntu{1,2,3}, all 0.40ubuntu*, 0.36ubuntu1 and missing 0.29 + 0.28 entries. @@ -18,10 +31,17 @@ initramfs-tools (0.70) unstable; urgency=low 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. + update-initramfs.8: Cleanup trailing whitespace and non tabular indents. + + * scripts/local-premount/resume: Use new resume bin from klibc-utils. + Removes superflous stat and awk usage. + + * debian/control: Depend against newer klibc-utils 1.4.11-1. + + * hooks/md, scripts/local-top/md: Drop as mdadm > 2.5-1 features them. + (closes: #367567) - -- maximilian attems Sun, 16 Jul 2006 21:50:34 +0200 + -- maximilian attems Wed, 19 Jul 2006 11:09:52 +0200 initramfs-tools (0.69b) unstable; urgency=high diff --git a/debian/control b/debian/control index a5a1cee..53caa8f 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.7.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.1.16-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) +Depends: klibc-utils (>= 1.4.11-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/hooks/md b/hooks/md deleted file mode 100755 index df2abc8..0000000 --- a/hooks/md +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -if [ ! -x /sbin/mdadm ]; then - exit 0 -fi - -. /usr/share/initramfs-tools/hook-functions - -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} -done diff --git a/mkinitramfs b/mkinitramfs index 81a859e..0f1cb58 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -183,8 +183,11 @@ fi # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. +# klibc ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin ln -s /lib/klibc-*.so ${DESTDIR}/lib +rm -f ${DESTDIR}/bin/kinit ${DESTDIR}/bin/gzip + copy_exec /usr/share/initramfs-tools/init /init cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts" for f in $(cd ${CONFDIR}/scripts && \ diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume index 0c88ccc..059e7a4 100755 --- a/scripts/local-premount/resume +++ b/scripts/local-premount/resume @@ -24,6 +24,5 @@ if [ ! -e "${resume}" ]; then fi if [ -e /sys/power/resume ]; then - major_minor=$(ls -l ${resume} | awk '{printf "%d:%d", $5, $6}') - echo $major_minor >/sys/power/resume + resume ${resume} fi diff --git a/scripts/local-top/md b/scripts/local-top/md deleted file mode 100755 index aa48474..0000000 --- a/scripts/local-top/md +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -PREREQ="udev_helper" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -unset raidlvl -gotraid=n - -# Detect raid level -for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do - if [ ! -e ${x} ]; then - continue - fi - raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') - if [ "$raidlvl" ]; then - modprobe -q ${raidlvl} 2>/dev/null - gotraid=y - fi -done - -[ "${gotraid}" = y ] || exit - -/sbin/mdrun /dev diff --git a/scripts/nfs b/scripts/nfs index 89b5c20..47e9ac1 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -33,7 +33,7 @@ mountroot () roflag="-o rw" fi - nfsmount ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt} + mount -o nolock ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt} [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom" run_scripts /scripts/nfs-bottom -- 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 'debian') 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 5d46a04527bd3023e4f34cc99029ffc281f42110 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 29 Jul 2006 14:49:39 +0200 Subject: - take care of partial mdadm/lvm Sarge upgrades this compat stuff can go once Etch is released - framebuffer stuff for usplash - don't leave modules file behind - thanks piuparts! --- debian/changelog | 38 ++++++++++++++++++++++++++++++++++++++ debian/initramfs-tools.postrm | 1 + hooks/lvm | 27 --------------------------- mkinitramfs | 17 +++++++++++++++++ scripts/init-top/framebuffer | 41 +++++++++++++++++++++++++++++++++++++++++ scripts/local-top/lvm | 6 +++++- scripts/local-top/mdraid | 41 +++++++++++++++++++++++++++++++++++++++++ 7 files changed, 143 insertions(+), 28 deletions(-) delete mode 100755 hooks/lvm create mode 100755 scripts/init-top/framebuffer create mode 100755 scripts/local-top/mdraid (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e6f271b..a43c6b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,41 @@ +initramfs-tools (0.73) unstable; urgency=high + + * debian/initramfs-tools.postrm: Don't forget to remove config file + modules on purge. Thanks piuparts verification. + + * mkinitramfs: Add sections that deals with sarge mdadm and lvm2. + Does nothing if etch package hooks are installed, will be dropped + postetch as then we upgrade from mdadm and lvm2 packages with hooks. + Taken from Dapper initramfs-tools-0.40ubuntu32. Adapt to add more + modules and no need for mdrun. + + * hooks/lvm: Remove handled by mkinitramfs itself. + + * scripts/local-top/lvm: Add prereqs lvm2 + mdraid. Exit if lvm2 hook is + present. Eases transition of lvm hooks to lvm2. + + * scripts/local-top/mdraid: Enable all raid devices. Add mdadm as prereqs. + Only run if no mdadm hook is in initramfs. (closes: 380089) + + * urgency high upload to get RC fixes into testing. + + -- maximilian attems Sat, 29 Jul 2006 13:35:43 +0200 + +initramfs-tools (0.72) unstable; urgency=low + + * Add scripts/init-top/framebuffer, reduces ubuntu diff even more. + fb is only activated with splash or vga boot param. + * Upload sponsored by Petter Reinholdtsen. + + -- maximilian attems Tue, 25 Jul 2006 09:11:18 +0200 + +initramfs-tools (0.71b) unstable; urgency=low + + * This time caught on bzr dotfiles, removed. + Thanks a lot to Frederik Schüler for review. + + -- maximilian attems Mon, 24 Jul 2006 15:06:04 +0200 + initramfs-tools (0.71) unstable; urgency=low * initramfs.conf.5, initramfs-tools.8, mkinitramfs.8, mkinitramfs-kpkg.8, diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm index b2f40bd..6896636 100644 --- a/debian/initramfs-tools.postrm +++ b/debian/initramfs-tools.postrm @@ -2,6 +2,7 @@ if [ "x${1}" = "xpurge" ]; then rm -f /etc/initramfs-tools/conf.d/resume + rm -f /etc/initramfs-tools/modules fi #DEBHELPER# diff --git a/hooks/lvm b/hooks/lvm deleted file mode 100755 index 49a8887..0000000 --- a/hooks/lvm +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -if [ ! -x /sbin/vgchange -a ! -d /lib/lvm-200 ]; then - exit 0 -fi - -. /usr/share/initramfs-tools/hook-functions - -copy_exec /lib/lvm-200/vgchange /sbin - -for x in dm_mod dm_snapshot dm_mirror; do - manual_add_modules ${x} -done diff --git a/mkinitramfs b/mkinitramfs index 52dea45..799b77e 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -228,6 +228,23 @@ cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d" run_scripts /usr/share/initramfs-tools/hooks run_scripts "${CONFDIR}"/hooks +# FIXME: Remove this Raid block after Etch releases +if [ -x /sbin/mdadm -a ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then + mdadm --examine --scan > $DESTDIR/conf/mdadm.conf + copy_exec /sbin/mdadm /sbin + for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do + manual_add_modules ${x} + done +fi + +# FIXME: Remove this LVM block after Etch releases +if [ -x /sbin/vgchange -a -d /lib/lvm-200 -a ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then + copy_exec /lib/lvm-200/vgchange /sbin + for x in dm_mod dm_snapshot dm_mirror; do + manual_add_modules ${x} + done +fi + # Apply DSDT to initramfs if [ -e "${CONFDIR}/DSDT.aml" ]; then copy_exec "${CONFDIR}/DSDT.aml" / diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer new file mode 100755 index 0000000..4f0ab62 --- /dev/null +++ b/scripts/init-top/framebuffer @@ -0,0 +1,41 @@ +#!/bin/sh + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +SPLASH=false; +VESA=false; + +for x in $(cat /proc/cmdline); do + case $x in + splash*) + SPLASH=true; + ;; + vga=*) + VESA=true; + ;; + esac +done + +if [ $SPLASH = "true" -o $VESA = "true" ]; then + modprobe -q fbcon + if [ $VESA = "true" ]; then + modprobe -q vesafb + else + modprobe -q vga16fb + fi + 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 + done +fi diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 9a45220..f9d1490 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -1,6 +1,6 @@ #!/bin/sh -PREREQ="mdadm" +PREREQ="mdadm mdraid lvm2" prereqs() { @@ -56,6 +56,10 @@ activate_vg() vgchange -ay ${vg} } +if [ -e /scripts/local-top/lvm2 ]; then + exit 0 +fi + if [ ! -e /sbin/vgchange ]; then exit 0 fi diff --git a/scripts/local-top/mdraid b/scripts/local-top/mdraid new file mode 100755 index 0000000..2cf3b5d --- /dev/null +++ b/scripts/local-top/mdraid @@ -0,0 +1,41 @@ +#!/bin/sh + +PREREQ="udev_helper" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +if [ -e /scripts/local-top/mdadm ]; then + exit 0 +fi + +unset raidlvl +gotraid=n + +# Detect raid level +for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do + if [ ! -e ${x} ]; then + continue + fi + raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') + if [ "$raidlvl" ]; then + modprobe -q ${raidlvl} 2>/dev/null + gotraid=y + fi +done + +[ "${gotraid}" = y ] || exit + +# Assemble all raid devices +mkdir /dev/md +mdadm --assemble --config=/etc/mdadm.conf --scan --run --auto=yes -- cgit v1.2.3 From a44616dd8e197c348d6061db84c2a6893fae5a27 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 5 Aug 2006 09:31:06 +0200 Subject: - revert s/mount/nfsmount debian busybux has no nfs support lately --- debian/changelog | 10 ++++++++++ scripts/nfs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a43c6b0..028f0e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +initramfs-tools (0.73b) unstable; urgency=high + + * Revert nfs change in 0.70: Debian busybox is build with CONFIG_NFSMOUNT=n. + Reuse nfsmount from klibc. nfsroot parsing needs more care for the next + release. Now at least support those users where nfs previously worked. + Thanks Vagrant Cascadian for report. + (closes: 380686). High urgency to get this into testing. + + -- maximilian attems Fri, 4 Aug 2006 09:53:46 +0200 + initramfs-tools (0.73) unstable; urgency=high * debian/initramfs-tools.postrm: Don't forget to remove config file diff --git a/scripts/nfs b/scripts/nfs index 47e9ac1..5bfb03d 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -33,7 +33,7 @@ mountroot () roflag="-o rw" fi - mount -o nolock ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt} + nfsmount -o nolock ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt} [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom" run_scripts /scripts/nfs-bottom -- cgit v1.2.3 From 317940266751218ffa46581a44260619ade32e0a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 8 Aug 2006 09:32:03 +0200 Subject: revert klibc-utils resume usage for now. --- debian/changelog | 8 ++++++++ debian/control | 2 +- scripts/local-premount/resume | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 028f0e6..b613529 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.73c) unstable; urgency=low + + * scripts/local-premount/resume: Revert klibc-utils resume usage until + breakage cause is known. Thus downgrade klibc dep to 1.4.8-0. Thanks + Steinar H. Gunderson for report. (closes: #381475) + + -- maximilian attems Sat, 5 Aug 2006 09:31:16 +0200 + initramfs-tools (0.73b) unstable; urgency=high * Revert nfs change in 0.70: Debian busybox is build with CONFIG_NFSMOUNT=n. diff --git a/debian/control b/debian/control index 53caa8f..a9d0e90 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.7.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.4.11-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) +Depends: klibc-utils (>= 1.4.8-0), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for prepackaged diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume index 564d6f8..593df78 100755 --- a/scripts/local-premount/resume +++ b/scripts/local-premount/resume @@ -33,5 +33,8 @@ if [ ! -e "${resume}" ]; then fi if [ -e /sys/power/resume ]; then - resume ${resume} +# FIXME: klibc-utils resume needs more tests +# resume ${resume} + major_minor=$(ls -l ${resume} | awk '{printf "%d:%d", $5, $6}') + echo $major_minor >/sys/power/resume fi -- cgit v1.2.3 From 9bd9dc139d5001f7fce1245b2854080859fba9de Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 12 Aug 2006 09:18:39 +0200 Subject: - fix mdadm config path location --- debian/changelog | 7 +++++++ scripts/local-top/mdraid | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b613529..d930d08 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.73d) unstable; urgency=low + + * scripts/local-top/mdraid: Fix path of expected mdadm config file. + Thanks Daniel Dickinson for report. (closes: 382602) + + -- maximilian attems Sat, 12 Aug 2006 09:02:10 +0200 + initramfs-tools (0.73c) unstable; urgency=low * scripts/local-premount/resume: Revert klibc-utils resume usage until diff --git a/scripts/local-top/mdraid b/scripts/local-top/mdraid index 2cf3b5d..8649aa4 100755 --- a/scripts/local-top/mdraid +++ b/scripts/local-top/mdraid @@ -38,4 +38,4 @@ done # Assemble all raid devices mkdir /dev/md -mdadm --assemble --config=/etc/mdadm.conf --scan --run --auto=yes +mdadm --assemble --config=/conf/mdadm.conf --scan --run --auto=yes -- cgit v1.2.3 From 659764e8cdb1dbffd4860348c113a5834ed4e09b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 12 Aug 2006 09:44:49 +0200 Subject: - really remove hooks/lvm - mkinitramfs: fix conf.d handling, thanks to vagrant patch - mkinitramfs.8: document conf.d usage --- debian/changelog | 15 +++++++++++++-- mkinitramfs | 17 ++++++++++------- mkinitramfs.8 | 8 +++++++- 3 files changed, 30 insertions(+), 10 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d930d08..3dec716 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,20 @@ -initramfs-tools (0.73d) unstable; urgency=low +initramfs-tools (0.73d) unstable; urgency=high * scripts/local-top/mdraid: Fix path of expected mdadm config file. Thanks Daniel Dickinson for report. (closes: 382602) - -- maximilian attems Sat, 12 Aug 2006 09:02:10 +0200 + * mkinitramfs: Treat /usr/share/initramfs-tools/conf.d config snippets as + the configuration files in /etc/initramfs-tools/conf.d. A configuration + file with the same name will override the first. (closes: 381315) + Thanks Vagrant Cascadian for the patch. + + * mkinitramfs.8: Document conf.d existence. + + * hooks/lvm: Really remove it, logic is in mkinitramfs. + + * urgency high for the mdraid bug fix, rest is trivial. + + -- maximilian attems Sat, 12 Aug 2006 09:43:55 +0200 initramfs-tools (0.73c) unstable; urgency=low diff --git a/mkinitramfs b/mkinitramfs index 799b77e..1f0a736 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -83,15 +83,14 @@ fi . "${CONFDIR}/initramfs.conf" EXTRA_CONF='' -for i in ${CONFDIR}/conf.d/*; do +for i in /usr/share/initramfs-tools/conf.d/* ${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} -done -for i in /usr/share/initramfs-tools/conf.d/*; do - if [ -e $i ]; then - . ${i} + if [ -e ${CONFDIR}/conf.d/${i} ]; then + . ${CONFDIR}/conf.d/${i} + elif [ -e /usr/share/initramfs-tools/conf.d/${i} ]; then + . /usr/share/initramfs-tools/conf.d/${i} fi done @@ -204,7 +203,11 @@ done echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf copy_exec "${CONFDIR}/initramfs.conf" /conf for i in ${EXTRA_CONF}; do - copy_exec "${CONFDIR}/conf.d/${i}" /conf/conf.d + if [ -e "${CONFDIR}/conf.d/${i}" /conf/conf.d ]; then + copy_exec "${CONFDIR}/conf.d/${i}" /conf/conf.d + elif [ -e "/usr/share/initramfs-tools/conf.d/${i}" ]; then + copy_exec "/usr/share/initramfs-tools/conf.d/${i}" /conf/conf.d + fi done echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 65f6203..9041ba6 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS 8 "$Date: 2006/02/17 $" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "$Date: 2006/08/12 $" "" "mkinitramfs manual" .SH NAME mkinitramfs \- generate an initramfs image @@ -82,6 +82,12 @@ Specified modules will be put in the generated image and loaded when the system which is described in .BR modules (5). +.TP +.I /etc/initramfs-tools/conf.d +The conf.d directory allows to hardcode bootargs at initramfs build time +via config snippets. This allows to set ROOT or RESUME. +This is especially useful for bootloaders, which do not pass an root bootarg. + .TP .I /etc/initramfs-tools/DSDT.aml If this file exists, it will be appended to the initramfs in a way that causes -- cgit v1.2.3 From a84613ae7742190e50cc619eee462cc0cd17f6c8 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 13 Aug 2006 10:24:04 +0200 Subject: - conf.d configuration test was bogus, fixes: /usr/sbin/mkinitramfs: line 206: [: /etc/initramfs-tools/conf.d/resume: binary operator expected --- debian/changelog | 6 ++++++ mkinitramfs | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3dec716..1686466 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.73e) unstable; urgency=high + + * mkinitramfs: Fix if statement for conf.d. (closes: 382740) + + -- maximilian attems Sun, 13 Aug 2006 10:05:10 +0200 + initramfs-tools (0.73d) unstable; urgency=high * scripts/local-top/mdraid: Fix path of expected mdadm config file. diff --git a/mkinitramfs b/mkinitramfs index 1f0a736..3df30ec 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -203,7 +203,7 @@ done echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf copy_exec "${CONFDIR}/initramfs.conf" /conf for i in ${EXTRA_CONF}; do - if [ -e "${CONFDIR}/conf.d/${i}" /conf/conf.d ]; then + if [ -e "${CONFDIR}/conf.d/${i}" ]; then copy_exec "${CONFDIR}/conf.d/${i}" /conf/conf.d elif [ -e "/usr/share/initramfs-tools/conf.d/${i}" ]; then copy_exec "/usr/share/initramfs-tools/conf.d/${i}" /conf/conf.d -- cgit v1.2.3 From 839572386f35bf4b4404dac5f976566bc155de94 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 17 Aug 2006 17:14:01 +0200 Subject: Release 0.74: - scripts/functions: fix debug boot param - update-initramfs: checkout /etc/kernel-img.conf if lilo and grub is installed - rename mdraid to mdrun, readd mdrun as it seems to work much better with sarge systems - add an help message for rescue shell - better package desc --- debian/changelog | 25 +++++++++++++++++++++++++ debian/control | 12 ++++++------ mkinitramfs | 1 + scripts/functions | 6 +++--- scripts/local | 2 ++ scripts/local-premount/resume | 6 ++---- scripts/local-top/mdraid | 41 ----------------------------------------- scripts/local-top/mdrun | 41 +++++++++++++++++++++++++++++++++++++++++ update-initramfs | 22 ++++++++++++++++++---- 9 files changed, 98 insertions(+), 58 deletions(-) delete mode 100755 scripts/local-top/mdraid create mode 100755 scripts/local-top/mdrun (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1686466..f089fe6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,28 @@ +initramfs-tools (0.74) unstable; urgency=low + + * scripts/local-premount/resume: Reuse klibc resume, hardcode path as + uswsusp shipps too an resume binary in initramfs-tools. Thus tighten + again klibc dep to 1.4.11-1. (closes: 381535) + + * mkinitramfs: Readd mdrun when around. + + * scripts/local-top/mdrun: Rename from mdraid. Use mdrun as previously, + there is no guarantee that the sarge mdadm works and that the sarge + mdadm.conf has any sense. + + * debian/control: Better package description. + + * scripts/local: mountroot add message what to check if root is not found + in 2 straight lines to keep as much of scrolling buffer. + + * scripts/functions: Use set ``--'' to change positional paramaters without + changing any options. This is useful for the debug bootparam on d?ash. + + * update-initramfs: Respect "do_bootloader = yes" from /etc/kernel-img.conf + to call lilo if both lilo and grub are installed. (closes: 382013) + + -- maximilian attems Thu, 17 Aug 2006 16:50:51 +0200 + initramfs-tools (0.73e) unstable; urgency=high * mkinitramfs: Fix if statement for conf.d. (closes: 382740) diff --git a/debian/control b/debian/control index a9d0e90..24d1bdc 100644 --- a/debian/control +++ b/debian/control @@ -8,13 +8,13 @@ Standards-Version: 3.7.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.4.8-0), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) +Depends: klibc-utils (>= 1.4.11-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) 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 a gzipped cpio archive. At boot time, the + This package contains tools to create and boot an initramfs for packaged 2.6 + Linux kernel. The initramfs is a gzipped cpio archive. At boot time, the kernel unpacks that archive into RAM, mounts and uses it as initial root file - system. 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. + system. The mounting of the real root file system occurs in early user space. + klibc provides utilities to setup root. Having the root on EVMS, MD, LVM2, + LUKS or NFS is also supported. Any boot loader with initrd support is able to load an initramfs archive. diff --git a/mkinitramfs b/mkinitramfs index 3df30ec..67d9df0 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -235,6 +235,7 @@ run_scripts "${CONFDIR}"/hooks if [ -x /sbin/mdadm -a ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then mdadm --examine --scan > $DESTDIR/conf/mdadm.conf copy_exec /sbin/mdadm /sbin + copy_exec /sbin/mdrun /sbin for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do manual_add_modules ${x} done diff --git a/scripts/functions b/scripts/functions index 9e578d7..e9d7a07 100644 --- a/scripts/functions +++ b/scripts/functions @@ -117,7 +117,7 @@ get_prereqs() count_unsatisfied() { - set - ${@} + set -- ${@} return ${#} } @@ -126,7 +126,7 @@ pop_list_item() { item=${1} shift - set - ${@} + set -- ${@} unset tmppop # Iterate for pop in ${@}; do @@ -143,7 +143,7 @@ reduce_prereqs() { unset runlist set_initlist - set - ${initlist} + set -- ${initlist} i=$# # Loop until there's no more in the queue to loop through while [ ${i} -ne 0 ]; do diff --git a/scripts/local b/scripts/local index 8510088..0b9baab 100644 --- a/scripts/local +++ b/scripts/local @@ -33,6 +33,8 @@ mountroot () # We've given up, but we'll let the user fix matters if they can while [ ! -e "${ROOT}" ]; do + echo " Check root= bootarg cat /proc/cmdline" + echo " or missing modules, devices: cat /proc/modules ls /dev" panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" done diff --git a/scripts/local-premount/resume b/scripts/local-premount/resume index 593df78..881af90 100755 --- a/scripts/local-premount/resume +++ b/scripts/local-premount/resume @@ -33,8 +33,6 @@ if [ ! -e "${resume}" ]; then fi if [ -e /sys/power/resume ]; then -# FIXME: klibc-utils resume needs more tests -# resume ${resume} - major_minor=$(ls -l ${resume} | awk '{printf "%d:%d", $5, $6}') - echo $major_minor >/sys/power/resume + # hardcode path, uswsusp ships an resume binary too + /bin/resume ${resume} fi diff --git a/scripts/local-top/mdraid b/scripts/local-top/mdraid deleted file mode 100755 index 8649aa4..0000000 --- a/scripts/local-top/mdraid +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -PREREQ="udev_helper" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -if [ -e /scripts/local-top/mdadm ]; then - exit 0 -fi - -unset raidlvl -gotraid=n - -# Detect raid level -for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do - if [ ! -e ${x} ]; then - continue - fi - raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') - if [ "$raidlvl" ]; then - modprobe -q ${raidlvl} 2>/dev/null - gotraid=y - fi -done - -[ "${gotraid}" = y ] || exit - -# Assemble all raid devices -mkdir /dev/md -mdadm --assemble --config=/conf/mdadm.conf --scan --run --auto=yes diff --git a/scripts/local-top/mdrun b/scripts/local-top/mdrun new file mode 100755 index 0000000..1b6ca3e --- /dev/null +++ b/scripts/local-top/mdrun @@ -0,0 +1,41 @@ +#!/bin/sh + +PREREQ="udev_helper" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +if [ -e /scripts/local-top/mdadm ]; then + exit 0 +fi + +unset raidlvl +gotraid=n + +# Detect raid level +for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do + if [ ! -e ${x} ]; then + continue + fi + raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') + if [ "$raidlvl" ]; then + modprobe -q ${raidlvl} 2>/dev/null + gotraid=y + fi +done + +[ "${gotraid}" = y ] || exit + +# Assemble all raid devices +# FIXME: assemble root raid first due to initrd-tools compatibility +/sbin/mdrun /dev diff --git a/update-initramfs b/update-initramfs index ea74136..e7dc586 100755 --- a/update-initramfs +++ b/update-initramfs @@ -81,11 +81,28 @@ generate_initramfs() fi } +# lilo call +run_lilo() +{ + lilo -t > /dev/null + if [ $? -eq 0 ]; then + lilo + fi +} + # only run lilo if no grub is around +# or if "do_bootloader = yes" is set run_bootloader() { if [ -x /sbin/grub -o -e /boot/grub/menu.lst ]; then if [ -e /etc/lilo.conf ]; then + do_bootloader=$(awk '/bootloader/{print $2}' \ + /etc/kernel-img.conf) + if [ "${do_bootloader}" = "yes" ]; then + run_lilo + return 0 + fi + echo echo "WARNING: grub and lilo installed." echo "If you use grub as bootloader everything is fine." @@ -95,10 +112,7 @@ run_bootloader() return 0 fi if [ -e /etc/lilo.conf ]; then - lilo -t > /dev/null - if [ $? -eq 0 ]; then - lilo - fi + run_lilo fi } -- cgit v1.2.3 From d1d6763409a1260708423e0092d7bc4182275773 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 18 Aug 2006 15:59:40 +0200 Subject: - really add DAC960 + add megaraid_sas - update TODO - first take at the panic parsing - do_bootloader variable is not case sensitive, catch more cases - if panic is set to 0 reboot and don't open console, needs still work for all other values. --- debian/TODO | 6 +++--- debian/changelog | 20 ++++++++++++++++++++ hook-functions | 11 ++++++----- init | 4 ++++ scripts/functions | 4 ++++ update-initramfs | 5 +++-- 6 files changed, 40 insertions(+), 10 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index 2c2edc0..7b9bf0a 100644 --- a/debian/TODO +++ b/debian/TODO @@ -5,10 +5,10 @@ TODO o Eliminate ?udev?, ?klibc?, busybox (-> glibc). - o Support list and dep options + o Better heuristics for MODULES=dep option o Default to dep for PPC - Possibly to detect newworld? - o lilo timeouts handling + o udevsettle timeouts handling - o mdadm + lvm2 hooks to their respective packages + o lvm2 hooks to their respective packages diff --git a/debian/changelog b/debian/changelog index f089fe6..995d76d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +initramfs-tools (0.75) unstable; urgency=high + + * hook-functions: Add megaraid_sas to the scsi list. Thanks Kenshi Muto + . + + * init: Parse for "panic=" bootarg. + + * hook-functions: Immediately call reboot in the panic function if panic=0 + to disallow any console access for secured boxes. (closes: 378455) + + * debian/TODO: Update to current state + + * update-initramfs: do_bootloader can be set mixed case or upper case. + Catch the obvious Yes and YES too. + + * hook-functions: Really include DAC960 driver. Thanks Tim Small + . (closes: 383486) 2 module fixes thus urgency high. + + -- maximilian attems Fri, 18 Aug 2006 15:35:09 +0200 + initramfs-tools (0.74) unstable; urgency=low * scripts/local-premount/resume: Reuse klibc resume, hardcode path as diff --git a/hook-functions b/hook-functions index 3175cba..08f396d 100644 --- a/hook-functions +++ b/hook-functions @@ -169,12 +169,13 @@ auto_add_modules() scsi) 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 \ + cciss ch cpqarray DAC960 dc395x dmx3191d dpt_i2o eata fdomain \ 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 \ + mac53c94 megaraid megaraid_mbox megaraid_mm megaraid_sas \ + 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 \ sd_mod sym53c8xx tmscsim zfcp; do diff --git a/init b/init index 69d9542..ab679b5 100755 --- a/init +++ b/init @@ -43,6 +43,7 @@ export readonly=y export rootmnt=/root export debug= export cryptopts=${CRYPTOPTS} +export panic for x in $(cat /proc/cmdline); do case $x in @@ -81,6 +82,9 @@ for x in $(cat /proc/cmdline); do noresume) NORESUME=y ;; + panic=*) + panic="${x#panic=}" + ;; quiet) quiet=y ;; diff --git a/scripts/functions b/scripts/functions index e9d7a07..178ad5d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -59,6 +59,10 @@ panic() if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "QUIT" fi + # Disallow console access + if [ "${panic}" = 0 ]; then + reboot + fi modprobe -q i8042 modprobe -q atkbd echo $@ diff --git a/update-initramfs b/update-initramfs index e7dc586..3ce8f1f 100755 --- a/update-initramfs +++ b/update-initramfs @@ -96,9 +96,10 @@ run_bootloader() { if [ -x /sbin/grub -o -e /boot/grub/menu.lst ]; then if [ -e /etc/lilo.conf ]; then - do_bootloader=$(awk '/bootloader/{print $2}' \ + do_b=$(awk '/bootloader/{print $2}' \ /etc/kernel-img.conf) - if [ "${do_bootloader}" = "yes" ]; then + if [ "${do_b}" = "yes" ] || [ "${do_b}" = "Yes" ] \ + || [ "${do_b}" = "YES" ]; then run_lilo return 0 fi -- cgit v1.2.3 From fabe918dee7da26d177d67d4aa8fe3fd6e83e513 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 23 Aug 2006 09:22:54 +0200 Subject: - improved nfsroo parsing - added rootdelay and rootfstype bootargs - document this changes - initrd-tools backward compatible mdadm assembe and then run mdrun - update-initramfs really checkout use_bootloader from /etc/kernel-img.conf - tighter klibc deps --- debian/NEWS | 13 +++++++++++++ debian/changelog | 39 ++++++++++++++++++++++++++++++++++++++ debian/control | 2 +- init | 13 +++++++++++-- initramfs-tools.8 | 50 ++++++++++++++++++++++++++++++++++++++++--------- mkinitramfs | 19 +++++++++++++++++-- scripts/functions | 9 +++------ scripts/local | 19 +++++++++++++++---- scripts/local-top/mdrun | 9 +++++++-- scripts/nfs | 48 +++++++++++++++++++++++++++++++++++++++++++++-- update-initramfs | 5 +++-- 11 files changed, 196 insertions(+), 30 deletions(-) (limited to 'debian') diff --git a/debian/NEWS b/debian/NEWS index a6ae4bc..9ac39f5 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,16 @@ +initramfs-tools (0.76) unstable; urgency=low + + * This release features nfs auto detection in the initramfs. + The boot paramaters are parsed according to the linux source + Documentation/kernel-parameters.txt and more specifically + Documentation/nfsroot.txt. + + The initramfs-tools(8) manpage documents the parsed boot parameter. + Note that the undocumented and non compliant nfsoption bootarg got + dropped. + + -- maximilian attems Wed, 23 Aug 2006 08:47:26 +0200 + initramfs-tools (0.61) unstable; urgency=low * This release moves the initramfs-tools confdir from /etc/mkinitramfs to diff --git a/debian/changelog b/debian/changelog index 995d76d..a5ac22f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,42 @@ +initramfs-tools (0.76) unstable; urgency=medium + + * debian/control: Tighten klibc to 1.4.19-2 for fixed nuke. (closes: 383730) + + * mkinitramfs: Only hard code root when root arg got passed. + + * init: Parse /proc/cmdline for rootfstype, initrd-tools did it too. + + * init: Parse /proc/cmdline for rootdelay. + + * scripts/local: Use eventual rootfstype and rootdelay info. + + * initramfs-tools.8: Add more docs about boot args, s/2.6.15/2.6.17/. + + * scripts/functions: Simplify parse_numeric() by arithmetic calculation, + instead of working on it's representation. Thanks to tarski. + (launchpad.net/21759) Much more elegant than the 0.58 version fix. + + * mkinitramfs: Parse rootraid for sarge compatibility and pass the info + to the initramfs if etch mdadm is not yet installed. + + * scripts/local-top/mdrun: Assemble the root raid first before mdrun. + Thanks martin f krafft . (closes: 383908, 384063) + + * update-initramfs: Check if /etc/kernel-img.conf is readable, + before attempting to parse also check for the right field. + + * init: Check for root=/dev/nfs. Parse ip kernel command line for nfsroot. + Drop undocumented and not compliant nfsopts. + + * scripts/nfs: Add ip parsing conforming to Documentation/nfsroot.txt. + Use the nfsroot bootparam in combination with eventual ip provided + device or server-ip. Do minor code cleanups. Both items based on patches + by Vagrant Cascadian . (closes: 380649) + + * Set urgency medium due to large number of serious bug fixes. + + -- maximilian attems Wed, 23 Aug 2006 08:17:51 +0200 + initramfs-tools (0.75) unstable; urgency=high * hook-functions: Add megaraid_sas to the scsi list. Thanks Kenshi Muto diff --git a/debian/control b/debian/control index 24d1bdc..dd4c3b3 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.7.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.4.11-1), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) +Depends: klibc-utils (>= 1.4.19-2), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 diff --git a/init b/init index ab679b5..386ec37 100755 --- a/init +++ b/init @@ -59,19 +59,28 @@ for x in $(cat /proc/cmdline); do UUID=*) ROOT="/dev/disk/by-uuid/${ROOT#UUID=}" ;; + /dev/nfs) + BOOT=nfs + ;; esac ;; rootflags=*) ROOTFLAGS="-o ${x#rootflags=}" ;; + rootfstype=*) + ROOTFSTYPE="${x#rootfstype=}" + ;; + rootdelay=*) + ROOTDELAY="${x#rootdelay=}" + ;; cryptopts=*) cryptopts="${x#cryptopts=}" ;; nfsroot=*) NFSROOT="${x#nfsroot=}" ;; - nfsopts=*) - NFSOPTS="-o ${x#nfsopts=}" + ip=*) + IPOPTS="${x#ip=}" ;; boot=*) BOOT=${x#boot=} diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 0950b39..7af09e1 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -1,4 +1,4 @@ -.TH INITRAMFS-TOOLS 8 "Date: 2005/12/06" "" "mkinitramfs script overview" +.TH INITRAMFS-TOOLS 8 "Date: 2006/08/19" "" "mkinitramfs script overview" .SH NAME initramfs-tools \- an introduction to writing scripts for mkinitramfs @@ -29,18 +29,44 @@ arguments which influence the boot procedure: .SS Boot options +The init and root are usually passed by the boot loader for local boot. +The other parameters are optional. + .TP \fB \fI init the binary to hand over execution to on the root fs after the initramfs scripts are done. .TP \fB \fI root -the device node to mount as the rootfs. +the device node to mount as the root file system. + +.TP +\fB \fI rootdelay +set delay in seconds. Determines how long mountroot waits for root to appear. + +.TP +\fB \fI rootflags +set the file system mount option string. + +.TP +\fB \fI rootfstype +set the root file system type. .TP \fB \fI nfsroot can be either "auto" to try to get the relevant information from DHCP or a -string of the form NFSSERVER:NFSPATH +string of the form NFSSERVER:NFSPATH or NFSSERVER:NFSPATH:NFSOPTS. +Use root=/dev/nfs for NFS to kick to in. + +.TP +\fB \fI ip +tells how to configure the ip adress. Allows to specify an different +NFS server than the DHCP server. See Documentation/nfsroot.txt in +any recent linux source for details. Optional paramater for NFS root. + +.TP +\fB \fI cryptopts +passes the args for cryptoroot. Set by the cryptsetup boot hooks. .TP \fB \fI boot @@ -50,27 +76,33 @@ either local or NFS (affects which initramfs scripts are run, see the "Subdirect \fB \fI resume On install initramfs-tools tries to autodetect the resume partition. On success the RESUME variable is written to /etc/initramfs-tools/conf.d/resume. -The boot variable overrides it. +The boot variable noresume overrides it. .TP \fB \fI quiet -reduces the amount of text output to the console during boot +reduces the amount of text output to the console during boot. .TP \fB \fI ro -mounts the rootfs read-only +mounts the rootfs read-only. .TP \fB \fI rw -mounts the rootfs read-write +mounts the rootfs read-write. + +.TP +\fB \fI panic +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 to /tmp/initramfs.debug. .TP \fB \fI break spawns a shell in the initramfs image at chosen run-time +(top, modules, premount, mount, bottom, init). +The default is premount without any arg. .SH HOOK SCRIPTS @@ -404,7 +436,7 @@ 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.15-1-686 | \\ +gunzip -c -9 /boot/initrd.img-2.6.17-2-686 | \\ cpio -i -d -H newc --no-absolute-filenames .fi .RE diff --git a/mkinitramfs b/mkinitramfs index 67d9df0..759d6cb 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -209,7 +209,11 @@ for i in ${EXTRA_CONF}; do copy_exec "/usr/share/initramfs-tools/conf.d/${i}" /conf/conf.d fi done -echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root + +# ROOT hardcoding +if [ -n "${ROOT}" ]; then + echo "ROOT=${ROOT}" > ${DESTDIR}/conf/conf.d/root +fi # Busybox if [ "x${BUSYBOX}" = "xn" ]; then @@ -233,7 +237,18 @@ run_scripts "${CONFDIR}"/hooks # FIXME: Remove this Raid block after Etch releases if [ -x /sbin/mdadm -a ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then - mdadm --examine --scan > $DESTDIR/conf/mdadm.conf + # use mkinitrd magic for Sarge backwards compat + rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')" + echo "rootraiddev=${rootraiddev}" > /conf/mdadm.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 } + END { print "devices='\''" devices "'\''" }' \ + >> /conf/mdadm.conf copy_exec /sbin/mdadm /sbin copy_exec /sbin/mdrun /sbin for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do diff --git a/scripts/functions b/scripts/functions index 178ad5d..7e67771 100644 --- a/scripts/functions +++ b/scripts/functions @@ -224,13 +224,10 @@ parse_numeric() { minor=${1#*:} major=${1%:*} ;; - [0-9][0-9][0-9]) - minor=$((0x${1#?})) - major=$((0x${1%??})) - ;; *) - minor=$((0x${1#??})) - major=$((0x${1%??})) + value=$(( 0x${1} )) + minor=$(( ${value} % 256 )) + major=$(( ${value} / 256 )) ;; esac diff --git a/scripts/local b/scripts/local index 0b9baab..9d71a5e 100644 --- a/scripts/local +++ b/scripts/local @@ -11,11 +11,18 @@ mountroot () # to deal with removable devices if [ ! -e "${ROOT}" ]; then log_begin_msg "Waiting for root file system..." + + # Default delay is 180s + if [ -z "${ROOTDELAY}" ]; then + slumber=180 + else + slumber=${ROOTDELAY} + fi if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "TIMEOUT 180" || true + /sbin/usplash_write "TIMEOUT ${slumber}" || true fi - slumber=1800 + slumber=$(( ${slumber} * 10 )) while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do /bin/sleep 0.1 slumber=$(( ${slumber} - 1 )) @@ -38,8 +45,12 @@ mountroot () panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" done - # Get the root filesystem type - eval $(fstype < ${ROOT}) + # Get the root filesystem type if not set + if [ -z "${ROOTFSTYPE}" ]; then + eval $(fstype < ${ROOT}) + else + FSTYPE=${ROOTFSTYPE} + fi [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" run_scripts /scripts/local-premount diff --git a/scripts/local-top/mdrun b/scripts/local-top/mdrun index 1b6ca3e..3ed995c 100755 --- a/scripts/local-top/mdrun +++ b/scripts/local-top/mdrun @@ -36,6 +36,11 @@ done [ "${gotraid}" = y ] || exit -# Assemble all raid devices -# FIXME: assemble root raid first due to initrd-tools compatibility +# source the presumed root md and it's info +. ./conf/mdadm.conf + +# assemble root raid first due to initrd-tools compatibility +mdadm -A ${rootraiddev} -R -u $uuid $devices + +# assemble all raid devices /sbin/mdrun /dev diff --git a/scripts/nfs b/scripts/nfs index 5bfb03d..844db70 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -13,13 +13,57 @@ mountroot () # For DHCP modprobe -q af_packet - ipconfig ${DEVICE} + # support ip options see linux sources Documentation/nfsroot.txt + case ${IPOPTS} in + none|off) + # Do nothing + ;; + ""|on|any) + # Bring up device + ipconfig ${DEVICE} + ;; + dhcp|bootb|rarp|both) + ipconfig -c ${IPOPTS} -d ${DEVICE} + ;; + *) + ipconfig -d $IPOPTS + + # grab device entry from full line + NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} + NEW_DEVICE=${NEW_DEVICE%:*} + if [ -n "${NEW_DEVICE}" ]; then + DEVICE="${NEW_DEVICE}" + fi + # grab server-ip + SERVER_IP=${IPOPTS#*:} + SERVER_IP=${SERVER_IP%:*:*:*:*:*:*} + ;; + esac + + # FIXME: who writes that? . /tmp/net-${DEVICE}.conf + + # get nfs root from dhcp if [ "x${NFSROOT}" = "xauto" ]; then NFSROOT=${ROOTSERVER}:${ROOTPATH} + # nfsroot=[:][,] + elif [ -n "${NFSROOT}" ]; then + # nfs options are an optional arg + if [ "${NFSROOT#*,}" != "${NFSROOT}" ]; then + 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 + fi fi - if [ "x${NFSOPTS}" = "x" ]; then + if [ -z "${NFSOPTS}" ]; then NFSOPTS="-o retrans=10" fi diff --git a/update-initramfs b/update-initramfs index 3ce8f1f..1ec8c7d 100755 --- a/update-initramfs +++ b/update-initramfs @@ -2,6 +2,7 @@ STATEDIR=/var/lib/initramfs-tools BOOTDIR=/boot +KPKGCONF=/etc/kernel-img.conf set -e @@ -96,8 +97,8 @@ run_bootloader() { if [ -x /sbin/grub -o -e /boot/grub/menu.lst ]; then if [ -e /etc/lilo.conf ]; then - do_b=$(awk '/bootloader/{print $2}' \ - /etc/kernel-img.conf) + [ -r "${KPKGCONF}" ] && \ + do_b=$(awk '/bootloader/{print $3}' "${KPKGCONF}") if [ "${do_b}" = "yes" ] || [ "${do_b}" = "Yes" ] \ || [ "${do_b}" = "YES" ]; then run_lilo -- cgit v1.2.3 From 45989c9f37db0ef23e984ea559f2da784a028366 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 25 Aug 2006 17:04:33 +0200 Subject: - fix bashism - rename mdadm.conf in mdrun.conf - retry nfsmount - harden init - fix lvm boot script prereqs --- debian/changelog | 20 ++++++++++++++++++ debian/initramfs-tools.postinst | 2 +- hook-functions | 2 +- init | 6 ++++-- mkinitramfs | 11 +++++----- scripts/local | 2 +- scripts/local-top/lvm | 2 +- scripts/local-top/mdrun | 2 +- scripts/nfs | 45 ++++++++++++++++++++++++++++++----------- update-initramfs | 2 +- 10 files changed, 69 insertions(+), 25 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a5ac22f..bc635a3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +initramfs-tools (0.77) unstable; urgency=medium + + * mkinitramfs, scripts/local-top/mdrun: Use mdrun.conf as config file. + Ship mdrun unconditionally if around, should help in recovery situations. + + * debian/initramfs-tools.postinst, hook-functions, mkinitramfs, + scripts/local, update-initramfs: Cleanup the "-a" and "-o" bashism. + + * scripts/nfs: Retry to mount NFS on eventual failure. (closes: 377643) + Based on a patch by Vagrant Cascadian . + + * init: Make sure there is an /dev and /root. Usually passed by the kernel. + Also /dev/null or /dev/console might already be shipped. + Based on a patch by David Härdeman . (closes: 340494) + + * scripts/local-top/lvm: Fix prereqs s/mdraid/mdrun, thus urgency medium. + Thanks Rainer Gauweiler for the notice. + + -- maximilian attems Fri, 25 Aug 2006 16:55:56 +0200 + initramfs-tools (0.76) unstable; urgency=medium * debian/control: Tighten klibc to 1.4.19-2 for fixed nuke. (closes: 383730) diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index 5f46777..2f36f3f 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -7,7 +7,7 @@ if [ ! -e /etc/initramfs-tools/modules ]; then fi # Regenerate initramfs on upgrade -if [ "$1" = "configure" -a -n "$2" ]; then +if [ "$1" = "configure" ] && [ -n "$2" ]; then update-initramfs -u fi diff --git a/hook-functions b/hook-functions index 08f396d..bfbe56a 100644 --- a/hook-functions +++ b/hook-functions @@ -48,7 +48,7 @@ manual_add_modules() mkdir -p "${DESTDIR}/$(dirname "${mam_x}")" ln -s "${mam_x}" "${DESTDIR}/$(dirname "${mam_x}")" - if [ -n "${verbose}" -a "${verbose}" = "y" ]; then + if [ -n "${verbose}" ] && [ "${verbose}" = "y" ]; then echo "Adding module ${mam_x}" fi done diff --git a/init b/init index 386ec37..a83dc39 100755 --- a/init +++ b/init @@ -2,6 +2,10 @@ 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 mkdir /sys mkdir /proc mkdir /tmp @@ -18,8 +22,6 @@ 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/null c 1 3 # Export the dpkg architecture export DPKG_ARCH= diff --git a/mkinitramfs b/mkinitramfs index 759d6cb..d088efa 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -236,10 +236,10 @@ run_scripts /usr/share/initramfs-tools/hooks run_scripts "${CONFDIR}"/hooks # FIXME: Remove this Raid block after Etch releases -if [ -x /sbin/mdadm -a ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then +if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then # use mkinitrd magic for Sarge backwards compat rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')" - echo "rootraiddev=${rootraiddev}" > /conf/mdadm.conf + echo "rootraiddev=${rootraiddev}" > /conf/mdrun.conf mdadm=$(mdadm --detail "${rootraiddev}") echo "${mdadm}" | awk ' $1 == "Number" && $2 == "Major" { start = 1; next } @@ -248,16 +248,17 @@ if [ -x /sbin/mdadm -a ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then $2 == 0 && $3 == 0 { next } { devices = devices " " $NF } END { print "devices='\''" devices "'\''" }' \ - >> /conf/mdadm.conf + >> /conf/mdrun.conf copy_exec /sbin/mdadm /sbin - copy_exec /sbin/mdrun /sbin for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do manual_add_modules ${x} done fi +[ -x /sbin/mdrun ] && copy_exec /sbin/mdrun /sbin # FIXME: Remove this LVM block after Etch releases -if [ -x /sbin/vgchange -a -d /lib/lvm-200 -a ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then +if [ -x /sbin/vgchange ] && [ -d /lib/lvm-200 ] \ + && [ ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then copy_exec /lib/lvm-200/vgchange /sbin for x in dm_mod dm_snapshot dm_mirror; do manual_add_modules ${x} diff --git a/scripts/local b/scripts/local index 9d71a5e..e7bf23e 100644 --- a/scripts/local +++ b/scripts/local @@ -23,7 +23,7 @@ mountroot () fi slumber=$(( ${slumber} * 10 )) - while [ ${slumber} -gt 0 -a ! -e "${ROOT}" ]; do + while [ ${slumber} -gt 0 ] && [ ! -e "${ROOT}" ]; do /bin/sleep 0.1 slumber=$(( ${slumber} - 1 )) done diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index f9d1490..27053de 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -1,6 +1,6 @@ #!/bin/sh -PREREQ="mdadm mdraid lvm2" +PREREQ="mdadm mdrun lvm2" prereqs() { diff --git a/scripts/local-top/mdrun b/scripts/local-top/mdrun index 3ed995c..da890c5 100755 --- a/scripts/local-top/mdrun +++ b/scripts/local-top/mdrun @@ -37,7 +37,7 @@ done [ "${gotraid}" = y ] || exit # source the presumed root md and it's info -. ./conf/mdadm.conf +. ./conf/mdrun.conf # assemble root raid first due to initrd-tools compatibility mdadm -A ${rootraiddev} -R -u $uuid $devices diff --git a/scripts/nfs b/scripts/nfs index 844db70..f42ed22 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -2,17 +2,9 @@ # FIXME This needs error checking -# Paramter: Where the root should be mounted -mountroot () +# parse nfs bootargs + launch ipconfig and nfsmount +do_nfsmount() { - [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-top" - run_scripts /scripts/nfs-top - [ "$quiet" != "y" ] && log_end_msg - - modprobe -q nfs - # For DHCP - modprobe -q af_packet - # support ip options see linux sources Documentation/nfsroot.txt case ${IPOPTS} in none|off) @@ -40,7 +32,7 @@ mountroot () ;; esac - # FIXME: who writes that? + # FIXME: source ipconfig output - might overwrite aboves . /tmp/net-${DEVICE}.conf # get nfs root from dhcp @@ -78,9 +70,38 @@ mountroot () fi nfsmount -o nolock ${roflag} ${NFSOPTS} ${NFSROOT} ${rootmnt} +} + +# NFS root mounting +mountroot() +{ + [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-top" + run_scripts /scripts/nfs-top + [ "$quiet" != "y" ] && log_end_msg + + modprobe -q nfs + # For DHCP + modprobe -q af_packet + + # Default delay is around 180s + # FIXME: add usplash info + if [ -z "${ROOTDELAY}" ]; then + delay=180 + else + delay=${ROOTDELAY} + fi + + # loop until nfsmount succeds + # FIXME: another place of init bin hardcoding + while [ ${delay} -gt 0 ] && [ ! -e ${rootmnt}/sbin/init ]; do + [ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount" + do_nfsmount + # FIXME: ipconfig loops every min at least - better param?? + delay=$(( ${delay} - 1 )) + [ "$quiet" != "y" ] && log_end_msg + done [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom" run_scripts /scripts/nfs-bottom [ "$quiet" != "y" ] && log_end_msg - } diff --git a/update-initramfs b/update-initramfs index 1ec8c7d..c1e42ab 100755 --- a/update-initramfs +++ b/update-initramfs @@ -95,7 +95,7 @@ run_lilo() # or if "do_bootloader = yes" is set run_bootloader() { - if [ -x /sbin/grub -o -e /boot/grub/menu.lst ]; then + if [ -x /sbin/grub ] || [ -e /boot/grub/menu.lst ]; then if [ -e /etc/lilo.conf ]; then [ -r "${KPKGCONF}" ] && \ do_b=$(awk '/bootloader/{print $3}' "${KPKGCONF}") -- cgit v1.2.3 From 8ae9783215c2845b50dfb70b919df0753c2b0dd9 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 1 Sep 2006 16:18:29 +0200 Subject: - fix destination of the mdrun.conf for partial sarge upgrades - checkout if /sbin/lilo is really there - guard more dirs against creation - add /etc/kernel-img.conf to reportbug output --- debian/changelog | 20 ++++++++++++++++++++ debian/script | 6 ++++++ init | 6 +++--- mkinitramfs | 4 ++-- update-initramfs | 3 +++ 5 files changed, 34 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bc635a3..b46db63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +initramfs-tools (0.78) unstable; urgency=medium + + * update-initramfs: Check in call_lilo() if /sbin/lilo is executable, + when /etc/lilo.conf exists (closes: 384967) - thus urgency medium. + + * init: Guard all dirs against creation. (closes: 385281) + + * debian/scripts: Add /etc/kernel-img.conf section, as update-initramfs + needs to act according to it. + + -- maximilian attems Thu, 31 Aug 2006 14:44:01 +0200 + +initramfs-tools (0.77b) unstable; urgency=high + + * 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) + + -- maximilian attems Thu, 31 Aug 2006 13:20:51 +0200 + initramfs-tools (0.77) unstable; urgency=medium * mkinitramfs, scripts/local-top/mdrun: Use mdrun.conf as config file. diff --git a/debian/script b/debian/script index b1b477d..a8e3dd9 100755 --- a/debian/script +++ b/debian/script @@ -13,3 +13,9 @@ echo echo "-- lsmod" lsmod echo + +if [ -r /etc/kernel-img.conf ]; then + echo "-- kernel-img.conf" + cat /etc/kernel-img.conf + echo +fi diff --git a/init b/init index a83dc39..0c336b3 100755 --- a/init +++ b/init @@ -6,9 +6,9 @@ echo "Loading, please wait..." [ -d /root ] || mkdir --mode=0700 /root [ -e /dev/console ] || mknod /dev/console c 5 1 [ -e /dev/null ] || mknod /dev/null c 1 3 -mkdir /sys -mkdir /proc -mkdir /tmp +[ -d /sys ] || mkdir /sys +[ -d /proc ] || mkdir /proc +[ -d /tmp ] || mkdir /tmp mkdir -p /var/lock mount -t sysfs none /sys mount -t proc none /proc diff --git a/mkinitramfs b/mkinitramfs index d088efa..c36e845 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -239,7 +239,7 @@ run_scripts "${CONFDIR}"/hooks if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then # use mkinitrd magic for Sarge backwards compat rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')" - echo "rootraiddev=${rootraiddev}" > /conf/mdrun.conf + echo "rootraiddev=${rootraiddev}" > ${DESTDIR}/conf/mdrun.conf mdadm=$(mdadm --detail "${rootraiddev}") echo "${mdadm}" | awk ' $1 == "Number" && $2 == "Major" { start = 1; next } @@ -248,7 +248,7 @@ if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then $2 == 0 && $3 == 0 { next } { devices = devices " " $NF } END { print "devices='\''" devices "'\''" }' \ - >> /conf/mdrun.conf + >> ${DESTDIR}/conf/mdrun.conf copy_exec /sbin/mdadm /sbin for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do manual_add_modules ${x} diff --git a/update-initramfs b/update-initramfs index c1e42ab..5cd1e2e 100755 --- a/update-initramfs +++ b/update-initramfs @@ -85,6 +85,9 @@ generate_initramfs() # lilo call run_lilo() { + if [ ! -x /sbin/lilo ]; then + return 1 + fi lilo -t > /dev/null if [ $? -eq 0 ]; then lilo -- 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 'debian') 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 'debian') 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 d4105f86b31e2c0fd35d060982a3f50e9eb9baf1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 12 Sep 2006 16:54:36 +0200 Subject: - another run_lilo improvement --- debian/changelog | 7 +++++++ update-initramfs | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6c06903..51987c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.80) unstable; urgency=low + + * update-initramfs: Test for lilo executable earlier otherwise an warning + would be issued with grub installed and left over lilo config. + + -- maximilian attems Tue, 12 Sep 2006 15:59:14 +0200 + initramfs-tools (0.79) unstable; urgency=high * update-initramfs: Allow create and delete to work on "all" kernelversions. diff --git a/update-initramfs b/update-initramfs index fa6c837..d1b7026 100755 --- a/update-initramfs +++ b/update-initramfs @@ -85,9 +85,6 @@ generate_initramfs() # lilo call run_lilo() { - if [ ! -x /sbin/lilo ]; then - return 0 - fi lilo -t > /dev/null if [ $? -eq 0 ]; then lilo @@ -99,7 +96,7 @@ run_lilo() run_bootloader() { if [ -x /sbin/grub ] || [ -e /boot/grub/menu.lst ]; then - if [ -e /etc/lilo.conf ]; then + if [ -e /etc/lilo.conf ] && [ -x /sbin/lilo ]; then [ -r "${KPKGCONF}" ] && \ do_b=$(awk '/bootloader/{print $3}' "${KPKGCONF}") if [ "${do_b}" = "yes" ] || [ "${do_b}" = "Yes" ] \ -- cgit v1.2.3 From 681dc7a7566afa2de5fa7d1edf8aa1c25ec451a6 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 19 Sep 2006 23:56:24 +0200 Subject: - more nfs work (timeout, parsing, typo) - lilo codeflow - add lasi700 scsi module --- debian/changelog | 17 +++++++++++++++-- hook-functions | 10 +++++----- scripts/nfs | 14 ++++++-------- update-initramfs | 3 ++- 4 files changed, 28 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 51987c7..d4033ac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,22 @@ -initramfs-tools (0.80) unstable; urgency=low +initramfs-tools (0.80) unstable; urgency=high + + Release "O partigiano, portami via, che mi sento di morir." * update-initramfs: Test for lilo executable earlier otherwise an warning would be issued with grub installed and left over lilo config. - -- maximilian attems Tue, 12 Sep 2006 15:59:14 +0200 + * hook-functions: Add lasi700 to the scsi modules. (closes: 387909) Thanks + Nagilum . Thus urgency high. + + * scripts/nfs: Fix typo in ipconfig protocol handling, fix dhcp server + passing ser-ip as part of root-path, retry every second to not hammer + an FAI'ed nfs initramfs network. Thanks for input and patches + Vagrant Cascadian . While we are there refactor + the loop. (closes: 387841, 387808, 387809) + + * update-initramfs: Check if /proc is mounted for ro_boot_check. + + -- maximilian attems Tue, 19 Sep 2006 07:56:47 +0200 initramfs-tools (0.79) unstable; urgency=high diff --git a/hook-functions b/hook-functions index bfbe56a..9f4d890 100644 --- a/hook-functions +++ b/hook-functions @@ -170,11 +170,11 @@ 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 hptiop ibmvscsic initio ipr ips isp1020 lpfc max_scsi \ - mac53c94 megaraid megaraid_mbox megaraid_mm megaraid_sas \ - mesh mptfc mptscsih mptsas mptspi nsp32 osst qla1280 \ - qla2100 qla2200 qla2300 qla2322 qla2xxx qla6312 \ - qlogicfas408 qlogicfc sata_mv sata_nv sata_promise \ + gdth hptiop ibmvscsic initio ipr ips isp1020 lasi700 lpfc \ + max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm \ + megaraid_sas 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 \ diff --git a/scripts/nfs b/scripts/nfs index c66e2a1..b3ac06f 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -16,7 +16,7 @@ do_nfsmount() # Bring up device ipconfig ${DEVICE} ;; - dhcp|bootb|rarp|both) + dhcp|bootp|rarp|both) ipconfig -c ${IPOPTS} -d ${DEVICE} ;; *) @@ -49,7 +49,7 @@ do_nfsmount() NFSOPTS="-o ${NFSROOT#*,}" fi NFSROOT=${NFSROOT%%,*} - if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then + if [ "${NFSROOT#:*}" = "$NFSROOT" ]; then NFSROOT=${ROOTSERVER}:${NFSROOT} fi fi @@ -83,7 +83,7 @@ mountroot() modprobe -q af_packet # Default delay is around 180s - # FIXME: add usplash info + # FIXME: add usplash_write info if [ -z "${ROOTDELAY}" ]; then delay=180 else @@ -91,15 +91,13 @@ mountroot() fi # loop until nfsmount succeds - while [ ${delay} -gt 0 ] && [ ! -e ${rootmnt}${init} ]; do + while [ ${retry_nr} -lt ${delay} ] && [ ! -e ${rootmnt}${init} ]; do [ ${retry_nr} -gt 0 ] && \ [ "$quiet" != "y" ] && log_begin_msg "Retrying nfs mount" do_nfsmount - # FIXME: ipconfig loops every min at least - better param?? - delay=$(( ${delay} - 1 )) - [ ${retry_nr} -gt 0 ] && [ "$quiet" != "y" ] && log_end_msg - [ ! -e ${rootmnt}/sbin/init ] && /bin/sleep 0.1 retry_nr=$(( ${retry_nr} + 1 )) + [ ! -e ${rootmnt}${init} ] && /bin/sleep 1 + [ ${retry_nr} -gt 0 ] && [ "$quiet" != "y" ] && log_end_msg done [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/nfs-bottom" diff --git a/update-initramfs b/update-initramfs index d1b7026..4a03614 100755 --- a/update-initramfs +++ b/update-initramfs @@ -113,7 +113,7 @@ run_bootloader() fi return 0 fi - if [ -e /etc/lilo.conf ]; then + if [ -e /etc/lilo.conf ] && [ -x /sbin/lilo ]; then run_lilo fi } @@ -138,6 +138,7 @@ delete_sha1() # ro /boot is not modified ro_boot_check() { + [ -d /proc ] || return 0 boot_opts=$(awk '/boot/{if (match($4, /ro/)) print "ro"}' /proc/mounts) if [ -n "${boot_opts}" ]; then echo "WARNING: /boot is ro mounted." -- cgit v1.2.3 From b8c8f676a5f0da208b27e4d9bac71ae3814a1b97 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 27 Sep 2006 16:03:30 +0200 Subject: - mkinitramfs: allow umask setting paranoid - revert an nfs changes small fixes over the place --- debian/changelog | 27 +++++++++++++++++++++++++++ debian/initramfs-tools.preinst | 6 ++++-- hook-functions | 20 +++++++++++--------- mkinitramfs | 10 ++++++++-- scripts/nfs | 2 +- update-initramfs | 4 ++-- 6 files changed, 53 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d4033ac..6efe40c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,30 @@ +initramfs-tools (0.81) unstable; urgency=low + + Release quick and happy spin j = l + s + + * update-initramfs: Really check for mounted /proc on use. (closes: 388241) + Thanks Alex Owen . While beeing in this business, + check for mounted proc in initramfs-tools.preinst too. + + * hook-functions: Add new scsi drivers aic94xx and stex. Add new net drivers + ehea, ep93xx_eth and qla3xxx. Thus urgency high. + + * update-initramfs: Use set ``--'' to change positional paramaters. Thanks + Jörg Sommer . (closes: 389726) + + * scripts/nfs: Revert to previous handling of dhcp server passing server-ip. + (closes: 387808) + + * debian/initramfs-tools.preinst: Fix comment typo, thanks + shaulka@012.net.il for the patch. (closes: 389486) + + * mkinitramfs: Allow an hook script to set an paranoid umask, considered + useful for shipping gpg keys inside of initramfs. Thanks Max Vozeler + and Lionel Elie Mamane for the + patch. (closes: 381677) + + -- maximilian attems Wed, 27 Sep 2006 15:56:46 +0200 + initramfs-tools (0.80) unstable; urgency=high Release "O partigiano, portami via, che mi sento di morir." diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index b92d393..7b02612 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -8,9 +8,11 @@ case "$1" in mkdir -p /etc/initramfs-tools/conf.d # First time install. Can we autodetect the RESUME partition? - RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') + if [ -r /proc/swaps ]; then + RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') + fi - # Inhertic initrd-tools settings if possible. + # Inherit initrd-tools settings if possible. if [ -e /etc/mkinitrd/mkinitrd.conf ]; then . /etc/mkinitrd/mkinitrd.conf fi diff --git a/hook-functions b/hook-functions index 9f4d890..9cb9712 100644 --- a/hook-functions +++ b/hook-functions @@ -148,9 +148,10 @@ 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 myri10ge natsemi ne2k-pci netconsole \ - ns83820 pcnet32 r8169 s2io sis900 skge slhc smc911x starfire \ + dl2k e1000 e100 ehea epic100 ep93xx_eth eql fealnx \ + famachi forcedeth 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; do @@ -168,17 +169,18 @@ auto_add_modules() ;; scsi) 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 hptiop ibmvscsic initio ipr ips isp1020 lasi700 lpfc \ - max_scsi mac53c94 megaraid megaraid_mbox megaraid_mm \ - megaraid_sas mesh mptfc mptscsih mptsas mptspi nsp32 \ + aic79xx aic7xxx aic94xx arcmsr ata_piix atari_scsi \ + atp870u BusLogic cciss ch cpqarray DAC960 dc395x \ + dmx3191d dpt_i2o eata fdomain gdth hptiop ibmvscsic \ + initio ipr ips isp1020 lasi700 lpfc max_scsi mac53c94 \ + megaraid megaraid_mbox megaraid_mm megaraid_sas \ + 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 \ - sd_mod sym53c8xx tmscsim zfcp; do + sd_mod stex sym53c8xx tmscsim zfcp; do manual_add_modules "${x}" done ;; diff --git a/mkinitramfs b/mkinitramfs index 8d5911d..f667c53 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -28,8 +28,7 @@ while true; do fi ;; -o) - touch $2 - outfile="$(readlink -f "$2")" + outfile="$2" shift 2 ;; -k) @@ -94,6 +93,13 @@ for i in ${EXTRA_CONF}; do fi done +if [ -n "${UMASK}" ]; then + umask "${UMASK}" +fi + +touch $outfile +outfile="$(readlink -f "$outfile")" + if [ -z "${outfile}" ]; then usage fi diff --git a/scripts/nfs b/scripts/nfs index b3ac06f..fc869cc 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -49,7 +49,7 @@ do_nfsmount() NFSOPTS="-o ${NFSROOT#*,}" fi NFSROOT=${NFSROOT%%,*} - if [ "${NFSROOT#:*}" = "$NFSROOT" ]; then + if [ "${NFSROOT#*:}" = "$NFSROOT" ]; then NFSROOT=${ROOTSERVER}:${NFSROOT} fi fi diff --git a/update-initramfs b/update-initramfs index 4a03614..45d4631 100755 --- a/update-initramfs +++ b/update-initramfs @@ -138,7 +138,7 @@ delete_sha1() # ro /boot is not modified ro_boot_check() { - [ -d /proc ] || return 0 + [ -r /proc/mounts ] || return 0 boot_opts=$(awk '/boot/{if (match($4, /ro/)) print "ro"}' /proc/mounts) if [ -n "${boot_opts}" ]; then echo "WARNING: /boot is ro mounted." @@ -201,7 +201,7 @@ set_linked_version() set_highest_version() { get_sorted_versions - set - ${version_list} + set -- ${version_list} version=${1} } -- cgit v1.2.3 From f49c698f4838b09794ebdd129e7eee14de2aad54 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 5 Oct 2006 16:22:08 +0200 Subject: add ide jmicron module + ubuntu changelogs add scsi qla4xxx module --- debian/changelog | 30 ++++++++++++++++++++++++++++++ hook-functions | 11 ++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6efe40c..2990625 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +initramfs-tools (0.82) unstable; urgency=high + + * Merge 0.69ubuntu15, plus 0.69ubuntu14 and 0.69ubuntu11 changelog entries + as not affected or already fixed. + + * hook-initramfs: Add qla4xxx support, thus urgency high. + + -- maximilian attems Thu, 5 Oct 2006 16:12:06 +0200 + initramfs-tools (0.81) unstable; urgency=low Release quick and happy spin j = l + s @@ -388,6 +397,27 @@ initramfs-tools (0.69b) unstable; urgency=high -- maximilian attems Fri, 14 Jul 2006 00:31:30 +0200 +initramfs-tools (0.69ubuntu15) edgy; urgency=low + + * Add jmicron module to ide list. + - Malone #63085 + + -- Ben Collins Wed, 4 Oct 2006 09:21:08 -0400 + +initramfs-tools (0.69ubuntu14) edgy; urgency=low + + * Remove stray "set -x" from scripts/local-premount/suspend. + + -- Adam Conrad Wed, 20 Sep 2006 08:35:05 +1000 + +initramfs-tools (0.69ubuntu11) edgy; urgency=low + + * since we ship /usr/share/initramfs-tools/conf.d as well as + /etc/initramfs-tools/conf.d, make sure mkinitramfs also reads from both, + not only from the /etc location + + -- Oliver Grawert Sun, 10 Sep 2006 11:50:14 +0200 + initramfs-tools (0.69ubuntu4) edgy; urgency=low * scripts/local-premount/suspend: Check for UUID= or LABEL= on the diff --git a/hook-functions b/hook-functions index 9cb9712..98c88a2 100644 --- a/hook-functions +++ b/hook-functions @@ -161,9 +161,10 @@ auto_add_modules() ide) for x in ide-cd ide-disk ide-generic aec62xx alim15x3 \ amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 \ - generic hpt34x hpt366 it821x ns87415 opti621 pdc202xx_new \ - pdc202xx_old piix rz1000 sc1200 serverworks siimage \ - sis5513 slc82c105 slc90e66 triflex trm290 via82cxxx; do + generic hpt34x hpt366 it821x jmicron ns87415 opti621 \ + pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks \ + siimage sis5513 slc82c105 slc90e66 triflex trm290 \ + via82cxxx; do manual_add_modules "${x}" done ;; @@ -176,8 +177,8 @@ auto_add_modules() megaraid megaraid_mbox megaraid_mm megaraid_sas \ 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 \ + qla4xxx 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 \ sd_mod stex sym53c8xx tmscsim zfcp; do -- 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 'debian') 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 63f337b6a8cfa058bb2ed9fcf0de6a71f3ffb9ab Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 13 Oct 2006 09:44:20 +0200 Subject: last minute fixes update-initramfs: - find against the correct backup - check if initramfs _really_ exists --- debian/changelog | 5 ++++- update-initramfs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1eaf2f9..49d07a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,7 +34,10 @@ initramfs-tools (0.83) unstable; urgency=high * manpages: Get a banana and mark myself as author. - -- maximilian attems Fri, 13 Oct 2006 08:12:40 +0200 + * update-initramfs: version_exists needs not only to check for existing + sha1sum, but also initramfs. (closes: 382472) + + -- maximilian attems Fri, 13 Oct 2006 09:38:27 +0200 initramfs-tools (0.82) unstable; urgency=high diff --git a/update-initramfs b/update-initramfs index 11d48be..151e47a 100755 --- a/update-initramfs +++ b/update-initramfs @@ -56,7 +56,7 @@ verbose() version_exists() { - [ -e "${STATEDIR}/${1}" ] + [ -e "${STATEDIR}/${1}" ] && [ -e "${initramfs}" ] return $? } @@ -93,7 +93,7 @@ backup_booted_initramfs() # 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}) + boot_initramfs=$(find "${initramfs}.bak" -mtime +${uptime_days}) fi if [ -n "${boot_initramfs}" ]; then mv -f "${initramfs_bak}" "${initramfs}.bak" -- cgit v1.2.3 From dc67493c8b72ebb4a360194a13c74a13d06def52 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 18 Oct 2006 13:16:03 +0200 Subject: - improve run_bootloader (elilo, zipl) - fix preinst sed command - bunch of minor fixes --- debian/changelog | 40 ++++++++++++++++++++++++++++++++++++++++ debian/initramfs-tools.preinst | 4 +--- hook-functions | 3 ++- hooks/thermal | 11 +++++++++++ initramfs-tools.8 | 4 ++-- mkinitramfs | 2 +- scripts/init-top/framebuffer | 2 +- scripts/local | 4 ++++ update-initramfs | 15 ++++++++++++--- 9 files changed, 74 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 49d07a9..022e167 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,31 @@ +initramfs-tools (0.84) unstable; urgency=high + + Release "A-t-on pris à Saint-Périne, Tous ces dictateurs impotents ?" + + * hook-functions: Use modprobe --ignore-install arg to put all listed + modules on initramfs. Thanks Mario Izquierdo + for report. (closes: 384043) + + * update-initramfs: If elilo is around run it on initramfs update, add + zipl run. + + * scripts/local: Use vol_id too if around to set FSTYPE. Thanks for the + patch to "Alex Owen" (closes: 380004) + + * hooks/thermal: Add many of the windfarm modules for powerpc boxes. + + * initramfs-tools.preinst: merge bits of 0.69ubuntu16. (closes: 393773) + urgency high as fixes upgrade from sarge - thanks Federico Grau + . + + * scripts/init-top/framebuffer: Fix mknod call. (closes: 393543) + Thanks for the patch Kiro Zimmer . + + * mkinitramfs: Create modulesdir even on monolithic linux. (closes: 393688) + Thanks for the patch Ian Campbell . + + -- maximilian attems Wed, 18 Oct 2006 11:04:50 +0200 + initramfs-tools (0.83) unstable; urgency=high Release "Ois was du verzapfst is a koida Kaffee" @@ -438,6 +466,18 @@ initramfs-tools (0.69b) unstable; urgency=high -- maximilian attems Fri, 14 Jul 2006 00:31:30 +0200 +initramfs-tools (0.69ubuntu16) edgy; urgency=low + + * Bring in preinst fixes from Debian, including s/configure/install/ in + preinst, since preinst is never called with "configure", and checking + for /proc/swaps before we blindly try to read it to determine RESUME. + * Do away with the bogus '-n "$2"' test in preinst, since "install" can + be called without any arguments at all (and often is, on a clean setup) + * On upgrades, revert the RESUME mangling that dapper's d-i did to our + config file, avoiding spurious conffile prompts (launchpad.net/63693) + + -- Adam Conrad Mon, 16 Oct 2006 17:23:41 +1000 + initramfs-tools (0.69ubuntu15) edgy; urgency=low * Add jmicron module to ide list. diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index fc1fd06..aa8c8ca 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -4,7 +4,6 @@ set -e case "$1" in install) - if [ -n "$2" ]; then mkdir -p /etc/initramfs-tools/conf.d # First time install. Can we autodetect the RESUME partition? @@ -29,7 +28,7 @@ case "$1" in -e '/# This file should/,/one per line\./d' \ -e 's/Comments begin with.*/Syntax: module_name [args ...]/' \ -e 's/^# ext2$/# raid1/' \ - -e 's/^# wd io=0x300$/# sd_mod/' + -e 's/^# wd io=0x300$/# sd_mod/' \ -e '/^ide-generic/d' \ -e '/^ide-disk/d' \ -e '/^ext2/d' \ @@ -40,7 +39,6 @@ case "$1" in if [ -e /etc/mkinitrd/DSDT ]; then cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml fi - fi ;; upgrade) if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.61"; then diff --git a/hook-functions b/hook-functions index 98c88a2..8df30f2 100644 --- a/hook-functions +++ b/hook-functions @@ -40,7 +40,8 @@ add_modules_from_file() manual_add_modules() { - for mam_x in $(modprobe --set-version="${version}" --show-depends "${1}" 2>/dev/null | awk '/^insmod/ { print $2 }'); do + for mam_x in $(modprobe --set-version="${version}" --ignore-install \ + --show-depends "${1}" 2>/dev/null | awk '/^insmod/ { print $2 }'); do # Prune duplicates if [ -e "${DESTDIR}/${mam_x}" ]; then continue diff --git a/hooks/thermal b/hooks/thermal index 9bfd323..ece7243 100755 --- a/hooks/thermal +++ b/hooks/thermal @@ -23,6 +23,17 @@ case "$DPKG_ARCH" in # copy the right modules powerpc|ppc64) manual_add_modules therm_pm72 + manual_add_modules windfarm_core + manual_add_modules windfarm_cpufreq_clamp + manual_add_modules windfarm_lm75_sensor + manual_add_modules windfarm_max6690_sensor + manual_add_modules windfarm_pid + manual_add_modules windfarm_pm112 + manual_add_modules windfarm_pm81 + manual_add_modules windfarm_pm91 + manual_add_modules windfarm_smu_controls + manual_add_modules windfarm_smu_sat + manual_add_modules windfarm_smu_sensors manual_add_modules i2c-powermac ;; i386|amd64|ia64) diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 4ce53d3..690505f 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -1,4 +1,4 @@ -.TH INITRAMFS-TOOLS 8 "Date: 2006/10/11" "" "mkinitramfs script overview" +.TH INITRAMFS-TOOLS 8 "Date: 2006/10/14" "" "mkinitramfs script overview" .SH NAME initramfs-tools \- an introduction to writing scripts for mkinitramfs @@ -438,7 +438,7 @@ 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.17-2-686 | \\ +gunzip -c -9 /boot/initrd.img-2.6.18-1-686 | \\ cpio -i -d -H newc --no-absolute-filenames .fi .RE diff --git a/mkinitramfs b/mkinitramfs index f667c53..2fd0cc8 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -166,7 +166,7 @@ export verbose # Private, used by 'catenate_cpiogz'. export __TMPCPIOGZ -for d in bin conf/conf.d etc lib modules sbin scripts; do +for d in bin conf/conf.d etc lib modules sbin scripts ${MODULESDIR}; do mkdir -p "${DESTDIR}/${d}" done diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer index bafbe19..8382b20 100755 --- a/scripts/init-top/framebuffer +++ b/scripts/init-top/framebuffer @@ -82,7 +82,7 @@ fi if [ -e /proc/fb ]; then while read fbno desc; do - mknod /dev/fb$fbno 29 $fbno + mknod /dev/fb$fbno c 29 $fbno done < /proc/fb mknod /dev/fb0 c 29 0 diff --git a/scripts/local b/scripts/local index 299fc65..f4079d5 100644 --- a/scripts/local +++ b/scripts/local @@ -51,6 +51,10 @@ mountroot () else FSTYPE=${ROOTFSTYPE} fi + if [ "$FSTYPE" = "unknown" ] && [ -x /lib/udev/vol_id ]; then + FSTYPE=$(/lib/udev/vol_id -t ${ROOT}) + [ -z "$FSTYPE" ] && FSTYPE="unknown" + fi [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" run_scripts /scripts/local-premount diff --git a/update-initramfs b/update-initramfs index 151e47a..c112211 100755 --- a/update-initramfs +++ b/update-initramfs @@ -148,10 +148,11 @@ mbr_check() echo } -# only run lilo if no grub is around -# or if "do_bootloader = yes" is set +# Invoke bootloader run_bootloader() { + # only run lilo if no grub is around + # or if "do_bootloader = yes" is set if [ -x /sbin/grub ] || [ -e /boot/grub/menu.lst ] \ || [ -x /usr/sbin/grub ]; then if [ -e /etc/lilo.conf ] && [ -x /sbin/lilo ]; then @@ -168,8 +169,16 @@ run_bootloader() fi return 0 fi - if [ -e /etc/lilo.conf ] && [ -x /sbin/lilo ]; then + if [ -r /etc/lilo.conf ] && [ -x /sbin/lilo ]; then run_lilo + return 0 + fi + if [ -x /sbin/elilo ]; then + elilo + return 0 + fi + if [ -r /etc/zipl.conf ]; then + zipl fi } -- cgit v1.2.3 From efa60794a8a0290ec3972aca23b3ab5f92c3175a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 2 Nov 2006 09:30:03 +0100 Subject: - enhance mbr_check() - fix /boot ro check - create fb devices unconditionaly --- debian/changelog | 32 ++++++++++++++++++++++++++++++++ hook-functions | 2 +- scripts/init-top/framebuffer | 17 +++++++++-------- update-initramfs | 40 +++++++++++++++++++++++++++++++++------- 4 files changed, 75 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 022e167..991ff6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,29 @@ +initramfs-tools (0.85) unstable; urgency=high + + Release "Nichts ist getan, wenn noch etwas zu tun übrig ist." + + * update-initramfs: Fix ro /boot check to not trigger on other mounts + having a /boot string. (closes: 393906) Thanks for the patch + Olli Helenius + + * init-top/framebuffer: Fix duplicate fbno0 device creation. Merge the + 0.69ubuntu10 solution. Thanks Benjamin Leipold + for the report. (closes: 393890) + + * update-initramfs: Fix mbr_check() for installed lilo and used grub. Thanks + for the patch by Michel Casabona . Also be + stricter about do_bootloader match, use negative info and add check for + grub on mbr before throwing error. (closes: 394559) urgency high. + + * hook-functions: Add sata_sil24 to scsi modules. (closes: 395907) + Thanks Vadim S. Solomi" for the patch. + + * update-initramfs: Fix lilo detection in mbr_check() for rootraid. + Based on a patch by Michael Prokop . Suppress lilo warning + messages on test run. + + -- maximilian attems Mon, 30 Oct 2006 10:12:58 +0100 + initramfs-tools (0.84) unstable; urgency=high Release "A-t-on pris à Saint-Périne, Tous ces dictateurs impotents ?" @@ -499,6 +525,12 @@ initramfs-tools (0.69ubuntu11) edgy; urgency=low -- Oliver Grawert Sun, 10 Sep 2006 11:50:14 +0200 +initramfs-tools (0.69ubuntu10) edgy; urgency=low + + * Create framebuffer device nodes unconditionally + + -- Matthew Garrett Tue, 5 Sep 2006 17:50:53 +0100 + initramfs-tools (0.69ubuntu4) edgy; urgency=low * scripts/local-premount/suspend: Check for UUID= or LABEL= on the diff --git a/hook-functions b/hook-functions index 8df30f2..c6a42a6 100644 --- a/hook-functions +++ b/hook-functions @@ -179,7 +179,7 @@ auto_add_modules() mesh mptfc mptscsih mptsas mptspi nsp32 \ osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx \ qla4xxx qla6312 qlogicfas408 qlogicfc sata_mv sata_nv \ - sata_promise sata_qstor sata_sil sata_sis sata_svw \ + sata_promise sata_qstor sata_sil sata_sil24 sata_sis sata_svw \ sata_sx4 sata_uli sata_via sata_vsc scsi_mod \ scsi_transport_fc scsi_transport_iscsi scsi_transport_spi \ sd_mod stex sym53c8xx tmscsim zfcp; do diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer index 8382b20..1d5e375 100755 --- a/scripts/init-top/framebuffer +++ b/scripts/init-top/framebuffer @@ -76,17 +76,18 @@ for x in $(cat /proc/cmdline); do esac done -if [ -n "$FB" ]; then - modprobe -q $FB $OPTS -fi - if [ -e /proc/fb ]; then while read fbno desc; do mknod /dev/fb$fbno c 29 $fbno done < /proc/fb - +else 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 - done +fi +for i in 0 1 2 3 4 5 6 7 8; do + mknod /dev/tty$i c 4 $i +done + +if [ -n "$FB" ]; then + modprobe -q fbcon + modprobe -q $FB $OPTS fi diff --git a/update-initramfs b/update-initramfs index c112211..0fea63c 100755 --- a/update-initramfs +++ b/update-initramfs @@ -127,7 +127,8 @@ generate_initramfs() # lilo call run_lilo() { - lilo -t > /dev/null + # suppress errors on test run + lilo -t > /dev/null 2>&1 if [ $? -eq 0 ]; then lilo fi @@ -136,11 +137,33 @@ run_lilo() # check if lilo is on mbr mbr_check() { + # check out lilo.conf for validity boot=$(awk -F = '/^boot=/{ print $2}' /etc/lilo.conf) [ -z "${boot}" ] && return 0 + case ${boot} in + /dev/md*) + if [ -r /proc/mdstat ]; then + MD=${boot#/dev/} + boot="/dev/$(awk "/^${MD}/{print substr(\$5, 1, 3)}" \ + /proc/mdstat)" + fi + ;; + esac [ ! -r "${boot}" ] && return 0 - dd if="${boot}" bs=512 skip=0 count=1 2> /dev/null | grep -q LILO - [ $? -eq 0 ] && run_lilo && return 0 + dd if="${boot}" bs=512 skip=0 count=1 2> /dev/null | grep -q LILO \ + && run_lilo && return 0 + + # try to discover grub and be happy + [ -r /boot/grub/menu.lst ] \ + && groot=$(awk '/^root/{print substr($2, 2, 3); exit}' \ + /boot/grub/menu.lst) + [ -e /boot/grub/device.map ] && [ -n "${groot}" ] \ + && dev=$(awk "/${groot}/{ print \$NF}" /boot/grub/device.map) + [ -n "${dev}" ] && [ -r ${dev} ] \ + && dd if="${dev}" bs=512 skip=0 count=1 2> /dev/null \ + | grep -q GRUB && return 0 + + # no idea which bootloader is used echo echo "WARNING: grub and lilo installed." echo "If you use grub as bootloader everything is fine." @@ -151,17 +174,19 @@ mbr_check() # Invoke bootloader run_bootloader() { - # only run lilo if no grub is around - # or if "do_bootloader = yes" is set + # if both lilo and grub around, figure out if lilo needs to be run if [ -x /sbin/grub ] || [ -e /boot/grub/menu.lst ] \ || [ -x /usr/sbin/grub ]; then if [ -e /etc/lilo.conf ] && [ -x /sbin/lilo ]; then [ -r "${KPKGCONF}" ] && \ - do_b=$(awk '/bootloader/{print $3}' "${KPKGCONF}") + do_b=$(awk '/^do_bootloader/{print $3}' "${KPKGCONF}") if [ "${do_b}" = "yes" ] || [ "${do_b}" = "Yes" ] \ || [ "${do_b}" = "YES" ]; then run_lilo return 0 + elif [ "${do_b}" = "no" ] || [ "${do_b}" = "No" ] \ + || [ "${do_b}" = "NO" ]; then + return 0 else mbr_check return 0 @@ -203,7 +228,8 @@ delete_sha1() ro_boot_check() { [ -r /proc/mounts ] || return 0 - boot_opts=$(awk '/boot/{if (match($4, /ro/)) print "ro"}' /proc/mounts) + boot_opts=$(awk '/boot/{if (match($4, /ro/) && $2 == "/boot") + print "ro"}' /proc/mounts) if [ -n "${boot_opts}" ]; then echo "WARNING: /boot is ro mounted." echo "update-initramfs: Not updating ${initramfs}" -- cgit v1.2.3 From 3c1412b1312c4b12d953aa8413d928bc8c9ad031 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 4 Nov 2006 12:20:05 +0100 Subject: - check that an initrd is around before trying to backup --- debian/changelog | 6 ++++++ update-initramfs | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 991ff6f..f6ef12c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.85a) unstable; urgency=high + + * On first time run backup_booted_initramfs() has nothing to back up. + + -- maximilian attems Fri, 3 Nov 2006 09:03:46 +0100 + initramfs-tools (0.85) unstable; urgency=high Release "Nichts ist getan, wenn noch etwas zu tun übrig ist." diff --git a/update-initramfs b/update-initramfs index 0fea63c..e694093 100755 --- a/update-initramfs +++ b/update-initramfs @@ -82,8 +82,11 @@ backup_booted_initramfs() # chroot [ ! -r /proc/uptime ] && rm -f "${initramfs_bak}" && return 0 - # no backup yet + # first time run initramfs_bak="${initramfs}.dpkg-bak" + [ ! -r "${initramfs_bak}" ] && return 0 + + # no backup yet if [ ! -r "${initramfs}.bak" ]; then mv -f ${initramfs_bak} "${initramfs}.bak" verbose "Backup ${initramfs}.bak" -- cgit v1.2.3 From 78fe68bcad9d0850e6b9877903719cab7c73b475 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 2 Dec 2006 18:51:54 +0100 Subject: - allow to disable backup - new bzr location - functional copy_dir_modules() - modprobe a bunch of ppc windfarm modules in thermal - provide output on error --- conf/update-initramfs.conf | 8 ++++++++ debian/changelog | 42 ++++++++++++++++++++++++++++++++++++++++++ debian/copyright | 2 +- hook-functions | 18 +++++++++++++++--- mkinitramfs | 6 +++--- scripts/init-premount/thermal | 9 +++++++++ scripts/init-top/framebuffer | 10 +++++----- update-initramfs | 12 ++++++++---- 8 files changed, 91 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/conf/update-initramfs.conf b/conf/update-initramfs.conf index 36c3dde..278c51c 100644 --- a/conf/update-initramfs.conf +++ b/conf/update-initramfs.conf @@ -9,3 +9,11 @@ # If set to no disables any update to initramfs beside kernel upgrade update_initramfs=yes + +# +# backup_initramfs [ yes | no ] +# +# Default is yes +# If set to no leaves no .bak backup files. + +backup_initramfs=yes diff --git a/debian/changelog b/debian/changelog index f6ef12c..acfa6f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,38 @@ +initramfs-tools (0.85c) unstable; urgency=medium + + Release "Pour être heureux vraiment Faut plus d'gouvernement" + + * hook-funcions: Show on verbose mode the added binaries and libraries. + + * update-initramfs: Don't silently fail, user won't be able to reboot. + Thanks Mario Aeby for his blog entry. + + * debian/copyright: Moved to bzr.d.o repo location. + + * hook-functions: Merge 0.69ubuntu22 copy_module_dir fixes, we'll use it + too postetch. Fix the bashism. Thanks to Jurij Smakov + + * scripts/init-premount/thermal: Load blindly a bunch of thermal modules + on powerpc as they are not hotpluggable. Might be ugly, but is a safe bet. + Kernel plattform fix is scheduled for 2.6.20. Push with medium urgency. + (closes: 401269) + + -- maximilian attems Sat, 2 Dec 2006 18:06:34 +0100 + +initramfs-tools (0.85b) unstable; urgency=medium + + * mkinitramfs: Test for ${outfile} before touching anything. (closes: 381677) + + * update-initramfs.conf, update-initramfs: Allow to disable backup strategy. + While we are it fix logic of backup_booted_initramfs(). (closes: 397787) + urgency medium. + + * scripts/init-top/framebuffer: Fix regression of /dev/fb0 creation, + modprobe fb before creating device. Thanks to Otavio Salvador + for patch. + + -- maximilian attems Tue, 14 Nov 2006 08:06:40 +0100 + initramfs-tools (0.85a) unstable; urgency=high * On first time run backup_booted_initramfs() has nothing to back up. @@ -498,6 +533,13 @@ initramfs-tools (0.69b) unstable; urgency=high -- maximilian attems Fri, 14 Jul 2006 00:31:30 +0200 +initramfs-tools (0.69ubuntu22) feisty; urgency=low + + * For copy_module_dir, actually call manual_module for each one, so deps are + taken care of. + + -- Ben Collins Thu, 23 Nov 2006 02:10:29 -0500 + initramfs-tools (0.69ubuntu16) edgy; urgency=low * Bring in preinst fixes from Debian, including s/configure/install/ in diff --git a/debian/copyright b/debian/copyright index 2c681c2..396499f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -10,7 +10,7 @@ The current ubuntu release can be found at: http://archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/ The Debian tree is maintained with "bzr" at: -http://debian.stro.at/bzr-test/initramfs-tools/ +http://bzr.debian.org/kernel/initramfs-tools/ Authors: Jeff Bailey , Adam Conrad , Scott James Remnant , diff --git a/hook-functions b/hook-functions index c6a42a6..b4cd58d 100644 --- a/hook-functions +++ b/hook-functions @@ -66,6 +66,9 @@ copy_exec() { fi else ln -s ${1} ${DESTDIR}/${2} + if [ -n "${verbose}" ] && [ "${verbose}" = "y" ]; then + echo "Adding binary ${1}" + fi fi # Copy the dependant libraries @@ -89,6 +92,9 @@ copy_exec() { mkdir -p ${DESTDIR}/${dirname} if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then ln -s ${x} ${DESTDIR}/${dirname} + if [ -n "${verbose}" ] && [ "${verbose}" = "y" ]; then + echo "Adding library ${x}" + fi fi done } @@ -96,9 +102,15 @@ copy_exec() { # Copy entire subtrees to the initramfs copy_modules_dir() { - tmpdir_modbase="${DESTDIR}/lib/modules/${version}" - mkdir -p "$(dirname "${tmpdir_modbase}/${1}")" - cp -a "${MODULESDIR}/${1}" "${tmpdir_modbase}/${1}" + if ! [ -d "${MODULESDIR}/${1}" ]; then + return; + fi + if [ -n "${verbose}" ] && [ "${verbose}" = "y" ]; then + echo "Copying module directory ${1}" + fi + for x_mod in $(find "${MODULESDIR}/${1}" -name '*.ko' -print); do + manual_add_modules `basename ${x_mod} .ko` + done } dep_add_modules() diff --git a/mkinitramfs b/mkinitramfs index 2fd0cc8..694f423 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -97,13 +97,13 @@ if [ -n "${UMASK}" ]; then umask "${UMASK}" fi -touch $outfile -outfile="$(readlink -f "$outfile")" - if [ -z "${outfile}" ]; then usage fi +touch "$outfile" +outfile="$(readlink -f "$outfile")" + # And by "version" we really mean path to kernel modules # This is braindead, and exists to preserve the interface with mkinitrd if [ ${#} -ne 1 ]; then diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index 3518e7c..bfea1fc 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -20,6 +20,15 @@ case "$DPKG_ARCH" in powerpc|ppc64) modprobe -q i2c-powermac modprobe -q therm_pm72 + modprobe -q windfarm_cpufreq_clamp + modprobe -q windfarm_lm75_sensor + modprobe -q windfarm_max6690_sensor + modprobe -q windfarm_pm112 + modprobe -q windfarm_pm81 + modprobe -q windfarm_pm91 + modprobe -q windfarm_smu_controls + modprobe -q windfarm_smu_sat + modprobe -q windfarm_smu_sensors ;; i386|amd64|ia64) modprobe -q fan diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer index 1d5e375..044b247 100755 --- a/scripts/init-top/framebuffer +++ b/scripts/init-top/framebuffer @@ -76,6 +76,11 @@ for x in $(cat /proc/cmdline); do esac done +if [ -n "$FB" ]; then + modprobe -q fbcon + modprobe -q $FB $OPTS +fi + if [ -e /proc/fb ]; then while read fbno desc; do mknod /dev/fb$fbno c 29 $fbno @@ -86,8 +91,3 @@ fi for i in 0 1 2 3 4 5 6 7 8; do mknod /dev/tty$i c 4 $i done - -if [ -n "$FB" ]; then - modprobe -q fbcon - modprobe -q $FB $OPTS -fi diff --git a/update-initramfs b/update-initramfs index e694093..4b230d0 100755 --- a/update-initramfs +++ b/update-initramfs @@ -79,12 +79,16 @@ backup_initramfs() # keep booted initramfs backup_booted_initramfs() { + initramfs_bak="${initramfs}.dpkg-bak" + + # first time run thus no backup + [ ! -r "${initramfs_bak}" ] && return 0 + # chroot [ ! -r /proc/uptime ] && rm -f "${initramfs_bak}" && return 0 - # first time run - initramfs_bak="${initramfs}.dpkg-bak" - [ ! -r "${initramfs_bak}" ] && return 0 + # no kept backup wanted + [ "${backup_initramfs}" = "no" ] && rm -f "${initramfs_bak}" && return 0 # no backup yet if [ ! -r "${initramfs}.bak" ]; then @@ -122,7 +126,7 @@ generate_initramfs() # minversion wasn't met, exit 0 exit 0 fi - verbose "mkinitramfs failed for ${initramfs}" + echo "update-initramfs: failed for ${initramfs}" exit $mkinitramfs_return fi } -- cgit v1.2.3 From c03e70312632212c516acac750cb5ec0ef4b33cb Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 14 Dec 2006 23:16:15 +0100 Subject: - show lilo error on lilo failure - add hppa zalon module - reduce size due to keeping only 1 busybox copy - warn on update mode when no initramfs exist and takeover not specified --- debian/changelog | 22 ++++++++++++++++++++++ hook-functions | 2 +- mkinitramfs | 7 ++++++- update-initramfs | 24 ++++++++++++++---------- 4 files changed, 43 insertions(+), 12 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index acfa6f0..394179a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +initramfs-tools (0.85d) unstable; urgency=high + + Release "Le gros ventre qu'engraisse L'suffrage universel" + + * update-initramfs: run_lilo() needs to show errors of lilo -t on failure + and exit with failure message. Thanks David Anselmi + for report. (closes: 401331) Updated according to review by + Jurij Smakov . + + * hook-functions: Add hppa zalon scsi module. (closes: 401229) urgency high + + * update-initramfs: Add warning for missing initramfs on update mode without + takeover arg. Restructure altered_check, don't delete sha1sum on failure. + Thanks Jurij Smakov for noticing. + + * mkinitramfs: Reduce size of initramfs by keeping 1 busybox copy. + Thanks for the patch input to Russell Coker . + Thanks for the sed rework to Klaus Ita . + (closes: 338405) + + -- maximilian attems Thu, 14 Dec 2006 16:10:06 +0100 + initramfs-tools (0.85c) unstable; urgency=medium Release "Pour être heureux vraiment Faut plus d'gouvernement" diff --git a/hook-functions b/hook-functions index b4cd58d..67f5931 100644 --- a/hook-functions +++ b/hook-functions @@ -194,7 +194,7 @@ auto_add_modules() sata_promise sata_qstor sata_sil sata_sil24 sata_sis sata_svw \ sata_sx4 sata_uli sata_via sata_vsc scsi_mod \ scsi_transport_fc scsi_transport_iscsi scsi_transport_spi \ - sd_mod stex sym53c8xx tmscsim zfcp; do + sd_mod stex sym53c8xx tmscsim zalon zfcp; do manual_add_modules "${x}" done ;; diff --git a/mkinitramfs b/mkinitramfs index 694f423..d187de0 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -228,7 +228,12 @@ if [ "x${BUSYBOX}" = "xn" ]; then else rm -f ${DESTDIR}/bin/sh copy_exec ${BUSYBOXDIR}/busybox /bin/busybox - ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh + rm -f ${DESTDIR}/bin/busybox + cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox + for cmd in `busybox | sed -n '/functions:$/,$p' \ + | sed -e 's/[[:space:]]*//g; s/,$//; s/,/\n/g; /busybox/d'`; do + ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/${cmd} + done fi # Modutils diff --git a/update-initramfs b/update-initramfs index 4b230d0..52e603b 100755 --- a/update-initramfs +++ b/update-initramfs @@ -134,11 +134,13 @@ generate_initramfs() # lilo call run_lilo() { - # suppress errors on test run - lilo -t > /dev/null 2>&1 - if [ $? -eq 0 ]; then - lilo + # show lilo errors on failure + if ! lilo -t > /dev/null 2>&1 ; then + echo "update-initramfs: lilo run failed for ${initramfs}:" + echo + lilo -t fi + lilo } # check if lilo is on mbr @@ -387,14 +389,16 @@ delete() rm -f "${initramfs}" } - +# Check for update mode on existing and modified initramfs altered_check() { - if [ "${takeover}" = 0 ]; then - if ! compare_sha1; then - delete_sha1 - mild_panic "${initramfs} has been altered. Cannot update." - fi + # No check on takeover + [ "${takeover}" = 1 ] && return 0 + if [ ! -e "${initramfs}" ]; then + mild_panic "${initramfs} does not exist. Cannot update." + fi + if ! compare_sha1; then + mild_panic "${initramfs} has been altered. Cannot update." fi } -- cgit v1.2.3 From d21a00a23405d1db81ab05a12342145276ef2af0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 21 Dec 2006 10:18:28 +0100 Subject: - revert busybox hardlinking it's utitilites - add drivers/ata - rework the framebuffer boot script - small docs changes --- debian/changelog | 24 ++++++++++++++++++++++++ hook-functions | 4 ++++ initramfs-tools.8 | 4 ++-- mkinitramfs | 8 ++------ scripts/init-top/framebuffer | 34 +++++++++++++++++++++++----------- 5 files changed, 55 insertions(+), 19 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 394179a..c292a82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,27 @@ +initramfs-tools (0.85e) unstable; urgency=high + + Release "Qu'ils soient rouges, bleus ou blancs Il faudrait mieux les pendre" + + * initramfs-tools.8: Correct copy_exec() example. (closes: 403122) + Add a better dir to copy_modules_dir() example. + + * mkinitramfs: Revert the sed magic busybox hardlinking for size reduction. + Go for functionality. The klibc binaries are better tested and superior + in some cases like sleep. Fixes several boot troubles. Thanks + Benjamí Villoslada for the report. (closes: 403224) + Thanks Jurij Smakov for pinpointing the trouble. + + * hook-functions: Add all drivers/ata drivers to initramfs that exist for + uname >= 2.6.19 (closes: 403309) urgency high. + + * scripts/init-top/framebuffer: Fix syntax by closing the brackets. Handle + options of the form key:value, map kernel bootarg to module name for + matroxfb. Thanks Rob Walker for the patches + (closes: 403667, 403669). Use posix regexes according to review by + Jurij Smakov . Also protect all variables. + + -- maximilian attems Wed, 20 Dec 2006 22:29:51 +0100 + initramfs-tools (0.85d) unstable; urgency=high Release "Le gros ventre qu'engraisse L'suffrage universel" diff --git a/hook-functions b/hook-functions index 67f5931..fe5d31e 100644 --- a/hook-functions +++ b/hook-functions @@ -198,6 +198,9 @@ auto_add_modules() manual_add_modules "${x}" done ;; + ata) + copy_modules_dir kernel/drivers/ata + ;; ieee1394) for x in ohci1394 sbp2; do manual_add_modules "${x}" @@ -218,6 +221,7 @@ auto_add_modules() auto_add_modules net auto_add_modules ide auto_add_modules scsi + auto_add_modules ata auto_add_modules i2o auto_add_modules dasd auto_add_modules ieee1394 diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 690505f..e280ba4 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -189,7 +189,7 @@ initramfs image. .RS .PP .B Example: -copy_modules_dir kernel/drivers/pci/foobar +copy_modules_dir kernel/drivers/ata .RE .SS Including binaries @@ -197,7 +197,7 @@ 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" +copy_exec /sbin/mdadm /sbin .RE mkinitramfs will automatically detect which libraries the executable depends on diff --git a/mkinitramfs b/mkinitramfs index d187de0..0c278d5 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -227,13 +227,9 @@ if [ "x${BUSYBOX}" = "xn" ]; then echo "Warning: Busybox is required for successful boot!" else rm -f ${DESTDIR}/bin/sh - copy_exec ${BUSYBOXDIR}/busybox /bin/busybox rm -f ${DESTDIR}/bin/busybox - cp ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/busybox - for cmd in `busybox | sed -n '/functions:$/,$p' \ - | sed -e 's/[[:space:]]*//g; s/,$//; s/,/\n/g; /busybox/d'`; do - ln -f ${DESTDIR}/bin/busybox ${DESTDIR}/bin/${cmd} - done + copy_exec ${BUSYBOXDIR}/busybox /bin/busybox + ln -s ${BUSYBOXDIR}/busybox ${DESTDIR}/bin/sh fi # Modutils diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer index 044b247..7c080f9 100755 --- a/scripts/init-top/framebuffer +++ b/scripts/init-top/framebuffer @@ -35,20 +35,23 @@ parse_video_opts() local IFS="," # Must be a line like video=:,[opt2]... - if [ "$OPTS" = "${OPTS%%:*}" ]; then + if [ "${OPTS}" = "${OPTS%%:*}" ]; then return fi OPTS="${OPTS#*:}" - for opt in $OPTS; do + for opt in ${OPTS}; do # Already in the "=" form - if [ "$opt" != "${opt#*=}" ]; then + if [ "${opt}" != "${opt#*=}" ]; then echo -n "$opt " + # In the ":" form + elif [ "${opt}" != "${opt#*:}" ]; then + echo -n "${opt%:*}=${opt#*:} " # Presumably a modevalue without the "mode=" prefix - elif [ "$opt" != "${opt#[[:digit:]]*x[[:digit:]]}"; then + elif [ "${opt}" != "${opt#[0-9]*x[0-9]}" ]; then echo -n "mode=$opt " # Presumably a boolean else - echo -n "$opt=1 " + echo -n "${opt}=1 " fi done } @@ -60,7 +63,7 @@ SPLASH=false; VESA=false; for x in $(cat /proc/cmdline); do - case $x in + case ${x} in splash*) FB="vga16fb"; OPTS=""; @@ -72,22 +75,31 @@ for x in $(cat /proc/cmdline); do video=*) FB=${x#*=} FB="${FB%%:*}" - OPTS="$(parse_video_opts "$TMP")" + OPTS="$(parse_video_opts "${x}")" esac done -if [ -n "$FB" ]; then +# Map command line name to module name +case ${FB} in +matroxfb) + FB=matroxfb_base + ;; +*) + ;; +esac + +if [ -n "${FB}" ]; then modprobe -q fbcon - modprobe -q $FB $OPTS + modprobe -q ${FB} ${OPTS} fi if [ -e /proc/fb ]; then while read fbno desc; do - mknod /dev/fb$fbno c 29 $fbno + mknod /dev/fb${fbno} c 29 ${fbno} done < /proc/fb else mknod /dev/fb0 c 29 0 fi for i in 0 1 2 3 4 5 6 7 8; do - mknod /dev/tty$i c 4 $i + mknod /dev/tty${i} c 4 ${i} done -- cgit v1.2.3 From c4343742b3bf028e467ac8a58ead95c9bfefc628 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 2 Apr 2007 13:29:25 +0200 Subject: first prerelease 0.86 + merge 0.85f * kick mdrun script * update control for lenny + ubuntu * add _all_ ide, block and drivers * use MODPROBE_OPTIONS and kill any modprobed arg * small doc + whitespace fixes --- debian/changelog | 60 +++++++++++++++++++++++++++++++++++++++++-- debian/control | 4 +-- debian/script | 2 +- hook-functions | 28 +++++--------------- init | 13 +++++++--- initramfs.conf.5 | 6 ++--- mkinitramfs.8 | 7 ++++- scripts/functions | 8 +++--- scripts/init-premount/thermal | 26 +++++++++---------- scripts/init-top/framebuffer | 7 ++--- scripts/local | 8 +++--- scripts/local-top/lvm | 6 ++--- scripts/local-top/mdrun | 46 --------------------------------- scripts/local-top/udev_helper | 2 +- scripts/nfs | 4 +-- update-initramfs | 24 +++++++++-------- update-initramfs.conf.5 | 4 +-- 17 files changed, 130 insertions(+), 125 deletions(-) delete mode 100755 scripts/local-top/mdrun (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c292a82..07d28d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,59 @@ +initramfs-tools (0.86) experimental; urgency=low + + * update-initramfs: Bound the mode and version variable. (closes: 403905) + Thanks "Nikita V. Youshchenko" for report. + + * init: Set once the MODPROBE_OPTIONS environment variable and export it. + Don't forget to set -b to have the modprobe.d blacklists respected. + Thus remove everywhere the -q modprobe switch. + Thanks Ben Collins for the suggestion. + + * small trailing whitespace cleanup, display full path of kernel-img.conf + in bug script. + + * debian/control: change maintainer entry to new DD mail. :) + Add busybox-initramfs as Ubuntu busybox alternative to depends. + Dropp the sarge busybox-cvs-static entry. + + * scripts/local-top/mdrun: Drop, existed for partial upgrades from sarge. + + * scripts/local: Improve panic message and printed order. (closes: 414640) + Thanks Vincent.McIntyre@csiro.au for patch. + + * scripts/functions: Check if panic is set befor using it. (closes: 406107) + Thanks martin f krafft for report. + + * hook-functions: Copy all kernel/drivers/{block,ide,scsi} subdir modules + instead of hardcoding the list of "supported" drivers. As consequence + the initramfs might be larger, but none of those should be missed. + As bonus syncs with Ubuntu. + + * init: Mount /sys and /proc nodev, noexec, nosuid - Ubuntu sync. + + -- maximilian attems Sat, 17 Mar 2007 21:39:13 +0100 + +initramfs-tools (0.85f) unstable; urgency=high + + Release "Au lieu d'aller voter Casse leur la margoulette" + + * update-initramfs: Grub _doesn't_ clear LILO string in mbr, but the inverse + is done. Fix mbr_check() to first check for GRUB. Fixes accidental lilo + call in the case that Grub is the used bootloader. (closes: 409820) + Thanks Michael Prokop for bringing up the case. + + * initramfs.conf.5, mkinitramfs.5: Fix typos. Document version. + (closes: 405157, 405190, 405194) + + * update-initramfs: Be more screamy about lilo error, people seem to + overlook recent lilo failures. + + * scripts/init-top/framebuffer: Remove unused variables. + + * init: Export ROOTDELAY to let udev boot script handle eventual rootdelay. + downgrades 401916 + + -- maximilian attems Wed, 7 Mar 2007 23:34:17 +0100 + initramfs-tools (0.85e) unstable; urgency=high Release "Qu'ils soient rouges, bleus ou blancs Il faudrait mieux les pendre" @@ -74,7 +130,7 @@ initramfs-tools (0.85b) unstable; urgency=medium urgency medium. * scripts/init-top/framebuffer: Fix regression of /dev/fb0 creation, - modprobe fb before creating device. Thanks to Otavio Salvador + modprobe fb before creating device. Thanks to Otavio Salvador for patch. -- maximilian attems Tue, 14 Nov 2006 08:06:40 +0100 @@ -93,7 +149,7 @@ initramfs-tools (0.85) unstable; urgency=high having a /boot string. (closes: 393906) Thanks for the patch Olli Helenius - * init-top/framebuffer: Fix duplicate fbno0 device creation. Merge the + * init-top/framebuffer: Fix duplicate fbno0 device creation. Merge the 0.69ubuntu10 solution. Thanks Benjamin Leipold for the report. (closes: 393890) diff --git a/debian/control b/debian/control index dd4c3b3..9294ee7 100644 --- a/debian/control +++ b/debian/control @@ -1,14 +1,14 @@ Source: initramfs-tools Section: utils Priority: optional -Uploaders: Jeff Bailey , maximilian attems +Uploaders: Jeff Bailey , maximilian attems Maintainer: Debian kernel team Build-Depends: debhelper (>= 4.1.0), cdbs Standards-Version: 3.7.2.0 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.4.19-2), busybox (>= 1:1.01-3) | busybox-cvs-static (>= 20040623-1), cpio, module-init-tools, udev (>= 0.086-1) +Depends: klibc-utils (>= 1.4.19-2), busybox (>= 1:1.01-3) | busybox-initramfs, cpio, module-init-tools, udev (>= 0.086-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 diff --git a/debian/script b/debian/script index a8e3dd9..7cfac12 100755 --- a/debian/script +++ b/debian/script @@ -15,7 +15,7 @@ lsmod echo if [ -r /etc/kernel-img.conf ]; then - echo "-- kernel-img.conf" + echo "-- /etc/kernel-img.conf" cat /etc/kernel-img.conf echo fi diff --git a/hook-functions b/hook-functions index fe5d31e..f506b49 100644 --- a/hook-functions +++ b/hook-functions @@ -172,35 +172,20 @@ auto_add_modules() done ;; ide) - for x in ide-cd ide-disk ide-generic aec62xx alim15x3 \ - amd74xx atiixp atuuxo cmd64x cs5520 cs5530 cy82c693 \ - generic hpt34x hpt366 it821x jmicron ns87415 opti621 \ - pdc202xx_new pdc202xx_old piix rz1000 sc1200 serverworks \ - siimage sis5513 slc82c105 slc90e66 triflex trm290 \ - via82cxxx; do - manual_add_modules "${x}" - done + copy_modules_dir kernel/drivers/ide ;; scsi) - for x in 3w-9xxx 3w-xxxx a100u2x aacraid advansys ahci \ - aic79xx aic7xxx aic94xx arcmsr ata_piix atari_scsi \ - atp870u BusLogic cciss ch cpqarray DAC960 dc395x \ - dmx3191d dpt_i2o eata fdomain gdth hptiop ibmvscsic \ - initio ipr ips isp1020 lasi700 lpfc max_scsi mac53c94 \ - megaraid megaraid_mbox megaraid_mm megaraid_sas \ - mesh mptfc mptscsih mptsas mptspi nsp32 \ - osst qla1280 qla2100 qla2200 qla2300 qla2322 qla2xxx \ - qla4xxx qla6312 qlogicfas408 qlogicfc sata_mv sata_nv \ - sata_promise sata_qstor sata_sil sata_sil24 sata_sis sata_svw \ - sata_sx4 sata_uli sata_via sata_vsc scsi_mod \ - scsi_transport_fc scsi_transport_iscsi scsi_transport_spi \ - sd_mod stex sym53c8xx tmscsim zalon zfcp; do + copy_modules_dir kernel/drivers/scsi + for x in mptfc mptsas mptscsih mptspi; do manual_add_modules "${x}" done ;; ata) copy_modules_dir kernel/drivers/ata ;; + block) + copy_modules_dir kernel/drivers/block + ;; ieee1394) for x in ohci1394 sbp2; do manual_add_modules "${x}" @@ -221,6 +206,7 @@ auto_add_modules() auto_add_modules net auto_add_modules ide auto_add_modules scsi + auto_add_modules block auto_add_modules ata auto_add_modules i2o auto_add_modules dasd diff --git a/init b/init index fbe32be..4c09fd7 100755 --- a/init +++ b/init @@ -8,8 +8,8 @@ echo "Loading, please wait..." [ -d /proc ] || mkdir /proc [ -d /tmp ] || mkdir /tmp mkdir -p /var/lock -mount -t sysfs none /sys -mount -t proc none /proc +mount -t sysfs none /sys -o nodev, noexec, nosuid +mount -t proc none /proc -o nodev, noexec, nosuid # Note that this only becomes /dev on the real filesystem if udev's scripts # are used; which they will be, but it's worth pointing out @@ -37,7 +37,10 @@ for i in conf/conf.d/*; do done . /scripts/functions -# Parse command line options +# Set modprobe env +export MODPROBE_OPTIONS="-qb" + +# Export relevant variables export break= export init=/sbin/init export quiet=n @@ -45,8 +48,10 @@ export readonly=y export rootmnt=/root export debug= export cryptopts=${CRYPTOPTS} -export panic +export ROOTDELAY= +export panic= +# Parse command line options for x in $(cat /proc/cmdline); do case $x in init=*) diff --git a/initramfs.conf.5 b/initramfs.conf.5 index ca47a02..e685298 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH INITRAMFS.CONF 5 "$Date: 2006/10/12 $" "" "initramfs.conf manual" +.TH INITRAMFS.CONF 5 "$Date: 2007/01/01 $" "" "initramfs.conf manual" .SH NAME initramfs.conf \- configuration file for mkinitramfs @@ -37,14 +37,14 @@ The default setting is \fImost\fP. Include busybox utilities for the boot scripts. If set to 'n' .B mkinitramfs -will build an initramfs whithout busybox. +will build an initramfs without busybox. Beware that many boot scripts need busybox utilities. .SH NFS VARIABLES .TP \fB BOOT 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). +The default is to boot from \fIlocal\fP media (harddrive, USB stick). Set to \fInfs\fP for an NFS root share. .TP diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 23e719f..6d81233 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS 8 "$Date: 2006/10/12 $" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "$Date: 2007/01/02 $" "" "mkinitramfs manual" .SH NAME mkinitramfs \- generate an initramfs image @@ -58,6 +58,11 @@ Override the setting in .IR initramfs.conf . +.TP +\fI version +Set the kernel version of the initramfs image +(defaults to the running kernel). + .TP \fB\-\-supported-host-version=\fIhversion This option queries if mkinitramfs can create ramdisks on a running kernel of version diff --git a/scripts/functions b/scripts/functions index 7e67771..7ae9c78 100644 --- a/scripts/functions +++ b/scripts/functions @@ -60,11 +60,11 @@ panic() /sbin/usplash_write "QUIT" fi # Disallow console access - if [ "${panic}" = 0 ]; then + if [ -n "${panic}" ] && [ "${panic}" = 0 ]; then reboot fi - modprobe -q i8042 - modprobe -q atkbd + modprobe i8042 + modprobe atkbd echo $@ PS1='(initramfs) ' /bin/sh -i /dev/console 2>&1 } @@ -206,7 +206,7 @@ load_modules() if [ "$com" = "#" ]; then continue fi - modprobe -q $m + modprobe $m done fi } diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index bfea1fc..aa146ec 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -18,20 +18,20 @@ esac case "$DPKG_ARCH" in # load the right modules powerpc|ppc64) - modprobe -q i2c-powermac - modprobe -q therm_pm72 - modprobe -q windfarm_cpufreq_clamp - modprobe -q windfarm_lm75_sensor - modprobe -q windfarm_max6690_sensor - modprobe -q windfarm_pm112 - modprobe -q windfarm_pm81 - modprobe -q windfarm_pm91 - modprobe -q windfarm_smu_controls - modprobe -q windfarm_smu_sat - modprobe -q windfarm_smu_sensors + modprobe i2c-powermac + modprobe therm_pm72 + modprobe windfarm_cpufreq_clamp + modprobe windfarm_lm75_sensor + modprobe windfarm_max6690_sensor + modprobe windfarm_pm112 + modprobe windfarm_pm81 + modprobe windfarm_pm91 + modprobe windfarm_smu_controls + modprobe windfarm_smu_sat + modprobe windfarm_smu_sensors ;; i386|amd64|ia64) - modprobe -q fan - modprobe -q thermal + modprobe fan + modprobe thermal ;; esac diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer index 7c080f9..c680409 100755 --- a/scripts/init-top/framebuffer +++ b/scripts/init-top/framebuffer @@ -59,9 +59,6 @@ parse_video_opts() FB="" OPTS="" -SPLASH=false; -VESA=false; - for x in $(cat /proc/cmdline); do case ${x} in splash*) @@ -89,8 +86,8 @@ matroxfb) esac if [ -n "${FB}" ]; then - modprobe -q fbcon - modprobe -q ${FB} ${OPTS} + modprobe fbcon + modprobe ${FB} ${OPTS} fi if [ -e /proc/fb ]; then diff --git a/scripts/local b/scripts/local index f4079d5..4e01472 100644 --- a/scripts/local +++ b/scripts/local @@ -40,9 +40,9 @@ mountroot () # We've given up, but we'll let the user fix matters if they can while [ ! -e "${ROOT}" ]; do - echo " Check root= bootarg cat /proc/cmdline" - echo " or missing modules, devices: cat /proc/modules ls /dev" - panic "ALERT! ${ROOT} does not exist. Dropping to a shell!" + echo "ALERT! ${ROOT} does not exist. Dropping to a shell!" + echo " Check your root= boot argument (cat /proc/cmdline)" + panic " Check for missing modules (cat /proc/modules), or device files (ls /dev)" done # Get the root filesystem type if not set @@ -67,7 +67,7 @@ mountroot () fi # FIXME This has no error checking - modprobe -q ${FSTYPE} + modprobe ${FSTYPE} # FIXME This has no error checking # Mount root diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm index 27053de..4cf48ad 100755 --- a/scripts/local-top/lvm +++ b/scripts/local-top/lvm @@ -64,9 +64,9 @@ if [ ! -e /sbin/vgchange ]; then exit 0 fi -modprobe -q dm-mod -modprobe -q dm-snapshot -modprobe -q dm-mirror +modprobe dm-mod +modprobe dm-snapshot +modprobe dm-mirror activate_vg "$ROOT" activate_vg "$resume" diff --git a/scripts/local-top/mdrun b/scripts/local-top/mdrun deleted file mode 100755 index f733656..0000000 --- a/scripts/local-top/mdrun +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -PREREQ="udev_helper" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -if [ -e /scripts/local-top/mdadm ]; then - exit 0 -fi - -unset raidlvl -gotraid=n - -# Detect raid level -for x in /dev/hd[a-z][0-9]* /dev/sd[a-z][0-9]*; do - if [ ! -e ${x} ]; then - continue - fi - raidlvl=$(mdadm --examine ${x} 2>/dev/null | grep "Level" | sed -e 's/.*Raid Level : \(.*\)/\1/') - if [ "$raidlvl" ]; then - modprobe -q ${raidlvl} 2>/dev/null - gotraid=y - fi -done - -[ "${gotraid}" = y ] || exit - -# source the presumed root md and it's info -. ./conf/mdrun.conf - -# assemble root raid first due to initrd-tools compatibility -mdadm -A ${rootraiddev} -R -u $uuid $devices - -# assemble all raid devices -/sbin/mdrun /dev diff --git a/scripts/local-top/udev_helper b/scripts/local-top/udev_helper index 2d4c209..c1694b7 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 ide-generic fi diff --git a/scripts/nfs b/scripts/nfs index fc869cc..5eb17bf 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -78,9 +78,9 @@ mountroot() run_scripts /scripts/nfs-top [ "$quiet" != "y" ] && log_end_msg - modprobe -q nfs + modprobe nfs # For DHCP - modprobe -q af_packet + modprobe af_packet # Default delay is around 180s # FIXME: add usplash_write info diff --git a/update-initramfs b/update-initramfs index 52e603b..a676fe9 100755 --- a/update-initramfs +++ b/update-initramfs @@ -4,6 +4,8 @@ STATEDIR=/var/lib/initramfs-tools BOOTDIR=/boot CONF=/etc/initramfs-tools/update-initramfs.conf KPKGCONF=/etc/kernel-img.conf +mode="" +version="" set -e @@ -136,7 +138,7 @@ run_lilo() { # show lilo errors on failure if ! lilo -t > /dev/null 2>&1 ; then - echo "update-initramfs: lilo run failed for ${initramfs}:" + echo "Error lilo fails for new ${initramfs}:" echo lilo -t fi @@ -146,6 +148,16 @@ run_lilo() # check if lilo is on mbr mbr_check() { + # try to discover grub and be happy + [ -r /boot/grub/menu.lst ] \ + && groot=$(awk '/^root/{print substr($2, 2, 3); exit}' \ + /boot/grub/menu.lst) + [ -e /boot/grub/device.map ] && [ -n "${groot}" ] \ + && dev=$(awk "/${groot}/{ print \$NF}" /boot/grub/device.map) + [ -n "${dev}" ] && [ -r ${dev} ] \ + && dd if="${dev}" bs=512 skip=0 count=1 2> /dev/null \ + | grep -q GRUB && return 0 + # check out lilo.conf for validity boot=$(awk -F = '/^boot=/{ print $2}' /etc/lilo.conf) [ -z "${boot}" ] && return 0 @@ -162,16 +174,6 @@ mbr_check() dd if="${boot}" bs=512 skip=0 count=1 2> /dev/null | grep -q LILO \ && run_lilo && return 0 - # try to discover grub and be happy - [ -r /boot/grub/menu.lst ] \ - && groot=$(awk '/^root/{print substr($2, 2, 3); exit}' \ - /boot/grub/menu.lst) - [ -e /boot/grub/device.map ] && [ -n "${groot}" ] \ - && dev=$(awk "/${groot}/{ print \$NF}" /boot/grub/device.map) - [ -n "${dev}" ] && [ -r ${dev} ] \ - && dd if="${dev}" bs=512 skip=0 count=1 2> /dev/null \ - | grep -q GRUB && return 0 - # no idea which bootloader is used echo echo "WARNING: grub and lilo installed." diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 index 30ef6d0..50e1f95 100644 --- a/update-initramfs.conf.5 +++ b/update-initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS.CONF 5 "$Date: 2006/10/12 $" "" "update-initramfs.conf manual" +.TH UPDATE-INITRAMFS.CONF 5 "$Date: 2006/12/22 $" "" "update-initramfs.conf manual" .SH NAME update-initramfs.conf \- configuration file for update-initramfs @@ -13,7 +13,7 @@ The configuration file allows to disable the update action from 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 +conservative manners needs to be applied. This disables the \fBupdate_initramfs -u\fP call. .SH AUTHOR -- cgit v1.2.3 From 5dfd85f416a10b1c41ca7005de38b58715c04472 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 2 Apr 2007 15:04:41 +0200 Subject: update-initramfs: restore_initramfs restore initramfs on failure path --- debian/changelog | 6 +++++- update-initramfs | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 07d28d0..3c7cdb8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,7 +30,11 @@ initramfs-tools (0.86) experimental; urgency=low * init: Mount /sys and /proc nodev, noexec, nosuid - Ubuntu sync. - -- maximilian attems Sat, 17 Mar 2007 21:39:13 +0100 + * update-initramfs: If update-initramfs fails, restore the backup. + Useful if a MINKVER set is not fulfilled. (LP: #101844) + Thanks Soren Hansen for patch. + + -- maximilian attems Mon, 2 Apr 2007 15:01:59 +0200 initramfs-tools (0.85f) unstable; urgency=high diff --git a/update-initramfs b/update-initramfs index a676fe9..9d2b03e 100755 --- a/update-initramfs +++ b/update-initramfs @@ -113,6 +113,15 @@ backup_booted_initramfs() rm -f ${initramfs_bak} } +# restore initramfs backup +restore_initramfs() +{ + [ -z "${initramfs_bak}" ] && return 0 + mv -f "${initramfs_bak}" "${initramfs}" + verbose "Restoring ${initramfs_bak}" +} + + generate_initramfs() { echo "update-initramfs: Generating ${initramfs}" @@ -124,6 +133,7 @@ generate_initramfs() set_sha1 else mkinitramfs_return="$?" + restore_initramfs if [ "$mkinitramfs_return" = "2" ]; then # minversion wasn't met, exit 0 exit 0 -- cgit v1.2.3 From 1eaf8424e56e3f52c60420ce68efdef5301a47d8 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 2 Apr 2007 20:21:34 +0200 Subject: bootfixes: mount args don't like spaces restore_initramfs(): verbose output before action --- debian/changelog | 2 +- init | 4 ++-- update-initramfs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3c7cdb8..e4c7b70 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,7 +34,7 @@ initramfs-tools (0.86) experimental; urgency=low Useful if a MINKVER set is not fulfilled. (LP: #101844) Thanks Soren Hansen for patch. - -- maximilian attems Mon, 2 Apr 2007 15:01:59 +0200 + -- maximilian attems Mon, 2 Apr 2007 20:20:29 +0200 initramfs-tools (0.85f) unstable; urgency=high diff --git a/init b/init index 4c09fd7..00e0dcf 100755 --- a/init +++ b/init @@ -8,8 +8,8 @@ echo "Loading, please wait..." [ -d /proc ] || mkdir /proc [ -d /tmp ] || mkdir /tmp mkdir -p /var/lock -mount -t sysfs none /sys -o nodev, noexec, nosuid -mount -t proc none /proc -o nodev, noexec, nosuid +mount -t sysfs none /sys -o nodev,noexec,nosuid +mount -t proc none /proc -o nodev,noexec,nosuid # Note that this only becomes /dev on the real filesystem if udev's scripts # are used; which they will be, but it's worth pointing out diff --git a/update-initramfs b/update-initramfs index 9d2b03e..f4c637b 100755 --- a/update-initramfs +++ b/update-initramfs @@ -117,8 +117,8 @@ backup_booted_initramfs() restore_initramfs() { [ -z "${initramfs_bak}" ] && return 0 - mv -f "${initramfs_bak}" "${initramfs}" verbose "Restoring ${initramfs_bak}" + mv -f "${initramfs_bak}" "${initramfs}" } -- cgit v1.2.3 From e5bc704cb8be07ecdd419f3630f8ce98129615c0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 2 Apr 2007 22:47:52 +0200 Subject: cleanup initramfs-tools.preinst from conffile move better test for $RESUME handling --- debian/changelog | 6 +++++- debian/initramfs-tools.preinst | 16 +--------------- 2 files changed, 6 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e4c7b70..509e41b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -34,7 +34,11 @@ initramfs-tools (0.86) experimental; urgency=low Useful if a MINKVER set is not fulfilled. (LP: #101844) Thanks Soren Hansen for patch. - -- maximilian attems Mon, 2 Apr 2007 20:20:29 +0200 + * initramfs-tools.preinst: Test if $RESUME is nonzero, not if it exists, + fixes issue of UUID resume dev. (LP: #67932) While there remove the + conffile mv handling of 0.61. + + -- maximilian attems Mon, 2 Apr 2007 22:43:33 +0200 initramfs-tools (0.85f) unstable; urgency=high diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index aa8c8ca..1379766 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -15,7 +15,7 @@ case "$1" in if [ -e /etc/mkinitrd/mkinitrd.conf ]; then . /etc/mkinitrd/mkinitrd.conf fi - if [ -e ${RESUME} ]; then + if [ -n "${RESUME}" ]; then echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume fi @@ -40,20 +40,6 @@ case "$1" in cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml fi ;; - upgrade) - if [ -n "$2" ] && dpkg --compare-versions "$2" lt "0.61"; then - if [ -d /etc/initramfs-tools ]; then - echo - echo "Warning: /etc/initramfs-tools already exists." - echo " Please remove it for upgrade." - echo - exit 1 - fi - if [ -d /etc/mkinitramfs ]; then - mv /etc/mkinitramfs /etc/initramfs-tools - fi - fi - ;; esac #DEBHELPER# -- cgit v1.2.3 From 60ee14df535436fc3dfc537017ba944f62e559ae Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 5 Apr 2007 21:48:20 +0200 Subject: scripts/functions, mkinitramfs: better backup file handling * don't panick on backup files on boot, just ignore them * don't include backup file in initramfs * cleanup changelog this is quite a fundamental change need to double check that it works on nfs root too.. :) --- debian/changelog | 20 +++++++++++++++----- mkinitramfs | 20 ++++++++++++++------ scripts/functions | 12 ++++++++++++ update-initramfs | 2 +- 4 files changed, 42 insertions(+), 12 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 509e41b..1f972ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,6 @@ -initramfs-tools (0.86) experimental; urgency=low +initramfs-tools (0.86) UNRELEASED; urgency=low * update-initramfs: Bound the mode and version variable. (closes: 403905) - Thanks "Nikita V. Youshchenko" for report. * init: Set once the MODPROBE_OPTIONS environment variable and export it. Don't forget to set -b to have the modprobe.d blacklists respected. @@ -20,12 +19,12 @@ initramfs-tools (0.86) experimental; urgency=low * scripts/local: Improve panic message and printed order. (closes: 414640) Thanks Vincent.McIntyre@csiro.au for patch. - * scripts/functions: Check if panic is set befor using it. (closes: 406107) + * scripts/functions: Check if panic is set before using it. (closes: 406107) Thanks martin f krafft for report. * hook-functions: Copy all kernel/drivers/{block,ide,scsi} subdir modules instead of hardcoding the list of "supported" drivers. As consequence - the initramfs might be larger, but none of those should be missed. + the initramfs might be larger, but none of those should be missed! As bonus syncs with Ubuntu. * init: Mount /sys and /proc nodev, noexec, nosuid - Ubuntu sync. @@ -38,7 +37,18 @@ initramfs-tools (0.86) experimental; urgency=low fixes issue of UUID resume dev. (LP: #67932) While there remove the conffile mv handling of 0.61. - -- maximilian attems Mon, 2 Apr 2007 22:43:33 +0200 + * scripts/functions: set_initlist() needs to add only script names with + alphabetics, numerics and underscores - skip any other. Bad enough + backup scripts get added, but they shouldn't lead to a panic. Also skip + directories that might lay around. (closes: 398347) (LP: #76131) + + * mkinitramfs: Don't add backup scripts to initramfs. (closes: 378682) + (LP: #78348) + + * scripts/functions: run_scripts() return immediately if passed dir + does not exist. Empty dirs without boot script aren't created anymore. + + -- maximilian attems Thu, 5 Apr 2007 21:16:45 +0200 initramfs-tools (0.85f) unstable; urgency=high diff --git a/mkinitramfs b/mkinitramfs index 0c278d5..c348516 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -199,13 +199,21 @@ ln -s /lib/klibc-*.so ${DESTDIR}/lib rm -f ${DESTDIR}/bin/kinit ${DESTDIR}/bin/gzip copy_exec /usr/share/initramfs-tools/init /init -cp -a /usr/share/initramfs-tools/scripts/* "${DESTDIR}/scripts" -for f in $(cd ${CONFDIR}/scripts && \ - find . \( -name '*.dpkg*' -prune -o -name '*~' -prune \) \ - -o -type f -print); do - mkdir --parents "${DESTDIR}/scripts/$(dirname "${f}")" -cp -p "${CONFDIR}/scripts/${f}" "${DESTDIR}/scripts/$(dirname "${f}")" + +# add existant boot scripts +for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ + -regex '.*/[a-z0-9_]+$' -type f); do + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ + || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "/usr/share/initramfs-tools/scripts/${b}" \ + "${DESTDIR}/scripts/$(dirname "${b}")" +done +for b in $(cd "${CONFDIR}/scripts" && find . -regex '.*/[a-z0-9_]+$' -type f); do + [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ + || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")" done + echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf copy_exec "${CONFDIR}/initramfs.conf" /conf for i in ${EXTRA_CONF}; do diff --git a/scripts/functions b/scripts/functions index 7ae9c78..d8e0411 100644 --- a/scripts/functions +++ b/scripts/functions @@ -85,9 +85,20 @@ set_initlist() { unset initlist for si_x in ${initdir}/*; do + # only allow variable name chars + case ${si_x#${initdir}/} in + *[!A-Za-z0-9_]*) + continue + ;; + esac + # skip non executable scripts if [ ! -x ${si_x} ]; then continue fi + # skip directories + if [ -d ${si_x} ]; then + continue + fi initlist="${initlist} ${si_x#${initdir}/}" done } @@ -187,6 +198,7 @@ call_scripts() run_scripts() { initdir=${1} + [ ! -d ${initdir} ] && return get_prereqs reduce_prereqs call_scripts diff --git a/update-initramfs b/update-initramfs index f4c637b..3c67f89 100755 --- a/update-initramfs +++ b/update-initramfs @@ -148,7 +148,7 @@ run_lilo() { # show lilo errors on failure if ! lilo -t > /dev/null 2>&1 ; then - echo "Error lilo fails for new ${initramfs}:" + echo "ERROR lilo fails for new ${initramfs}:" echo lilo -t fi -- cgit v1.2.3 From b40436b200c024167cc289b63a2edb456a6cb258 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 6 Apr 2007 19:49:16 +0200 Subject: merge 0.85g security upload: fixes permissions of created device /dev/root for lilo boots: brw------- 1 root root 8, 1 2007-04-06 09:28 /dev/root note: this is on trunk aka master, need to create etch branch too. --- debian/changelog | 16 +++++++++++++--- scripts/functions | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1f972ed..9e4031b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,9 +10,8 @@ initramfs-tools (0.86) UNRELEASED; urgency=low * small trailing whitespace cleanup, display full path of kernel-img.conf in bug script. - * debian/control: change maintainer entry to new DD mail. :) - Add busybox-initramfs as Ubuntu busybox alternative to depends. - Dropp the sarge busybox-cvs-static entry. + * debian/control: Add busybox-initramfs as Ubuntu busybox alternative + to depends. Drop the sarge busybox-cvs-static entry. * scripts/local-top/mdrun: Drop, existed for partial upgrades from sarge. @@ -50,6 +49,17 @@ initramfs-tools (0.86) UNRELEASED; urgency=low -- maximilian attems Thu, 5 Apr 2007 21:16:45 +0200 +initramfs-tools (0.85g) unstable; urgency=high + + * SECURITY scripts/functions: Set permission of created root dev in + parse_numeric() to 600. This bug only affects lilo boots. Thanks + Fabian Pietsch and Goswin von Brederlow + for patch input. (closes: 417995) + + * debian/control: Change Uploaders email. + + -- maximilian attems Fri, 6 Apr 2007 09:19:13 +0200 + initramfs-tools (0.85f) unstable; urgency=high Release "Au lieu d'aller voter Casse leur la margoulette" diff --git a/scripts/functions b/scripts/functions index d8e0411..183b9f2 100644 --- a/scripts/functions +++ b/scripts/functions @@ -244,5 +244,6 @@ parse_numeric() { esac mknod /dev/root b ${major} ${minor} + chmod 600 /dev/root ROOT=/dev/root } -- cgit v1.2.3 From 5182887b98795207caa1d2142cba0b4bc9e0aec0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 6 Apr 2007 23:00:58 +0200 Subject: mkinitramfs: set PATH with sbin allows non-root user creation of initramfs :) --- debian/changelog | 8 ++++++-- mkinitramfs | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9e4031b..73466c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -44,10 +44,14 @@ initramfs-tools (0.86) UNRELEASED; urgency=low * mkinitramfs: Don't add backup scripts to initramfs. (closes: 378682) (LP: #78348) - * scripts/functions: run_scripts() return immediately if passed dir + * scripts/functions: run_scripts() return immediately if passed dir does not exist. Empty dirs without boot script aren't created anymore. - -- maximilian attems Thu, 5 Apr 2007 21:16:45 +0200 + * mkinitramfs: Set PATH with /sbin to allow non-root user usage. + Thanks Bob Montgomery for the suggestion. + (closes: 409995) + + -- maximilian attems Fri, 6 Apr 2007 22:40:56 +0200 initramfs-tools (0.85g) unstable; urgency=high diff --git a/mkinitramfs b/mkinitramfs index c348516..17e1846 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -1,6 +1,7 @@ #!/bin/sh umask 0022 +export PATH='/usr/bin:/sbin:/bin' # Defaults keep="n" -- cgit v1.2.3 From 8fa4b2cc032423e0f93e3f6591d0676c2146e051 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 8 Apr 2007 00:25:11 +0200 Subject: debian/copyright: general update with current authors + git tree location --- debian/changelog | 5 ++++- debian/copyright | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 73466c0..c440f5d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,11 +47,14 @@ initramfs-tools (0.86) UNRELEASED; urgency=low * scripts/functions: run_scripts() return immediately if passed dir does not exist. Empty dirs without boot script aren't created anymore. + * debian/copyright: Update my email, add Ben Collins, update years, + alphabetic authors sort + add new git tree location. + * mkinitramfs: Set PATH with /sbin to allow non-root user usage. Thanks Bob Montgomery for the suggestion. (closes: 409995) - -- maximilian attems Fri, 6 Apr 2007 22:40:56 +0200 + -- maximilian attems Sun, 8 Apr 2007 00:20:20 +0200 initramfs-tools (0.85g) unstable; urgency=high diff --git a/debian/copyright b/debian/copyright index 396499f..b75f009 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,7 +1,7 @@ This package was debianized by Jeff Bailey on Thu, 27 Jan 2005 15:23:52 -0500. -The current Debian maintainer is maximilian attems +The current Debian maintainer is maximilian attems The source code up to 0.31 can be found by using "bzr" at: http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools @@ -9,17 +9,21 @@ http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools The current ubuntu release can be found at: http://archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/ -The Debian tree is maintained with "bzr" at: -http://bzr.debian.org/kernel/initramfs-tools/ +The Debian tree is maintained with "git" at: +git://git.debian.org/git/kernel/initramfs-tools.git +http://git.debian.org/?p=kernel/initramfs-tools.git;a=shortlog -Authors: Jeff Bailey , Adam Conrad , +Authors: Adam Conrad , + Ben Collins , + Jeff Bailey , + maximilian attems Scott James Remnant , - maximilian attems -Copyright: 2005 Jeff Bailey - 2005 - 2006 Adam Conrad +Copyright: 2005 - 2006 Adam Conrad + 2006 Ben Collins + 2005 Jeff Bailey + 2005 - 2007 maximilian attems 2005 - 2006 Scott James Remnant - 2005 - 2006 maximilian attems License: -- cgit v1.2.3 From 1566c7599d021a09179bc59ef39e07f80e542c99 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 9 Apr 2007 00:10:24 +0200 Subject: man initramfs-tools document valid script names --- debian/changelog | 4 +++- initramfs-tools.8 | 9 ++++----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c440f5d..37729e2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -41,6 +41,8 @@ initramfs-tools (0.86) UNRELEASED; urgency=low backup scripts get added, but they shouldn't lead to a panic. Also skip directories that might lay around. (closes: 398347) (LP: #76131) + * initramfs-tools.8: Document valid script names. + * mkinitramfs: Don't add backup scripts to initramfs. (closes: 378682) (LP: #78348) @@ -54,7 +56,7 @@ initramfs-tools (0.86) UNRELEASED; urgency=low Thanks Bob Montgomery for the suggestion. (closes: 409995) - -- maximilian attems Sun, 8 Apr 2007 00:20:20 +0200 + -- maximilian attems Mon, 9 Apr 2007 00:08:11 +0200 initramfs-tools (0.85g) unstable; urgency=high diff --git a/initramfs-tools.8 b/initramfs-tools.8 index e280ba4..c102de0 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -1,4 +1,4 @@ -.TH INITRAMFS-TOOLS 8 "Date: 2006/10/14" "" "mkinitramfs script overview" +.TH INITRAMFS-TOOLS 8 "Date: 2007/04/09" "" "mkinitramfs script overview" .SH NAME initramfs-tools \- an introduction to writing scripts for mkinitramfs @@ -9,6 +9,9 @@ will be used during different phases of execution. Each of these will be discussed separately below with the help of an imaginary tool which performs a frobnication of a lvm partition prior to mounting the root partition. +Valid boot and hook scripts names consist solely of alphabetics, numerics +and underscores. Other scripts are discarded. + .SS Hook scripts These are used when an initramfs image is created and not included in the image itself. They can however cause files to be included in the image. @@ -18,10 +21,6 @@ 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. -initramfs-tools uses shell variable names for handling dependencies. -Notice that `-' is not a valid shell variable name and thus should -not be used as script filename. - .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 -- cgit v1.2.3 From f2a9e65d56ffecb19a4615ff6c78c1f9ef0a336d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 10 Apr 2007 21:52:30 +0200 Subject: 0.86 release --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 37729e2..6aa6359 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.86) UNRELEASED; urgency=low +initramfs-tools (0.86) unstable; urgency=low * update-initramfs: Bound the mode and version variable. (closes: 403905) @@ -56,7 +56,7 @@ initramfs-tools (0.86) UNRELEASED; urgency=low Thanks Bob Montgomery for the suggestion. (closes: 409995) - -- maximilian attems Mon, 9 Apr 2007 00:08:11 +0200 + -- maximilian attems Tue, 10 Apr 2007 21:45:36 +0200 initramfs-tools (0.85g) unstable; urgency=high -- cgit v1.2.3 From fdbdb7193427633c6ac8574f5416058b3b70e305 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 11 Apr 2007 00:16:23 +0200 Subject: scripts/functions: fix cicular dep panic due to non-working prereqs check prereqs with the same set of checks for valid boot scripts --- debian/changelog | 8 ++++++++ scripts/functions | 13 ++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6aa6359..0da1fed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.87) UNRELEASED; urgency=low + + * scripts/functions: reduce_satisfied() needs to ignore the same set as + set_initlist() otherwise an script having a prereqs on a non-executable + boot script may cause circular panic. (closes: 418509) + + -- maximilian attems Wed, 11 Apr 2007 00:07:18 +0200 + initramfs-tools (0.86) unstable; urgency=low * update-initramfs: Bound the mode and version variable. (closes: 403905) diff --git a/scripts/functions b/scripts/functions index 183b9f2..00fcf3d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -108,7 +108,18 @@ reduce_satisfied() deplist="$(render array_${1})" unset tmpdeplist for rs_y in ${deplist}; do - if [ ! -f ${initdir}/${rs_y} ]; then + # only allow variable name chars + case ${rs_y} in + *[!A-Za-z0-9_]*) + continue + ;; + esac + # skip non executable scripts + if [ ! -x ${initdir}/${rs_y} ]; then + continue + fi + # skip directories + if [ -d ${initdir}/${rs_y} ]; then continue fi tmpdeplist="${tmpdeplist} ${rs_y}" -- cgit v1.2.3 From 1541218fe148cfae9c3a4ce84e7fd6692f3d2028 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Thu, 12 Apr 2007 21:56:32 +0200 Subject: Add support for loading keymaps. (closes: 337663) --- conf/initramfs.conf | 9 ++++++++ debian/changelog | 6 +++++- hooks/keymap | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ initramfs.conf.5 | 7 +++++++ mkinitramfs | 1 + scripts/init-top/keymap | 27 ++++++++++++++++++++++++ 6 files changed, 104 insertions(+), 1 deletion(-) create mode 100755 hooks/keymap create mode 100755 scripts/init-top/keymap (limited to 'debian') diff --git a/conf/initramfs.conf b/conf/initramfs.conf index b0d1dc0..0620d26 100644 --- a/conf/initramfs.conf +++ b/conf/initramfs.conf @@ -17,6 +17,7 @@ MODULES=most +# # BUSYBOX: [ y | n ] # # Use busybox if available. @@ -24,6 +25,14 @@ MODULES=most BUSYBOX=y +# +# KEYMAP: [ y | n ] +# +# Load a keymap during the initramfs stage. +# + +KEYMAP=n + # # NFS Section of the config. # diff --git a/debian/changelog b/debian/changelog index 0da1fed..f224405 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,14 @@ initramfs-tools (0.87) UNRELEASED; urgency=low + [ maximilian attems ] * scripts/functions: reduce_satisfied() needs to ignore the same set as set_initlist() otherwise an script having a prereqs on a non-executable boot script may cause circular panic. (closes: 418509) - -- maximilian attems Wed, 11 Apr 2007 00:07:18 +0200 + [ David Härdeman ] + * Add support for loading keymaps. (closes: 337663) + + -- David Härdeman Thu, 12 Apr 2007 21:28:45 +0200 initramfs-tools (0.86) unstable; urgency=low diff --git a/hooks/keymap b/hooks/keymap new file mode 100755 index 0000000..749f24c --- /dev/null +++ b/hooks/keymap @@ -0,0 +1,55 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hook to load keymaps into the initramfs if requested by KEYMAP="y" +if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then + exit 0 +fi + +# Step 1 - Basic tools +if [ ! -x /bin/loadkeys ] || [ ! -r /etc/console/boottime.kmap.gz ]; then + exit 0 +fi + +. /usr/share/initramfs-tools/hook-functions +copy_exec /bin/loadkeys /bin +cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc + +# Step 2 - Check for UTF8 console +if [ ! -x /usr/bin/kbd_mode ]; then + exit 0 +fi + +if [ -r /etc/environment ]; then + env="/etc/environment" +elif [ -r /etc/default/locale ]; then + env="/etc/default/locale" +else + exit 0 +fi + +for var in LANG LC_ALL LC_CTYPE; do + value=$(egrep "^[^#]*${var}=" $env | tail -n1 | cut -d= -f2) + eval $var=$value +done + +charmap=$(LANG=$LANG LC_ALL=$LC_ALL LC_CTYPE=$LC_CTYPE locale charmap) +if [ "$charmap" = "UTF-8" ]; then + copy_exec /usr/bin/kbd_mode /bin +fi +exit 0 + diff --git a/initramfs.conf.5 b/initramfs.conf.5 index e685298..55d6629 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -40,6 +40,13 @@ If set to 'n' will build an initramfs without busybox. Beware that many boot scripts need busybox utilities. +.TP +\fB KEYMAP +If set to 'y', the console keymap will be loaded during the initramfs stage. +The keymap will anyway be loaded by the initscripts later, and the packages +that might need input will normally set this variable automatically, so there +should normally be no need to set this. + .SH NFS VARIABLES .TP \fB BOOT diff --git a/mkinitramfs b/mkinitramfs index 17e1846..7d73ba1 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -163,6 +163,7 @@ export CONFDIR export DESTDIR export DPKG_ARCH export verbose +export KEYMAP # Private, used by 'catenate_cpiogz'. export __TMPCPIOGZ diff --git a/scripts/init-top/keymap b/scripts/init-top/keymap new file mode 100755 index 0000000..f011abf --- /dev/null +++ b/scripts/init-top/keymap @@ -0,0 +1,27 @@ +#!/bin/sh + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +OPTS="-q" + +# Should terminal be in UTF8 mode? +if [ -x /bin/kbd_mode ]; then + /bin/kbd_mode -u + OPTS="${OPTS} -u" +fi + +# Load custom keymap +if [ -x /bin/loadkeys -a -r /etc/boottime.kmap.gz ]; then + loadkeys ${OPTS} /etc/boottime.kmap.gz +fi -- cgit v1.2.3 From 976a23c3d0a4fb156f4e069ff2bbde7c3daa6927 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Thu, 12 Apr 2007 23:59:40 +0200 Subject: I am apparently supposed to add myself to the uploaders field... --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 9294ee7..b515c49 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: initramfs-tools Section: utils Priority: optional -Uploaders: Jeff Bailey , maximilian attems +Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team Build-Depends: debhelper (>= 4.1.0), cdbs Standards-Version: 3.7.2.0 -- cgit v1.2.3 From 878b47192bc92fcfe78f34134a8aea70afc161f5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 13 Apr 2007 01:25:53 +0200 Subject: Add support for a blacklist boot parameter. disallows modules loading inside of the initramfs. --- debian/changelog | 5 ++++- init | 4 ++++ initramfs-tools.8 | 5 +++++ scripts/init-premount/blacklist | 25 +++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 scripts/init-premount/blacklist (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f224405..d86408d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,11 +4,14 @@ initramfs-tools (0.87) UNRELEASED; urgency=low * scripts/functions: reduce_satisfied() needs to ignore the same set as set_initlist() otherwise an script having a prereqs on a non-executable boot script may cause circular panic. (closes: 418509) + * Add blacklist boot param, disabling the load of specific modules inside + the initramfs. Still needs to be passed via tmpfs to the rootfs. [ David Härdeman ] * Add support for loading keymaps. (closes: 337663) - -- David Härdeman Thu, 12 Apr 2007 21:28:45 +0200 + + -- maximilian attems Fri, 13 Apr 2007 01:22:56 +0200 initramfs-tools (0.86) unstable; urgency=low diff --git a/init b/init index 00e0dcf..b115cd1 100755 --- a/init +++ b/init @@ -50,6 +50,7 @@ export debug= export cryptopts=${CRYPTOPTS} export ROOTDELAY= export panic= +export blacklist= # Parse command line options for x in $(cat /proc/cmdline); do @@ -125,6 +126,9 @@ for x in $(cat /proc/cmdline); do break) break=premount ;; + blacklist=*) + blacklist=${x#blacklist=} + ;; esac done diff --git a/initramfs-tools.8 b/initramfs-tools.8 index c102de0..526899f 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -89,6 +89,11 @@ mounts the rootfs read-only. \fB \fI rw mounts the rootfs read-write. +.TP +\fB \fI blacklist +disables load of specific modules. +Use blacklist=module1,module2,module3 bootparameter. + .TP \fB \fI panic sets an timeout on panic. Currently only zero value supported. diff --git a/scripts/init-premount/blacklist b/scripts/init-premount/blacklist new file mode 100755 index 0000000..1dd9dbc --- /dev/null +++ b/scripts/init-premount/blacklist @@ -0,0 +1,25 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# sanity check +[ -z "${blacklist}" ] && exit 0 + +# write blacklist to modprobe.d +IFS=',' +for b in ${blacklist}; do + echo "blacklist $b" >> /etc/modprobe.d/initramfs +done -- cgit v1.2.3 From 16fac6738535e973cfe1493f1b9b5c67c5150ffc Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Fri, 13 Apr 2007 20:11:21 +0200 Subject: Use -Qb for for module loading to honor blacklists. --- debian/changelog | 5 +++-- scripts/init-premount/thermal | 4 ++-- scripts/local | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d86408d..c0f652b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,9 +9,10 @@ initramfs-tools (0.87) UNRELEASED; urgency=low [ David Härdeman ] * Add support for loading keymaps. (closes: 337663) + * Ubuntu merge + - Use -Qb for for module loading to honor blacklists. - - -- maximilian attems Fri, 13 Apr 2007 01:22:56 +0200 + -- David Härdeman Fri, 13 Apr 2007 20:08:26 +0200 initramfs-tools (0.86) unstable; urgency=low diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index aa146ec..e8a6ae4 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -31,7 +31,7 @@ powerpc|ppc64) modprobe windfarm_smu_sensors ;; i386|amd64|ia64) - modprobe fan - modprobe thermal + modprobe -Qb fan + modprobe -Qb thermal ;; esac diff --git a/scripts/local b/scripts/local index 4e01472..47ef7fa 100644 --- a/scripts/local +++ b/scripts/local @@ -67,7 +67,7 @@ mountroot () fi # FIXME This has no error checking - modprobe ${FSTYPE} + modprobe -Qb ${FSTYPE} # FIXME This has no error checking # Mount root -- cgit v1.2.3 From 3f94f7f380f1a5fe9afd7e20d0796365c2da25c3 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Fri, 13 Apr 2007 20:38:06 +0200 Subject: Add PS3 module loading functionality. --- debian/changelog | 1 + hook-functions | 8 +++++++- scripts/init-premount/ps3 | 28 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100755 scripts/init-premount/ps3 (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c0f652b..1476018 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,7 @@ initramfs-tools (0.87) UNRELEASED; urgency=low * Add support for loading keymaps. (closes: 337663) * Ubuntu merge - Use -Qb for for module loading to honor blacklists. + - Add PS3 module loading functionality. -- David Härdeman Fri, 13 Apr 2007 20:08:26 +0200 diff --git a/hook-functions b/hook-functions index f506b49..f33d323 100644 --- a/hook-functions +++ b/hook-functions @@ -146,6 +146,12 @@ dep_add_modules() if [ -e /sys/bus/i2o/devices/ ]; then manual_add_modules i2o_block fi + + if [ -e /sys/bus/ps3_system_bus/ ]; then + for x in ps3_storage gelic_net ohci-hcd ehci-hcd; do + manual_add_modules "${x}" + done + fi } @@ -167,7 +173,7 @@ auto_add_modules() 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 + typhon via-rhine via-velocity yellowfin gelic_net; do manual_add_modules "${x}" done ;; diff --git a/scripts/init-premount/ps3 b/scripts/init-premount/ps3 new file mode 100755 index 0000000..1fe65ae --- /dev/null +++ b/scripts/init-premount/ps3 @@ -0,0 +1,28 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +case "$DPKG_ARCH" in +powerpc|ppc64) + # For PS3's we know these devices will exist, and we'll need them + if grep -q PS3 /proc/cpuinfo; then + modprobe ps3_storage + modprobe gelic_net + modprobe ohci-hcd + modprobe ehci-hcd + fi + ;; +esac -- cgit v1.2.3 From f8ccffbf604d146b7fc6bab77fcf1862bbe59de8 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Fri, 13 Apr 2007 21:02:50 +0200 Subject: Move legacy code from mkinitramfs to separate hooks. --- debian/changelog | 3 ++- hooks/legacy-lvm | 26 ++++++++++++++++++++++++++ hooks/legacy-mdadm | 38 ++++++++++++++++++++++++++++++++++++++ mkinitramfs | 30 ------------------------------ 4 files changed, 66 insertions(+), 31 deletions(-) create mode 100755 hooks/legacy-lvm create mode 100755 hooks/legacy-mdadm (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1476018..a20ad86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,11 +9,12 @@ initramfs-tools (0.87) UNRELEASED; urgency=low [ David Härdeman ] * Add support for loading keymaps. (closes: 337663) + * Move legacy code from mkinitramfs to separate hooks. * Ubuntu merge - Use -Qb for for module loading to honor blacklists. - Add PS3 module loading functionality. - -- David Härdeman Fri, 13 Apr 2007 20:08:26 +0200 + -- David Härdeman Fri, 13 Apr 2007 21:01:11 +0200 initramfs-tools (0.86) unstable; urgency=low diff --git a/hooks/legacy-lvm b/hooks/legacy-lvm new file mode 100755 index 0000000..ffdf038 --- /dev/null +++ b/hooks/legacy-lvm @@ -0,0 +1,26 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# FIXME: Remove this hook after Lenny releases +if [ -x /sbin/vgchange ] && [ -d /lib/lvm-200 ] \ + && [ ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then + copy_exec /lib/lvm-200/vgchange /sbin + for x in dm_mod dm_snapshot dm_mirror; do + manual_add_modules ${x} + done +fi +exit 0 diff --git a/hooks/legacy-mdadm b/hooks/legacy-mdadm new file mode 100755 index 0000000..66c6d8e --- /dev/null +++ b/hooks/legacy-mdadm @@ -0,0 +1,38 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# FIXME: Remove this hook after Etch releases +if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then + # use mkinitrd magic for Sarge backwards compat + rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')" + 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 } + END { print "devices='\''" devices "'\''" }' \ + >> ${DESTDIR}/conf/mdrun.conf + copy_exec /sbin/mdadm /sbin + for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do + manual_add_modules ${x} + done +fi +[ -x /sbin/mdrun ] && copy_exec /sbin/mdrun /sbin +exit 0 diff --git a/mkinitramfs b/mkinitramfs index 0197937..b3514fc 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -252,36 +252,6 @@ cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d" run_scripts /usr/share/initramfs-tools/hooks run_scripts "${CONFDIR}"/hooks -# FIXME: Remove this Raid block after Etch releases -if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then - # use mkinitrd magic for Sarge backwards compat - rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')" - 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 } - END { print "devices='\''" devices "'\''" }' \ - >> ${DESTDIR}/conf/mdrun.conf - copy_exec /sbin/mdadm /sbin - for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do - manual_add_modules ${x} - done -fi -[ -x /sbin/mdrun ] && copy_exec /sbin/mdrun /sbin - -# FIXME: Remove this LVM block after Lenny releases -if [ -x /sbin/vgchange ] && [ -d /lib/lvm-200 ] \ - && [ ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then - copy_exec /lib/lvm-200/vgchange /sbin - for x in dm_mod dm_snapshot dm_mirror; do - manual_add_modules ${x} - done -fi - # Apply DSDT to initramfs if [ -e "${CONFDIR}/DSDT.aml" ]; then copy_exec "${CONFDIR}/DSDT.aml" / -- cgit v1.2.3 From f1b65664af21300696de827b1b5bab70665091a1 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Fri, 13 Apr 2007 21:07:13 +0200 Subject: Update copyright info --- debian/copyright | 4 +++- initramfs-tools.8 | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/copyright b/debian/copyright index b75f009..44905db 100644 --- a/debian/copyright +++ b/debian/copyright @@ -15,12 +15,14 @@ http://git.debian.org/?p=kernel/initramfs-tools.git;a=shortlog Authors: Adam Conrad , Ben Collins , + David Härdeman , Jeff Bailey , maximilian attems - Scott James Remnant , + Scott James Remnant Copyright: 2005 - 2006 Adam Conrad 2006 Ben Collins + 2005 - 2007 David Härdeman 2005 Jeff Bailey 2005 - 2007 maximilian attems 2005 - 2006 Scott James Remnant diff --git a/initramfs-tools.8 b/initramfs-tools.8 index 526899f..20b9755 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -452,7 +452,7 @@ cpio -i -d -H newc --no-absolute-filenames The initramfs-tools are written by Maximilian Attems , Jeff Bailey and numerous others. .PP -This manual was written by David H\[:a]rdeman , +This manual was written by David H\[:a]rdeman , updated by Maximilian Attems . .SH SEE ALSO -- cgit v1.2.3 From 8640586a5c7467a54ef1cc9cad77e5296aff26ae Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Fri, 13 Apr 2007 21:27:10 +0200 Subject: Bump standards version, no changes necessary. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index b515c49..da8730f 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team Build-Depends: debhelper (>= 4.1.0), cdbs -Standards-Version: 3.7.2.0 +Standards-Version: 3.7.2.2 Package: initramfs-tools Architecture: all -- cgit v1.2.3 From 24973b26ba0b43594d6c2bdbc2680f51998b8294 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sat, 14 Apr 2007 10:57:12 +0200 Subject: Revert NACK'ed change --- debian/changelog | 3 +-- scripts/init-premount/thermal | 4 ++-- scripts/local | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a20ad86..838da0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,10 +11,9 @@ initramfs-tools (0.87) UNRELEASED; urgency=low * Add support for loading keymaps. (closes: 337663) * Move legacy code from mkinitramfs to separate hooks. * Ubuntu merge - - Use -Qb for for module loading to honor blacklists. - Add PS3 module loading functionality. - -- David Härdeman Fri, 13 Apr 2007 21:01:11 +0200 + -- David Härdeman Sat, 14 Apr 2007 10:53:56 +0200 initramfs-tools (0.86) unstable; urgency=low diff --git a/scripts/init-premount/thermal b/scripts/init-premount/thermal index e8a6ae4..aa146ec 100755 --- a/scripts/init-premount/thermal +++ b/scripts/init-premount/thermal @@ -31,7 +31,7 @@ powerpc|ppc64) modprobe windfarm_smu_sensors ;; i386|amd64|ia64) - modprobe -Qb fan - modprobe -Qb thermal + modprobe fan + modprobe thermal ;; esac diff --git a/scripts/local b/scripts/local index 47ef7fa..4e01472 100644 --- a/scripts/local +++ b/scripts/local @@ -67,7 +67,7 @@ mountroot () fi # FIXME This has no error checking - modprobe -Qb ${FSTYPE} + modprobe ${FSTYPE} # FIXME This has no error checking # Mount root -- cgit v1.2.3 From 27d1b93ad381d09b4bcf39b4e1697c06cecf957e Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sun, 15 Apr 2007 22:58:08 +0200 Subject: Also print settings from initramfs.conf in reportbug script (thanks to Maik Zumstrull for the suggestion) --- debian/script | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/script b/debian/script index 7cfac12..f9dfc37 100755 --- a/debian/script +++ b/debian/script @@ -1,6 +1,6 @@ #!/bin/sh -exec >&3 +#exec >&3 echo "-- /proc/cmdline" cat /proc/cmdline @@ -19,3 +19,9 @@ if [ -r /etc/kernel-img.conf ]; then cat /etc/kernel-img.conf echo fi + +if [ -r /etc/initramfs-tools/initramfs.conf ]; then + echo "-- /etc/initramfs-tools/initramfs.conf" + sed 's/#.*$//;/^[[:space:]]*$/d' /etc/initramfs-tools/initramfs.conf + echo +fi -- cgit v1.2.3 From b9e2f8e2aa33dd26914883c6ced457c12c171c1d Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Mon, 16 Apr 2007 02:08:07 +0200 Subject: Remove stray comment --- debian/script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/script b/debian/script index f9dfc37..5990db3 100755 --- a/debian/script +++ b/debian/script @@ -1,6 +1,6 @@ #!/bin/sh -#exec >&3 +exec >&3 echo "-- /proc/cmdline" cat /proc/cmdline -- 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 'debian') 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 2b382bf18e47765e9f3bb1963008f8ee1a46cf97 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 16 Apr 2007 20:33:52 +0200 Subject: fix regexes to always use posix char classes and release 0.87 needs the -regextype posix-extended switch for find, also it seems 0.86 disgarded uselessly uppercase scripts (they might be distasteful ;) --- debian/changelog | 7 +++++-- mkinitramfs | 8 +++++--- scripts/functions | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c5a5e01..0d77ff9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.87) UNRELEASED; urgency=low +initramfs-tools (0.87) unstable; urgency=low [ maximilian attems ] * scripts/functions: reduce_satisfied() needs to ignore the same set as @@ -6,6 +6,9 @@ initramfs-tools (0.87) UNRELEASED; urgency=low boot script may cause circular panic. (closes: 418509) * Add blacklist boot param, disabling the load of specific modules inside the initramfs. Still needs to be passed via tmpfs to the rootfs. + * mkinitramfs, scripts/functions: Fix regexes to always use posix character + classes. Based on a patch by Meelis Roos . + (closes: 419062) [ David Härdeman ] * Add support for loading keymaps. (closes: 337663) @@ -16,7 +19,7 @@ initramfs-tools (0.87) UNRELEASED; urgency=low * Bump standards version, no changes necessary. * debian/scripts: Print settings from initramfs.conf in reportbug script. - -- maximilian attems Mon, 16 Apr 2007 19:54:04 +0200 + -- maximilian attems Mon, 16 Apr 2007 20:21:30 +0200 initramfs-tools (0.86) unstable; urgency=low diff --git a/mkinitramfs b/mkinitramfs index b3514fc..e7b9b13 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -84,7 +84,8 @@ fi . "${CONFDIR}/initramfs.conf" EXTRA_CONF='' for i in /usr/share/initramfs-tools/conf.d/* ${CONFDIR}/conf.d/*; do - EXTRA_CONF="${EXTRA_CONF} $(basename $i | grep '^[a-z0-9][a-z0-9\._-]*$' | grep -v '\.dpkg-.*$')"; + EXTRA_CONF="${EXTRA_CONF} $(basename $i \ + | grep '^[[:alnum:]][[:alnum:]\._-]*$' | grep -v '\.dpkg-.*$')"; done for i in ${EXTRA_CONF}; do if [ -e ${CONFDIR}/conf.d/${i} ]; then @@ -204,13 +205,14 @@ copy_exec /usr/share/initramfs-tools/init /init # add existant boot scripts for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ - -regex '.*/[a-z0-9_]+$' -type f); do + -regextype posix-extended -regex '.*/[[:alnum:]_]+$' -type f); do [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" cp -p "/usr/share/initramfs-tools/scripts/${b}" \ "${DESTDIR}/scripts/$(dirname "${b}")" done -for b in $(cd "${CONFDIR}/scripts" && find . -regex '.*/[a-z0-9_]+$' -type f); do +for b in $(cd "${CONFDIR}/scripts" && find . \ + -regextype posix-extended -regex '.*/[[:alnum:]_]+$' -type f); do [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")" diff --git a/scripts/functions b/scripts/functions index 00fcf3d..0b8d1e8 100644 --- a/scripts/functions +++ b/scripts/functions @@ -87,7 +87,7 @@ set_initlist() for si_x in ${initdir}/*; do # only allow variable name chars case ${si_x#${initdir}/} in - *[!A-Za-z0-9_]*) + *[![:alnum:]_]*) continue ;; esac @@ -110,7 +110,7 @@ reduce_satisfied() for rs_y in ${deplist}; do # only allow variable name chars case ${rs_y} in - *[!A-Za-z0-9_]*) + *[![:alnum:]_]*) continue ;; esac -- cgit v1.2.3 From 7e0470e3fe7ede0f846ff2e459aeec1650742e9b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 16 Apr 2007 22:07:01 +0200 Subject: nice usplash experience tested both on my laptop as on qemu ubuntu merge --- debian/changelog | 7 +++++++ scripts/init-top/framebuffer | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0d77ff9..62fef53 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.88) UNRELEASED; urgency=low + + * scripts/init-top/framebuffer: Remove vga16fb loading on splash bootarg. + Newer usplash > 0.4 no longer needs that. + + -- maximilian attems Mon, 16 Apr 2007 22:05:18 +0200 + initramfs-tools (0.87) unstable; urgency=low [ maximilian attems ] diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer index c680409..08e36d2 100755 --- a/scripts/init-top/framebuffer +++ b/scripts/init-top/framebuffer @@ -61,10 +61,6 @@ OPTS="" for x in $(cat /proc/cmdline); do case ${x} in - splash*) - FB="vga16fb"; - OPTS=""; - ;; vga=*) FB="vesafb"; OPTS=""; -- cgit v1.2.3 From e4fc12ec7db32e3b7844697ce248df3c61ff8e82 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 16 Apr 2007 23:19:52 +0200 Subject: TODO: lvm2 has it's own hooks *phew* :) --- debian/TODO | 2 -- 1 file changed, 2 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index 7b9bf0a..7ed390f 100644 --- a/debian/TODO +++ b/debian/TODO @@ -10,5 +10,3 @@ TODO o Default to dep for PPC - Possibly to detect newworld? o udevsettle timeouts handling - - o lvm2 hooks to their respective packages -- cgit v1.2.3 From 2c12a02f54098c18b05d450d739440f05f638ab2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 17 Apr 2007 12:03:33 +0200 Subject: release 0.87b: cleanup legacy hooks - remove legacymdadm - source hook-functions in legacylvm --- debian/changelog | 8 ++++++-- hooks/legacylvm | 2 ++ hooks/legacymdadm | 38 -------------------------------------- 3 files changed, 8 insertions(+), 40 deletions(-) delete mode 100755 hooks/legacymdadm (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 62fef53..b36c9a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,13 @@ -initramfs-tools (0.88) UNRELEASED; urgency=low +initramfs-tools (0.87b) unstable; urgency=low * scripts/init-top/framebuffer: Remove vga16fb loading on splash bootarg. Newer usplash > 0.4 no longer needs that. - -- maximilian attems Mon, 16 Apr 2007 22:05:18 +0200 + * hooks/legacymdadm: remove only needed for partial upgrades from sarge. + + * hooks/legacylvm: Source relevant functions. (closes: 419667) + + -- maximilian attems Tue, 17 Apr 2007 11:56:58 +0200 initramfs-tools (0.87) unstable; urgency=low diff --git a/hooks/legacylvm b/hooks/legacylvm index ffdf038..9121f90 100755 --- a/hooks/legacylvm +++ b/hooks/legacylvm @@ -16,6 +16,8 @@ prereqs) esac # FIXME: Remove this hook after Lenny releases +. /usr/share/initramfs-tools/hook-functions + if [ -x /sbin/vgchange ] && [ -d /lib/lvm-200 ] \ && [ ! -f /usr/share/initramfs-tools/hooks/lvm2 ]; then copy_exec /lib/lvm-200/vgchange /sbin diff --git a/hooks/legacymdadm b/hooks/legacymdadm deleted file mode 100755 index 66c6d8e..0000000 --- a/hooks/legacymdadm +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# FIXME: Remove this hook after Etch releases -if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then - # use mkinitrd magic for Sarge backwards compat - rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')" - 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 } - END { print "devices='\''" devices "'\''" }' \ - >> ${DESTDIR}/conf/mdrun.conf - copy_exec /sbin/mdadm /sbin - for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do - manual_add_modules ${x} - done -fi -[ -x /sbin/mdrun ] && copy_exec /sbin/mdrun /sbin -exit 0 -- cgit v1.2.3 From 27d498d8d190e67d51bc1a25a331acb805425721 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 22 Apr 2007 19:10:31 +0200 Subject: lintian: make package error/warning clean again - missing colon in closes --- debian/changelog | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b36c9a6..e604463 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.88) UNRELEASED; urgency=low + + * Fix missing colons in closes. + + -- maximilian attems Sun, 22 Apr 2007 19:08:40 +0200 + initramfs-tools (0.87b) unstable; urgency=low * scripts/init-top/framebuffer: Remove vga16fb loading on splash bootarg. @@ -1160,7 +1166,7 @@ initramfs-tools (0.54) unstable; urgency=low * hook-functions: Add dasd class to auto_add_modules and dd zfcp module. Thanks to s390 support Bastian Blank . (closes: #355595) - * hook-functions: Add it821x. (closes #352460) + * hook-functions: Add it821x. (closes: #352460) -- maximilian attems Wed, 8 Mar 2006 17:34:25 +0100 -- cgit v1.2.3 From b71721f02b6b46fddfc624888f61aafbc2399129 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 1 May 2007 18:31:38 +0200 Subject: mkinitramfs: better heuristics for MODULES=dep * add a first shoot that survives ide, scsi boot testing nfs still needs work let's see what other testers have to say * next step is to cut on the added libs for smaller initramfs enhances boot speed due to smaller initramfs for tuning freaks, others might still be better off with safe MODULES=most setting. --- debian/TODO | 2 -- debian/changelog | 6 ++++-- hook-functions | 34 ++++++++++++++++++++++------------ 3 files changed, 26 insertions(+), 16 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index 7ed390f..f62656f 100644 --- a/debian/TODO +++ b/debian/TODO @@ -5,8 +5,6 @@ TODO o Eliminate ?udev?, ?klibc?, busybox (-> glibc). - o Better heuristics for MODULES=dep option - o Default to dep for PPC - Possibly to detect newworld? o udevsettle timeouts handling diff --git a/debian/changelog b/debian/changelog index e604463..22b793b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,10 @@ initramfs-tools (0.88) UNRELEASED; urgency=low - * Fix missing colons in closes. + * debian/changelog: Fix missing colons in closes. + * hook-functions: Add a proper /sys walking dep_add_modules() for a minimal + initramfs on MODULES=dep. (closes: #395526) - -- maximilian attems Sun, 22 Apr 2007 19:08:40 +0200 + -- maximilian attems Tue, 01 May 2007 18:29:59 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/hook-functions b/hook-functions index a5d1f61..12faeff 100644 --- a/hook-functions +++ b/hook-functions @@ -113,24 +113,34 @@ copy_modules_dir() done } +# only copy relevant modules dep_add_modules() { + # findout root block device + fstype + eval "$(mount | awk '/ \/ / {print "root=" $1 "\nrootfs=" $5; exit}')" + block=${root#/dev/} + block=${block%[0-9]*} - # Things that are too hard to autodetect. - for x in ext2 ext3 isofs jfs nfs reiserfs xfs af_packet; do - manual_add_modules "${x}" - done + # Error out if /sys lack block dev + if [ -z "${block}" ] || [ ! -e /sys/block/${block} ]; then + echo "Error: missing ${block} root ${root} /sys entry" + exit 1 + fi - for x in /sys/bus/pci/devices/*; do - if [ -e "${x}/modalias" ]; then - manual_add_modules $(cat "${x}/modalias") - fi - done + # Add rootfs + force_load "${rootfs}" - for x in /sys/bus/usb/devices/*; do - if [ -e "${x}/modalias" ]; then - manual_add_modules $(cat "${x}/modalias") + # walk /sys for relevant modules + device_path=$(readlink -f /sys/block/${block}/device) + while [ "${device_path}" != "/sys" ]; do + driver_path="$(readlink -f ${device_path}/driver)" + if [ -e "$driver_path" ]; then + module="$(basename $(readlink -f $driver_path))" + if [ -n "${module}" ]; then + force_load "${module}" + fi fi + device_path="$(dirname ${device_path})" done if [ -e /proc/ide ]; then -- cgit v1.2.3 From b65e2e814325991ea130c3a176024f6a7e416c46 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 1 May 2007 18:49:42 +0200 Subject: mkinitramfs.8: improve docs * add example section * be more explicit that update-initramfs is a wrapper around mkinitramfs and what it does --- debian/changelog | 6 +++++- mkinitramfs.8 | 26 +++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 22b793b..b5eff37 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,14 @@ initramfs-tools (0.88) UNRELEASED; urgency=low * debian/changelog: Fix missing colons in closes. + * hook-functions: Add a proper /sys walking dep_add_modules() for a minimal initramfs on MODULES=dep. (closes: #395526) - -- maximilian attems Tue, 01 May 2007 18:29:59 +0200 + * mkinitramfs.8: Add examples section, plus improve description of the + low-level tool and how it fits with update-initramfs. + + -- maximilian attems Tue, 01 May 2007 18:48:03 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/mkinitramfs.8 b/mkinitramfs.8 index a35a561..64fcc8d 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,7 +1,7 @@ -.TH MKINITRAMFS 8 "$Date: 2007/01/02 $" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "$Date: 2007/05/01 $" "" "mkinitramfs manual" .SH NAME -mkinitramfs \- generate an initramfs image +mkinitramfs \- low-level tool for generating an initramfs image .SH SYNOPSIS .B mkinitramfs @@ -31,7 +31,12 @@ 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. +calls +.B mkinitramfs +with the relevant parameters. +.B update-initramfs +keeps sha1sum of generated initramfs. It takes care to generate backups +and eventually runs the bootloader. At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system. All finding of the root device @@ -98,6 +103,21 @@ This is especially useful for bootloaders, which do not pass an root bootarg. If this file exists, it will be appended to the initramfs in a way that causes it to be loaded by ACPI. +.SH EXAMPLES + +Create an initramfs for current running kernel: + +.PP +.B mkinitramfs -o ~/tmp/initramfs-$(uname -r) + +Create an initramfs for specific kernel and keep builddirs: + +.PP +.B mkinitramfs -k -o ~/tmp/initramfs-2.6.21-686 2.6.21-686 + +Debug initramfs creation (check out written logfile) +.PP +.B sh -x mkinitramfs -o ~/tmp/initramfs-$(uname -r) 2> ~/tmp/log .SH AUTHOR The initramfs-tools are written by Maximilian Attems , -- cgit v1.2.3 From 8800b09a519db23e0fefd32868a57c45c0a013e8 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 1 May 2007 18:59:39 +0200 Subject: init: Remove cryptopts parsing the cryptsetup scripts parse /proc/cmdline themselves (even in the Etch version). --- debian/changelog | 7 ++++++- init | 4 ---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b5eff37..8932889 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ initramfs-tools (0.88) UNRELEASED; urgency=low + [ maximilian attems ] * debian/changelog: Fix missing colons in closes. * hook-functions: Add a proper /sys walking dep_add_modules() for a minimal @@ -8,7 +9,11 @@ initramfs-tools (0.88) UNRELEASED; urgency=low * mkinitramfs.8: Add examples section, plus improve description of the low-level tool and how it fits with update-initramfs. - -- maximilian attems Tue, 01 May 2007 18:48:03 +0200 + [ David Härdeman ] + * init: Remove cryptopts parsing, not official bootparam. cryptsetup scripts + parse /proc/cmdline themselves (even in the Etch version). + + -- maximilian attems Tue, 01 May 2007 18:56:40 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/init b/init index b115cd1..7de409a 100755 --- a/init +++ b/init @@ -47,7 +47,6 @@ export quiet=n export readonly=y export rootmnt=/root export debug= -export cryptopts=${CRYPTOPTS} export ROOTDELAY= export panic= export blacklist= @@ -81,9 +80,6 @@ for x in $(cat /proc/cmdline); do rootdelay=*) ROOTDELAY="${x#rootdelay=}" ;; - cryptopts=*) - cryptopts="${x#cryptopts=}" - ;; nfsroot=*) NFSROOT="${x#nfsroot=}" ;; -- cgit v1.2.3 From 97463b8108d05b33a09d8847c7f4d7c1be7e41db Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Tue, 1 May 2007 19:25:27 +0200 Subject: hook-funtions: copy_exec work * Change copy_exec to use the same source and destination path if only one argument is given. * document how copy_exec determines the target path. This also fixes a minor bug, these two commands: copy_exec /some/thing /thing copy_exec /some/other/thing /thing Would previously print (note the incorrect path): W:copy_exec: Not copying /some/other/thing to $DESTDIR/thing/thing... --- debian/changelog | 7 +++--- hook-functions | 67 +++++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 53 insertions(+), 21 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8932889..40363ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,18 +2,19 @@ initramfs-tools (0.88) UNRELEASED; urgency=low [ maximilian attems ] * debian/changelog: Fix missing colons in closes. - * hook-functions: Add a proper /sys walking dep_add_modules() for a minimal initramfs on MODULES=dep. (closes: #395526) - * mkinitramfs.8: Add examples section, plus improve description of the low-level tool and how it fits with update-initramfs. [ David Härdeman ] * init: Remove cryptopts parsing, not official bootparam. cryptsetup scripts parse /proc/cmdline themselves (even in the Etch version). + * hook-functions: Change copy_exec to use the same source and + destination path if only one argument is given. + * hook-funcions: document how copy_exec determines the target path. - -- maximilian attems Tue, 01 May 2007 18:56:40 +0200 + -- maximilian attems Tue, 01 May 2007 19:23:10 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 12faeff..6c75b5f 100644 --- a/hook-functions +++ b/hook-functions @@ -55,24 +55,55 @@ manual_add_modules() done } -# $1 is source -# $2 is relative destination +# $1 is the source path (e.g. /usr/bin/time) +# $2 is the relative destination (e.g. /usr or /usr/time) +# +# The destination is interpreted in the same way "cp" would, meaning +# (assuming /bin is a directory): +# +# "copy_exec /usr/bin/time /bin" -> /bin/time +# "copy_exec /usr/bin/time /bin/mytime" -> /bin/mytime +# +# If $2 is left out, the same destination path as for the source arg will +# be used and directories will be created as needed, so: +# +# "copy_exec /usr/bin/time" -> /usr/bin/time +# copy_exec() { - final_destination=${DESTDIR}/${2}/`basename ${1}` + local source target destination final_destination x nonoptlib + local libname dirname + + source="${1}" + if [ -n "${2}" ]; then + target="${2}" + else + if [ ! -e "${DESTDIR}/$(dirname "${1}")" ]; then + mkdir -p "${DESTDIR}/$(dirname "${1}")" + fi + target="${1}" + fi + + if [ -d "${DESTDIR}/${target}" ]; then + destination="${target}/$(basename "${source}")" + else + destination="${target}" + fi + final_destination="${DESTDIR}/${destination}" + if [ -L "$final_destination" ]; then - if ! [ `readlink ${final_destination}` = "${1}" ]; then - echo "W:copy_exec: Not copying ${1} to \$DESTDIR${2}/`basename ${1}`, which is already a copy of `readlink ${final_destination}`" >&2 + if [ $(readlink "${final_destination}") != "${source}" ]; then + echo "W:copy_exec: Not copying ${source} to \$DESTDIR${destination}, which is already a copy of $(readlink ${final_destination})" >&2 return fi else - ln -s ${1} ${DESTDIR}/${2} - if [ -n "${verbose}" ] && [ "${verbose}" = "y" ]; then - echo "Adding binary ${1}" + ln -s ${source} ${DESTDIR}/${destination} + if [ "${verbose}" = "y" ]; then + echo "Adding binary ${source}" fi fi # Copy the dependant libraries - for x in $(ldd ${1} 2>/dev/null | sed -e ' + for x in $(ldd ${source} 2>/dev/null | sed -e ' /\//!d; /linux-gate/d; /=>/ {s/.*=>[[:blank:]]*\([^[:blank:]]*\).*/\1/}; @@ -80,19 +111,19 @@ copy_exec() { # Try to use non-optimised libraries where possible. # We assume that all HWCAP libraries will be in tls. - nonoptlib=$(echo ${x} | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#') + nonoptlib=$(echo "${x}" | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#') - if [ -e ${nonoptlib} ]; then - x=${nonoptlib} + if [ -e "${nonoptlib}" ]; then + x="${nonoptlib}" fi - libname=$(basename ${x}) - dirname=$(dirname ${x}) + libname=$(basename "${x}") + dirname=$(dirname "${x}") - mkdir -p ${DESTDIR}/${dirname} - if [ ! -e ${DESTDIR}/${dirname}/${libname} ]; then - ln -s ${x} ${DESTDIR}/${dirname} - if [ -n "${verbose}" ] && [ "${verbose}" = "y" ]; then + mkdir -p "${DESTDIR}/${dirname}" + if [ ! -e "${DESTDIR}/${dirname}/${libname}" ]; then + ln -s "${x}" "${DESTDIR}/${dirname}" + if [ "${verbose}" = "y" ]; then echo "Adding library ${x}" fi fi -- cgit v1.2.3 From 6fd917d49cd09c5124df25c48e1458e1a87f2365 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 1 May 2007 19:35:45 +0200 Subject: init: ignore non-numeric rootdelay, panic bootargs they cause funny sleep error messages: aka you can't sleep "bar" time ;) take into account that subsecond sleeps are ok. thanks david for the idea, gone for the q&d regex check. --- debian/changelog | 3 ++- init | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 40363ad..b436b0a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ initramfs-tools (0.88) UNRELEASED; urgency=low initramfs on MODULES=dep. (closes: #395526) * mkinitramfs.8: Add examples section, plus improve description of the low-level tool and how it fits with update-initramfs. + * init: Ignore non-numerical panic and rootdelay bootarg. [ David Härdeman ] * init: Remove cryptopts parsing, not official bootparam. cryptsetup scripts @@ -14,7 +15,7 @@ initramfs-tools (0.88) UNRELEASED; urgency=low destination path if only one argument is given. * hook-funcions: document how copy_exec determines the target path. - -- maximilian attems Tue, 01 May 2007 19:23:10 +0200 + -- maximilian attems Tue, 01 May 2007 19:31:41 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/init b/init index 7de409a..0da01d4 100755 --- a/init +++ b/init @@ -79,6 +79,11 @@ for x in $(cat /proc/cmdline); do ;; rootdelay=*) ROOTDELAY="${x#rootdelay=}" + case ${ROOTDELAY} in + *[![:digit:].]*) + ROOTDELAY= + ;; + esac ;; nfsroot=*) NFSROOT="${x#nfsroot=}" @@ -97,6 +102,11 @@ for x in $(cat /proc/cmdline); do ;; panic=*) panic="${x#panic=}" + case ${panic} in + *[![:digit:].]*) + panic= + ;; + esac ;; quiet) quiet=y -- cgit v1.2.3 From f123993d1c73c906c50bcb8484e8abb5f9dd44f1 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Thu, 3 May 2007 18:47:00 +0200 Subject: hook-functions: add firmware loading support newer modinfo outputs firmware files corresponding to the modules MODULE_FIRMWARE() field. Take care to add them automaticaly. --- debian/changelog | 6 ++++-- hook-functions | 38 +++++++++++++++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b436b0a..032fa85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,9 +13,11 @@ initramfs-tools (0.88) UNRELEASED; urgency=low parse /proc/cmdline themselves (even in the Etch version). * hook-functions: Change copy_exec to use the same source and destination path if only one argument is given. - * hook-funcions: document how copy_exec determines the target path. + * hook-functions: Document how copy_exec determines the target path. + * hook-functions: Add firmware loading support to manual_add_modules(). + (closes: #355881) - -- maximilian attems Tue, 01 May 2007 19:31:41 +0200 + -- maximilian attems Thu, 03 May 2007 18:43:14 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 6c75b5f..b3264ac 100644 --- a/hook-functions +++ b/hook-functions @@ -38,8 +38,11 @@ add_modules_from_file() done } +# Add dependent modules + eventual firmware manual_add_modules() { + local man_x firmwares firmware + for mam_x in $(modprobe --set-version="${version}" --ignore-install \ --show-depends "${1}" 2>/dev/null | awk '/^insmod/ { print $2 }'); do # Prune duplicates @@ -49,9 +52,42 @@ manual_add_modules() mkdir -p "${DESTDIR}/$(dirname "${mam_x}")" ln -s "${mam_x}" "${DESTDIR}/$(dirname "${mam_x}")" - if [ -n "${verbose}" ] && [ "${verbose}" = "y" ]; then + if [ "${verbose}" = "y" ]; then echo "Adding module ${mam_x}" fi + + # Add firmware files if necessary + firmwares=$(modinfo -F firmware "${mam_x}") + if [ -z "${firmwares}" ]; then + continue + fi + for firmware in $firmwares; do + if [ -e "${DESTDIR}/lib/firmware/${firmware}" ]; then + continue + fi + + # Only print warning for missing fw of loaded module + # or forced loaded module + if [ ! -e "/lib/firmware/${firmware}" ]; then + if grep -q "^$(basename "${mam_x}" .ko)" \ + /proc/modules \ + || grep -q "^$(basename "${mam_x}" .ko)" \ + "${CONFDIR}/modules"; then + echo "W: Possible missing firmware /lib/firmware/${firmware} for module $(basename ${mam_x} .ko)" >&2 + fi + continue + fi + + if [ ! -e "${DESTDIR}/lib/udev/firmware.agent" ] \ + && [ -e "/lib/udev/firmware.agent" ]; then + copy_exec /lib/udev/firmware.agent + fi + + copy_exec "/lib/firmware/${firmware}" + if [ "${verbose}" = "y" ]; then + echo "Adding firmware ${firmware}" + fi + done done } -- cgit v1.2.3 From 525008f4da3ddc32c83329dbb6322ae1660b8fc8 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sun, 27 May 2007 00:29:27 +0200 Subject: scripts/local: check for fs on rootnode some device node will exist before they can be safely used --- debian/changelog | 10 ++++++++-- scripts/local | 36 +++++++++++++++++++++++++++++------- 2 files changed, 37 insertions(+), 9 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 032fa85..042cf8d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,14 @@ initramfs-tools (0.88) UNRELEASED; urgency=low * hook-functions: Document how copy_exec determines the target path. * hook-functions: Add firmware loading support to manual_add_modules(). (closes: #355881) - - -- maximilian attems Thu, 03 May 2007 18:43:14 +0200 + * scripts/local: Ubuntu merge + - As well as waiting for the existance of the root device node, also check + to see whether we have a filesystem of some kind on it. Some devices + nodes (devmapper/LVM/EVMS, mdadm) will exist before they can be safely + used. Patch by Scott James Remnant . Changed to + support both fstype and vol_id. + + -- maximilian attems Sun, 27 May 2007 00:26:17 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/scripts/local b/scripts/local index 4e01472..459ba8d 100644 --- a/scripts/local +++ b/scripts/local @@ -1,5 +1,29 @@ # Local filesystem mounting -*- shell-script -*- +# Parameter: device node to check +# Echos fstype to stdout +# Return value: indicates if an fs could be recognized +get_fstype () +{ + local FS FSTYPE FSSIZE RET + FS="${1}" + + # vol_id has a more complete list of file systems + if [ -x /lib/udev/vol_id ]; then + FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null) + else + eval $(fstype < "${FS}" 2> /dev/null) + fi + RET=$? + + if [ -z "${FSTYPE}" ]; then + FSTYPE="unknown" + fi + + echo "${FSTYPE}" + return ${RET} +} + # Parameter: Where to mount the filesystem mountroot () { @@ -9,7 +33,7 @@ mountroot () # If the root device hasn't shown up yet, give it a little while # to deal with removable devices - if [ ! -e "${ROOT}" ]; then + if [ ! -e "${ROOT}" ] || ! $(get_fstype "${ROOT}" >/dev/null); then log_begin_msg "Waiting for root file system..." # Default delay is 180s @@ -23,9 +47,11 @@ mountroot () fi slumber=$(( ${slumber} * 10 )) - while [ ${slumber} -gt 0 ] && [ ! -e "${ROOT}" ]; do + while [ ! -e "${ROOT}" ] \ + || ! $(get_fstype "${ROOT}" >/dev/null); do /bin/sleep 0.1 slumber=$(( ${slumber} - 1 )) + [ ${slumber} -gt 0 ] || break done if [ ${slumber} -gt 0 ]; then @@ -47,14 +73,10 @@ mountroot () # Get the root filesystem type if not set if [ -z "${ROOTFSTYPE}" ]; then - eval $(fstype < ${ROOT}) + FSTYPE=$(get_fstype "${ROOT}") else FSTYPE=${ROOTFSTYPE} fi - if [ "$FSTYPE" = "unknown" ] && [ -x /lib/udev/vol_id ]; then - FSTYPE=$(/lib/udev/vol_id -t ${ROOT}) - [ -z "$FSTYPE" ] && FSTYPE="unknown" - fi [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-premount" run_scripts /scripts/local-premount -- cgit v1.2.3 From 0df638ec51ee9a8362f3c81ceb9070d8e2820381 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 27 May 2007 00:32:10 +0200 Subject: scripts/init-premount/ps3: typo fix --- debian/changelog | 3 ++- scripts/init-premount/ps3 | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 042cf8d..86ba300 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,7 @@ initramfs-tools (0.88) UNRELEASED; urgency=low * mkinitramfs.8: Add examples section, plus improve description of the low-level tool and how it fits with update-initramfs. * init: Ignore non-numerical panic and rootdelay bootarg. + * scripts/init-premount/ps3: Fix typo. (closes: #423469) [ David Härdeman ] * init: Remove cryptopts parsing, not official bootparam. cryptsetup scripts @@ -23,7 +24,7 @@ initramfs-tools (0.88) UNRELEASED; urgency=low used. Patch by Scott James Remnant . Changed to support both fstype and vol_id. - -- maximilian attems Sun, 27 May 2007 00:26:17 +0200 + -- maximilian attems Sun, 27 May 2007 00:31:13 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/scripts/init-premount/ps3 b/scripts/init-premount/ps3 index d4b1609..8f8ce1c 100755 --- a/scripts/init-premount/ps3 +++ b/scripts/init-premount/ps3 @@ -18,7 +18,7 @@ esac case "$DPKG_ARCH" in powerpc|ppc64) while read line; do - if [ "${line}" =! "${line#machine*PS3PF}" ]; then + if [ "${line}" != "${line#machine*PS3PF}" ]; then # For PS3's we know these devices will exist, # and that we'll need them modprobe ps3_storage -- cgit v1.2.3 From bb98536c4c1b597ed326c8729e048eac5526869b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 27 May 2007 00:43:18 +0200 Subject: scripts/nfs: fix when root-path includes server-ip --- debian/changelog | 4 +++- scripts/nfs | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 86ba300..622b109 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ initramfs-tools (0.88) UNRELEASED; urgency=low low-level tool and how it fits with update-initramfs. * init: Ignore non-numerical panic and rootdelay bootarg. * scripts/init-premount/ps3: Fix typo. (closes: #423469) + * scripts/nfs: Fix when root-path includes server-ip. (closes: #387808) + Thanks Vagrant Cascadian for patch. [ David Härdeman ] * init: Remove cryptopts parsing, not official bootparam. cryptsetup scripts @@ -24,7 +26,7 @@ initramfs-tools (0.88) UNRELEASED; urgency=low used. Patch by Scott James Remnant . Changed to support both fstype and vol_id. - -- maximilian attems Sun, 27 May 2007 00:31:13 +0200 + -- maximilian attems Sun, 27 May 2007 00:41:08 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/scripts/nfs b/scripts/nfs index 5eb17bf..717dfe8 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -41,7 +41,13 @@ do_nfsmount() # get nfs root from dhcp if [ "x${NFSROOT}" = "xauto" ]; then - NFSROOT=${ROOTSERVER}:${ROOTPATH} + # check if server ip is part of dhcp root-path + if [ "${ROOTPATH#*:}" = "${ROOTPATH}" ]; then + NFSROOT=${ROOTSERVER}:${ROOTPATH} + else + NFSROOT=${ROOTPATH} + fi + # nfsroot=[:][,] elif [ -n "${NFSROOT}" ]; then # nfs options are an optional arg -- cgit v1.2.3 From fa78f20fc86dabbd6e89485b755cb40f3918895a Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sun, 27 May 2007 00:57:02 +0200 Subject: hook-functions: make version check in check_minkver more robust. --- debian/changelog | 5 +++-- hook-functions | 10 +++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 622b109..4c0ff66 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.88) UNRELEASED; urgency=low +initramfs-tools (0.88) unstable; urgency=low [ maximilian attems ] * debian/changelog: Fix missing colons in closes. @@ -25,8 +25,9 @@ initramfs-tools (0.88) UNRELEASED; urgency=low nodes (devmapper/LVM/EVMS, mdadm) will exist before they can be safely used. Patch by Scott James Remnant . Changed to support both fstype and vol_id. + * hook-functions: make version check in check_minkver more robust. - -- maximilian attems Sun, 27 May 2007 00:41:08 +0200 + -- maximilian attems Sun, 27 May 2007 00:52:38 +0200 initramfs-tools (0.87b) unstable; urgency=low diff --git a/hook-functions b/hook-functions index b3264ac..1b38931 100644 --- a/hook-functions +++ b/hook-functions @@ -340,9 +340,13 @@ check_minkver() fi 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 + # sed: keep last line starting with MINKVER=, + # remove MINKVER= and trailing space + minver=$(sed '/^MINKVER=/!d;$!d;s/^MINKVER=//;s/[[:space:]]*$//' "${initdir}/${cm_x}") + if [ -z "${tmp}" ]; then + continue + elif dpkg --compare-versions "${curversion}" lt "${minver}"; then + echo "W: ${cm_x} hook script requires at least kernel version ${minver}" >&2 echo "W: not generating requested initramfs for kernel ${curversion}" >&2 exit 2 fi -- cgit v1.2.3 From ce60ba266ecf3724bede535b21cf61377ac52002 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 30 May 2007 13:27:09 +0200 Subject: document ROOT hardcoding only indirectly referenced in mkinitramfs.8 --- debian/changelog | 6 ++++++ initramfs.conf.5 | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4c0ff66..d413936 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.89) unstable; urgency=low + + * initramfs.conf.5: Document ROOT hardcoding. + + -- maximilian attems Wed, 30 May 2007 13:25:36 +0200 + initramfs-tools (0.88) unstable; urgency=low [ maximilian attems ] diff --git a/initramfs.conf.5 b/initramfs.conf.5 index c7fee03..d6c3f0e 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -58,6 +58,11 @@ Set to \fInfs\fP for an NFS root share. \fB DEVICE Specifies the network interface, like eth0. +.TP +\fB ROOT +Allows optional root bootarg hardcoding, when no root bootarg can be passed. +A root bootarg overrides that special setting. + .TP \fB NFSROOT Defaults to \fIauto\fP in order to pick up value from DHCP server. -- cgit v1.2.3 From ad5ae668b01884a4ef99d14bbfef7ce07f908801 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 11 Jun 2007 00:42:05 +0200 Subject: scripts/local: use simpler fstype invocation compatible with etch released klibc --- debian/changelog | 4 +++- scripts/local | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d413936..be82239 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,9 @@ initramfs-tools (0.89) unstable; urgency=low * initramfs.conf.5: Document ROOT hardcoding. - -- maximilian attems Wed, 30 May 2007 13:25:36 +0200 + * scripts/local: Use simpler fstype invocation. + + -- maximilian attems Mon, 11 Jun 2007 00:40:29 +0200 initramfs-tools (0.88) unstable; urgency=low diff --git a/scripts/local b/scripts/local index 459ba8d..429d1f6 100644 --- a/scripts/local +++ b/scripts/local @@ -12,7 +12,7 @@ get_fstype () if [ -x /lib/udev/vol_id ]; then FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null) else - eval $(fstype < "${FS}" 2> /dev/null) + eval $(fstype "${FS}" 2> /dev/null) fi RET=$? -- cgit v1.2.3 From ddef7d56a60dd4602f513450581d65a9def58920 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 20 Jun 2007 20:03:24 +0200 Subject: docs fix typos apply latest patches from bts. --- debian/changelog | 5 ++++- initramfs-tools.8 | 4 ++-- initramfs.conf.5 | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index be82239..b1bacac 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,10 @@ initramfs-tools (0.89) unstable; urgency=low * scripts/local: Use simpler fstype invocation. - -- maximilian attems Mon, 11 Jun 2007 00:40:29 +0200 + * initramfs-tools.8, initramfs.conf.5: Fix typos. (closes: #427837, #427838) + Thanks "A. Costa" for the patch. + + -- maximilian attems Wed, 20 Jun 2007 20:01:20 +0200 initramfs-tools (0.88) unstable; urgency=low diff --git a/initramfs-tools.8 b/initramfs-tools.8 index fd0a83f..be4de54 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -59,9 +59,9 @@ Use root=/dev/nfs for NFS to kick to in. .TP \fB \fI ip -tells how to configure the ip adress. Allows to specify an different +tells how to configure the ip address. Allows to specify an different NFS server than the DHCP server. See Documentation/nfsroot.txt in -any recent linux source for details. Optional paramater for NFS root. +any recent Linux source for details. Optional paramater for NFS root. .TP \fB \fI cryptopts diff --git a/initramfs.conf.5 b/initramfs.conf.5 index d6c3f0e..e5fcec9 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -51,7 +51,7 @@ should normally be no need to set this. .TP \fB BOOT Allows to use an nfs drive as the root of the drive. -The default is to boot from \fIlocal\fP media (harddrive, USB stick). +The default is to boot from \fIlocal\fP media (hard drive, USB stick). Set to \fInfs\fP for an NFS root share. .TP -- cgit v1.2.3 From 087dc49f30e7d94db10c0f0cd89020a56a04a918 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 20 Jun 2007 20:58:41 +0200 Subject: scripts/local: add a q&d crude method to warn about renamed root dev maybe this will reduce ration of bug reports, as further device renaming is in the pipes. :) --- debian/changelog | 5 ++++- scripts/local | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b1bacac..d506d71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,10 @@ initramfs-tools (0.89) unstable; urgency=low * initramfs-tools.8, initramfs.conf.5: Fix typos. (closes: #427837, #427838) Thanks "A. Costa" for the patch. - -- maximilian attems Wed, 20 Jun 2007 20:01:20 +0200 + * scripts/local: Try to warn for renamed root dev. (closes: #374611) + + + -- maximilian attems Wed, 20 Jun 2007 20:56:14 +0200 initramfs-tools (0.88) unstable; urgency=low diff --git a/scripts/local b/scripts/local index 429d1f6..10e2f73 100644 --- a/scripts/local +++ b/scripts/local @@ -66,6 +66,25 @@ mountroot () # We've given up, but we'll let the user fix matters if they can while [ ! -e "${ROOT}" ]; do + # give hint about renamed root + case "${ROOT}" in + /dev/hd*) + suffix="${ROOT#/dev/hd}" + major="${suffix%[[:digit:]]}" + major="${major%[[:digit:]]}" + if [ -d "/sys/block/sd${major}" ]; then + echo "WARNING bootdevice may be renamed. Try root=/dev/sd${suffix}" + fi + ;; + /dev/sd*) + suffix="${ROOT#/dev/sd}" + major="${suffix%[[:digit:]]}" + major="${major%[[:digit:]]}" + if [ -d "/sys/block/hd${major}" ]; then + echo "WARNING bootdevice may be renamed. Try root=/dev/hd${suffix}" + fi + ;; + esac echo "ALERT! ${ROOT} does not exist. Dropping to a shell!" echo " Check your root= boot argument (cat /proc/cmdline)" panic " Check for missing modules (cat /proc/modules), or device files (ls /dev)" -- cgit v1.2.3 From ea411290cf026aa07d8cf4c2a0f8154e0dbde977 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 20 Jun 2007 21:14:49 +0200 Subject: mkinitramfs: on wrong MODULES setting fallback to most this setting is known to be bootable, currently we would just create an unbootable initramfs. *bad* --- debian/changelog | 7 +++++-- mkinitramfs | 25 +++++++++++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d506d71..4993f97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,9 +8,12 @@ initramfs-tools (0.89) unstable; urgency=low Thanks "A. Costa" for the patch. * scripts/local: Try to warn for renamed root dev. (closes: #374611) - - -- maximilian attems Wed, 20 Jun 2007 20:56:14 +0200 + * minitramfs: Fall back to bootable default MODULES=most if unsupported + MODULES setting is passed. Thanks Henning Sprang + for report. (closes: #429144) + + -- maximilian attems Wed, 20 Jun 2007 21:06:43 +0200 initramfs-tools (0.88) unstable; urgency=low diff --git a/mkinitramfs b/mkinitramfs index a2e643c..d8a24fe 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -181,18 +181,27 @@ for x in "${CONFDIR}/modules" /usr/share/initramfs-tools/modules.d/*; do fi done -if [ "${MODULES}" = "dep" ]; then +# MODULES=most is default +case "${MODULES}" in +dep) dep_add_modules -fi - -if [ "${MODULES}" = "most" ]; then + ;; +most) auto_add_modules -fi - -if [ "${MODULES}" = "netboot" ]; then + ;; +netboot) auto_add_modules base auto_add_modules net -fi + ;; +list) + # nothing to add + ;; +*) + echo "mkinitramfs: Warning unsupported MODULES setting: ${MODULES}." + echo "mkinitramfs: Falling back to MODULES=most." + auto_add_modules + ;; +esac # Have to do each file, because cpio --dereference doesn't recurse down # symlinks. -- cgit v1.2.3 From 879602b218973fc7a5f92874bbaf41ea818fae31 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 21 Jun 2007 11:51:08 +0200 Subject: mkinitramfs: add patch from joeyh fixing arm boot acked by aurel32: 11:07 maks: I ack the fact to always add libgcc to arm, init needs libgcc1 for _Unwind_* functions --- debian/changelog | 12 +++++++----- mkinitramfs | 5 +++++ 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4993f97..e1aa7c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,19 +1,21 @@ initramfs-tools (0.89) unstable; urgency=low + [ maximilian attems ] * initramfs.conf.5: Document ROOT hardcoding. - * scripts/local: Use simpler fstype invocation. - * initramfs-tools.8, initramfs.conf.5: Fix typos. (closes: #427837, #427838) Thanks "A. Costa" for the patch. - * scripts/local: Try to warn for renamed root dev. (closes: #374611) - * minitramfs: Fall back to bootable default MODULES=most if unsupported MODULES setting is passed. Thanks Henning Sprang for report. (closes: #429144) - -- maximilian attems Wed, 20 Jun 2007 21:06:43 +0200 + [ Joey Hess ] + * mkinitramfs: Include libgcc_s.so.1 on arm since glibc always tries to load + it for the SJLJ exception handling on that architecture. (closes: #426395) + Thanks to Aurelien Jarno for ack and review. + + -- maximilian attems Thu, 21 Jun 2007 11:49:23 +0200 initramfs-tools (0.88) unstable; urgency=low diff --git a/mkinitramfs b/mkinitramfs index d8a24fe..e1cf857 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -261,6 +261,11 @@ copy_exec /sbin/rmmod /sbin mkdir -p "${DESTDIR}/etc/modprobe.d" cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d" +# workaround: libgcc always needed on old-abi arm +if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then + cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib" +fi + run_scripts /usr/share/initramfs-tools/hooks run_scripts "${CONFDIR}"/hooks -- cgit v1.2.3 From 728d6fc95b28254b982395e73153c5c422c81768 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 21 Jun 2007 11:58:14 +0200 Subject: hook-functions: fix variable typo --- debian/changelog | 3 ++- hook-functions | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e1aa7c8..6a17083 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,13 +9,14 @@ initramfs-tools (0.89) unstable; urgency=low * minitramfs: Fall back to bootable default MODULES=most if unsupported MODULES setting is passed. Thanks Henning Sprang for report. (closes: #429144) + * hook-functions: Fix variable typo. Thanks Emanuele Rocca . [ Joey Hess ] * mkinitramfs: Include libgcc_s.so.1 on arm since glibc always tries to load it for the SJLJ exception handling on that architecture. (closes: #426395) Thanks to Aurelien Jarno for ack and review. - -- maximilian attems Thu, 21 Jun 2007 11:49:23 +0200 + -- maximilian attems Thu, 21 Jun 2007 11:57:20 +0200 initramfs-tools (0.88) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 1b38931..a133a0b 100644 --- a/hook-functions +++ b/hook-functions @@ -41,7 +41,7 @@ add_modules_from_file() # Add dependent modules + eventual firmware manual_add_modules() { - local man_x firmwares firmware + local mam_x firmwares firmware for mam_x in $(modprobe --set-version="${version}" --ignore-install \ --show-depends "${1}" 2>/dev/null | awk '/^insmod/ { print $2 }'); do -- cgit v1.2.3 From 5ac61dd320ed9616a7e986fa824f804dbbd626af Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 4 Jul 2007 00:34:42 +0200 Subject: revert vol_id usage for now, when more matured this can be easily rechanged. --- debian/changelog | 17 +++++++++++------ scripts/local | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6a17083..3141edf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,11 @@ initramfs-tools (0.89) unstable; urgency=low + + Release "L'électeur c'est notoire N'a pas tout' sa raison" + + [ Joey Hess ] + * mkinitramfs: Include libgcc_s.so.1 on arm since glibc always tries to load + it for the SJLJ exception handling on that architecture. (closes: #426395) + Thanks to Aurelien Jarno for ack and review. [ maximilian attems ] * initramfs.conf.5: Document ROOT hardcoding. @@ -10,13 +17,11 @@ initramfs-tools (0.89) unstable; urgency=low MODULES setting is passed. Thanks Henning Sprang for report. (closes: #429144) * hook-functions: Fix variable typo. Thanks Emanuele Rocca . + * scripts/local: Revert change to use udev vol_id before fstype, + there are too many "wrongly" formated fs out there. fstype supports less, + but is more robust. - [ Joey Hess ] - * mkinitramfs: Include libgcc_s.so.1 on arm since glibc always tries to load - it for the SJLJ exception handling on that architecture. (closes: #426395) - Thanks to Aurelien Jarno for ack and review. - - -- maximilian attems Thu, 21 Jun 2007 11:57:20 +0200 + -- maximilian attems Wed, 04 Jul 2007 00:28:34 +0200 initramfs-tools (0.88) unstable; urgency=low diff --git a/scripts/local b/scripts/local index 10e2f73..b06ca63 100644 --- a/scripts/local +++ b/scripts/local @@ -10,9 +10,9 @@ get_fstype () # vol_id has a more complete list of file systems if [ -x /lib/udev/vol_id ]; then - FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null) - else eval $(fstype "${FS}" 2> /dev/null) + else + FSTYPE=$(/lib/udev/vol_id -t "${FS}" 2> /dev/null) fi RET=$? -- cgit v1.2.3 From 02b76d4d71a6e5c9cae1c0acaba281e3def583e0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 4 Jul 2007 00:49:14 +0200 Subject: hook-functions: fix Xen boot --- debian/changelog | 7 +++++++ hook-functions | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3141edf..bf883bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.90) UNRELEASED; urgency=low + + * hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754) + Thanks Marco Nenciarini for patch. + + -- maximilian attems Wed, 04 Jul 2007 00:45:20 +0200 + initramfs-tools (0.89) unstable; urgency=low Release "L'électeur c'est notoire N'a pas tout' sa raison" diff --git a/hook-functions b/hook-functions index a133a0b..131f132 100644 --- a/hook-functions +++ b/hook-functions @@ -147,7 +147,7 @@ copy_exec() { # Try to use non-optimised libraries where possible. # We assume that all HWCAP libraries will be in tls. - nonoptlib=$(echo "${x}" | sed -e 's#/lib/tls.*/\(lib.*\)#/lib/\1#') + nonoptlib=$(echo "${x}" | sed -e 's#/lib/\(tls\|i686\).*/\(lib.*\)#/lib/\2#') if [ -e "${nonoptlib}" ]; then x="${nonoptlib}" -- cgit v1.2.3 From b7ccd08326806dd1c46448610a77f6a2e015c5d4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 28 Jul 2007 18:10:25 +0200 Subject: copyright: old bzr tree gone kill dangling link. changes are imported into git. --- debian/copyright | 3 --- 1 file changed, 3 deletions(-) (limited to 'debian') diff --git a/debian/copyright b/debian/copyright index 2b3581a..b473ab4 100644 --- a/debian/copyright +++ b/debian/copyright @@ -3,9 +3,6 @@ Thu, 27 Jan 2005 15:23:52 -0500. The current Debian maintainer is maximilian attems -The source code up to 0.31 can be found by using "bzr" at: -http://people.ubuntu.com/~jbailey/bzrtree/initramfs-tools - The current ubuntu release can be found at: http://archive.ubuntu.com/ubuntu/pool/main/i/initramfs-tools/ -- cgit v1.2.3 From bc7a264c033d8236a7e2672b0165493f59878b54 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 28 Jul 2007 18:57:55 +0200 Subject: control: tighten dep on klibc-utils we need the etch version at least, so bump. --- debian/changelog | 6 ++++-- debian/control | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bf883bc..d3b579d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,11 +3,13 @@ initramfs-tools (0.90) UNRELEASED; urgency=low * hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754) Thanks Marco Nenciarini for patch. - -- maximilian attems Wed, 04 Jul 2007 00:45:20 +0200 + * debian/control: Bump dep on klibc-utils from etch. (closes: 435031) + + -- maximilian attems Sat, 28 Jul 2007 18:56:36 +0200 initramfs-tools (0.89) unstable; urgency=low - Release "L'électeur c'est notoire N'a pas tout' sa raison" + Release "L'\xE9lecteur c'est notoire N'a pas tout' sa raison" [ Joey Hess ] * mkinitramfs: Include libgcc_s.so.1 on arm since glibc always tries to load diff --git a/debian/control b/debian/control index da8730f..6a621e9 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.7.2.2 Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.4.19-2), busybox (>= 1:1.01-3) | busybox-initramfs, cpio, module-init-tools, udev (>= 0.086-1) +Depends: klibc-utils (>= 1.4.34-1), busybox (>= 1:1.01-3) | busybox-initramfs, cpio, module-init-tools, udev (>= 0.086-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 494e8cf2560b3d139273513899164219c7c2ae98 Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sat, 28 Jul 2007 19:06:11 +0200 Subject: hook-functions: Protect variables with local usage bonus minor coding style cleanup --- debian/changelog | 7 +++++-- hook-functions | 18 ++++++++++++------ 2 files changed, 17 insertions(+), 8 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d3b579d..c37028a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,14 @@ initramfs-tools (0.90) UNRELEASED; urgency=low + [ maximilian attems ] * hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754) Thanks Marco Nenciarini for patch. - * debian/control: Bump dep on klibc-utils from etch. (closes: 435031) - -- maximilian attems Sat, 28 Jul 2007 18:56:36 +0200 + [ David Härdeman ] + * hook-functions: Protect all variable with local, plus coding style fixes. + + -- maximilian attems Sat, 28 Jul 2007 19:03:35 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 131f132..b371cbb 100644 --- a/hook-functions +++ b/hook-functions @@ -169,20 +169,24 @@ copy_exec() { # Copy entire subtrees to the initramfs copy_modules_dir() { + local x_mod + if ! [ -d "${MODULESDIR}/${1}" ]; then return; fi - if [ -n "${verbose}" ] && [ "${verbose}" = "y" ]; then + if [ "${verbose}" = "y" ]; then echo "Copying module directory ${1}" fi for x_mod in $(find "${MODULESDIR}/${1}" -name '*.ko' -print); do - manual_add_modules `basename ${x_mod} .ko` + manual_add_modules $(basename ${x_mod} .ko) done } # only copy relevant modules dep_add_modules() { + local x + # findout root block device + fstype eval "$(mount | awk '/ \/ / {print "root=" $1 "\nrootfs=" $5; exit}')" block=${root#/dev/} @@ -319,10 +323,12 @@ EOF # minimal supported kernel version check_minkver() { - curversion=${1} - initdir=${2} - if [ -z ${initdir} ]; then - DPKG_ARCH=`dpkg --print-installation-architecture` + local curversion initdir DPKG_ARCH minversion cm_x tmp + + curversion="${1}" + initdir="${2}" + if [ -z "${initdir}" ]; then + DPKG_ARCH=$(dpkg --print-installation-architecture) case ${DPKG_ARCH} in ia64|hppa) minversion="2.6.15" -- cgit v1.2.3 From e23c0a34f51d053357fd6c171cd8edfd38bc3df0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 7 Aug 2007 01:19:38 +0200 Subject: scripts/functions: Implement non-zero panic boot arg sleep the passed time and then call reboot. works as arg can only be numeric. --- debian/changelog | 3 ++- initramfs-tools.8 | 4 ++-- scripts/functions | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c37028a..91f7ec9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,11 +4,12 @@ initramfs-tools (0.90) UNRELEASED; urgency=low * hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754) Thanks Marco Nenciarini for patch. * debian/control: Bump dep on klibc-utils from etch. (closes: 435031) + * scripts/functions: Implement non-zero panic bootarg. [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Sat, 28 Jul 2007 19:03:35 +0200 + -- maximilian attems Tue, 07 Aug 2007 01:18:25 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/initramfs-tools.8 b/initramfs-tools.8 index be4de54..3708575 100644 --- a/initramfs-tools.8 +++ b/initramfs-tools.8 @@ -1,4 +1,4 @@ -.TH INITRAMFS-TOOLS 8 "Date: 2007/04/09" "" "mkinitramfs script overview" +.TH INITRAMFS-TOOLS 8 "Date: 2007/07/07" "" "mkinitramfs script overview" .SH NAME initramfs-tools \- an introduction to writing scripts for mkinitramfs @@ -96,7 +96,7 @@ Use blacklist=module1,module2,module3 bootparameter. .TP \fB \fI panic -sets an timeout on panic. Currently only zero value supported. +sets an timeout on panic. .TP \fB \fI debug diff --git a/scripts/functions b/scripts/functions index 0b8d1e8..e73874d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -62,6 +62,9 @@ panic() # Disallow console access if [ -n "${panic}" ] && [ "${panic}" = 0 ]; then reboot + elif [ -n "${panic}" ]; then + sleep ${panic} + reboot fi modprobe i8042 modprobe atkbd @@ -71,7 +74,7 @@ panic() maybe_break() { - if [ x$1 = x${break} ]; then + if [ -n "${break}" ]; then panic "Spawning shell within the initramfs" fi } -- cgit v1.2.3 From f917408f4bb541f44973be3f7ef4a48ba6528e9a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 7 Aug 2007 14:10:17 +0200 Subject: scripts/functions: style fix for maybe_break() recover func from previous bogus change.. --- debian/changelog | 5 +++-- scripts/functions | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 91f7ec9..60f216b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,12 +4,13 @@ initramfs-tools (0.90) UNRELEASED; urgency=low * hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754) Thanks Marco Nenciarini for patch. * debian/control: Bump dep on klibc-utils from etch. (closes: 435031) - * scripts/functions: Implement non-zero panic bootarg. + * scripts/functions: Implement non-zero panic bootarg. Style fix for + maybe_break(). [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Tue, 07 Aug 2007 01:18:25 +0200 + -- maximilian attems Tue, 07 Aug 2007 14:09:18 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/scripts/functions b/scripts/functions index e73874d..2914aea 100644 --- a/scripts/functions +++ b/scripts/functions @@ -74,7 +74,7 @@ panic() maybe_break() { - if [ -n "${break}" ]; then + if [ "${break}" = "$1" ]; then panic "Spawning shell within the initramfs" fi } -- cgit v1.2.3 From ccb150b16473ce974a0fbbb236c0dd95a022ec43 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Aug 2007 01:02:16 +0200 Subject: hook-functions: fix dep_add_modules() for lvm, md and luks root a better shot and try for finding the underlying root devices in the case of MODULES=dep and /sys walk. dep_add_modules() should be splitted.. --- debian/changelog | 6 ++++-- hook-functions | 26 ++++++++++++++++++++++---- 2 files changed, 26 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 60f216b..f0da4a9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.90) UNRELEASED; urgency=low +initramfs-tools (0.90~beta1) UNRELEASED; urgency=low [ maximilian attems ] * hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754) @@ -6,11 +6,13 @@ initramfs-tools (0.90) UNRELEASED; urgency=low * debian/control: Bump dep on klibc-utils from etch. (closes: 435031) * scripts/functions: Implement non-zero panic bootarg. Style fix for maybe_break(). + * hook-functions: dep_add_modules() fix for md, lv, luks root. + (closes: #426917, #429237, #426446) [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Tue, 07 Aug 2007 14:09:18 +0200 + -- maximilian attems Wed, 08 Aug 2007 00:50:22 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/hook-functions b/hook-functions index b371cbb..ef4a94e 100644 --- a/hook-functions +++ b/hook-functions @@ -185,16 +185,34 @@ copy_modules_dir() # only copy relevant modules dep_add_modules() { - local x + local root rootfs block minor device_path module x # findout root block device + fstype eval "$(mount | awk '/ \/ / {print "root=" $1 "\nrootfs=" $5; exit}')" - block=${root#/dev/} - block=${block%[0-9]*} + + # lvm luks root + if [ "${root#/dev/mapper/}" != "${root}" ]; then + minor=$((0x$(stat --format "%T" ${root}) % 256)) + block=$(ls -1 /sys/block/dm-${minor}/slaves | head -n 1) + if [ "${block#dm-}" != "${block}" ]; then + block=$(ls -1 /sys/block/${block}/slaves | head -n 1) + fi + block=${block%[0-9]*} + # md root + elif [ "${root#/dev/md}" != "${root}" ]; then + root=${root#/dev/} + block=$(awk "/^${root}/{print substr(\$5, 1, 3); exit}" \ + /proc/mdstat) + # classical root device + else + block=${root#/dev/} + block=${block%[0-9]*} + fi # Error out if /sys lack block dev if [ -z "${block}" ] || [ ! -e /sys/block/${block} ]; then - echo "Error: missing ${block} root ${root} /sys entry" + echo "mkinitramfs: missing ${block} root ${root} /sys entry" + echo "mkinitramfs: Error use MODULES=most" exit 1 fi -- cgit v1.2.3 From 0b7e1a0bf6a45479301c5364c9888a4c6745227d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Aug 2007 01:19:23 +0200 Subject: debian/scripts: Add /etc/crypttab to reportbug script a big share of bugreports concern encrypted usage, that output is useful for /etc/fstab parsing. --- debian/changelog | 3 ++- debian/script | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f0da4a9..e54a808 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,11 +8,12 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low maybe_break(). * hook-functions: dep_add_modules() fix for md, lv, luks root. (closes: #426917, #429237, #426446) + * debian/scripts: Add /etc/crypttab to reportbug script. [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Wed, 08 Aug 2007 00:50:22 +0200 + -- maximilian attems Wed, 08 Aug 2007 01:17:29 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/debian/script b/debian/script index 5990db3..129513b 100755 --- a/debian/script +++ b/debian/script @@ -25,3 +25,9 @@ if [ -r /etc/initramfs-tools/initramfs.conf ]; then sed 's/#.*$//;/^[[:space:]]*$/d' /etc/initramfs-tools/initramfs.conf echo fi + +if [ -r /etc/crypttab ]; then + echo "-- /etc/crypttab" + cat /etc/crypttab + echo +fi -- cgit v1.2.3 From 665af22852513601ad93eb54d97542f7ab255a4c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Aug 2007 01:24:01 +0200 Subject: debian/script: add list of /sys/block on MODULES=dep a find might be a bit to verbose, so be happy for now with a q&d list. --- debian/changelog | 5 +++-- debian/script | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index e54a808..87ffed4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,12 +8,13 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low maybe_break(). * hook-functions: dep_add_modules() fix for md, lv, luks root. (closes: #426917, #429237, #426446) - * debian/scripts: Add /etc/crypttab to reportbug script. + * debian/scripts: Add /etc/crypttab to reportbug script. Add /sys/block + list for MODULES=dep to reportbug script. [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Wed, 08 Aug 2007 01:17:29 +0200 + -- maximilian attems Wed, 08 Aug 2007 01:22:00 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/debian/script b/debian/script index 129513b..3aaacd0 100755 --- a/debian/script +++ b/debian/script @@ -31,3 +31,9 @@ if [ -r /etc/crypttab ]; then cat /etc/crypttab echo fi + +if [ grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ]; then + echo "-- /sys/block" + ls /sys/block + echo +fi -- cgit v1.2.3 From a951e89170510a6877aaa0fd281a30f08106008e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Aug 2007 19:04:49 +0200 Subject: scripts/funtions: run_scripts() on verbose mode add error messages * add the error messages * fix double call to set_initlist * skip empty dirs at start --- debian/changelog | 6 +++++- scripts/functions | 13 ++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 87ffed4..05b837b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,11 +10,15 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low (closes: #426917, #429237, #426446) * debian/scripts: Add /etc/crypttab to reportbug script. Add /sys/block list for MODULES=dep to reportbug script. + * scripts/functions: Add error message on verbose mode about ignored files + in boot/hooks dir. Thanks Kornilios Kourtis + for the initial patch. Fixes a double set_initlist call too. Ignore empty + dirs earlier too. (closes: #433459) [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Wed, 08 Aug 2007 01:22:00 +0200 + -- maximilian attems Wed, 08 Aug 2007 18:57:20 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/scripts/functions b/scripts/functions index 2914aea..81174bf 100644 --- a/scripts/functions +++ b/scripts/functions @@ -88,20 +88,32 @@ set_initlist() { unset initlist for si_x in ${initdir}/*; do + # skip empty dirs without warning + [ "${si_x}" = "${initdir}/*" ] && return + # only allow variable name chars case ${si_x#${initdir}/} in *[![:alnum:]_]*) + [ "${verbose}" = "y" ] \ + && echo "$si_x ignored: not alphanumeric or '_' file" continue ;; esac + # skip non executable scripts if [ ! -x ${si_x} ]; then + [ "${verbose}" = "y" ] \ + && echo "$si_x ignored: not executable" continue fi + # skip directories if [ -d ${si_x} ]; then + [ "${verbose}" = "y" ] \ + && echo "$si_x ignored: a directory" continue fi + initlist="${initlist} ${si_x#${initdir}/}" done } @@ -171,7 +183,6 @@ pop_list_item() reduce_prereqs() { unset runlist - set_initlist set -- ${initlist} i=$# # Loop until there's no more in the queue to loop through -- cgit v1.2.3 From 788877833dc1e5201030927742f75b41bec324d7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Aug 2007 19:09:35 +0200 Subject: mkinitramfs.8: Document verbose mode. Strange forgot about the interface almost as not seen in manpage.. --- debian/changelog | 3 ++- mkinitramfs.8 | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 05b837b..4dfa781 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,11 +14,12 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low in boot/hooks dir. Thanks Kornilios Kourtis for the initial patch. Fixes a double set_initlist call too. Ignore empty dirs earlier too. (closes: #433459) + * mkinitramfs.8: Document verbose mode. [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Wed, 08 Aug 2007 18:57:20 +0200 + -- maximilian attems Wed, 08 Aug 2007 19:08:15 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/mkinitramfs.8 b/mkinitramfs.8 index 64fcc8d..a40de53 100644 --- a/mkinitramfs.8 +++ b/mkinitramfs.8 @@ -1,4 +1,4 @@ -.TH MKINITRAMFS 8 "$Date: 2007/05/01 $" "" "mkinitramfs manual" +.TH MKINITRAMFS 8 "$Date: 2007/08/08 $" "" "mkinitramfs manual" .SH NAME mkinitramfs \- low-level tool for generating an initramfs image @@ -12,6 +12,7 @@ mkinitramfs \- low-level tool for generating an initramfs image .IR outfile ] .RB [ \-r .IR root ] +.RB [ \-v ] .RI [ version ] .B mkinitramfs @@ -63,6 +64,10 @@ Override the setting in .IR initramfs.conf . +.TP +\fB \-v +Set the verbose mode output. + .TP \fI version Set the kernel version of the initramfs image -- cgit v1.2.3 From 9102a2d94ffd7b74ba8afc678836480f018b0d42 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Aug 2007 19:32:33 +0200 Subject: initramfs-tools.preinst: Inhibit resume var creation. don't create /etc/initramfs-tools/conf.d/resume in chroot for debian-live and other custom debian distributions which build their systems in a chroot. --- debian/changelog | 7 +++++-- debian/initramfs-tools.preinst | 14 +++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4dfa781..70685fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,13 +13,16 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low * scripts/functions: Add error message on verbose mode about ignored files in boot/hooks dir. Thanks Kornilios Kourtis for the initial patch. Fixes a double set_initlist call too. Ignore empty - dirs earlier too. (closes: #433459) + dirs earlier too. (closes: #428729, #433459) * mkinitramfs.8: Document verbose mode. + * debian/initramfs-tools.preinst: Inhibit /etc/initramfs-tools/conf.d/resume + creation in chroot for debian-live and other. (closes: #433190) + Thanks Kel Modderman for the patch. [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Wed, 08 Aug 2007 19:08:15 +0200 + -- maximilian attems Wed, 08 Aug 2007 19:29:23 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 1379766..6a8b88f 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -2,6 +2,17 @@ set -e +chrooted() { + # borrowed from udev's postinst + if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then + # the devicenumber/inode pair of / is the same as that of + # /sbin/init's root, so we're *not* in a chroot and hence + # return false. + return 1 + fi + return 0 +} + case "$1" in install) mkdir -p /etc/initramfs-tools/conf.d @@ -15,7 +26,8 @@ case "$1" in if [ -e /etc/mkinitrd/mkinitrd.conf ]; then . /etc/mkinitrd/mkinitrd.conf fi - if [ -n "${RESUME}" ]; then + # write conf.d/resume if not in a chroot + if [ -n "${RESUME}" ] && ! chrooted; then echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume fi -- cgit v1.2.3 From b6c5123351ce61299532e10ab933d21704e8a30b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 9 Aug 2007 20:45:31 +0200 Subject: update-initramfs: enhance altered error message. --- debian/changelog | 3 ++- update-initramfs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 70685fd..1097e16 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,11 +18,12 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low * debian/initramfs-tools.preinst: Inhibit /etc/initramfs-tools/conf.d/resume creation in chroot for debian-live and other. (closes: #433190) Thanks Kel Modderman for the patch. + * update-initramfs: Improve "altered" error message. (closes: #436752) [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Wed, 08 Aug 2007 19:29:23 +0200 + -- maximilian attems Thu, 09 Aug 2007 20:44:27 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/update-initramfs b/update-initramfs index 3c67f89..61f809e 100755 --- a/update-initramfs +++ b/update-initramfs @@ -410,7 +410,8 @@ altered_check() mild_panic "${initramfs} does not exist. Cannot update." fi if ! compare_sha1; then - mild_panic "${initramfs} has been altered. Cannot update." + echo "update-initramfs: ${initramfs} has been altered." >&2 + mild_panic "update-initramfs: Cannot update. Override with -t option." fi } -- cgit v1.2.3 From aad955549a7f103ff92520f37726344cc08797ec Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 9 Aug 2007 21:22:10 +0200 Subject: update_initramfs tristate variable "all" allow admin to set that an update-initramfs postinst call should update any known initramfs. --- conf/update-initramfs.conf | 3 ++- debian/changelog | 5 ++++- update-initramfs | 4 +++- update-initramfs.conf.5 | 3 ++- 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/conf/update-initramfs.conf b/conf/update-initramfs.conf index 278c51c..c08c6ed 100644 --- a/conf/update-initramfs.conf +++ b/conf/update-initramfs.conf @@ -3,9 +3,10 @@ # # -# update_initramfs [ yes | no ] +# update_initramfs [ yes | all | no ] # # Default is yes +# If set to all update-initramfs will update all initramfs # If set to no disables any update to initramfs beside kernel upgrade update_initramfs=yes diff --git a/debian/changelog b/debian/changelog index 1097e16..97d9f26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,11 +19,14 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low creation in chroot for debian-live and other. (closes: #433190) Thanks Kel Modderman for the patch. * update-initramfs: Improve "altered" error message. (closes: #436752) + * update-initramfs, update-initramfs.conf: update_initramfs config variable + is tristate. Set to 'all' to update any initramfs: $(update-initramfs -u). + Allows specific admin setting. (closes: #425050) [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Thu, 09 Aug 2007 20:44:27 +0200 + -- maximilian attems Thu, 09 Aug 2007 21:20:34 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/update-initramfs b/update-initramfs index 61f809e..774da61 100755 --- a/update-initramfs +++ b/update-initramfs @@ -464,7 +464,8 @@ if [ -z "${mode}" ]; then usage "You must specify at least one of -c, -u, or -d." fi -if [ "${version}" = "all" ]; then +if [ "${version}" = "all" ] \ + || ( [ "${update_initramfs}" = "all" ] && [ -z "${version}" ] ); then : FIXME check for --yes, and if not ask are you sure get_sorted_versions if [ -z "${version_list}" ]; then @@ -492,6 +493,7 @@ if [ "${version}" = "all" ]; then exit 0 fi + case "${mode}" in c) create diff --git a/update-initramfs.conf.5 b/update-initramfs.conf.5 index 302cffe..58e3cc4 100644 --- a/update-initramfs.conf.5 +++ b/update-initramfs.conf.5 @@ -1,4 +1,4 @@ -.TH UPDATE-INITRAMFS.CONF 5 "$Date: 2006/12/22 $" "" "update-initramfs.conf manual" +.TH UPDATE-INITRAMFS.CONF 5 "$Date: 2007/08/09 $" "" "update-initramfs.conf manual" .SH NAME update-initramfs.conf \- configuration file for update-initramfs @@ -12,6 +12,7 @@ The configuration file allows to disable the update action from \fB update_initramfs Default is \fIyes\fP for running the latest initramfs-tools hooks in the newest Linux image. +Setting it to \fIall\fP updates any known initramfs. It is possible to set it to \fIno\fP for remote servers or boxes where conservative manners needs to be applied. This disables the \fBupdate_initramfs -u\fP call. -- cgit v1.2.3 From 8b4b8b0ced679130f768cb10df8f78c1bb513281 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 9 Aug 2007 21:41:08 +0200 Subject: release 0.90 push out enough pending stuff. --- debian/changelog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 97d9f26..32992b8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ -initramfs-tools (0.90~beta1) UNRELEASED; urgency=low +initramfs-tools (0.90) unstable; urgency=low + + Release "J'aim' pas le fataliste Je n'ai ni foi ni loi" [ maximilian attems ] * hook-functions: Fix xen i386 boots with optimized 2.5. (closes: 420754) @@ -26,7 +28,7 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Thu, 09 Aug 2007 21:20:34 +0200 + -- maximilian attems Thu, 09 Aug 2007 21:30:29 +0200 initramfs-tools (0.89) unstable; urgency=low -- cgit v1.2.3 From 45e9e24621bb7833ef20cc4c0a8ee1c4f2c8eefa Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 16 Aug 2007 00:26:25 +0200 Subject: mkinitramfs: kick empty modules dir assume a s/ /\// was meant ;) --- debian/changelog | 7 +++++++ mkinitramfs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 32992b8..34f7103 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.91) unstable; urgency=low + + * scripts/functions: simplify panic() + * mkinitramfs: Kick empty dir modules. + + -- maximilian attems Thu, 16 Aug 2007 00:25:22 +0200 + initramfs-tools (0.90) unstable; urgency=low Release "J'aim' pas le fataliste Je n'ai ni foi ni loi" diff --git a/mkinitramfs b/mkinitramfs index e1cf857..c7a4598 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -170,7 +170,7 @@ export KEYMAP # Private, used by 'catenate_cpiogz'. export __TMPCPIOGZ -for d in bin conf/conf.d etc lib modules sbin scripts ${MODULESDIR}; do +for d in bin conf/conf.d etc lib/modules sbin scripts ${MODULESDIR}; do mkdir -p "${DESTDIR}/${d}" done -- cgit v1.2.3 From 286148ccc99630bb60168e27b6aba1b14c1f737f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 16 Aug 2007 10:07:42 +0200 Subject: hook-functions factor out sys_walk_mod_add() add it as a function of it's own --- debian/changelog | 3 ++- hook-functions | 36 ++++++++++++++++++++++-------------- 2 files changed, 24 insertions(+), 15 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 34f7103..da0b63e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,9 @@ initramfs-tools (0.91) unstable; urgency=low * scripts/functions: simplify panic() * mkinitramfs: Kick empty dir modules. + * hook-functions: Factor sys_walk_mod_add() out of dep_add_modules(). - -- maximilian attems Thu, 16 Aug 2007 00:25:22 +0200 + -- maximilian attems Thu, 16 Aug 2007 10:06:09 +0200 initramfs-tools (0.90) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 0f66aa2..0a50051 100644 --- a/hook-functions +++ b/hook-functions @@ -182,10 +182,28 @@ copy_modules_dir() done } -# only copy relevant modules +# walk /sys for relevant modules +sys_walk_mod_add() +{ + local driver_path module + device_path="$1" + + while [ "${device_path}" != "/sys" ]; do + driver_path="$(readlink -f ${device_path}/driver)" + if [ -e "$driver_path" ]; then + module="$(basename $(readlink -f $driver_path))" + if [ -n "${module}" ]; then + force_load "${module}" + fi + fi + device_path="$(dirname ${device_path})" + done +} + +# find and only copy root relevant modules dep_add_modules() { - local root rootfs block minor device_path module x + local block minor root rootfs root_dev_path x # findout root block device + fstype eval "$(mount | awk '/ \/ / {print "root=" $1 "\nrootfs=" $5; exit}')" @@ -220,18 +238,8 @@ dep_add_modules() # Add rootfs force_load "${rootfs}" - # walk /sys for relevant modules - device_path=$(readlink -f /sys/block/${block}/device) - while [ "${device_path}" != "/sys" ]; do - driver_path="$(readlink -f ${device_path}/driver)" - if [ -e "$driver_path" ]; then - module="$(basename $(readlink -f $driver_path))" - if [ -n "${module}" ]; then - force_load "${module}" - fi - fi - device_path="$(dirname ${device_path})" - done + root_dev_path=$(readlink -f /sys/block/${block}/device) + sys_walk_mod_add ${root_dev_path} if [ -e /proc/ide ]; then for x in ide-generic ide-disk ide-cd; do -- cgit v1.2.3 From 5489c2f911a1259e9ad7ccdb5b90af529f912ffa Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 21 Aug 2007 17:09:32 +0200 Subject: init: Fix mount options invocation for klibc mount. --- debian/changelog | 3 ++- init | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index da0b63e..5d42ec6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,8 +3,9 @@ initramfs-tools (0.91) unstable; urgency=low * scripts/functions: simplify panic() * mkinitramfs: Kick empty dir modules. * hook-functions: Factor sys_walk_mod_add() out of dep_add_modules(). + * init: Fix mount options invocation for klibc mount. - -- maximilian attems Thu, 16 Aug 2007 10:06:09 +0200 + -- maximilian attems Tue, 21 Aug 2007 17:08:48 +0200 initramfs-tools (0.90) unstable; urgency=low diff --git a/init b/init index 0da01d4..3ea9ef4 100755 --- a/init +++ b/init @@ -8,8 +8,8 @@ echo "Loading, please wait..." [ -d /proc ] || mkdir /proc [ -d /tmp ] || mkdir /tmp mkdir -p /var/lock -mount -t sysfs none /sys -o nodev,noexec,nosuid -mount -t proc none /proc -o nodev,noexec,nosuid +mount -t sysfs -o nodev,noexec,nosuid none /sys +mount -t proc -o nodev,noexec,nosuid none /proc # Note that this only becomes /dev on the real filesystem if udev's scripts # are used; which they will be, but it's worth pointing out -- cgit v1.2.3 From b15ec51af8521331dc74814d3582fdbb492589d0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 23 Aug 2007 14:32:55 +0200 Subject: hook-functions: Add the new firewire modules. --- debian/changelog | 3 ++- hook-functions | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 5d42ec6..a60168d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,9 @@ initramfs-tools (0.91) unstable; urgency=low * mkinitramfs: Kick empty dir modules. * hook-functions: Factor sys_walk_mod_add() out of dep_add_modules(). * init: Fix mount options invocation for klibc mount. + * hook-functions: Add the new firewire modules. - -- maximilian attems Tue, 21 Aug 2007 17:08:48 +0200 + -- maximilian attems Thu, 23 Aug 2007 14:31:59 +0200 initramfs-tools (0.90) unstable; urgency=low diff --git a/hook-functions b/hook-functions index 0a50051..61af0a5 100644 --- a/hook-functions +++ b/hook-functions @@ -300,11 +300,17 @@ auto_add_modules() block) copy_modules_dir kernel/drivers/block ;; + # FIXME: can be removed after Lenny release ieee1394) for x in ohci1394 sbp2; do manual_add_modules "${x}" done ;; + firewire) + for x in firewire-ohci firewire-sbp2; do + manual_add_modules "${x}" + done + ;; i2o) for x in i2o_block; do manual_add_modules "${x}" @@ -325,6 +331,7 @@ auto_add_modules() auto_add_modules i2o auto_add_modules dasd auto_add_modules ieee1394 + auto_add_modules firewire ;; esac } -- cgit v1.2.3 From 0c76f85851b7c15a24776c74813e29052357f15d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 23 Aug 2007 15:05:05 +0200 Subject: release 0.90a --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a60168d..ed6b6d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.91) unstable; urgency=low +initramfs-tools (0.90a) unstable; urgency=high * scripts/functions: simplify panic() * mkinitramfs: Kick empty dir modules. @@ -6,7 +6,7 @@ initramfs-tools (0.91) unstable; urgency=low * init: Fix mount options invocation for klibc mount. * hook-functions: Add the new firewire modules. - -- maximilian attems Thu, 23 Aug 2007 14:31:59 +0200 + -- maximilian attems Thu, 23 Aug 2007 14:37:51 +0200 initramfs-tools (0.90) unstable; urgency=low -- cgit v1.2.3 From 0d04c24d798c34d00faf812cc82b80df5e6360c6 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 25 Aug 2007 13:38:54 +0200 Subject: initramfs-tools: axe udev_helper --- debian/changelog | 7 +++++++ scripts/local-top/udev_helper | 23 ----------------------- 2 files changed, 7 insertions(+), 23 deletions(-) delete mode 100755 scripts/local-top/udev_helper (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ed6b6d3..dc62b5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.91) UNRELEASED; urgency=low + + * udev_helper: Axe the modprobe ide-generic should no longer be needed + for kernel since Etch. + + -- maximilian attems Sat, 25 Aug 2007 13:37:15 +0200 + initramfs-tools (0.90a) unstable; urgency=high * scripts/functions: simplify panic() diff --git a/scripts/local-top/udev_helper b/scripts/local-top/udev_helper deleted file mode 100755 index c1694b7..0000000 --- a/scripts/local-top/udev_helper +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# If we're booting from IDE, it might not be a PCI controller, -# 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 ide-generic -fi -- cgit v1.2.3 From f0942dc8aceb12e2e802a80e81a62f596424c407 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 25 Aug 2007 14:21:26 +0200 Subject: debian/control: updates * add vcs fields * mv busybox from depends to recommneds, as should be found in all but unusual installations * tighten dep on latest klibc --- debian/changelog | 4 +++- debian/control | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index dc62b5a..1d1fc29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * udev_helper: Axe the modprobe ide-generic should no longer be needed for kernel since Etch. + * debian/control: Tighten dep on latest klibc for BUSYBOX=n usage. + Add XS-Vcs-* fields. Mv busybox from Depends to Recommends. - -- maximilian attems Sat, 25 Aug 2007 13:37:15 +0200 + -- maximilian attems Sat, 25 Aug 2007 14:04:17 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/debian/control b/debian/control index 6a621e9..4a3be89 100644 --- a/debian/control +++ b/debian/control @@ -5,10 +5,13 @@ Uploaders: Jeff Bailey , maximilian attems Maintainer: Debian kernel team Build-Depends: debhelper (>= 4.1.0), cdbs Standards-Version: 3.7.2.2 +XS-Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git +XS-Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Package: initramfs-tools Architecture: all -Depends: klibc-utils (>= 1.4.34-1), busybox (>= 1:1.01-3) | busybox-initramfs, cpio, module-init-tools, udev (>= 0.086-1) +Recommends: busybox (>= 1:1.01-3) | busybox-initramfs +Depends: klibc-utils (>= 1.5.6-1), cpio, module-init-tools, udev (>= 0.086-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 45aa4bb4bf35e8577c5de25cf3bf9b80f72f9b8e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 25 Aug 2007 14:32:07 +0200 Subject: mkinitramfs: cope when no busybox is around only warn on cases where we know that busybox is needed. --- debian/changelog | 3 ++- mkinitramfs | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1d1fc29..bba283d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low for kernel since Etch. * debian/control: Tighten dep on latest klibc for BUSYBOX=n usage. Add XS-Vcs-* fields. Mv busybox from Depends to Recommends. + * mkinitramfs: Cope when no busybox is around warn on md/lvm root. - -- maximilian attems Sat, 25 Aug 2007 14:04:17 +0200 + -- maximilian attems Sat, 25 Aug 2007 14:29:42 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/mkinitramfs b/mkinitramfs index c7a4598..71c1332 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -244,9 +244,14 @@ if [ -n "${ROOT}" ]; then fi # Busybox -if [ "x${BUSYBOX}" = "xn" ]; then - ln -s ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh - echo "Warning: Busybox is required for successful boot!" +if [ "${BUSYBOX}" = "n" ] || [ ! -e ${BUSYBOXDIR}/busybox ]; then + mv ${DESTDIR}/bin/sh.shared ${DESTDIR}/bin/sh + # those root need busybox + eval "$(mount | awk '/ \/ / {print "r_dev=" $1; exit}')" + if [ "${r_dev#/dev/mapper/}" != "${r_dev}" ] \ + || [ "${r_dev#/dev/md}" != "${r_dev}" ]; then + echo "Warning: Busybox is required for successful boot!" + fi else rm -f ${DESTDIR}/bin/sh rm -f ${DESTDIR}/bin/busybox -- cgit v1.2.3 From 6119c2636fc78af4049a5facc584325521ca19f8 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 25 Aug 2007 14:36:20 +0200 Subject: mkinitramfs: kill kinit.shared too --- debian/changelog | 3 ++- mkinitramfs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bba283d..26a76aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * debian/control: Tighten dep on latest klibc for BUSYBOX=n usage. Add XS-Vcs-* fields. Mv busybox from Depends to Recommends. * mkinitramfs: Cope when no busybox is around warn on md/lvm root. + * mkinitramfs: Kill kinit.shared too. - -- maximilian attems Sat, 25 Aug 2007 14:29:42 +0200 + -- maximilian attems Sat, 25 Aug 2007 14:35:38 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/mkinitramfs b/mkinitramfs index 71c1332..90a7702 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -209,7 +209,7 @@ esac # klibc ln -s /usr/lib/klibc/bin/* ${DESTDIR}/bin ln -s /lib/klibc-*.so ${DESTDIR}/lib -rm -f ${DESTDIR}/bin/kinit ${DESTDIR}/bin/gzip +rm -f ${DESTDIR}/bin/kinit* ${DESTDIR}/bin/gzip copy_exec /usr/share/initramfs-tools/init /init -- cgit v1.2.3 From cd3e97b5b87380e8d1700c6f86d907ad40a1179d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 25 Aug 2007 19:11:44 +0200 Subject: scripts/local: small CodingStyle quote readonly variable --- debian/changelog | 3 ++- scripts/local | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 26a76aa..1031a50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,8 +6,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low Add XS-Vcs-* fields. Mv busybox from Depends to Recommends. * mkinitramfs: Cope when no busybox is around warn on md/lvm root. * mkinitramfs: Kill kinit.shared too. + * scripts/local: Quote readonly variable. (LP: #115807) - -- maximilian attems Sat, 25 Aug 2007 14:35:38 +0200 + -- maximilian attems Sat, 25 Aug 2007 19:10:20 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/scripts/local b/scripts/local index 55d4c46..b55212e 100644 --- a/scripts/local +++ b/scripts/local @@ -101,7 +101,7 @@ mountroot () run_scripts /scripts/local-premount [ "$quiet" != "y" ] && log_end_msg - if [ ${readonly} = y ]; then + if [ "${readonly}" = "y" ]; then roflag=-r else roflag=-w -- cgit v1.2.3 From f26697d21e617646da61bed3c88e48be1d781cf5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 27 Aug 2007 10:10:40 +0200 Subject: mkinitramfs, hooks/keymap: add trailing slash to cp destionation just make sure we really copy into a dir and not a file. --- debian/changelog | 3 ++- hooks/keymap | 2 +- mkinitramfs | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1031a50..07bf916 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,8 +7,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * mkinitramfs: Cope when no busybox is around warn on md/lvm root. * mkinitramfs: Kill kinit.shared too. * scripts/local: Quote readonly variable. (LP: #115807) + * mkinitramfs, scripts/keymap: Add trailing slash on cp destination for dir. - -- maximilian attems Sat, 25 Aug 2007 19:10:20 +0200 + -- maximilian attems Mon, 27 Aug 2007 10:09:25 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/hooks/keymap b/hooks/keymap index 749f24c..a2b1b08 100755 --- a/hooks/keymap +++ b/hooks/keymap @@ -27,7 +27,7 @@ fi . /usr/share/initramfs-tools/hook-functions copy_exec /bin/loadkeys /bin -cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc +cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc/ # Step 2 - Check for UTF8 console if [ ! -x /usr/bin/kbd_mode ]; then diff --git a/mkinitramfs b/mkinitramfs index 90a7702..4ba9cd4 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -219,13 +219,13 @@ for b in $(cd /usr/share/initramfs-tools/scripts/ && find . \ [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" cp -p "/usr/share/initramfs-tools/scripts/${b}" \ - "${DESTDIR}/scripts/$(dirname "${b}")" + "${DESTDIR}/scripts/$(dirname "${b}")/" done for b in $(cd "${CONFDIR}/scripts" && find . \ -regextype posix-extended -regex '.*/[[:alnum:]_]+$' -type f); do [ -d "${DESTDIR}/scripts/$(dirname "${b}")" ] \ || mkdir -p "${DESTDIR}/scripts/$(dirname "${b}")" - cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")" + cp -p "${CONFDIR}/scripts/${b}" "${DESTDIR}/scripts/$(dirname "${b}")/" done echo "DPKG_ARCH=${DPKG_ARCH}" > ${DESTDIR}/conf/arch.conf @@ -264,11 +264,11 @@ copy_exec /sbin/modprobe /sbin copy_exec /sbin/depmod /sbin copy_exec /sbin/rmmod /sbin mkdir -p "${DESTDIR}/etc/modprobe.d" -cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d" +cp -a /etc/modprobe.d/* "${DESTDIR}/etc/modprobe.d/" # workaround: libgcc always needed on old-abi arm if [ "$DPKG_ARCH" = arm ] || [ "$DPKG_ARCH" = armeb ]; then - cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib" + cp -a /lib/libgcc_s.so.1 "${DESTDIR}/lib/" fi run_scripts /usr/share/initramfs-tools/hooks -- cgit v1.2.3 From 928ed0689705f52a757e23478783b4ade1423944 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 1 Sep 2007 10:48:03 +0200 Subject: init: call panic if run-init fails --- debian/changelog | 3 ++- init | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 07bf916..36a3b81 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,8 +8,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * mkinitramfs: Kill kinit.shared too. * scripts/local: Quote readonly variable. (LP: #115807) * mkinitramfs, scripts/keymap: Add trailing slash on cp destination for dir. + * init: Call panic for debug sh if run-init fails. - -- maximilian attems Mon, 27 Aug 2007 10:09:25 +0200 + -- maximilian attems Sat, 01 Sep 2007 10:45:04 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/init b/init index 3ea9ef4..53c228a 100755 --- a/init +++ b/init @@ -186,3 +186,4 @@ fi # Chain to real filesystem maybe_break init exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console >${rootmnt}/dev/console +panic "Could not execute run-init." -- cgit v1.2.3 From 971f6f778035b49afaea9be8408f90cccb6b548b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 1 Sep 2007 10:56:59 +0200 Subject: init-top/framebuffer: Check that fb minor is below 32. you can only have up to 32 fb devices going from fb0 to fb31. --- debian/changelog | 3 ++- scripts/init-top/framebuffer | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 36a3b81..6a1d1f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,8 +9,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * scripts/local: Quote readonly variable. (LP: #115807) * mkinitramfs, scripts/keymap: Add trailing slash on cp destination for dir. * init: Call panic for debug sh if run-init fails. + * init-top/framebuffer: Check that fb minor is below 32. - -- maximilian attems Sat, 01 Sep 2007 10:45:04 +0200 + -- maximilian attems Sat, 01 Sep 2007 10:55:33 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/scripts/init-top/framebuffer b/scripts/init-top/framebuffer index 08e36d2..9292024 100755 --- a/scripts/init-top/framebuffer +++ b/scripts/init-top/framebuffer @@ -88,7 +88,9 @@ fi if [ -e /proc/fb ]; then while read fbno desc; do - mknod /dev/fb${fbno} c 29 ${fbno} + if [ $(($fbnum < 32)) ]; then + mknod /dev/fb${fbno} c 29 ${fbno} + fi done < /proc/fb else mknod /dev/fb0 c 29 0 -- cgit v1.2.3 From f2f808cfeaf4350f4f300c689eccea88a327793d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 1 Sep 2007 13:42:16 +0200 Subject: init: export noresume fo uswsusp and kdump --- debian/changelog | 3 ++- init | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6a1d1f3..66dceea 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,8 +10,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * mkinitramfs, scripts/keymap: Add trailing slash on cp destination for dir. * init: Call panic for debug sh if run-init fails. * init-top/framebuffer: Check that fb minor is below 32. + * init: Export noresume if set. uswsusp and kdump need it. - -- maximilian attems Sat, 01 Sep 2007 10:55:33 +0200 + -- maximilian attems Sat, 01 Sep 2007 13:40:24 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/init b/init index 53c228a..72b59f2 100755 --- a/init +++ b/init @@ -95,10 +95,10 @@ for x in $(cat /proc/cmdline); do BOOT=${x#boot=} ;; resume=*) - RESUME="${x#resume=}" + resume="${x#resume=}" ;; noresume) - NORESUME=y + noresume=y ;; panic=*) panic="${x#panic=}" @@ -138,8 +138,10 @@ for x in $(cat /proc/cmdline); do esac done -if [ -z "${NORESUME}" ]; then - export resume=${RESUME} +if [ -z "${noresume}" ]; then + export resume=${resume} +else + export noresume fi depmod -a -- cgit v1.2.3 From 748cff514e9033e1a7984f26ece7ed25079e3535 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 3 Sep 2007 11:45:39 +0200 Subject: init: search for valid init Fixes bootfailure on bogus init bootarg too. Plus there may be a rootfs without init, but with sh. --- debian/changelog | 4 +++- init | 23 ++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 66dceea..0bdb6b9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,8 +11,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * init: Call panic for debug sh if run-init fails. * init-top/framebuffer: Check that fb minor is below 32. * init: Export noresume if set. uswsusp and kdump need it. + * init: Try harder to find a valid init on rootmnt. Fixes bootfailure on + bogus init bootarg too. - -- maximilian attems Sat, 01 Sep 2007 13:40:24 +0200 + -- maximilian attems Mon, 03 Sep 2007 11:44:04 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/init b/init index 6d06bc1..e66cac2 100755 --- a/init +++ b/init @@ -176,9 +176,26 @@ run_scripts /scripts/init-bottom mount -n -o move /sys ${rootmnt}/sys mount -n -o move /proc ${rootmnt}/proc -while [ ! -x ${rootmnt}${init} ]; do - panic "Target filesystem doesn't have ${init}" -done +# Check init bootarg +if [ -n "${init}" ] && [ ! -x "${rootmnt}${init}" ]; then + init= + echo "Target filesystem doesn't have ${init}." +fi + +# Search for valid init +if [ -z "${init}" ] ; then + for init in /sbin/init /etc/init /bin/init /bin/sh; do + if [ ! -x "${rootmnt}${i}" ]; then + continue + fi + break + done +fi + +# No init on rootmount +if [ ! -x "${rootmnt}${init}" ]; then + panic "No init found. Try passing init= bootarg." +fi # Confuses /etc/init.d/rc if [ -n ${debug} ]; then -- cgit v1.2.3 From 5ac8a35ffa7db1c1295f46c75e6b8cc7cd698546 Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Tue, 4 Sep 2007 10:41:07 +0200 Subject: initramfs-tools: split networking code into separate function ltsp in ubuntu started using NBD+unionfs+squashfs instead of NFS, and debian-live uses has a network boot methods using cifs in addition to a different way of using NFS (i think it also uses unionfs and maybe squashfs, not just a plain NFS/cifs mount)... so splitting out the networking related code into a separate function would move towards not having forked code for all of these different network boot methods. at least, that's my hope. --- debian/changelog | 4 +++- scripts/functions | 35 +++++++++++++++++++++++++++++++++++ scripts/nfs | 33 ++------------------------------- 3 files changed, 40 insertions(+), 32 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0bdb6b9..f5ace4e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -13,8 +13,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * init: Export noresume if set. uswsusp and kdump need it. * init: Try harder to find a valid init on rootmnt. Fixes bootfailure on bogus init bootarg too. + * scripts/{functions,nfs}: Split networking code in separate function. + Thanks Vagrant Cascadian for the patch. - -- maximilian attems Mon, 03 Sep 2007 11:44:04 +0200 + -- maximilian attems Tue, 04 Sep 2007 10:39:07 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/scripts/functions b/scripts/functions index db223cd..fdd808f 100644 --- a/scripts/functions +++ b/scripts/functions @@ -270,3 +270,38 @@ parse_numeric() { chmod 600 /dev/root ROOT=/dev/root } + +configure_networking() +{ + # support ip options see linux sources Documentation/nfsroot.txt + case ${IPOPTS} in + none|off) + # Do nothing + ;; + ""|on|any) + # Bring up device + ipconfig ${DEVICE} + ;; + dhcp|bootp|rarp|both) + ipconfig -c ${IPOPTS} -d ${DEVICE} + ;; + *) + ipconfig -d $IPOPTS + + # grab device entry from ip option + NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} + if [ "${NEW_DEVICE}" != "${IPOPTS}" ]; then + NEW_DEVICE=${NEW_DEVICE%:*} + else + # wrong parse, possibly only a partial string + NEW_DEVICE= + fi + if [ -n "${NEW_DEVICE}" ]; then + DEVICE="${NEW_DEVICE}" + fi + ;; + esac + + # source relevant ipconfig output + . /tmp/net-${DEVICE}.conf +} diff --git a/scripts/nfs b/scripts/nfs index 717dfe8..b9c2522 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -4,40 +4,11 @@ retry_nr=0 -# parse nfs bootargs + launch ipconfig and nfsmount +# parse nfs bootargs and mount nfs do_nfsmount() { - # support ip options see linux sources Documentation/nfsroot.txt - case ${IPOPTS} in - none|off) - # Do nothing - ;; - ""|on|any) - # Bring up device - ipconfig ${DEVICE} - ;; - dhcp|bootp|rarp|both) - ipconfig -c ${IPOPTS} -d ${DEVICE} - ;; - *) - ipconfig -d $IPOPTS - # grab device entry from ip option - NEW_DEVICE=${IPOPTS#*:*:*:*:*:*} - if [ "${NEW_DEVICE}" != "${IPOPTS}" ]; then - NEW_DEVICE=${NEW_DEVICE%:*} - else - # wrong parse, possibly only a partial string - NEW_DEVICE= - fi - if [ -n "${NEW_DEVICE}" ]; then - DEVICE="${NEW_DEVICE}" - fi - ;; - esac - - # source relevant ipconfig output - . /tmp/net-${DEVICE}.conf + configure_networking # get nfs root from dhcp if [ "x${NFSROOT}" = "xauto" ]; then -- cgit v1.2.3 From 803cf67dabfe32516f2ed08ba76dc9de7f9311cb Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 4 Sep 2007 11:35:32 +0200 Subject: update-initramfs: Don't check for ro /boot inside of a chroot. debian-live may as well be build on a host with ro /boot --- debian/changelog | 3 ++- update-initramfs | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f5ace4e..f479eb9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low bogus init bootarg too. * scripts/{functions,nfs}: Split networking code in separate function. Thanks Vagrant Cascadian for the patch. + * update-initramfs: Don't check for ro /boot inside of a chroot. - -- maximilian attems Tue, 04 Sep 2007 10:39:07 +0200 + -- maximilian attems Tue, 04 Sep 2007 11:34:15 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/update-initramfs b/update-initramfs index 774da61..a257f1c 100755 --- a/update-initramfs +++ b/update-initramfs @@ -33,6 +33,19 @@ EOF exit 1 } +# chroot check +chrooted() +{ + # borrowed from udev's postinst + if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i /proc/1/root 2>/dev/null)" ]; then + # the devicenumber/inode pair of / is the same as that of + # /sbin/init's root, so we're *not* in a chroot and hence + # return false. + return 1 + fi + return 0 +} + mild_panic() { if [ -n "${1}" ]; then @@ -86,7 +99,7 @@ backup_booted_initramfs() # first time run thus no backup [ ! -r "${initramfs_bak}" ] && return 0 - # chroot + # chroot with no /proc [ ! -r /proc/uptime ] && rm -f "${initramfs_bak}" && return 0 # no kept backup wanted @@ -248,7 +261,11 @@ delete_sha1() # ro /boot is not modified ro_boot_check() { - [ -r /proc/mounts ] || return 0 + # check irrelevant inside of a chroot + if [ ! -r /proc/mounts ] || chrooted; then + return 0 + fi + boot_opts=$(awk '/boot/{if (match($4, /ro/) && $2 == "/boot") print "ro"}' /proc/mounts) if [ -n "${boot_opts}" ]; then -- cgit v1.2.3 From c559ab5d603454e9d3281e4e399bf5cc9f0f1ce3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 7 Sep 2007 15:11:13 +0200 Subject: debian/script: Fix syntax of MODULES=dep block. thanks madduck for reporting the error: [: 39: -q: unexpected operator --- debian/changelog | 3 ++- debian/script | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f479eb9..78a6922 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * scripts/{functions,nfs}: Split networking code in separate function. Thanks Vagrant Cascadian for the patch. * update-initramfs: Don't check for ro /boot inside of a chroot. + * debian/script: Fix syntax of MODULES=dep block. - -- maximilian attems Tue, 04 Sep 2007 11:34:15 +0200 + -- maximilian attems Fri, 07 Sep 2007 15:10:11 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/debian/script b/debian/script index 3aaacd0..706a84d 100755 --- a/debian/script +++ b/debian/script @@ -32,7 +32,7 @@ if [ -r /etc/crypttab ]; then echo fi -if [ grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ]; then +if grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ; then echo "-- /sys/block" ls /sys/block echo -- cgit v1.2.3 From 41f9c1621e502a4af2f00f063d42e0f4ac53d6c2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 7 Sep 2007 18:29:36 +0200 Subject: hook-functions: probe rootfs on auto type fix dep_add_modules(), as bonus check rootfs output so that eventual unkown rootfs get reported. --- debian/changelog | 4 +++- hook-functions | 19 ++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 78a6922..6d8b335 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,8 +17,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low Thanks Vagrant Cascadian for the patch. * update-initramfs: Don't check for ro /boot inside of a chroot. * debian/script: Fix syntax of MODULES=dep block. + * hook-functions: Add rootfs detection for the "auto" mount output. + Thanks martin f krafft for report. (closes: #441211) - -- maximilian attems Fri, 07 Sep 2007 15:10:11 +0200 + -- maximilian attems Fri, 07 Sep 2007 18:24:40 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/hook-functions b/hook-functions index 61af0a5..cb2c75d 100644 --- a/hook-functions +++ b/hook-functions @@ -203,10 +203,23 @@ sys_walk_mod_add() # find and only copy root relevant modules dep_add_modules() { - local block minor root rootfs root_dev_path x + local block minor root FSTYPE root_dev_path x # findout root block device + fstype - eval "$(mount | awk '/ \/ / {print "root=" $1 "\nrootfs=" $5; exit}')" + eval "$(mount | awk '/ \/ / {print "root=" $1 "\nFSTYPE=" $5; exit}')" + + # find out real rootfs on auto type + if [ "${FSTYPE}" = "auto" ]; then + eval "$(/usr/lib/klibc/bin/fstype ${root})" + fi + + # check that fstype rootfs recognition + if [ "${FSTYPE}" = "unknown" ]; then + echo "mkinitramfs: unkown fstype on root ${root}" + echo "mkinitramfs: workaround is MODULES=most" + echo "mkinitramfs: Error please report bug against klibc" + exit 1 + fi # lvm luks root if [ "${root#/dev/mapper/}" != "${root}" ]; then @@ -236,7 +249,7 @@ dep_add_modules() fi # Add rootfs - force_load "${rootfs}" + force_load "${FSTYPE}" root_dev_path=$(readlink -f /sys/block/${block}/device) sys_walk_mod_add ${root_dev_path} -- cgit v1.2.3 From 156f5a6ee96ee8f507523c2b75604c4ed124e138 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 8 Sep 2007 19:58:51 +0200 Subject: changelog: add entry for mika's patches almost ready for release, just missing the hook-conf only dir. --- debian/changelog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 6d8b335..3002e75 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,8 +19,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * debian/script: Fix syntax of MODULES=dep block. * hook-functions: Add rootfs detection for the "auto" mount output. Thanks martin f krafft for report. (closes: #441211) + * init: Disable quiet on debug bootarg. Fix new init error message. + Thanks Michael Prokop for the patches. - -- maximilian attems Fri, 07 Sep 2007 18:24:40 +0200 + -- maximilian attems Sat, 08 Sep 2007 19:56:22 +0200 initramfs-tools (0.90a) unstable; urgency=high -- cgit v1.2.3 From 937188e01273de536b02f7fa782a8bb4045a009c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 8 Sep 2007 22:03:16 +0200 Subject: hook-functions: MODULES=dep fix I2O detection. * missing i2o_block * force_load when !udev --- debian/changelog | 3 ++- hook-functions | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3002e75..c7f7ea1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,8 +21,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low Thanks martin f krafft for report. (closes: #441211) * init: Disable quiet on debug bootarg. Fix new init error message. Thanks Michael Prokop for the patches. + * hook-functions: MODULES=dep fix I2O detection. - -- maximilian attems Sat, 08 Sep 2007 19:56:22 +0200 + -- maximilian attems Sat, 08 Sep 2007 22:01:15 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/hook-functions b/hook-functions index 0c27755..628811b 100644 --- a/hook-functions +++ b/hook-functions @@ -265,7 +265,8 @@ dep_add_modules() fi if [ -e /sys/bus/i2o/devices/ ]; then - manual_add_modules i2o_block + force_load i2o_block + force_load i2o_config fi if [ -e /sys/bus/ps3_system_bus/ ]; then -- cgit v1.2.3 From c371cfa72e473518a9ff0540b0b1d2eae83dd7aa Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 8 Sep 2007 22:33:12 +0200 Subject: hook-functions: Add sys_walk_modalias() for IDE instead of searching non matching sysfs modules strings PIIX_IDE != piix, just look up the modalias. modprobe likes it too ;) --- debian/changelog | 5 +++-- hook-functions | 24 ++++++++++++++++++++---- 2 files changed, 23 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c7f7ea1..431cf50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,9 +21,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low Thanks martin f krafft for report. (closes: #441211) * init: Disable quiet on debug bootarg. Fix new init error message. Thanks Michael Prokop for the patches. - * hook-functions: MODULES=dep fix I2O detection. + * hook-functions: MODULES=dep fix I2O detection. Add sys_walk_modalias() + to catch old style IDE. - -- maximilian attems Sat, 08 Sep 2007 22:01:15 +0200 + -- maximilian attems Sat, 08 Sep 2007 22:29:42 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/hook-functions b/hook-functions index 628811b..9becfe2 100644 --- a/hook-functions +++ b/hook-functions @@ -200,6 +200,20 @@ sys_walk_mod_add() done } +# walk /sys for relevant modalias +sys_walk_modalias() +{ + local device_path modalias + + device_path="$(dirname "${1}")" + device_path="$(dirname "${device_path}")" + modalias=$(cat "${device_path}/modalias") + + if [ -n "${modalias}" ]; then + force_load "${modalias}" + fi +} + # find and only copy root relevant modules dep_add_modules() { @@ -251,13 +265,15 @@ dep_add_modules() exit 1 fi + # sys walk ATA root_dev_path=$(readlink -f /sys/block/${block}/device) sys_walk_mod_add ${root_dev_path} - if [ -e /proc/ide ]; then - for x in ide-generic ide-disk ide-cd; do - manual_add_modules "${x}" - done + # catch old-style IDE + if [ -e /sys/bus/ide/devices/ ]; then + sys_walk_modalias ${root_dev_path} + manual_add_modules ide-disk + manual_add_modules ide-cd fi if [ -e /sys/bus/scsi/devices/ ]; then -- cgit v1.2.3 From c09f8e45cb6740561f1a4f657acc591fa7ceb16e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 8 Sep 2007 23:29:59 +0200 Subject: mkinitramfs: Export MODULES, allows hook script to act accordingly. this is better then passing some strange prereqs param, as the prereqs is intermixed with boot/hook scripts. --- debian/changelog | 5 ++++- mkinitramfs | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 431cf50..cb49ebf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,7 @@ initramfs-tools (0.91) UNRELEASED; urgency=low bogus init bootarg too. * scripts/{functions,nfs}: Split networking code in separate function. Thanks Vagrant Cascadian for the patch. + (closes: #439397) * update-initramfs: Don't check for ro /boot inside of a chroot. * debian/script: Fix syntax of MODULES=dep block. * hook-functions: Add rootfs detection for the "auto" mount output. @@ -23,8 +24,10 @@ initramfs-tools (0.91) UNRELEASED; urgency=low Thanks Michael Prokop for the patches. * hook-functions: MODULES=dep fix I2O detection. Add sys_walk_modalias() to catch old style IDE. + * mkinitramfs: Export MODULES, allows hook script to act accordingly. + (closes: #421658) - -- maximilian attems Sat, 08 Sep 2007 22:29:42 +0200 + -- maximilian attems Sat, 08 Sep 2007 23:28:37 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/mkinitramfs b/mkinitramfs index 4ba9cd4..0064963 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -166,6 +166,7 @@ export DESTDIR export DPKG_ARCH export verbose export KEYMAP +export MODULES # Private, used by 'catenate_cpiogz'. export __TMPCPIOGZ -- cgit v1.2.3 From 475b09a738d329624e34e5f82e01ebaf3c16a708 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 9 Sep 2007 12:34:44 +0200 Subject: mkinitramfs: Add /usr/share/initramfs-tools/conf-hooks.d this allows to seperate conf files which needs to land on initramfs and those that should only be run on mkinitramfs. --- debian/changelog | 9 +++++---- debian/initramfs-tools.dirs | 1 + mkinitramfs | 9 +++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index cb49ebf..499d316 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.91) UNRELEASED; urgency=low +initramfs-tools (0.91) unstable; urgency=low * udev_helper: Axe the modprobe ide-generic should no longer be needed for kernel since Etch. @@ -24,10 +24,11 @@ initramfs-tools (0.91) UNRELEASED; urgency=low Thanks Michael Prokop for the patches. * hook-functions: MODULES=dep fix I2O detection. Add sys_walk_modalias() to catch old style IDE. - * mkinitramfs: Export MODULES, allows hook script to act accordingly. - (closes: #421658) + * mkinitramfs: Export MODULES, allows hook scripts to act accordingly. + (closes: #421658) Add /usr/share/initramfs-tools/conf-hooks.d for hooks + options on mkinitramfs run. Do not land in initramfs. - -- maximilian attems Sat, 08 Sep 2007 23:28:37 +0200 + -- maximilian attems Sun, 09 Sep 2007 12:26:16 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/debian/initramfs-tools.dirs b/debian/initramfs-tools.dirs index 2c6a83a..a11bf32 100644 --- a/debian/initramfs-tools.dirs +++ b/debian/initramfs-tools.dirs @@ -10,5 +10,6 @@ etc/initramfs-tools/scripts/nfs-top etc/initramfs-tools/hooks etc/initramfs-tools/conf.d usr/share/initramfs-tools/conf.d +usr/share/initramfs-tools/hooksconf.d usr/share/initramfs-tools/modules.d /var/lib/initramfs-tools diff --git a/mkinitramfs b/mkinitramfs index 0064963..06d2149 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -88,6 +88,8 @@ for i in /usr/share/initramfs-tools/conf.d/* ${CONFDIR}/conf.d/*; do EXTRA_CONF="${EXTRA_CONF} $(basename $i \ | grep '^[[:alnum:]][[:alnum:]\._-]*$' | grep -v '\.dpkg-.*$')"; done +# FIXME: deprecated those settings on mkinitramfs run +# these conf dirs are for boot scripts and land on initramfs for i in ${EXTRA_CONF}; do if [ -e ${CONFDIR}/conf.d/${i} ]; then . ${CONFDIR}/conf.d/${i} @@ -96,6 +98,13 @@ for i in ${EXTRA_CONF}; do fi done +# source package confs +for i in /usr/share/initramfs-tools/conf-hooks.d/*; do + if [ -e "${i}" ]; then + . "${i}" + fi +done + if [ -n "${UMASK}" ]; then umask "${UMASK}" fi -- cgit v1.2.3 From 1c2d02dc513346876464434ae422d499642e6a16 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 12 Sep 2007 19:07:36 +0200 Subject: init: fix RESUME hardcoding --- debian/changelog | 7 +++++++ init | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 499d316..bf48bff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.91a) unstable; urgency=low + + * init: Fix resuming with hardcoded uppercase RESUME variable. + Thanks Raphael Hertzog for the report. + + -- maximilian attems Wed, 12 Sep 2007 19:06:19 +0200 + initramfs-tools (0.91) unstable; urgency=low * udev_helper: Axe the modprobe ide-generic should no longer be needed diff --git a/init b/init index 9afc87a..52e3f45 100755 --- a/init +++ b/init @@ -95,7 +95,7 @@ for x in $(cat /proc/cmdline); do BOOT=${x#boot=} ;; resume=*) - resume="${x#resume=}" + RESUME="${x#resume=}" ;; noresume) noresume=y @@ -141,7 +141,7 @@ for x in $(cat /proc/cmdline); do done if [ -z "${noresume}" ]; then - export resume=${resume} + export resume=${RESUME} else export noresume fi -- cgit v1.2.3 From 89ba49b87ef14314223222d751e01373b0ec08a6 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 4 Oct 2007 12:04:51 +0200 Subject: hooks/udevhelper: Adding all /lib/udev on initramfs if missing. Due to overly strict errexit usage by udev hook a lot might be missing. This is an potential Etch -> Lenny upgrade issue. (closes: 431291) fixes boot failure on UUID and LABEL root for those. it seems much better to add this stupid hook than to pump udev dep. Thanks Michael Prokop for report. --- debian/changelog | 9 +++++++++ hooks/udevhelper | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100755 hooks/udevhelper (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bf48bff..2916413 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +initramfs-tools (0.91b) unstable; urgency=low + + * hooks/udevhelper: Adding all /lib/udev on initramfs if missing. Due to + overly strict errexit usage by udev hook functionality might be missing. + This is an potential Etch Lenny upgrade issue on UUID and LABEL roots. + Thanks Michael Prokop for report. (closes: 431291) + + -- maximilian attems Thu, 04 Oct 2007 12:00:33 +0200 + initramfs-tools (0.91a) unstable; urgency=low * init: Fix resuming with hardcoded uppercase RESUME variable. diff --git a/hooks/udevhelper b/hooks/udevhelper new file mode 100755 index 0000000..44e1d5d --- /dev/null +++ b/hooks/udevhelper @@ -0,0 +1,37 @@ +#!/bin/sh +# FIXME: kill after lenny release +# needed for UUID root and partial etch upgrades +# +PREREQ="udev" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +# should never happen +if [ ! -e $DESTDIR/lib/udev/ ]; then + exit 0 +fi + +# fixed udev hook +if [ -e $DESTDIR/lib/udev/ ] && [ -e $DESTDIR/lib/udev/hotplug.functions ]; then + exit 0 +fi + +cp /lib/udev/hotplug.functions $DESTDIR/lib/udev/ +copy_exec /lib/udev/ide.agent /lib/udev/ +for program in /lib/udev/*_id; do + copy_exec $program /lib/udev/ +done +exit 0 -- cgit v1.2.3 From ed852bbb20fac3b38e86eecd4e078151f4ea4809 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 28 Nov 2007 19:51:20 +0100 Subject: release 0.91c --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2916413..c581efb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.91c) unstable; urgency=low + + * update-initramfs: Fix ro /boot partition check (closes: #451151) + * init: Don't overwrite boot cmdline arg (closes: #453294) + + -- maximilian attems Wed, 28 Nov 2007 19:49:41 +0100 + initramfs-tools (0.91b) unstable; urgency=low * hooks/udevhelper: Adding all /lib/udev on initramfs if missing. Due to -- cgit v1.2.3 From 7f89641f3d32dbad8b2367cad26b4d2b9f249e15 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 26 Dec 2007 00:44:13 +0100 Subject: debian/control: Add versioned depends on findutils. (closes: #450888) it seems backport of current iniramfs-toosl together with linux-images is more frequent then expected. thus just declare that you need newer findutils then sarge available. this can be kicked after lenny release. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 4a3be89..d27fe03 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ XS-Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs -Depends: klibc-utils (>= 1.5.6-1), cpio, module-init-tools, udev (>= 0.086-1) +Depends: klibc-utils (>= 1.5.6-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 5d264012d5a8de41124ca81eaef1b95a932eda6c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 26 Dec 2007 00:44:40 +0100 Subject: Update to newer standards version without changes. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index d27fe03..a5f1248 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team Build-Depends: debhelper (>= 4.1.0), cdbs -Standards-Version: 3.7.2.2 +Standards-Version: 3.7.3 XS-Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git XS-Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git -- cgit v1.2.3 From 7e40a0b28df5f0aef150b9b7244cba35857b2b99 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 26 Dec 2007 00:55:41 +0100 Subject: release 0.91d --- debian/changelog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index c581efb..92fff4d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +initramfs-tools (0.91d) unstable; urgency=low + + * MODULES=dep fix for new /dev/md/X naming scheme (closes: #440694). + * debian/control: Add versioned depends on findutils (closes: #450888). + * Update to newer standards version without changes. + * local-premount/resume: coding style fixes. + + -- maximilian attems Wed, 26 Dec 2007 00:53:48 +0100 + initramfs-tools (0.91c) unstable; urgency=low * update-initramfs: Fix ro /boot partition check (closes: #451151) -- cgit v1.2.3 From caa6893258b4262c898807227a7d2a03b9ba6f4a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 12 Feb 2008 18:34:33 +0100 Subject: release 0.91e --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 92fff4d..dd24385 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.91e) unstable; urgency=medium + + [ Daniel Reichelt ] + * update-initramfs: fix ro-mounted /boot check (closes: #458772) + + -- maximilian attems Tue, 12 Feb 2008 18:23:34 +0100 + initramfs-tools (0.91d) unstable; urgency=low * MODULES=dep fix for new /dev/md/X naming scheme (closes: #440694). -- cgit v1.2.3 From bf4c07348b91597d96764ba8a484678845a58cd7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 16 Mar 2008 18:41:11 +0100 Subject: debian/control: s/XS-Vcs/Vcs/ Those fields are official dpkg supported, so just use them. --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index a5f1248..3f56a0e 100644 --- a/debian/control +++ b/debian/control @@ -5,8 +5,8 @@ Uploaders: Jeff Bailey , maximilian attems Maintainer: Debian kernel team Build-Depends: debhelper (>= 4.1.0), cdbs Standards-Version: 3.7.3 -XS-Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -XS-Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git +Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git +Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git Package: initramfs-tools Architecture: all -- cgit v1.2.3 From e4b83628580eb117cd3759f10d4882802cad203c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 22 Mar 2008 15:09:44 +0100 Subject: Ignore lintian warnings about empty directories. These warnings are harmless and initramfs-tools wants to provide this directory structure for other users. scripts are to be placed there and dir existence is assumed. --- debian/initramfs-tools.install | 1 + debian/lintian/initramfs-tools | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 debian/lintian/initramfs-tools (limited to 'debian') diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index 5b3d8a6..fb1c088 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -9,3 +9,4 @@ hook-functions usr/share/initramfs-tools conf/modules usr/share/initramfs-tools update-initramfs usr/sbin debian/script usr/share/bug/initramfs-tools +debian/lintian/initramfs-tools usr/share/lintian/overrides diff --git a/debian/lintian/initramfs-tools b/debian/lintian/initramfs-tools new file mode 100644 index 0000000..6d1b9c8 --- /dev/null +++ b/debian/lintian/initramfs-tools @@ -0,0 +1,3 @@ +initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/conf.d/ +initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/hooksconf.d/ +initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/modules.d/ -- cgit v1.2.3 From 265ba0ac08d5cb33f7013c2820d9c8823165df54 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 30 Mar 2008 04:03:24 +0200 Subject: debian/control: Depend on latest klibc for mknod usage. Previsous changes depend on the latest klibc, thus bump dependency version. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 3f56a0e..39a1134 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs -Depends: klibc-utils (>= 1.5.6-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24) +Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 5dfdae9ae274c271943c9bee9ddc3db7fd255695 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 2 Apr 2008 15:26:52 -0400 Subject: update-initramfs: use dpkg-trigger This is a lightly modified version of Ian Jackson's original patch, incorporating maximilian attems's comments. dh_installdeb automatically installs the triggers file, so the rules file does not need to be changed. --- debian/initramfs-tools.postinst | 11 +++++++++-- debian/initramfs-tools.triggers | 1 + update-initramfs | 13 +++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 debian/initramfs-tools.triggers (limited to 'debian') diff --git a/debian/initramfs-tools.postinst b/debian/initramfs-tools.postinst index 2f36f3f..6ecfe2e 100644 --- a/debian/initramfs-tools.postinst +++ b/debian/initramfs-tools.postinst @@ -6,9 +6,16 @@ if [ ! -e /etc/initramfs-tools/modules ]; then cp /usr/share/initramfs-tools/modules /etc/initramfs-tools/ fi -# Regenerate initramfs on upgrade -if [ "$1" = "configure" ] && [ -n "$2" ]; then +# Regenerate initramfs whenever we go to dpkg state `installed' + +if [ "x$1" != xtriggered ] && \ + dpkg --compare-versions "$DPKG_RUNNING_VERSION" ge '1.14.5ubuntu10~~' +then + # this activates the trigger, if triggers are working update-initramfs -u +else + # force it to actually happen + DPKG_MAINTSCRIPT_PACKAGE='' update-initramfs -u fi #DEBHELPER# diff --git a/debian/initramfs-tools.triggers b/debian/initramfs-tools.triggers new file mode 100644 index 0000000..860c664 --- /dev/null +++ b/debian/initramfs-tools.triggers @@ -0,0 +1 @@ +interest update-initramfs diff --git a/update-initramfs b/update-initramfs index 42f2831..6e8e7aa 100755 --- a/update-initramfs +++ b/update-initramfs @@ -4,6 +4,7 @@ STATEDIR=/var/lib/initramfs-tools BOOTDIR=/boot CONF=/etc/initramfs-tools/update-initramfs.conf KPKGCONF=/etc/kernel-img.conf +USETRIGGERS=true mode="" version="" @@ -11,6 +12,18 @@ set -e [ -r ${CONF} ] && . ${CONF} +if $USETRIGGERS \ + && [ x"$DPKG_MAINTSCRIPT_PACKAGE" != x ] \ + && [ $# = 1 ] \ + && [ x"$1" = x-u ] \ + && dpkg-trigger --check-supported 2>/dev/null +then + if dpkg-trigger --no-await update-initramfs; then + echo "update-initramfs: deferring update (trigger activated)" + exit 0 + fi +fi + usage() { if [ -n "${1}" ]; then -- cgit v1.2.3 From 78f8afdedbc0fca0f0523d3c4c67996ce814cd57 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 9 Apr 2008 10:44:11 +0200 Subject: release 0.92 * add changelog with bug closures * new release song "Fischia il vento" --- debian/changelog | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index dd24385..a01d699 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,47 @@ +initramfs-tools (0.92) unstable; urgency=low + + Release "Ogni contrada è patria del ribelle" + + [ maximilian attems ] + * init: export ROOTFLAGS + ROOTFSTYPE. + * debian/control: s/XS-Vcs/Vcs/ + * mkinitramfs: Drop gzip -9 option. (closes: #470869) + Thanks Tollef Fog Heen . + * Ignore lintian warnings about empty directories. + * framebuffer: Let udev create fb devices. + * framebuffer: Leave tty devices for udev too. + * manpages: fix hyphen-used-as-minus-sign + * init: fix mkdir usage. + * init: Set proper permissions of /dev/console mknod fallback. + * scripts/function: Use mknod directly. + * debian/control: Depend on latest klibc for mknod usage. + * scripts/functions: fix configure_networking() for multiple interfaces. + (closes: #467078) Thanks Michal Sojka . + * ps3 nuke useless hardcoded initramfs script. (closes: #468113) + * resume: Add support for resume_offset swap file suspend to disk. + (closes: #474691) Thanks Alan Jenkins . + * update-initramfs: Rename function according to reliability fix. + * hook-functions: Add atl1, cxgb3, e1000e, igb, ipg, niu, sky2 to + net section of initramfs modules. (closes: #463607) + * hook-functions: MODULES=dep fix ps3 support. + * initramfs-tools.8: Small documentation fixes. (closes: #467627) + + [ debian@x.ray.net ] + * configure_network(): do nothing if device already configured. + (closes: #465901) + + [ Joey Hess ] + * update-initramfs: use dpkg-trigger. (closes: #447611) + + [ Luke Yelavich ] + * update-initramfs: Initramfs generation reliability fixes. + (closes: #468112) + + [ Fabio M. Di Nitto ] + * hook-functions: Add support for sunvnet and sunvdc. + + -- maximilian attems Wed, 09 Apr 2008 10:42:49 +0200 + initramfs-tools (0.91e) unstable; urgency=medium [ Daniel Reichelt ] -- cgit v1.2.3 From 8db2495b6d17f1e8d1f114a4105548f5d0d53dc5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 30 Apr 2008 09:54:00 +0200 Subject: release 0.92a --- debian/changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a01d699..d0710eb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +initramfs-tools (0.92a) unstable; urgency=high + + * ps3: Add ps3_sys_manager to MODULES=dep ps3 modules. + * initramfs-tools.8: Document resume_offset bootparam. + * Documentation typo fixes and additions. + * init: Fix hardcoded ROOT bootcase. (closes: #478236) + Thanks Kevin Price for report and + Martin Michlmayr for debugging. + + -- maximilian attems Tue, 29 Apr 2008 21:18:55 +0200 + initramfs-tools (0.92) unstable; urgency=low Release "Ogni contrada è patria del ribelle" -- cgit v1.2.3 From 7941455289174b1f53bfa91c11cf9747a95a3a99 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 30 May 2008 16:36:49 +0200 Subject: release 0.92b --- debian/changelog | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index d0710eb..9a07600 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +initramfs-tools (0.92b) unstable; urgency=low + + [ maximilian attems ] + * update-initramfs: mbr_check() fix for /dev/md/X naming. (closes: #469312) + Thanks to Axel Beckert for report. + * hook-functions: MODULES=dep fix error message. + + [ Glennie Vignarajah ] + * initramfs-tools: Fix UUID rootfs detection with 'MODULES=dep'. + (closes: #483082) + + -- maximilian attems Fri, 30 May 2008 16:31:42 +0200 + initramfs-tools (0.92a) unstable; urgency=high * ps3: Add ps3_sys_manager to MODULES=dep ps3 modules. -- cgit v1.2.3 From f7d97ceae4000b9a08e7f04765beacd68b3bebb4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 5 Jul 2008 00:34:56 +0200 Subject: release 0.92c Signed-off-by: maximilian attems --- debian/changelog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9a07600..90e50a6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +initramfs-tools (0.92c) unstable; urgency=low + + [ maximilian attems ] + * doc: fix date string of manual pages. + * MODULES=most add mmc host and card drivers for OLPC. (closes: #483431) + * update-initramfs.conf.5: document backup_initramfs variable. + (closes: #475430) + * initramfs-tools.8: Document "break" and "panic" behaviour. + (closes: #481196) + * wait_for_udev(): simplify, no need for logging. + + [ martin f. krafft ] + * Wait for udevsettle after -top scripts ran + * init: Remove extra ellipses + + -- maximilian attems Sat, 05 Jul 2008 00:31:06 +0200 + initramfs-tools (0.92b) unstable; urgency=low [ maximilian attems ] -- cgit v1.2.3 From 6d6f6125e9b165b296f437c788d981ef749a91e8 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 5 Jul 2008 02:15:14 +0200 Subject: initramfs-tools.preinst: Try to use UUID for resume device. ubuntu merge. --- debian/initramfs-tools.preinst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian') diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 6a8b88f..3c8a9b0 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -20,6 +20,10 @@ case "$1" in # First time install. Can we autodetect the RESUME partition? if [ -r /proc/swaps ]; then RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') + UUID=$(/sbin/vol_id -u "$RESUME" || true) + if [ -n "$UUID" ]; then + RESUME="UUID=$UUID" + fi fi # Inherit initrd-tools settings if possible. -- cgit v1.2.3 From f2725289fe635947d0ebcab0259c7e597281682b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 5 Jul 2008 02:34:54 +0200 Subject: debian/initramfs-tools.preinst: accomodate with different vol_id pathes Signed-off-by: maximilian attems --- debian/initramfs-tools.preinst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 3c8a9b0..3cf477e 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -20,7 +20,11 @@ case "$1" in # First time install. Can we autodetect the RESUME partition? if [ -r /proc/swaps ]; then RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') - UUID=$(/sbin/vol_id -u "$RESUME" || true) + if [ -x /sbin/vol_id ]; then + UUID=$(/sbin/vol_id -u "$RESUME" || true) + elif [ -x /lib/udev/vol_id ]; then + UUID=$(/sbin/vol_id -u "$RESUME" || true) + fi if [ -n "$UUID" ]; then RESUME="UUID=$UUID" fi -- cgit v1.2.3 From 6244406a9cd195d2867c72662ce632c2a2d2f653 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 5 Jul 2008 02:46:04 +0200 Subject: release 0.92d --- debian/changelog | 17 +++++++++++++++++ scripts/init-top/all_generic_ide | 0 2 files changed, 17 insertions(+) mode change 100644 => 100755 scripts/init-top/all_generic_ide (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 90e50a6..2d8029b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +initramfs-tools (0.92d) unstable; urgency=low + + * Ubuntu merge + - More meaningful text for no root device panic from Ubuntu. + - Add virtio_pci, udf for MODULES=most root device support. + - usplash pulsates: drop code to increment a progress bar after + each message. + - initramfs-tools.preinst: Try to use UUID for resume device. + - add boot script loading ide-generic on all_generic_ide cmdline. + Thanks Frans Pop for report. (closes: #485786) + * init: add possible mountroot break (closes: #488963) + * initramfs-tools.8: document UUID usage for root and all_generic_ide. + (closes: #489186) + * debian/initramfs-tools.preinst: try with different vol_id pathes. + + -- maximilian attems Sat, 05 Jul 2008 02:36:10 +0200 + initramfs-tools (0.92c) unstable; urgency=low [ maximilian attems ] diff --git a/scripts/init-top/all_generic_ide b/scripts/init-top/all_generic_ide old mode 100644 new mode 100755 -- cgit v1.2.3 From 2bcd4eceb4fb75762807455cbc128bd969fa8bee Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 7 Jul 2008 13:54:46 +0200 Subject: release 0.92e --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 2d8029b..968f32f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.92e) unstable; urgency=medium + + * udevhelper hook: drop ide.agent. + + -- maximilian attems Mon, 07 Jul 2008 13:52:54 +0200 + initramfs-tools (0.92d) unstable; urgency=low * Ubuntu merge -- cgit v1.2.3 From 33c41ca99c834ffac0a1e007dcd113d6e884bccd Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 12 Aug 2008 10:54:04 +0200 Subject: preinst fix vol_id path thanks Michael Tautschnig (closes: #494433) --- debian/initramfs-tools.preinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 3cf477e..758b504 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -23,7 +23,7 @@ case "$1" in if [ -x /sbin/vol_id ]; then UUID=$(/sbin/vol_id -u "$RESUME" || true) elif [ -x /lib/udev/vol_id ]; then - UUID=$(/sbin/vol_id -u "$RESUME" || true) + UUID=$(/lib/udev/vol_id -u "$RESUME" || true) fi if [ -n "$UUID" ]; then RESUME="UUID=$UUID" -- cgit v1.2.3 From d3e81429fdee2e02aeaee914cc09c9e952362530 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 12 Aug 2008 11:31:47 +0200 Subject: Update to newer standards version without changes. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 39a1134..4986dea 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team Build-Depends: debhelper (>= 4.1.0), cdbs -Standards-Version: 3.7.3 +Standards-Version: 3.8.0 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -- cgit v1.2.3 From ab8a9ab6ca271a4244a275c7fc0074a2bdd7b986 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 12 Aug 2008 11:35:52 +0200 Subject: release 0.92f --- debian/changelog | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 968f32f..f0bd7d3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +initramfs-tools (0.92f) unstable; urgency=medium + + [ maximilian attems ] + * mkinitramfs: only lvm2 initramfs has busybox dep. (closes: #490875) + * mkinitramfs: Fix usage and man outfile arg is not optional. + (closes: #493238) + * preinst fix vol_id path. (closes: #494433) + * update-initramfs: run_bootloader() invoke flash-kernel and glantank- + update-kernel in order to have latest initramfs flashed on triggered + update. Thanks to Joey Hess . + * debian/control: Newer standards version without changes. + + [ Chris Lamb ] + * make log_begin_msg not emit trailing newline (closes: #494257) + + [ Martin Michlmayr ] + * MODULES=dep boot fix for Orion. (closes: #494027) + + -- maximilian attems Tue, 12 Aug 2008 11:09:11 +0200 + initramfs-tools (0.92e) unstable; urgency=medium * udevhelper hook: drop ide.agent. -- cgit v1.2.3 From 1c5e3dd3801d9d142d2502fc550f6407b54f83b2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 2 Sep 2008 17:56:56 +0200 Subject: release 0.92g --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index f0bd7d3..60f4cc4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +initramfs-tools (0.92g) unstable; urgency=high + + [ maximilian attems ] + * wait_for_udev: s/udevsettle/udevadm/ for upgrades after Lenny. + * auto_add_modules: Add ext4 and ext4dev. (closes: #494922) + + [ Andres Salomon ] + * Fix parse_numeric() to ignore non hex root string prefixes aka + root=mtd0 on OLPC. see #497133 + + -- maximilian attems Tue, 02 Sep 2008 17:50:32 +0200 + initramfs-tools (0.92f) unstable; urgency=medium [ maximilian attems ] -- cgit v1.2.3 From 4d36335297a3c41f24e206e5727f210149a94911 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 8 Sep 2008 16:21:10 +0200 Subject: release 0.92i --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 60f4cc4..036a27b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.92i) unstable; urgency=high + + * MODULES=dep fix for root lvm on md. (closes: #498237) + Thanks Rod Whitby for report and test. + + -- maximilian attems Mon, 08 Sep 2008 16:13:24 +0200 + initramfs-tools (0.92g) unstable; urgency=high [ maximilian attems ] -- cgit v1.2.3 From 5b77bbc7e0d1b3e429fa13b8c54d08e235774709 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sat, 13 Sep 2008 12:10:50 +0200 Subject: release 0.92j --- debian/changelog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 036a27b..1ab7e6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +initramfs-tools (0.92j) unstable; urgency=high + + [ Gerfried Fuchs ] + * initramfs-tools.8: Nuke useless bold spaces. + * initramfs-tools.8: Fix manpage-has-errors-from-man. + + [ maximilian attems ] + * Readd zfcp to auto_add_modules. (closes: #498698) + * Add dasd_diag_mod to auto_add_modules block section + Thanks Bastian Blank . + + [ Martin Michlmayr ] + * initramfs.conf: Mention possible value overriding by d-i for + example. (closes: #498712) + + -- maximilian attems Sat, 13 Sep 2008 12:12:02 +0200 + initramfs-tools (0.92i) unstable; urgency=high * MODULES=dep fix for root lvm on md. (closes: #498237) -- cgit v1.2.3 From c5a45496b9c72e41333e213979d43fbcff34da9f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 16 Sep 2008 14:51:30 +0200 Subject: initramfs-tools: Add support for linux-2.6 make deb-pkg target it generates linux images that look into this directories for maintainer script action. make sure to generate an intramfs and also to remove it. --- debian/initramfs-tools.install | 1 + debian/rules | 2 +- kernel/postinst.d/update-initramfs | 7 +++++++ kernel/postrm.d/update-initramfs | 7 +++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 kernel/postinst.d/update-initramfs create mode 100755 kernel/postrm.d/update-initramfs (limited to 'debian') diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index fb1c088..71670ef 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -10,3 +10,4 @@ conf/modules usr/share/initramfs-tools update-initramfs usr/sbin debian/script usr/share/bug/initramfs-tools debian/lintian/initramfs-tools usr/share/lintian/overrides +kernel etc diff --git a/debian/rules b/debian/rules index 2a5ae55..1376aa9 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,6 @@ include /usr/share/cdbs/1/rules/debhelper.mk pre-build:: chmod +x init mkinitramfs chmod +x hooks/* - for x in `find scripts/ -maxdepth 1 -type d | tail -n+2`; do \ + for x in `find scripts/ kernel/ -maxdepth 1 -type d | tail -n+2`; do \ chmod -R +x $$x; \ done diff --git a/kernel/postinst.d/update-initramfs b/kernel/postinst.d/update-initramfs new file mode 100755 index 0000000..2d3b391 --- /dev/null +++ b/kernel/postinst.d/update-initramfs @@ -0,0 +1,7 @@ +#!/bin/sh +# + +[ -z "$1" ] && exit 0 + +# create initramfs - update runs do_bootloader +update-initramfs -t -u -k "$1" diff --git a/kernel/postrm.d/update-initramfs b/kernel/postrm.d/update-initramfs new file mode 100755 index 0000000..432d672 --- /dev/null +++ b/kernel/postrm.d/update-initramfs @@ -0,0 +1,7 @@ +#!/bin/sh +# + +[ -z "$1" ] && exit 0 + +# delete initramfs +update-initramfs -d -k "$1" -- cgit v1.2.3 From 01988cc40c445aba8f592d01f2ce38857e34e205 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 16 Sep 2008 15:03:09 +0200 Subject: release 0.92k --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1ab7e6e..44f6103 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +initramfs-tools (0.92k) unstable; urgency=high + + [ Martin Michlmayr ] + * update initramfs.conf according to latest Debian Installer. + * update-initramfs: don't run glantank-update-kernel. + + [ maximilian attems ] + * auto_add_modules: add dasd_diag_mod to dasd section. + * initramfs-tools: Add support for linux-2.6 make deb-pkg target. + + -- maximilian attems Tue, 16 Sep 2008 14:55:04 +0200 + initramfs-tools (0.92j) unstable; urgency=high [ Gerfried Fuchs ] -- cgit v1.2.3 From 04356cfcee60b2ff3a57a6942c2cebfdb088d04c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 17 Sep 2008 15:36:16 +0200 Subject: Revert "initramfs-tools: Add support for linux-2.6 make deb-pkg target" This reverts commit c5a45496b9c72e41333e213979d43fbcff34da9f. hinders removal of other package linux-image postinst call also the /etc/kernel structure, thus delete needs a takeover and this is postlenny material. thanks Vincent Danjean for report. (closes: #499270) --- debian/initramfs-tools.install | 1 - debian/rules | 2 +- kernel/postinst.d/update-initramfs | 7 ------- kernel/postrm.d/update-initramfs | 7 ------- 4 files changed, 1 insertion(+), 16 deletions(-) delete mode 100755 kernel/postinst.d/update-initramfs delete mode 100755 kernel/postrm.d/update-initramfs (limited to 'debian') diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index 71670ef..fb1c088 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -10,4 +10,3 @@ conf/modules usr/share/initramfs-tools update-initramfs usr/sbin debian/script usr/share/bug/initramfs-tools debian/lintian/initramfs-tools usr/share/lintian/overrides -kernel etc diff --git a/debian/rules b/debian/rules index 1376aa9..2a5ae55 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,6 @@ include /usr/share/cdbs/1/rules/debhelper.mk pre-build:: chmod +x init mkinitramfs chmod +x hooks/* - for x in `find scripts/ kernel/ -maxdepth 1 -type d | tail -n+2`; do \ + for x in `find scripts/ -maxdepth 1 -type d | tail -n+2`; do \ chmod -R +x $$x; \ done diff --git a/kernel/postinst.d/update-initramfs b/kernel/postinst.d/update-initramfs deleted file mode 100755 index 2d3b391..0000000 --- a/kernel/postinst.d/update-initramfs +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# - -[ -z "$1" ] && exit 0 - -# create initramfs - update runs do_bootloader -update-initramfs -t -u -k "$1" diff --git a/kernel/postrm.d/update-initramfs b/kernel/postrm.d/update-initramfs deleted file mode 100755 index 432d672..0000000 --- a/kernel/postrm.d/update-initramfs +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# - -[ -z "$1" ] && exit 0 - -# delete initramfs -update-initramfs -d -k "$1" -- cgit v1.2.3 From ed4f203aceb2af1355e25142b2849598c867ffdd Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 17 Sep 2008 15:50:16 +0200 Subject: release 0.92l have to clean up goof up from 0.92k too.. --- debian/changelog | 7 +++++++ debian/initramfs-tools.preinst | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 44f6103..1d73a4a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.92l) unstable; urgency=high + + * Revert "initramfs-tools: Add support for linux-2.6 make deb-pkg + target" (closes: #499270) thanks Vincent Danjean . + + -- maximilian attems Wed, 17 Sep 2008 15:38:05 +0200 + initramfs-tools (0.92k) unstable; urgency=high [ Martin Michlmayr ] diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 758b504..11e9057 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -60,6 +60,12 @@ case "$1" in cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml fi ;; + upgrade) + if dpkg --compare-versions "$2" eq "0.92k"; then + rm -f /etc/kernel/postinst.d/update-initramfs + rm -f /etc/kernel/postrm.d/update-initramfs + fi + ;; esac #DEBHELPER# -- cgit v1.2.3 From dea1e93a1783c40463663619ecd55ab26aa890e3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 15 Dec 2008 01:12:14 +0100 Subject: nuke 0.92k goof clean up --- debian/initramfs-tools.preinst | 6 ------ 1 file changed, 6 deletions(-) (limited to 'debian') diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 11e9057..758b504 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -60,12 +60,6 @@ case "$1" in cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml fi ;; - upgrade) - if dpkg --compare-versions "$2" eq "0.92k"; then - rm -f /etc/kernel/postinst.d/update-initramfs - rm -f /etc/kernel/postrm.d/update-initramfs - fi - ;; esac #DEBHELPER# -- cgit v1.2.3 From 3c620c38f29a7372e544f17a4fa5da55eabe30bf Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 15 Dec 2008 11:09:21 +0100 Subject: postrm: set -e flag harmless as the postrm is small, but better be clean. --- debian/initramfs-tools.postrm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/initramfs-tools.postrm b/debian/initramfs-tools.postrm index 6896636..f66e01a 100644 --- a/debian/initramfs-tools.postrm +++ b/debian/initramfs-tools.postrm @@ -1,5 +1,7 @@ #!/bin/sh +set -e + if [ "x${1}" = "xpurge" ]; then rm -f /etc/initramfs-tools/conf.d/resume rm -f /etc/initramfs-tools/modules -- cgit v1.2.3 From 5180b033fc6172c1354647d74754119d6cd94d76 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 16 Dec 2008 16:13:37 +0100 Subject: release 0.92m --- debian/changelog | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 1d73a4a..9acbfcc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,38 @@ +initramfs-tools (0.92m) unstable; urgency=medium + + [ Colin Watson ] + * scripts/functions: Call ipconfig with a one-minute timeout. + * Make debug option write to /dev/.initramfs/initramfs.debug, + so that it can be retrieved after boot. + + [ Julien Danjou ] + * scripts/functions: Wrong check for udevadm in functions. (closes: #507059) + + [ maximilian attems ] + * scripts/functions: fix not set break variable. (closes: #502058) + * MODULES=dep fix for ida devices. + * hook-functions: alphebetize net drivers, fix typhoon typo. + * Add atl1e, cxgb, ixgb, ixgbe, mlx4_core, netxen_nic, sfc, tehuti to + net module list. (closes: #503216) + * nuke 0.92k goof clean up. + * postrm: set -e flag. + * Revert "framebuffer: Let udev create fb devices." + * scripts/functions: comment fix path to moved linux-2.6 + Documentation. + * init: Don't leak initramfs-tools exported variables. + (closes: #426465, #505440) + + [ dann frazier ] + * Fix MODULES=dep for cciss devices. (closes: #507619) + + [ Michal Pokrywka ] + * framebuffer: Add support for uvesafb. (closes: #502056) + + [ Andres Salomon ] + * fix redboot partition support. (closes: #504555) + + -- maximilian attems Tue, 16 Dec 2008 16:01:44 +0100 + initramfs-tools (0.92l) unstable; urgency=high * Revert "initramfs-tools: Add support for linux-2.6 make deb-pkg -- cgit v1.2.3 From 15dea23a41c24c07c2ea36deb49c8cbf478bb32b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 19 Dec 2008 14:09:44 +0100 Subject: release 0.92n d-i fix, thus high urgency. --- debian/changelog | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9acbfcc..4edb150 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +initramfs-tools (0.92n) unstable; urgency=high + + [ Eugene Paskevich ] + * hook-functions: Fix MODULES=dep for lvm LABEL fstab notation. + (closes: #508906) + + [ maximilian attems ] + * all_generic_ide: Also parse boolean bootoption. (closes: #507805) + * initramfs-tools.8: Document where to look up NFSOPTS. (closes: #502927) + * update-initramfs.8: List -d and mark the non-optional as such. + + [ S. Sakar ] + * hook-functions: MODULES=dep fix encrypted loop device. + (closes: #499666) + + -- maximilian attems Fri, 19 Dec 2008 14:03:13 +0100 + initramfs-tools (0.92m) unstable; urgency=medium [ Colin Watson ] -- cgit v1.2.3 From bec0c23de01fd6fc690e84ed81c8b9ebe51bd95f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 7 Jan 2009 15:45:28 +0100 Subject: release 0.92o --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4edb150..85ce872 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.92o) unstable; urgency=high + + * configure_networking: Raise ipconfig timeout to 180 seconds. + Thanks Norbert Tretkowski for report. + (closes: #511085) + + -- maximilian attems Wed, 07 Jan 2009 15:16:14 +0100 + initramfs-tools (0.92n) unstable; urgency=high [ Eugene Paskevich ] -- cgit v1.2.3 From dd84494afe697a5ff12ab002cf64b1281dcc3b40 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 18 Jan 2009 15:15:32 +0100 Subject: control: Add ${misc:Depends} depends clears debhelper-but-no-misc-depends lintian warning. don't know if we really need it, but better be safe and referenced in debhelper(7) manpage. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 4986dea..0c359bf 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,7 @@ Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs -Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24) +Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 7812c98ccaf731b0d76909f924639af4e9554ed3 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Tue, 14 Oct 2008 15:02:17 -0400 Subject: initramfs-tools: Readd support for linux-2.6 make deb-pkg target. ..via /etc/kernel Signed-off-by: Andres Salomon (closes: #504551) [ fixed update-initramfs postinst call s/-u/-c/ -maks ] Signed-off-by: maximilian attems --- debian/initramfs-tools.install | 1 + debian/rules | 2 +- kernel/postinst.d/initramfs-tools | 10 ++++++++++ kernel/postrm.d/initramfs-tools | 10 ++++++++++ 4 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 kernel/postinst.d/initramfs-tools create mode 100755 kernel/postrm.d/initramfs-tools (limited to 'debian') diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index fb1c088..71670ef 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -10,3 +10,4 @@ conf/modules usr/share/initramfs-tools update-initramfs usr/sbin debian/script usr/share/bug/initramfs-tools debian/lintian/initramfs-tools usr/share/lintian/overrides +kernel etc diff --git a/debian/rules b/debian/rules index 2a5ae55..1376aa9 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,6 @@ include /usr/share/cdbs/1/rules/debhelper.mk pre-build:: chmod +x init mkinitramfs chmod +x hooks/* - for x in `find scripts/ -maxdepth 1 -type d | tail -n+2`; do \ + for x in `find scripts/ kernel/ -maxdepth 1 -type d | tail -n+2`; do \ chmod -R +x $$x; \ done diff --git a/kernel/postinst.d/initramfs-tools b/kernel/postinst.d/initramfs-tools new file mode 100755 index 0000000..1cb72a8 --- /dev/null +++ b/kernel/postinst.d/initramfs-tools @@ -0,0 +1,10 @@ +#!/bin/sh + +# passing the kernel version is required +[ -z "$1" ] && exit 0 + +# kernel-package passes an extra arg; hack to not run under kernel-package +[ -z "$2" ] || exit 0 + +# we're good - create initramfs. update runs do_bootloader +update-initramfs -c -t -k "$1" diff --git a/kernel/postrm.d/initramfs-tools b/kernel/postrm.d/initramfs-tools new file mode 100755 index 0000000..278a6fc --- /dev/null +++ b/kernel/postrm.d/initramfs-tools @@ -0,0 +1,10 @@ +#!/bin/sh + +# passing the kernel version is required +[ -z "$1" ] && exit 0 + +# kernel-package passes an extra arg; hack to not run under kernel-package +[ -z "$2" ] || exit 0 + +# delete initramfs +update-initramfs -d -k "$1" -- cgit v1.2.3 From 21ccf36d1ff1f39cbefce34de7287cf99307c93c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 18 Feb 2009 19:11:09 +0100 Subject: release 0.93 release string from "Fischia il vento" :) --- debian/changelog | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 85ce872..9edc37d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,59 @@ +initramfs-tools (0.93) unstable; urgency=low + + Release "Fischia il vento e infuria la bufera" + + [ maximilian attems ] + * manpages: Set Linux as necessary OS. + * initramfs-tools.8: Fix path of debug log - now kept after boot. + (closes: #488804) + * mkinitramfs: Use cp with correct DESTDIR instead of copy_exec for configs. + Fixes relative pathes for -d option. (closes: #472409) + * initramfs-tools.8: Document default 180s rootdelay. + * update-initramfs: Fix run_bootloader() to check for grub2. + (closes: #511514) + * control: Add ${misc:Depends} depends. + * nuke old lvm hook scripts. + * mkinitramfs-kpkg: deprecate it's usage. + * hook-functions: just ship old iee1394 if around. + * mkinitramfs: Post-Lenny cleanup. + * udevhelper: nuke as need for partial upgrades between etch/lenny. + * mkinitramfs: Fix new pipe construct to really work inside + "${DESTDIR}". + * thermal boot script: Don't load thermal+fan on acpi=off. (closes: #514997) + * MODULES=dep fix for minor partitions > 9. (closes: #513958) + * initramfs-tools.8: Document mkinitramfs and init env variables. + (closes: #512453) + * init: Fix boot with LABEL containting one or several '/'. Thanks to + Andres Salomon for testing. (closes: #489008) + * scripts/local-premount/resume: Fix resume with LABEL containing '/'. + + [ e2xbegqsdyt21hfc ] + * update-initramfs.8: mentions the specific conf file. + + [ Kel Modderman ] + * init: variable `break' unset before `maybe_break init' is evaluated. + (closes: #509637) + + [ Kees Cook ] + * minitramfs: find/cpio exit codes ignored while building initramfs. + (closes: #514938) + * mkinitramfs: Do not pass exit code through on pipe failure. + + [ Luke Yelavich ] + * hook-functions: Add hid_* modules, since some keyboards will not be + usable at the initramfs/busybox prompt without them. (closes: #515866) + + [ Andres Salomon ] + * allow root=mtd0 to be used; skip root checks if ROOT doesn't start + with /dev. (closes: #497133) + * initramfs-tools: Readd support for linux-2.6 make deb-pkg target. + (closes: #504551) + + [ Ian Campbell ] + * MODULES=dep fix for Xen virtual block devices. + + -- maximilian attems Wed, 18 Feb 2009 19:10:23 +0100 + initramfs-tools (0.92o) unstable; urgency=high * configure_networking: Raise ipconfig timeout to 180 seconds. -- cgit v1.2.3 From 82eb87958a73cc50c45cad21f0450c21bdec4888 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 10 Mar 2009 18:11:59 +0100 Subject: initramfs-tools.preinst: Nuke initrd-tools related migration path. initrd-tools was last shipped in etch and was sarge default. we no longer need to care about it. only came to light while grepping for ide-disk. --- debian/initramfs-tools.preinst | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'debian') diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 758b504..8095b88 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -30,35 +30,11 @@ case "$1" in fi fi - # Inherit initrd-tools settings if possible. - if [ -e /etc/mkinitrd/mkinitrd.conf ]; then - . /etc/mkinitrd/mkinitrd.conf - fi # write conf.d/resume if not in a chroot if [ -n "${RESUME}" ] && ! chrooted; then echo "RESUME=${RESUME}" > /etc/initramfs-tools/conf.d/resume fi - # Add initrd-tools modules, while trying to minimize prompting - if [ -e /etc/mkinitrd/modules ]; then - cp /etc/mkinitrd/modules /etc/initramfs-tools/ - sed -i \ - -e 's/\/etc\/mkinitrd\/modules: Kernel modules to load for initrd./List of modules that you want to include in your initramfs./g' \ - -e 's/mkinitrd/update-initramfs/g' \ - -e '/# This file should/,/one per line\./d' \ - -e 's/Comments begin with.*/Syntax: module_name [args ...]/' \ - -e 's/^# ext2$/# raid1/' \ - -e 's/^# wd io=0x300$/# sd_mod/' \ - -e '/^ide-generic/d' \ - -e '/^ide-disk/d' \ - -e '/^ext2/d' \ - -e '/^ext3/d' \ - /etc/initramfs-tools/modules - fi - - if [ -e /etc/mkinitrd/DSDT ]; then - cp /etc/mkinitrd/DSDT /etc/initramfs-tools/DSDT.aml - fi ;; esac -- cgit v1.2.3 From 86785b990c64d08014b735eeb588236a17bb35f4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 10 Mar 2009 21:54:05 +0100 Subject: update copyright year of my contributions --- debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/copyright b/debian/copyright index b473ab4..ddbb70f 100644 --- a/debian/copyright +++ b/debian/copyright @@ -21,7 +21,7 @@ Copyright: 2005 - 2006 Adam Conrad 2006 Ben Collins 2005 - 2007 David Härdeman 2005 Jeff Bailey - 2005 - 2007 maximilian attems + 2005 - 2009 maximilian attems 2005 - 2006 Scott James Remnant License: -- cgit v1.2.3 From 97f393b68e67b602bcb33a3681551ae6fd51b680 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 12 Mar 2009 15:12:28 +0100 Subject: control: conform to latest policy without changes --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 0c359bf..5551acb 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team Build-Depends: debhelper (>= 4.1.0), cdbs -Standards-Version: 3.8.0 +Standards-Version: 3.8.1 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -- cgit v1.2.3 From 3002fdd76cc22f1137afeb2b8a1a45bc1e5123b7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 23 Mar 2009 07:52:45 +0100 Subject: debian/compat: Set debhelper compatibility version 5 gets rid of lintian warning: package-uses-deprecated-debhelper-compat-version 4 --- debian/compat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/compat b/debian/compat index b8626c4..7ed6ff8 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -4 +5 -- cgit v1.2.3 From 055fa3e34ee5edda2e99aec8f265b0958475989a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 23 Mar 2009 08:04:27 +0100 Subject: release 0.93.1 new naming scheme for stable releases. no longer adding a letter, but a maintenance number. --- debian/changelog | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9edc37d..af127db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,33 @@ +initramfs-tools (0.93.1) unstable; urgency=low + + [ maximilian attems ] + * init: export ip root param for configure_networking(). (closes: #516746) + * initramfs-tools.8: Document exported IP kernel parameter. + * initramfs-tools.preinst: Nuke initrd-tools related migration path. + * MODULES=dep: ide-disk got renamed to ide-gd_mod since 2.6.28. + * mkinitramfs: usage() fix conffile name. + * update copyright year of my contributions. + * control: conform to latest policy without changes. + * hook-functions: reword MODULES=dep error message. + * hook-functions: MODULES=dep fix for mmc root. (closes: #520198) + * debian/compat: Set debhelper compatibility version 5. + + [ Matt Kraai ] + * mkinitramfs-kpkg misspells "deprecation" as "depreciation". + (closes: #517344) + + [ Michael Vogt ] + * update-initramfs: set_linked_version() check if the links point to + an existing initrd.img. + + [ Scott James Remnant ] + * mkinitramfs: include the modules.order file. + + [ Ben Collins ] + * init-top/framebuffer: ignore blacklist for forced vga= usage. + + -- maximilian attems Mon, 23 Mar 2009 07:55:16 +0100 + initramfs-tools (0.93) unstable; urgency=low Release "Fischia il vento e infuria la bufera" -- cgit v1.2.3 From e939f98f684326ddc06d54fe0379c552fb94010f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 2 Apr 2009 12:56:06 +0200 Subject: release 0.93.2 --- debian/changelog | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index af127db..46de96f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,31 @@ +initramfs-tools (0.93.2) unstable; urgency=low + + [ François Delawarde ] + * hook-functions: MODULES=dep fix for luks over cciss devices. + (closes: #517072, #522030) + + [ maximilian attems ] + * hook-functions: stricter match on loaded module for firmware + warning. + * hook-functions: Add first firmware from $(uname -r) versioned + directories. (closes: #521370) + * hook-functions: MODULES=most add all fb modules per default. + * update-initramfs: Cleanup run_bootloader() + * update-initramfs: mbr_check() use /boot/grub/grub.cfg for grub2 + search. (closes: #427509) + * update-initramfs: Run update on highest version instead of + /initrd.img link. (closes: #493863) + * hook-functions: MODULES=most fb add all available agp modules. + * update-initramfs: Fix error message on wrong -k version argument. + * hooks/thermal: Prevent inclusion of windfarm modules on PS3. + * mkinitramfs: Allow dots in boot and script filenames. + + [ Maik Zumstrull ] + * init-top/framebuffer: Load intel-agp for intelfb. + (closes: #416063, #455876) + + -- maximilian attems Thu, 02 Apr 2009 12:44:33 +0200 + initramfs-tools (0.93.1) unstable; urgency=low [ maximilian attems ] -- cgit v1.2.3 From 88462fef31e21ec066c9e71f09310b6320b135c0 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 23 Apr 2009 11:25:34 +0200 Subject: debian/control: No longer mention EVMS in long description. evms seems dead, so no longer list it explicitly. Signed-off-by: maximilian attems --- debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 5551acb..72af0d2 100644 --- a/debian/control +++ b/debian/control @@ -18,6 +18,6 @@ Description: tools for generating an initramfs Linux kernel. The initramfs is a gzipped cpio archive. At boot time, the kernel unpacks that archive into RAM, mounts and uses it as initial root file system. The mounting of the real root file system occurs in early user space. - klibc provides utilities to setup root. Having the root on EVMS, MD, LVM2, - LUKS or NFS is also supported. + klibc provides utilities to setup root. Having the root on MD, LVM2, LUKS or + NFS is also supported. Any boot loader with initrd support is able to load an initramfs archive. -- cgit v1.2.3 From ce5f54d97daa77a150a8539dc971e1830e21feb5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 10 Jun 2009 16:04:25 +0200 Subject: release 0.93.3 too many small fixes piled up to hold back even more.. --- debian/changelog | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 46de96f..eb9da0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +initramfs-tools (0.93.3) unstable; urgency=low + + [ maximilian attems ] + * cleanup LABEL handling code. + * update-initramfs: Use exit code of command -v too. + * hook-functions: Add i915 module for kms. + * update-initramfs: Pass version to flash-kernel. (closes: #523711) + * update-initramfs: Don't hardcode path for lilo or elilo. (closes: #524928) + * hook-functions: MODULES=dep error out if sysfs not mounted on /sys. + (closes: #524179) + * debian/control: No longer mention EVMS in long description. + * hook-functions: MODULES=most fix old typo s/smc911x/smc91x/. + (closes: #528094) + * mkinitramfs: Invoke dpkg --print-architecture. (closes: #529222) + + [ Loic Minier ] + * copy_exec: also avoid picking sse2, neon, and vfp hwcaps libs. + + -- maximilian attems Tue, 21 Apr 2009 15:05:40 +0200 + initramfs-tools (0.93.2) unstable; urgency=low [ François Delawarde ] -- cgit v1.2.3 From 3eb5ad8d680f54dadb64994ec2c2e481c06211d2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 23 Jun 2009 00:39:52 +0200 Subject: preinst: Don't hardcode vol_id cmd use command instead of hardcoded path, fixes lintian error: command-with-path-in-maintainer-script Signed-off-by: maximilian attems --- debian/initramfs-tools.preinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 8095b88..bb58684 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -20,8 +20,8 @@ case "$1" in # First time install. Can we autodetect the RESUME partition? if [ -r /proc/swaps ]; then RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') - if [ -x /sbin/vol_id ]; then - UUID=$(/sbin/vol_id -u "$RESUME" || true) + if command -v vol_id >/dev/null 2>&1; then + UUID=$(vol_id -u "$RESUME" || true) elif [ -x /lib/udev/vol_id ]; then UUID=$(/lib/udev/vol_id -u "$RESUME" || true) fi -- cgit v1.2.3 From dbb23dbcf3eba81af78ecb546c86c9f94a18622e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 23 Jun 2009 00:45:00 +0200 Subject: control: bump versioned dep on debhelper fixes lintian warning: package-lacks-versioned-build-depends-on-debhelper * 5 --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 72af0d2..1cec19c 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: utils Priority: optional Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team -Build-Depends: debhelper (>= 4.1.0), cdbs +Build-Depends: debhelper (>= 5.0), cdbs Standards-Version: 3.8.1 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -- cgit v1.2.3 From 71ef55e707383818e7a4fe09f02ead7e63dd0d88 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 23 Jun 2009 11:53:32 +0200 Subject: control: bump standards version without changes. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 1cec19c..17827ba 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team Build-Depends: debhelper (>= 5.0), cdbs -Standards-Version: 3.8.1 +Standards-Version: 3.8.2 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -- cgit v1.2.3 From ddf09adbf2f2710e62b4a1eedfad213ce6e908e7 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 29 Jul 2009 14:58:09 +0200 Subject: release 0.93.4 last of this line, we need to work on bootspeed. --- debian/changelog | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index eb9da0c..b0575f0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +initramfs-tools (0.93.4) unstable; urgency=medium + + [ Aaron M. Ucko ] + * scripts/init-top/framebuffer: i915 needs intel-agp too. (closes: #533258) + + [ maximilian attems ] + * preinst: Don't hardcode vol_id cmd. + * initramfs-tools.8: Convert hyphen to minus sign. + * control: bump versioned dep on debhelper. + * control: bump standards version without changes. + * hook-functions: Fix loading of entries without newline in + /etc/initramfs-tools/modules. (closes: #532745) + * MODULES=most: Add virtio_net to initramfs. (closes: #533894) + + -- maximilian attems Wed, 29 Jul 2009 14:55:04 +0200 + initramfs-tools (0.93.3) unstable; urgency=low [ maximilian attems ] -- cgit v1.2.3 From 5bbb92c9bfa7f109a8ed10f1a815e974cb0db01a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 25 Sep 2009 01:54:15 +0200 Subject: fix out-of-date-standards-version --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 17827ba..69b51b0 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team Build-Depends: debhelper (>= 5.0), cdbs -Standards-Version: 3.8.2 +Standards-Version: 3.8.3 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -- cgit v1.2.3 From 8d3cbe0252a6caec0b5a6bd97c5aa2de65ccc139 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 27 Sep 2009 16:26:19 +0200 Subject: Nuke useless unused dir. shipp used conf-hooks.d Reported-by: Jonas Meurer Signed-off-by: maximilian attems --- debian/initramfs-tools.dirs | 2 +- debian/lintian/initramfs-tools | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/initramfs-tools.dirs b/debian/initramfs-tools.dirs index a11bf32..0f63f2f 100644 --- a/debian/initramfs-tools.dirs +++ b/debian/initramfs-tools.dirs @@ -10,6 +10,6 @@ etc/initramfs-tools/scripts/nfs-top etc/initramfs-tools/hooks etc/initramfs-tools/conf.d usr/share/initramfs-tools/conf.d -usr/share/initramfs-tools/hooksconf.d +usr/share/initramfs-tools/conf-hooks.d usr/share/initramfs-tools/modules.d /var/lib/initramfs-tools diff --git a/debian/lintian/initramfs-tools b/debian/lintian/initramfs-tools index 6d1b9c8..5191f49 100644 --- a/debian/lintian/initramfs-tools +++ b/debian/lintian/initramfs-tools @@ -1,3 +1,3 @@ initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/conf.d/ -initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/hooksconf.d/ +initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/conf-hooks.d/ initramfs-tools: package-contains-empty-directory usr/share/initramfs-tools/modules.d/ -- cgit v1.2.3 From fe0a965e82ee16b7d64188fe1afb527ac648d686 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 24 Mar 2010 04:38:27 +0100 Subject: control: bump standards version without changes. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 69b51b0..5e76fa5 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: Jeff Bailey , maximilian attems , David Härdeman Maintainer: Debian kernel team Build-Depends: debhelper (>= 5.0), cdbs -Standards-Version: 3.8.3 +Standards-Version: 3.8.4 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -- cgit v1.2.3 From a069caef21d2456a17d2df77f1ab2e84b31074dd Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 24 Mar 2010 04:39:34 +0100 Subject: control: Clean up Uploaders field none of the other listed persons are active currently. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 5e76fa5..57f990e 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: initramfs-tools Section: utils Priority: optional -Uploaders: Jeff Bailey , maximilian attems , David Härdeman +Uploaders: maximilian attems Maintainer: Debian kernel team Build-Depends: debhelper (>= 5.0), cdbs Standards-Version: 3.8.4 -- cgit v1.2.3 From b5c928d159623f617f872323b7064ebfbf19a269 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 21 Apr 2009 00:55:05 +0200 Subject: switch from cdbs to debhelper 7 newest debhelper makefile is short and quick. inspiration from /usr/share/doc/debhelper/examples/rules.tiny. also drop useless pre-build rule, which seems to stem from old bzr. it was an vcs that didn't keep the permissions. Signed-off-by: maximilian attems --- debian/compat | 2 +- debian/control | 2 +- debian/rules | 10 ++-------- 3 files changed, 4 insertions(+), 10 deletions(-) (limited to 'debian') diff --git a/debian/compat b/debian/compat index 7ed6ff8..7f8f011 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -5 +7 diff --git a/debian/control b/debian/control index 57f990e..6580c78 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: utils Priority: optional Uploaders: maximilian attems Maintainer: Debian kernel team -Build-Depends: debhelper (>= 5.0), cdbs +Build-Depends: debhelper (>= 7.0) Standards-Version: 3.8.4 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git diff --git a/debian/rules b/debian/rules index 1376aa9..2d33f6a 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,4 @@ #!/usr/bin/make -f -include /usr/share/cdbs/1/rules/debhelper.mk - -pre-build:: - chmod +x init mkinitramfs - chmod +x hooks/* - for x in `find scripts/ kernel/ -maxdepth 1 -type d | tail -n+2`; do \ - chmod -R +x $$x; \ - done +%: + dh $@ -- cgit v1.2.3 From 034308f306b2cb3bffeb5811aca2636405d29dd4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Apr 2010 05:14:34 +0200 Subject: modernize docs to todays standards seems nobody had a look since longer, nuke useless cpiogz for now, we may want resurrect that later. Signed-off-by: maximilian attems --- debian/initramfs-tools.examples | 1 - docs/example_hook | 56 +++------------------------ docs/example_hook_cpiogz | 84 ----------------------------------------- docs/example_script | 63 ++----------------------------- 4 files changed, 9 insertions(+), 195 deletions(-) delete mode 100644 docs/example_hook_cpiogz (limited to 'debian') diff --git a/debian/initramfs-tools.examples b/debian/initramfs-tools.examples index 9f67297..9466301 100644 --- a/debian/initramfs-tools.examples +++ b/debian/initramfs-tools.examples @@ -1,4 +1,3 @@ conf/modules docs/example_script docs/example_hook -docs/example_hook_cpiogz diff --git a/docs/example_hook b/docs/example_hook index a0d015a..683ddad 100644 --- a/docs/example_hook +++ b/docs/example_hook @@ -1,5 +1,5 @@ #!/bin/sh - +# # # This is an example hook script. It will be run by 'mkinitramfs' # when it creates the image. It's job is to decide which files to @@ -8,39 +8,12 @@ # package is installed, or when the administrator runs 'mkinitramfs' # by hand to update an initramfs image. # -# TODO: What about the case where you install something that should be -# added to the initramfs, but the linux-image it relates to has -# already been installed previously? Does this happen often -# enough that it needs to be handled? How can it be handled? -# -# * Think about the 'usplash'. The initramfs will need to be -# updated if a theme change or update is desired. Maybe it -# should not be totally automatic, but offered on upgrade -# predicated on a user response to a debconf question? That -# issue needs to be explored and a solution specified. -# -# * Do not assume that any needed subdirectories have been created -# yet, but don't bail out if they are already there. -# -# * All of the standard system tools are available, of course, since -# this hook is running in the real system, not the initramfs. -# -# * TODO: ... ? Anything else to tell them in this bullet-list? -# - -# -# The environment contains at least: -# -# CONFDIR -- usually /etc/mkinitramfs, can be set on mkinitramfs +# CONFDIR -- usually /etc/initramfs-tools, can be set on mkinitramfs # command line. # # DESTDIR -- The staging directory where we are building the image. -# -# TODO: Decide what environment variables are meaningful and defined -# in this context, then document them as part of the interface. -# -# TODO: May need a version_compare function for comparison of VERSION? - +# +# see initramfs-tools(8) # # List the soft prerequisites here. This is a space separated list of @@ -80,7 +53,7 @@ esac # course may be other reasons to have custom logic deciding what to # install. The version variable may be useful for this. # -if [ -x /usr/bin/myprog ]; then +if command -v myprog >/dev/null 2>&1; then copy_exec /usr/bin/myprog usr/bin fi @@ -92,23 +65,4 @@ fi # ... and it should do what is necessary to have 'myprog' get run # inside the early runtime environment. -# Handle an error: -# -if [ -n "$an_error_occured" ]; -then - # - # TODO: Do we need 'warn()', 'error()', and/or 'fatal()' for this? - # - echo "An error occured in $0: $an_error_occured" >&2 - exit 1 - # - # TODO: Decide if different error codes are meaningful, what they - # mean, and what the semantics of them are wrt 'mkinitramfs' - # pass or fail. Consider naming the error values with - # mnemonic symbols rather than magic numbers. They may or - # may not be the same set of errors as the set for - # in-initramfs scripts. - # -fi - exit 0 diff --git a/docs/example_hook_cpiogz b/docs/example_hook_cpiogz deleted file mode 100644 index f3e44d9..0000000 --- a/docs/example_hook_cpiogz +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -# -# The environment contains at least: -# -# CONFDIR -- usually /etc/mkinitramfs, can be set on mkinitramfs -# command line. -# -# DESTDIR -- The staging directory where we are building the image. -# -# TODO: Decide what environment variables are meaningful and defined -# in this context, then document them as part of the interface. -# -# TODO: Write a common header for these examples or move this -# documentation to a man page and reference it here. :-) -# - -# -# List the soft prerequisites here. This is a space separated list of -# names, of scripts that are in the same directory as this one, that -# must be run before this one can be. -# -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -# -# Source the 'hook-functions' scriptlet (for 'catenate_cpiogz'): -# -. /usr/share/initramfs-tools/hook-functions - -# -# Lets pretend it has a conffile (think debconf), and we source it -# here. Don't make debconf lookup calls here. The postinst for the -# package owning this hook script should have done that and configured -# the "/etc/default/conffile" already. -# -# TODO: How does the package ensure that it's installed BEFORE the -# corresponding 'linux-image' package? Can it declare that, in -# the case where it's an add-on that the 'linux-image' is not -# aware of? This might be an apt and dpkg issue. -# -# * Eg. an optional usplash or suspend2ui_fbsplash package. -# -. /etc/default/mypackage-initramfs - -# -# Also pretend that we only include our initramfs overlay if an opion -# is not "no", and the 'linux-image' package we are generating this -# initramfs for matches the version this script's package is designed -# for. Just for example; pretend this example mkinitramfs hook script -# is part of a 'linux-image' or 'xxx-modules' package. -# -if [ "$MYOPTION" != "no" -a "$version" = "2.6.12+ss2.1.9.1" ]; then - catenate_cpiogz /usr/lib/mypackage/initramfs.cpio.gz -fi - -# -# In this case, there does not have to be an (eg.): -# -# "/etc/mkinitramfs/init-top/mypackage" -# -# ... since that script is probably inside of the initramfs overlay -# already. If it's a conffile though, it does not belong in there, -# and should be placed in the appropriate location inside of -# "/etc/mkinitramfs". Remember that if it needs access to the -# settings in our "/etc/default/mypackage-initramfs", then that file -# must also get copied into a location inside of ${DESTDIR} by this -# hook script in order to make it available inside of the initramfs -# environment. -# - -exit 0 diff --git a/docs/example_script b/docs/example_script index d7f407f..5e9153b 100644 --- a/docs/example_script +++ b/docs/example_script @@ -2,45 +2,11 @@ # # This script is run inside of the initramfs environment during the -# system boot process. It is installed there by 'mkinitramfs'. The -# package that owns it may opt to install it in either an appropriate -# location under "/usr/share/initramfs-tools/scripts/", or a similar -# location under "/etc/mkinitramfs/scripts/", depending upon whether -# it should be considered to be a user modifiable conffile or not. -# -# TODO: How do we deal with the case where the package that installed -# this has been removed but not purged, if we always arbitrarily -# copy all of these scripts into the initramfs? -# -# * The available toolset is limited inside this environment... -# -# TODO: document that toolset in the man page. -# -# * /dev, /proc, and /sys are already mounted. / is a ?? ro/rw -# filesystem... etc. more documentation. -# -# * It is expected that /proc and /sys will be umounted before -# changing over to the real root file system, so you must not keep -# any files open on them beyond these scripts. -# -# * You may like to strip these documentation comments from this -# example if you take it for a template, to save a little space in -# the initramfs, since nobody will ever read it from inside of -# there anyhow. -# - -# -# The environment contains at least the following variables: -# -# TODO: Decide what environment variables are meaningful and defined -# in this context, then document them as part of the interface. -# -# Because this script will be run as a full separate process, rather -# than sourced inside the context of the driver script, if it needs to -# pass information to another script that may run after it, it must do -# so by writing data to a file location known to both scripts. Simply -# setting an environment variable will not work. +# system boot process. It is installed there by 'update-initramfs'. +# The # package that owns it may opt to install it in an appropriate +# location under "/usr/share/initramfs-tools/scripts/". # +# see initramfs-tools(8) for more details. # # List the soft prerequisites here. This is a space separated list of @@ -66,25 +32,4 @@ esac echo "Got here!" -# Handle an error: - -if [ -n "$an_error_occured" ]; -then - # - # TODO: Do we need 'warn()', 'error()', and/or 'fatal()' for this? - # I think we ultimately do, and that they need to be in their own - # well-documented location so that an overlay can override them. - # Think 'usplash' progress updates. - # - echo "An error occured in $0: $an_error_occured" >&2 - exit 1 - # - # TODO: Decide if different error codes are meaningful, what they - # mean, and what the semantics of them are wrt 'init' pass - # or panic. Consider naming the error values with mnemonic - # symbols rather than magic numbers. - # -fi - exit 0 - -- cgit v1.2.3 From c1ab7621fbb6fd30d0d35eebc0853e04db6b41fa Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Apr 2010 05:18:37 +0200 Subject: examples: shipp old framebuffer boot script people might want to use that. Signed-off-by: maximilian attems --- debian/initramfs-tools.examples | 1 + docs/framebuffer | 108 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 docs/framebuffer (limited to 'debian') diff --git a/debian/initramfs-tools.examples b/debian/initramfs-tools.examples index 9466301..bb28943 100644 --- a/debian/initramfs-tools.examples +++ b/debian/initramfs-tools.examples @@ -1,3 +1,4 @@ conf/modules docs/example_script docs/example_hook +docs/framebuffer diff --git a/docs/framebuffer b/docs/framebuffer new file mode 100644 index 0000000..678ffdf --- /dev/null +++ b/docs/framebuffer @@ -0,0 +1,108 @@ +#!/bin/sh + +PREREQ="" +prereqs() +{ + echo "$PREREQ" +} +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + + +# The options part of the kernel "video=" argument (i.e. everyting +# after "video=:") 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 " + # In the ":" form + elif [ "${opt}" != "${opt#*:}" ]; then + echo -n "${opt%:*}=${opt#*:} " + # Presumably a modevalue without the "mode=" prefix + elif [ "${opt}" != "${opt#[0-9]*x[0-9]}" ]; then + echo -n "mode=$opt " + # Presumably a boolean + else + echo -n "${opt}=1 " + fi + done +} + +FB="" +OPTS="" + +for x in $(cat /proc/cmdline); do + case ${x} in + vga=*) + FB="vesafb"; + OPTS=""; + ;; + video=*) + FB=${x#*=} + FB="${FB%%:*}" + OPTS="$(parse_video_opts "${x}")" + esac +done + +# Module-specific workarounds +case ${FB} in +matroxfb) + # Map command line name to module name + FB=matroxfb_base + ;; +intelfb|i810fb|i915) + # Needs AGP driver loaded + modprobe intel-agp + ;; +uvesafb) + # v86d requires /dev/zero and dev/mem, but udev haven't been started yet + [ -e /dev/zero ] || mknod -m 0666 /dev/zero c 1 5 + [ -e /dev/mem ] || mknod -m 0640 /dev/mem c 1 1 + ;; +*) + ;; +esac + +if [ -n "${FB}" ]; then + unset MODPROBE_OPTIONS + modprobe -q fbcon + modprobe -q ${FB} ${OPTS} +fi + +if [ -e /proc/fb ]; then + while read fbno desc; do + if [ $(($fbno < 32)) ]; then + mknod -m 0640 /dev/fb${fbno} c 29 ${fbno} + fi + done < /proc/fb +else + mknod -m 0640 /dev/fb0 c 29 0 +fi -- cgit v1.2.3 From b07403cfe4d525574aab719bd83c231fe5f7687e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Apr 2010 07:42:45 +0200 Subject: debian/control: Add a breaks cryptsetup. see 576488, for report. Signed-off-by: maximilian attems --- debian/control | 1 + 1 file changed, 1 insertion(+) (limited to 'debian') diff --git a/debian/control b/debian/control index 6580c78..42b68e0 100644 --- a/debian/control +++ b/debian/control @@ -12,6 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} +Breaks: cryptsetup (<< 2:1.1.0-2) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From d3c6ee2bdfb07593c009bba604901936eda525f1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Apr 2010 09:03:29 +0200 Subject: prepare release 0.94 add changelog and NEWS Signed-off-by: maximilian attems --- debian/NEWS | 11 +++++ debian/changelog | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) (limited to 'debian') diff --git a/debian/NEWS b/debian/NEWS index 9ac39f5..ca2d765 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,14 @@ +initramfs-tools (0.94) unstable; urgency=low + + * For better boot speed and due to unusual complications framebuffer, AGP + and KMS drivers are dropped out of the generic MODULES=most case. + The dropped framebuffer boot script is shipped in the examples for + packagers of userspace boot graphics. They may also need to ship + a hook file adding the mentioned graphics drivers, but in a more + complete way. For the majority of boxes this is not necessary. + + -- maximilian attems Mon, 05 Apr 2010 08:10:34 +0200 + initramfs-tools (0.76) unstable; urgency=low * This release features nfs auto detection in the initramfs. diff --git a/debian/changelog b/debian/changelog index b0575f0..ea53cee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,136 @@ +initramfs-tools (0.94) UNRELEASED; urgency=low + + * The "Litte Bang" release + + [ maximilian attems ] + * Nuke kernelextras hooks. + * Create a klibc hook script. + * Redefinde MODULES=most to not carry any fb driver per default. + * Nuke framebuffer boot script. + * Revert "hook-functions: Add hid_* modules." + * Move busybox addition to a hook script. + * mkinitramfs fix comment. + * hook-functions: Fix mounted /sys check for openvz container. + * initramfs-tools.8: fix boot example script to execute. + scripts/functions. (closes: #545728) + * Fix out-of-date-standards-version. + * /etc/kernel hook script support for make deb-pkg generated linux-images + and kernel-package. (closes: #523735, #561289) + * update-initramfs: allow -t takeover on delete. + * /etc/kernel/postrm.d/i-t: use now takeover on delete. + (closes: #524534, #547365, #559619) + * Nuke useless unused dir. + * kernel hook scripts: Fix typo, add comments. + * hook-funcitions: Only warn about missing firmware if /proc/modules + exists. (closes: #560266, #575154) + * mkinitramfs: Be opportunistic when calling modprobe thus showing + errors. (closes: #554873) + * copy_exec: Check if ldd is around. + * scripts/local: Use blkid as backup fstype detection. (closes: #568527) + * mkinitramfs: only copy modprobe conf files. (closes: #506533) + * blacklist earlier at init-top stage. + * scripts/local: fix blkid invocation. + * init: export and unset BOOTIF. + * init: rexport resume to reallow it's hardcoded usage. (closes: #572858) + * update-initramfs: -d delete .bak file. (closes: #559535) + * control: bump standards version without changes. + * control: Clean up Uploaders field. + * switch from cdbs to debhelper 7. + * update-initramfs: Stop second guessing lilo usage. (closes: #574553) + * mkinitramfs: allow to build initramfs for unmodular linux images. + (closes: #415474, #433708) + * initramfs.conf.5: document UMASK variable for sensitive initramfs. + (closes: #536195) + * update-initramfs: only run elilo if configured. (closes: #534201) + * update-initramfs: fix previous elilo commit. + * MODULES=DEP Use driver/module syfs attribute. (closes: #567189) + * panic: quote variable. + * MODULES=DEP: Check rootfs on mkinitramfs. (closes: #519800) + * Use ata_generic driver on all_generic_ide bootarg + * scripts/functions: add get_fstype() from scripts/local. (closes: #487409) + * mkinitramfs.8: update date. + * Keep acpi modules in initramfs so that udev can load them early. + * mkinitramfs: no longer copy depmod. + * init: Silence "Loading essential drivers..." on quiet boot. + * hook-functions: Add btrfs to base modules. + * init: export BOOT for casper and friends. + * hooks/klibc: Keep gzip in initramfs. + * modernize docs to todays standards. + * examples: shipp old framebuffer boot script. + * initramfs.conf.5, update-initramfs.conf.5: Add FILES section. + (closes: #565386) + * mkinitramfs: be silent if no modules.map was generated in first place. + * debian/control: Add a breaks cryptsetup. + + [ Tormod Volden ] + * blacklist boot hook write to /etc/modprobe.d/initramfs.conf. + (closes: #541864) + + [ Michael Prokop ] + * Fix path to nfsroot.txt in documentation. + * hook-functions: Avoid firmware copy error. (closes: #570678) + + [ Joey Hess ] + * scripts/local: avoid mount -t unknown. (closes: #567065) + + [ Avi Rozen ] + * mkinitramfs: add all usb storage devices. (closes: #543568) + + [ Ferenc Wagner ] + * initramfs-tools: make the panic argument available in the rescue + shell. (closes: #569033) + + [ Maximilian Gass ] + * mkinitramfs: KEYMAP option fails to work due to missing keymap. + (closes: #565416) + + [ Vagrant Cascadian ] + * configure_networking: support BOOTIF variable set by pxelinux. + (closes: #535008) + + [ Ben Hutchings ] + * copy_modules_dir: Take a list of exclusions after the base directory. + * auto_add_modules: Copy all modules from net, excluding some + subdirectories. + + [ Scott James Remnant ] + * init: Mount devtmpfs on /dev. + * mkinitramfs: Call depmod before packing the initramfs. + (closes: #465760, #562561) + * init: load the netconsole module with netconsole bootarg + * init: mount /dev/pts as well as /dev. + + [ Ben Collins ] + * update-initramfs: Default to not keep .bak backups. + + [ Piotr Lewandowski ] + * update-initramfs breaks if /etc/mtab is a symlink to /proc/mounts. + (closes: #525606) + + [ Martin Michlmayr ] + * MODULES=dep fix boot with MMC. (closes: #548711) + + [ Nikolaus Schulz ] + * hook-functions: let dep_add_modules() recurse into lvm slave devices. + (closes: 573761) + + [ Anna Jonna Armannsdottir ] + * configure_networking: Try repeatedly ipconfig with increasing + timeout. + + [ Colin Watson ] + * mkinitramfs: Filter out looping or broken symlinks from the + initramfs. (closes: #575157) + * mkinitramfs: set initramfs root to 755. + + [ Bert Schulze ] + * initramfs-tools: support different compression tools in mkinitramfs. + (closes: #533903) + * mkinitramfs: -c compression support / commandline override. + (closes: #576429) + + -- maximilian attems Mon, 05 Apr 2010 05:25:48 +0200 + initramfs-tools (0.93.4) unstable; urgency=medium [ Aaron M. Ucko ] -- cgit v1.2.3 From dff462b8a86c3753f8b0107fbf4bb445ac9adb00 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Apr 2010 17:53:38 +0200 Subject: NEWS: shorten and rephrase concerning framebuffer boot script: "I don't think regular users need to see this; the maintainers of those packages can read the changelog." Reviewed-by: Ben Hutchings --- debian/NEWS | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'debian') diff --git a/debian/NEWS b/debian/NEWS index ca2d765..a2a16af 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,11 +1,7 @@ initramfs-tools (0.94) unstable; urgency=low - * For better boot speed and due to unusual complications framebuffer, AGP - and KMS drivers are dropped out of the generic MODULES=most case. - The dropped framebuffer boot script is shipped in the examples for - packagers of userspace boot graphics. They may also need to ship - a hook file adding the mentioned graphics drivers, but in a more - complete way. For the majority of boxes this is not necessary. + * To improve boot speed and avoid some complications, video drivers are + no longer included in the initramfs by default (MODULES=most). -- maximilian attems Mon, 05 Apr 2010 08:10:34 +0200 -- cgit v1.2.3 From 9b9648e26e87d9b7cd1ba0398f38441d4150c7eb Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Apr 2010 22:37:02 +0200 Subject: release "Little Bang 0.94" initramfs-tools --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ea53cee..5a30a2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -initramfs-tools (0.94) UNRELEASED; urgency=low +initramfs-tools (0.94) unstable; urgency=low * The "Litte Bang" release -- cgit v1.2.3 From 46cec44601a2e65e3368c71b7728614c9b7d8a95 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 03:39:50 +0200 Subject: update TODO list to bring forward current known issues. --- debian/TODO | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index f62656f..7423d06 100644 --- a/debian/TODO +++ b/debian/TODO @@ -3,8 +3,16 @@ TODO o Grep for TODO and FIXME and do those. =) - o Eliminate ?udev?, ?klibc?, busybox (-> glibc). + o Exclude list of hooks for admin. + + o Easier generation for remote boxes, see #570522. + + o "Fix" sed magic for lib dependence, + copy_exec, maybe use dracut copy logic. - o Default to dep for PPC - Possibly to detect newworld? + o root loop support. + + o MODULES=dep md replace awk magic with proper parsing. + + o Eliminate ?udev?, ?klibc?, busybox (-> glibc). - o udevsettle timeouts handling -- cgit v1.2.3 From 61d52590d7c75300dfb82ddfcc9ec542a8de45e9 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 09:16:39 +0200 Subject: debian/control: Add a breaks mdadm hadn't checked that boot script before upload, see #576641. Signed-off-by: maximilian attems --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 42b68e0..4fee5e5 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<< 2:1.1.0-2) +Breaks: cryptsetup (<< 2:1.1.0-2), mdadm (<< 3.1.1-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 7f65166f8e30c26961bd0b85c2491d594b4b9d94 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 15:49:33 +0200 Subject: debian/control: Fix Breaks version comparison needs to include current sid versions. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 4fee5e5..81a329c 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<< 2:1.1.0-2), mdadm (<< 3.1.1-1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (<= 3.1.1-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 27a9b05eb7d067023c48524dfa86de86a508e639 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 09:16:39 +0200 Subject: debian/control: Add a breaks mdadm hadn't checked that boot script before upload, see #576641. Signed-off-by: maximilian attems --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 42b68e0..4fee5e5 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<< 2:1.1.0-2) +Breaks: cryptsetup (<< 2:1.1.0-2), mdadm (<< 3.1.1-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 60d58df3065c796c8e60602568ca5130c489fb78 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 15:49:33 +0200 Subject: debian/control: Fix Breaks version comparison needs to include current sid versions. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 4fee5e5..81a329c 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<< 2:1.1.0-2), mdadm (<< 3.1.1-1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (<= 3.1.1-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 9ac74c77a1f23fbfab17cf75077ce07cfc08eade Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 16:33:14 +0200 Subject: release 0.94.1 just the relevant fixes --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 5a30a2a..5db44fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.94.1) unstable; urgency=low + + * debian/control: Add a breaks mdadm. + * debian/control: Fix Breaks version comparison. + + -- maximilian attems Tue, 06 Apr 2010 16:18:25 +0200 + initramfs-tools (0.94) unstable; urgency=low * The "Litte Bang" release -- cgit v1.2.3 From 82c15be74a55d1042341b4c43e4604a66d124ad1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 23:37:33 +0200 Subject: amend Breaks for mdadm recommend way by dpkg maintainer, need to test. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 81a329c..ad7552c 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (<= 3.1.1-1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (3.1.1-1+incremental+2), mdadm (3.1.1-1+incremental+1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From d6b533044ffcd014799a52b234d5a0769e183de8 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 23:37:33 +0200 Subject: amend Breaks for mdadm recommend way by dpkg maintainer, need to test. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 81a329c..ad7552c 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (<= 3.1.1-1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (3.1.1-1+incremental+2), mdadm (3.1.1-1+incremental+1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 38756f9759f3985b75c66532cf0b9ca0b591260c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 23:48:45 +0200 Subject: debian/control: really fix that break list. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index ad7552c..909b7da 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (3.1.1-1+incremental+2), mdadm (3.1.1-1+incremental+1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 1685c20d93e110970e2ac35734657ccb57de82c9 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 23:48:45 +0200 Subject: debian/control: really fix that break list. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index ad7552c..909b7da 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (3.1.1-1+incremental+2), mdadm (3.1.1-1+incremental+1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 294f3024953b530186cfcdc01c5dd9a1b21f24a6 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Apr 2010 23:50:30 +0200 Subject: release 0.94.2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 5db44fb..cdf341c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.94.2) unstable; urgency=low + + * debian/control: amend Breaks for exp mdadm. + + -- maximilian attems Tue, 06 Apr 2010 23:50:06 +0200 + initramfs-tools (0.94.1) unstable; urgency=low * debian/control: Add a breaks mdadm. -- cgit v1.2.3 From 497c367625f218368c577e0aaac79bc97e396a30 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 7 Apr 2010 20:09:20 +0200 Subject: bug script: include sizes of generated initramfs usually gives a good indications when things go wrong. --- debian/script | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/script b/debian/script index 706a84d..daf3924 100755 --- a/debian/script +++ b/debian/script @@ -2,6 +2,9 @@ exec >&3 +echo "-- initramfs sizes" +ls -lh /boot/initrd.img-2.6.* + echo "-- /proc/cmdline" cat /proc/cmdline echo -- cgit v1.2.3 From 845edd0e39a635fdd171140fc35b616840fa34d5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 8 Apr 2010 03:07:16 +0200 Subject: debian/script: add generated resume param to bug /etc/initramfs-tools/conf.d/resume is often to be seen. Signed-off-by: maximilian attems --- debian/script | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'debian') diff --git a/debian/script b/debian/script index daf3924..43ae7d1 100755 --- a/debian/script +++ b/debian/script @@ -9,6 +9,11 @@ echo "-- /proc/cmdline" cat /proc/cmdline echo +if [ -r /etc/initramfs-tools/conf.d/resume ]; then + echo "-- resume" + cat /etc/initramfs-tools/conf.d/resume +fi + echo "-- /proc/filesystems" grep -v nodev /proc/filesystems echo -- cgit v1.2.3 From 6e22545f2f2355a3defb6bdb6a7a72329d54d373 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 8 Apr 2010 03:46:37 +0200 Subject: debian/control: Add Breaks against experimental findutils (closes: #576677) --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 909b7da..79ffcf6 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1), findutils (= 4.5.7-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 7a519612ec7b1ac077c395404d8b890738c790b3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 8 Apr 2010 03:46:37 +0200 Subject: debian/control: Add Breaks against experimental findutils (closes: #576677) --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 909b7da..79ffcf6 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1), findutils (= 4.5.7-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 062dfde05b2d67a2e2e8766f30847e56dd4c87d2 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 8 Apr 2010 03:56:11 +0200 Subject: release 0.94.3 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index cdf341c..b1fd2a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.94.3) unstable; urgency=low + + * debian/control: Add Breaks against experimental findutils. + (closes: #576677) + + -- maximilian attems Thu, 08 Apr 2010 03:50:28 +0200 + initramfs-tools (0.94.2) unstable; urgency=low * debian/control: amend Breaks for exp mdadm. -- cgit v1.2.3 From 8c7b84b78088b12bef20ef3c138da3f508232373 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 8 Apr 2010 06:04:03 +0200 Subject: release 0.94.4 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index b1fd2a7..3fbdc8c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +initramfs-tools (0.94.4) unstable; urgency=low + + * init: fix hardcoded resume handling. (Closes: #576700) + + -- maximilian attems Thu, 08 Apr 2010 06:02:28 +0200 + initramfs-tools (0.94.3) unstable; urgency=low * debian/control: Add Breaks against experimental findutils. -- cgit v1.2.3 From 6112a1927281c14b040ea8dbe3207cfddb4d9d4b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 8 Apr 2010 20:24:24 +0200 Subject: debian/control: remove findutils Breaks newer findutils got uploaded to experimental ( and it was in principle findutils, who broke initramfs ;) Signed-off-by: maximilian attems --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 79ffcf6..909b7da 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1), findutils (= 4.5.7-1) +Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From 70b8f446dfe1ac302fdf5d564896214a6ccf5a1e Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 19 May 2010 20:01:17 +0200 Subject: initramfs-tools: change license to GPL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The public domain "license" is very liberal and thus allows this to be relicensed under mostly any compatible license. Although not strictly needed many passed contributors agreed on the license change. Many especially asked for the "or any later version", thus it is now licensed under GPL v2 or later. This should ease collaboration with dracut. Acked-by: Jeff Bailey Acked-by: Kees Cook Acked-by: Matt Kraai Acked-by: Michal Pokrywka Acked-by: martin f krafft Acked-by: Ian Campbell Acked-by: Andres Salomon Acked-by: Loïc Minier Acked-by: Chris Lamb Acked-by: Michael Prokop Acked-by: Ferenc Wagner Acked-by: Avi Rozen Acked-by: Piotr Lewandowski Acked-by: Daniel Reichelt Acked-by: Colin Watson Acked-by: Fabio M. Di Nitto Acked-by: Axel Beckert Acked-by: debian@x.ray.net Acked-by: Maik Zumstrull Acked-by: David Härdeman Acked-by: Martin Michlmayr Acked-by: Ben Collins Acked-by: Glennie Vignarajah Acked-by: Ben Hutchings Acked-by: Aaron M. Ucko Acked-by: kel@otaku42.de Acked-by: Maximilian Gass Acked-by: Joey Hess Acked-by: Gerfried Fuchs Acked-by: Tormod Volden --- debian/copyright | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/copyright b/debian/copyright index ddbb70f..c21c66d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -26,4 +26,4 @@ Copyright: 2005 - 2006 Adam Conrad License: -PUBLIC DOMAIN +GPL v2 or any later version -- cgit v1.2.3 From 6e9b04af970b7ebe6d5099bc1721e6fdf4bf1742 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 28 May 2010 16:52:16 -0700 Subject: initramfs-tools: drop outdated breaks all of this software got fixed and was mostly seen in exp, with cryptestup fixed long time ago. Signed-off-by: maximilian attems --- debian/control | 1 - 1 file changed, 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 79ffcf6..6580c78 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,6 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} -Breaks: cryptsetup (<= 2:1.1.0-2), mdadm (= 3.1.1-1+incremental+4), mdadm (= 3.1.1-1+incremental+3), mdadm (= 3.1.1-1+incremental+2), mdadm (= 3.1.1-1+incremental+1), findutils (= 4.5.7-1) Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 -- cgit v1.2.3 From e20bb92433deadc137626f3bcd1e86b93d14b579 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 28 May 2010 16:59:14 -0700 Subject: debian/copyright: add boilerplate to keep lintian happy. shuts up copyright-should-refer-to-common-license-file-for-gpl. Signed-off-by: maximilian attems --- debian/copyright | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian') diff --git a/debian/copyright b/debian/copyright index c21c66d..f84910d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -27,3 +27,6 @@ Copyright: 2005 - 2006 Adam Conrad License: GPL v2 or any later version + +On Debian systems, the complete text of the GNU General Public License version +2 can be found in `/usr/share/common-licenses/GPL-2'. -- cgit v1.2.3 From 06468756ee6d5477b306a61473789f4aa9c088a1 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 28 May 2010 17:24:05 -0700 Subject: release 0.95 Signed-off-by: maximilian attems --- debian/changelog | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3fbdc8c..35ef312 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,52 @@ +initramfs-tools (0.95) unstable; urgency=low + + [ maximilian attems ] + * update TODO list. + * hook-functions: refactor copy_exec. + * mkinitramfs: check only once for existing ldd. + * mkinitramfs: Use eventual TMPDIR definition. + * mkinitramfs: guard against empty EXTRA_CONF. + * update-initramfs: Use nounset. + * mkinitramfs: Fix several unbound variables. + * mkinitramfs: On verbose indicate what we rm. + * bug script: include sizes of generated initramfs. + * debian/script: add generated resume param to bug. + * hook-functions: manual_add_modules simplify. + * hook-functions: copy_modules_dir() small simplifications. + * mkinitramfs.8: Fix wrong sourcing in boot script. (Closes: #545728) + * initramfs-tools.8: Mention /scritps/functions. + * initramfs-tools.8: cryptopts param gone. + * initramfs-tools.8: document BOOTIF variable. + * configure_networking(): work with empty DEVICE string. + (Closes: #566295, #575766) + * hook-functions: add hid-apple. (Closes: #577253) + * Revert "mkinitramfs: only copy modprobe conf files". (Closes: #577981) + * initramfs-tools: change license to GPL. + * hook-functions: re-add hid-microsoft. (Closes: #577253) + * initramfs-tools: drop outdated breaks. + * debian/copyright: add boilerplate to keep lintian happy. + * hook-functions: Fix copy_modules_dir(). + + [ Axel Beckert ] + * mkinitramfs.8: Add information about $TMPDIR environment variable. + + [ bert schulze ] + * mkinitramfs: add LZO support. + * mkinitramfs: use -9 for lzop. + + [ Vagrant Cascadian ] + * configure_networking: pxelinux BOOTIF fixes. + * init: add BOOTIF bootarg. + + [ Michael Prokop ] + * Support booting from USB 3 xHCI-based controllers. + + [ Claus Herwig ] + * mkinitramfs: fix MODULES=dep on mylex raid devices (DAC960). + (Closes: #579702) + + -- maximilian attems Fri, 28 May 2010 17:22:56 -0700 + initramfs-tools (0.94.4) unstable; urgency=low * init: fix hardcoded resume handling. (Closes: #576700) -- cgit v1.2.3 From 75ab44586744b4c2b7ff1a1a13e9c7c8425ac829 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 30 May 2010 22:10:44 +0200 Subject: release 0.95.1. Signed-off-by: Michael Prokop --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 35ef312..4d3f8c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +initramfs-tools (0.95.1) unstable; urgency=low + + [ Michael Prokop ] + * NMU as requested by maintainer. + * update-initramfs: fix unbound variables. [Closes: #583695] + Based on patch by Jonathan Nieder. + + [ Jonathan Nieder ] + * update-initramfs: use $* instead of $@. + + -- Michael Prokop Sun, 30 May 2010 22:09:15 +0200 + initramfs-tools (0.95) unstable; urgency=low [ maximilian attems ] -- cgit v1.2.3 From e2b7015f7d0e47065c2a299c2e7bde59dbac0b14 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 8 Jun 2010 13:57:56 +0200 Subject: Add symlinks issue to TODO file. --- debian/TODO | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/TODO b/debian/TODO index 7423d06..505da9c 100644 --- a/debian/TODO +++ b/debian/TODO @@ -13,6 +13,8 @@ TODO o root loop support. o MODULES=dep md replace awk magic with proper parsing. + -> WIP, check o Eliminate ?udev?, ?klibc?, busybox (-> glibc). + o Support expanding symlinks, see #506540 + #338405 -- cgit v1.2.3 From 127fc8277f7868021a40851c399682eec259c2ed Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 8 Jun 2010 15:56:30 +0200 Subject: Add myself to uploaders. ACK-ed by maks on IRC. Signed-off-by: Michael Prokop --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 6580c78..f98fdd7 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: initramfs-tools Section: utils Priority: optional -Uploaders: maximilian attems +Uploaders: maximilian attems , Michael Prokop Maintainer: Debian kernel team Build-Depends: debhelper (>= 7.0) Standards-Version: 3.8.4 -- cgit v1.2.3 From 5aac044bc1c91dc3a7920d560eeb5df04bc1c9d2 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 8 Jun 2010 16:06:50 +0200 Subject: release 0.96.1. Signed-off-by: Michael Prokop --- debian/changelog | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4d3f8c0..a63ec34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,22 @@ +initramfs-tools (0.96.1) unstable; urgency=low + + * hook-functions: Make sure copy_exec hook function does not + exit with a non-zero return value in non-verbose mode. + [Closes: #584520] + * docs/framebuffer: Document mode vs. mode_option option in + framebuffer example script. [Closes: #439846] + * hook-functions: make device name handling for /proc/mdstat + more flexible for MODULES=dep. [Closes: #584520, #514756] + * mkinitramfs / scripts/functions + initramfs-tools.8: + Support dashes inside scripts names. [Closes: #566056] + * hook-functions: handle ubifs in dep_add_modules() and return + since ubifs root is a char device, (see issue #582858). + * mkinitramfs: warn if TMPDIR is mounted noexec + fall back + to not cache run scripts then. [Closes: #576678] + * Add myself to uploaders. + + -- Michael Prokop Tue, 08 Jun 2010 15:59:08 +0200 + initramfs-tools (0.95.1) unstable; urgency=low [ Michael Prokop ] -- cgit v1.2.3 From d2914e36a645da74bf7294f8d4a9ddf7ea0af170 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 8 Jun 2010 17:07:51 +0200 Subject: Fix bug number in changelog (#584520 -> #549680) for upload of 0.96.1. --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a63ec34..b3ae973 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,7 +6,7 @@ initramfs-tools (0.96.1) unstable; urgency=low * docs/framebuffer: Document mode vs. mode_option option in framebuffer example script. [Closes: #439846] * hook-functions: make device name handling for /proc/mdstat - more flexible for MODULES=dep. [Closes: #584520, #514756] + more flexible for MODULES=dep. [Closes: #549680, #514756] * mkinitramfs / scripts/functions + initramfs-tools.8: Support dashes inside scripts names. [Closes: #566056] * hook-functions: handle ubifs in dep_add_modules() and return -- cgit v1.2.3 From a8a5ce4030983af37715f2581099d453473fd0ea Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 13 Jun 2010 20:43:04 +0200 Subject: script: Add update-initramfs.conf to bug report we see lately unbound variables from there, so it's nice to have it. Signed-off-by: maximilian attems --- debian/script | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/script b/debian/script index 43ae7d1..da030d1 100755 --- a/debian/script +++ b/debian/script @@ -34,6 +34,12 @@ if [ -r /etc/initramfs-tools/initramfs.conf ]; then echo fi +if [ -r /etc/initramfs-tools/update-initramfs.conf ]; then + echo "-- /etc/initramfs-tools/update-initramfs.conf" + sed 's/#.*$//;/^[[:space:]]*$/d' /etc/initramfs-tools/update-initramfs.conf + echo +fi + if [ -r /etc/crypttab ]; then echo "-- /etc/crypttab" cat /etc/crypttab -- cgit v1.2.3 From 60afd2a944cf36a5bce6ca3b4c07a422e98efeba Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Jun 2010 12:10:28 +0200 Subject: code cleanup: drop trailing whitespaces. Signed-off-by: Michael Prokop --- conf/update-initramfs.conf | 2 +- debian/changelog | 6 +++--- debian/copyright | 2 +- docs/example_hook | 2 +- hook-functions | 2 +- init | 6 +++--- initramfs.conf.5 | 12 ++++++------ mkinitramfs | 2 +- scripts/functions | 2 +- scripts/local | 2 +- scripts/nfs | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) (limited to 'debian') diff --git a/conf/update-initramfs.conf b/conf/update-initramfs.conf index 3c27473..31823e2 100644 --- a/conf/update-initramfs.conf +++ b/conf/update-initramfs.conf @@ -1,4 +1,4 @@ -# +# # Configuration file for update-initramfs(8) # diff --git a/debian/changelog b/debian/changelog index b3ae973..901222a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -247,7 +247,7 @@ initramfs-tools (0.93.4) unstable; urgency=medium * initramfs-tools.8: Convert hyphen to minus sign. * control: bump versioned dep on debhelper. * control: bump standards version without changes. - * hook-functions: Fix loading of entries without newline in + * hook-functions: Fix loading of entries without newline in /etc/initramfs-tools/modules. (closes: #532745) * MODULES=most: Add virtio_net to initramfs. (closes: #533894) @@ -537,7 +537,7 @@ initramfs-tools (0.92d) unstable; urgency=low each message. - initramfs-tools.preinst: Try to use UUID for resume device. - add boot script loading ide-generic on all_generic_ide cmdline. - Thanks Frans Pop for report. (closes: #485786) + Thanks Frans Pop for report. (closes: #485786) * init: add possible mountroot break (closes: #488963) * initramfs-tools.8: document UUID usage for root and all_generic_ide. (closes: #489186) @@ -744,7 +744,7 @@ initramfs-tools (0.90) unstable; urgency=low -- maximilian attems Thu, 09 Aug 2007 21:30:29 +0200 initramfs-tools (0.89) unstable; urgency=low - + Release "L'\xE9lecteur c'est notoire N'a pas tout' sa raison" [ Joey Hess ] diff --git a/debian/copyright b/debian/copyright index f84910d..9fe89c8 100644 --- a/debian/copyright +++ b/debian/copyright @@ -13,7 +13,7 @@ http://git.debian.org/?p=kernel/initramfs-tools.git;a=shortlog Authors: Adam Conrad , Ben Collins , David Härdeman , - Jeff Bailey , + Jeff Bailey , maximilian attems , Scott James Remnant diff --git a/docs/example_hook b/docs/example_hook index 683ddad..1f35352 100644 --- a/docs/example_hook +++ b/docs/example_hook @@ -12,7 +12,7 @@ # command line. # # DESTDIR -- The staging directory where we are building the image. -# +# # see initramfs-tools(8) # diff --git a/hook-functions b/hook-functions index f5da1c4..8b6a89c 100644 --- a/hook-functions +++ b/hook-functions @@ -183,7 +183,7 @@ sys_walk_mod_add() { local driver_path module device_path="$1" - + while [ "${device_path}" != "/sys" ]; do sys_walk_modalias ${device_path} driver_path="$(readlink -f ${device_path}/driver/module)" diff --git a/init b/init index 142eb14..a614d89 100755 --- a/init +++ b/init @@ -8,8 +8,8 @@ echo "Loading, please wait..." [ -d /proc ] || mkdir /proc [ -d /tmp ] || mkdir /tmp mkdir -p /var/lock -mount -t sysfs -o nodev,noexec,nosuid none /sys -mount -t proc -o nodev,noexec,nosuid none /proc +mount -t sysfs -o nodev,noexec,nosuid none /sys +mount -t proc -o nodev,noexec,nosuid none /proc # Note that this only becomes /dev on the real filesystem if udev's scripts # are used; which they will be, but it's worth pointing out @@ -184,7 +184,7 @@ done if [ -n "${noresume}" ]; then export noresume unset resume -else +else resume=${RESUME:-} fi diff --git a/initramfs.conf.5 b/initramfs.conf.5 index bb01f58..92c3a6d 100644 --- a/initramfs.conf.5 +++ b/initramfs.conf.5 @@ -48,12 +48,12 @@ The keymap will anyway be loaded by the initscripts later, and the packages that might need input will normally set this variable automatically, so there should normally be no need to set this. -.TP -\fB COMPRESS -Specifies the compression method used for the initramfs image. -.B mkinitramfs -will default to gzip if the kernel lacks support (CONFIG_RD) or the -corresponding userspace utility is not present. +.TP +\fB COMPRESS +Specifies the compression method used for the initramfs image. +.B mkinitramfs +will default to gzip if the kernel lacks support (CONFIG_RD) or the +corresponding userspace utility is not present. .TP \fB UMASK diff --git a/mkinitramfs b/mkinitramfs index 58e4c11..70e5c13 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -315,7 +315,7 @@ exec 3>&1 eval ` # http://cfaj.freeshell.org/shell/cus-faq-2.html exec 4>&1 >&3 3>&- - cd "${DESTDIR}" + cd "${DESTDIR}" { find . 4>&-; echo "ec1=$?;" >&4 } | { diff --git a/scripts/functions b/scripts/functions index 8730d52..685642e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -218,7 +218,7 @@ run_scripts() { initdir=${1} [ ! -d ${initdir} ] && return - + if [ -f ${initdir}/ORDER ]; then . ${initdir}/ORDER elif command -v tsort >/dev/null 2>&1; then diff --git a/scripts/local b/scripts/local index cca5e8d..98464f9 100644 --- a/scripts/local +++ b/scripts/local @@ -50,7 +50,7 @@ pre_mountroot() # We've given up, but we'll let the user fix matters if they can while [ ! -e "${ROOT}" ]; do # give hint about renamed root - case "${ROOT}" in + case "${ROOT}" in /dev/hd*) suffix="${ROOT#/dev/hd}" major="${suffix%[[:digit:]]}" diff --git a/scripts/nfs b/scripts/nfs index 435d2d0..5c41573 100644 --- a/scripts/nfs +++ b/scripts/nfs @@ -4,7 +4,7 @@ retry_nr=0 -# parse nfs bootargs and mount nfs +# parse nfs bootargs and mount nfs do_nfsmount() { -- cgit v1.2.3 From b1fff5e9e4b0ed38f018132cef28330eac7a963c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Mon, 14 Jun 2010 16:04:08 +0200 Subject: add bash-completion for update-initramfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes: #537139 Thanks: David Paleino Thanks: Stéphane Jourdois Signed-off-by: Michael Prokop --- bash_completion.d/initramfs-tools | 26 ++++++++++++++++++++++++++ debian/control | 1 + debian/initramfs-tools.install | 1 + 3 files changed, 28 insertions(+) create mode 100644 bash_completion.d/initramfs-tools (limited to 'debian') diff --git a/bash_completion.d/initramfs-tools b/bash_completion.d/initramfs-tools new file mode 100644 index 0000000..a52074f --- /dev/null +++ b/bash_completion.d/initramfs-tools @@ -0,0 +1,26 @@ +# update-initramfs(8) completion + +_update_initramfs() +{ + local cur prev valid_options + + # TODO: this can be "_get_comp_words_by_ref cur prev" once + # bash-completion >= 1.2 is available, see #537139 + cur=$(_get_cword) + prev=${COMP_WORDS[COMP_CWORD-1]} + + # The only option that takes an argument is -k + if [[ "$prev" == '-k' ]]; then + # Complete with kernel versions + _kernel_versions + COMPREPLY=( $( compgen -W '${COMPREPLY[@]} all' -- "$cur" ) ) + return; + fi + + # Complete with available options (obtained from -h) + valid_options=$( update-initramfs -h 2>&1 | \ + sed -e '/^ -/!d;s/^ \(-\w\+\).*/\1/' ) + COMPREPLY=( $( compgen -W "$valid_options" -- $cur ) ) +} + +complete -F _update_initramfs update-initramfs diff --git a/debian/control b/debian/control index f98fdd7..30d873b 100644 --- a/debian/control +++ b/debian/control @@ -12,6 +12,7 @@ Package: initramfs-tools Architecture: all Recommends: busybox (>= 1:1.01-3) | busybox-initramfs Depends: klibc-utils (>= 1.5.9-1), cpio, module-init-tools, udev (>= 0.086-1), findutils (>= 4.2.24), ${misc:Depends} +Suggests: bash-completion Provides: linux-initramfs-tool Description: tools for generating an initramfs This package contains tools to create and boot an initramfs for packaged 2.6 diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index 71670ef..ebe6a14 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -11,3 +11,4 @@ update-initramfs usr/sbin debian/script usr/share/bug/initramfs-tools debian/lintian/initramfs-tools usr/share/lintian/overrides kernel etc +bash_completion.d etc -- cgit v1.2.3 From 7afab22b3d9bbcc5e2843a9fa634a50082e9c6d3 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 15 Jun 2010 18:22:15 +0200 Subject: debian/script: append /proc/mdstat (iff present) to bugreports Signed-off-by: Michael Prokop --- debian/script | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/script b/debian/script index da030d1..fa706cd 100755 --- a/debian/script +++ b/debian/script @@ -46,6 +46,12 @@ if [ -r /etc/crypttab ]; then echo fi +if [ -r /proc/mdstat ]; then + echo "-- /proc/mdstat" + cat /proc/mdstat + echo +fi + if grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ; then echo "-- /sys/block" ls /sys/block -- cgit v1.2.3 From e506ee7e5b4bd9d87299e0e55d5fa43b738c0933 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Wed, 16 Jun 2010 17:52:13 +0200 Subject: move maintainer-notes.html to docs/ and install as /usr/share/doc/initramfs-tools/maintainer-notes.html Signed-off-by: Michael Prokop --- debian/initramfs-tools.docs | 1 + docs/maintainer-notes.html | 306 ++++++++++++++++++++++++++++++++++++++++++++ maintainer-notes.html | 306 -------------------------------------------- 3 files changed, 307 insertions(+), 306 deletions(-) create mode 100644 docs/maintainer-notes.html delete mode 100644 maintainer-notes.html (limited to 'debian') diff --git a/debian/initramfs-tools.docs b/debian/initramfs-tools.docs index 5c374b1..a592331 100644 --- a/debian/initramfs-tools.docs +++ b/debian/initramfs-tools.docs @@ -1 +1,2 @@ HACKING +docs/maintainer-notes.html diff --git a/docs/maintainer-notes.html b/docs/maintainer-notes.html new file mode 100644 index 0000000..11149b8 --- /dev/null +++ b/docs/maintainer-notes.html @@ -0,0 +1,306 @@ + + + + +Maintainer documentation for initramfs-tools + + + + + +
+
+ +

Maintainer documentation for initramfs-tools

+ +
+ +

Table of Contents

+ + + +
+ +

1. Definitions

+ +

+ Note: This cheatpage assumes that you are using git-core 1.5.6 or newer. +

+ + + + + +
version:version string
username:name of the alioth account
mailaddress:mailaddress of the user
+ + +
+ +

2. Preparations

+ +
    + +
  1. Install required software (notice: git is named git-core on Debian/stable): +
    +# apt-get install git git-buildpackage dpkg-dev
    +
    +
  2. + +
  3. Set environment variables (e.g. through your ~/.bashrc or ~/.zshrc) for git and git-dch: +
    +% export GIT_AUTHOR_EMAIL=<mailaddress>
    +% export DEBEMAIL=<mailaddress>
    +% export GIT_COMMITTER_EMAIL=<mailaddress>
    +
    +
  4. + +
  5. Checkout repository (anonymous): +
    +% git clone git://git.debian.org/git/kernel/initramfs-tools.git
    +% cd initramfs-tools
    +
    +
  6. + +
  7. Checkout repository (with developer access): +
    +% git clone ssh://username@git.debian.org/git/kernel/initramfs-tools.git
    +% cd initramfs-tools
    +
    +
  8. + +
+ + +
+ +

3. Workflow for daily work

+ +

3.1 Implement new features

+ +
    + +
  1. Checkout new branch and switch to it: +
    +% git checkout -b username/short-descr-of-new-feature
    +
    +
  2. + +
  3. Hack and commit work: +
    +% $EDITOR $somefile
    +% git add $somefile
    +% git commit -s
    +
    +
  4. + +

    NOTE: Use 'Closes: #BUGID' for closing a bugreport, 'Thanks: Name +<mailaddress>' for giving credits in your commit message. git-dch will use +this information for generating the changelog using the --meta option later +on.

    + +
  5. Finally push your branch to alioth: +
    +% git push origin username/short-descr-of-new-feature
    +
    +
  6. + +
+ +

3.2 Merge branches

+ +
    + +
  1. Switch to the branch you want to merge: +
    +% git checkout username/new-feature
    +
    +
  2. + +
  3. Rebase to master: +
    +% git rebase master
    +
    +
  4. + +
  5. Switch to master branch and merge: +
    +% git checkout master
    +% git merge username/new-feature
    +
    +
  6. + +
  7. Push: +
    +% git push
    +
    +
  8. + +
  9. After branch is merged delete branch on server and locally: +
    +% git push origin :username/short-descr-of-new-feature
    +% git branch -d username/short-descr-of-new-feature
    +
    +
  10. + +
+ +

3.3 Test specific branch

+ +
    + +
  1. Checkout a specific branch iff branch is not already present locally: +
    +% git checkout -b somename/short-descr-of-new-feature origin/somename/short-descr-of-new-feature
    +
    +
  2. + +
  3. Checkout a specific branch iff branch is already present locally: +
    +% git checkout -b somename/short-descr-of-new-feature
    +
    +
  4. + +
  5. Adjust debian/changelog accordingly: +
    +git-dch --debian-branch="$(git branch | awk -F\* '/^* / { print $2}' )" --since=$(dpkg-parsechangelog | awk '/^Version:/ {print $2}') -S --id-length=7 --meta
    +
    +
  6. + +
  7. Build package: +
    +% git-buildpackage --git-debian-branch="$(git branch | awk -F\*\  '/^* / { print $2}' )" -tc
    +
    +
+ + + +

4. Contribute

+ +

TODO / WIP:

+ +
    +
  1. Create patch: +
    +% git format-patch HEAD
    +
    +
+ + + +

5 Releasing new version

+ +
    + +
  1. Creating changelog: + +
    +% git-dch --debian-branch debian --release --since HASH
    +
    + +or more dynamically: + +
    +% git-dch --meta --release --since v$(dpkg-parsechangelog | awk '/^Version:/ {print $2}') --debian-branch="$(git branch | awk -F\*\  '/^* / { print $2}' )" [--id-length=7] [--full]
    +
    + +
  2. + +
  3. Releasing: +
    +% git commit -a -s -m "Releasing debian version version."
    +
    +
  4. + +
  5. Tagging: +
    +% git tag -s v"version" -m "release version"
    +
    +
  6. + +
  7. Pushing: +
    +% git push
    +% git push --tags
    +
    +
  8. + +
  9. Build in chroot and upload to ftp-master.
  10. + +
  11. Send mail announcing the new initramfs-tools version with subject +"initramfs-tools $VERSION release" to initramfs@vger.kernel.org, +debian-kernel@lists.debian.org + kernel-team@lists.ubuntu.com - including a +shortlog (generated through "git shortlog $TAG..").
  12. + +
+ + +
+ +

Ressources

+ + + + + +
+ +

Credits

+ +
    +
  • Thanks to Daniel Baumann for his "Maintainer Cheatpage" which inspired this document
  • +
+ + +
+ +

+-- Michael Prokop <mika@debian.org> +

+ +
+ +
+ + + + diff --git a/maintainer-notes.html b/maintainer-notes.html deleted file mode 100644 index 11149b8..0000000 --- a/maintainer-notes.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - -Maintainer documentation for initramfs-tools - - - - - -
-
- -

Maintainer documentation for initramfs-tools

- -
- -

Table of Contents

- - - -
- -

1. Definitions

- -

- Note: This cheatpage assumes that you are using git-core 1.5.6 or newer. -

- - - - - -
version:version string
username:name of the alioth account
mailaddress:mailaddress of the user
- - -
- -

2. Preparations

- -
    - -
  1. Install required software (notice: git is named git-core on Debian/stable): -
    -# apt-get install git git-buildpackage dpkg-dev
    -
    -
  2. - -
  3. Set environment variables (e.g. through your ~/.bashrc or ~/.zshrc) for git and git-dch: -
    -% export GIT_AUTHOR_EMAIL=<mailaddress>
    -% export DEBEMAIL=<mailaddress>
    -% export GIT_COMMITTER_EMAIL=<mailaddress>
    -
    -
  4. - -
  5. Checkout repository (anonymous): -
    -% git clone git://git.debian.org/git/kernel/initramfs-tools.git
    -% cd initramfs-tools
    -
    -
  6. - -
  7. Checkout repository (with developer access): -
    -% git clone ssh://username@git.debian.org/git/kernel/initramfs-tools.git
    -% cd initramfs-tools
    -
    -
  8. - -
- - -
- -

3. Workflow for daily work

- -

3.1 Implement new features

- -
    - -
  1. Checkout new branch and switch to it: -
    -% git checkout -b username/short-descr-of-new-feature
    -
    -
  2. - -
  3. Hack and commit work: -
    -% $EDITOR $somefile
    -% git add $somefile
    -% git commit -s
    -
    -
  4. - -

    NOTE: Use 'Closes: #BUGID' for closing a bugreport, 'Thanks: Name -<mailaddress>' for giving credits in your commit message. git-dch will use -this information for generating the changelog using the --meta option later -on.

    - -
  5. Finally push your branch to alioth: -
    -% git push origin username/short-descr-of-new-feature
    -
    -
  6. - -
- -

3.2 Merge branches

- -
    - -
  1. Switch to the branch you want to merge: -
    -% git checkout username/new-feature
    -
    -
  2. - -
  3. Rebase to master: -
    -% git rebase master
    -
    -
  4. - -
  5. Switch to master branch and merge: -
    -% git checkout master
    -% git merge username/new-feature
    -
    -
  6. - -
  7. Push: -
    -% git push
    -
    -
  8. - -
  9. After branch is merged delete branch on server and locally: -
    -% git push origin :username/short-descr-of-new-feature
    -% git branch -d username/short-descr-of-new-feature
    -
    -
  10. - -
- -

3.3 Test specific branch

- -
    - -
  1. Checkout a specific branch iff branch is not already present locally: -
    -% git checkout -b somename/short-descr-of-new-feature origin/somename/short-descr-of-new-feature
    -
    -
  2. - -
  3. Checkout a specific branch iff branch is already present locally: -
    -% git checkout -b somename/short-descr-of-new-feature
    -
    -
  4. - -
  5. Adjust debian/changelog accordingly: -
    -git-dch --debian-branch="$(git branch | awk -F\* '/^* / { print $2}' )" --since=$(dpkg-parsechangelog | awk '/^Version:/ {print $2}') -S --id-length=7 --meta
    -
    -
  6. - -
  7. Build package: -
    -% git-buildpackage --git-debian-branch="$(git branch | awk -F\*\  '/^* / { print $2}' )" -tc
    -
    -
- - - -

4. Contribute

- -

TODO / WIP:

- -
    -
  1. Create patch: -
    -% git format-patch HEAD
    -
    -
- - - -

5 Releasing new version

- -
    - -
  1. Creating changelog: - -
    -% git-dch --debian-branch debian --release --since HASH
    -
    - -or more dynamically: - -
    -% git-dch --meta --release --since v$(dpkg-parsechangelog | awk '/^Version:/ {print $2}') --debian-branch="$(git branch | awk -F\*\  '/^* / { print $2}' )" [--id-length=7] [--full]
    -
    - -
  2. - -
  3. Releasing: -
    -% git commit -a -s -m "Releasing debian version version."
    -
    -
  4. - -
  5. Tagging: -
    -% git tag -s v"version" -m "release version"
    -
    -
  6. - -
  7. Pushing: -
    -% git push
    -% git push --tags
    -
    -
  8. - -
  9. Build in chroot and upload to ftp-master.
  10. - -
  11. Send mail announcing the new initramfs-tools version with subject -"initramfs-tools $VERSION release" to initramfs@vger.kernel.org, -debian-kernel@lists.debian.org + kernel-team@lists.ubuntu.com - including a -shortlog (generated through "git shortlog $TAG..").
  12. - -
- - -
- -

Ressources

- - - - - -
- -

Credits

- -
    -
  • Thanks to Daniel Baumann for his "Maintainer Cheatpage" which inspired this document
  • -
- - -
- -

--- Michael Prokop <mika@debian.org> -

- -
- -
- - - - -- cgit v1.2.3 From a39db63500c4482aad7d2fc17ad83edd3a56bb8f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 16 Jun 2010 17:12:53 +0200 Subject: Add lsinitramfs to initramfs-tools useful script to quickly look into initramfs for debugger or bug reporter, inspired by similar dracut tool. Signed-off-by: maximilian attems --- debian/initramfs-tools.install | 1 + debian/initramfs-tools.manpages | 1 + lsinitramfs | 14 ++++++++++++++ lsinitramfs.8 | 31 +++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100755 lsinitramfs create mode 100644 lsinitramfs.8 (limited to 'debian') diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index ebe6a14..184837f 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -1,3 +1,4 @@ +lsinitramfs usr/bin mkinitramfs usr/sbin mkinitramfs-kpkg usr/sbin init usr/share/initramfs-tools diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages index 0c88045..6d78d4c 100644 --- a/debian/initramfs-tools.manpages +++ b/debian/initramfs-tools.manpages @@ -1,3 +1,4 @@ +lsinitramfs.8 mkinitramfs.8 mkinitramfs-kpkg.8 initramfs.conf.5 diff --git a/lsinitramfs b/lsinitramfs new file mode 100755 index 0000000..aea7747 --- /dev/null +++ b/lsinitramfs @@ -0,0 +1,14 @@ +#!/bin/sh + +usage() +{ + echo "Usage: $(basename $0) " + exit 1 +} + +[ $# -eq 0 ] && usage + +for i in $*; do + echo $i + zcat $i | cpio --extract --verbose --quiet --list +done diff --git a/lsinitramfs.8 b/lsinitramfs.8 new file mode 100644 index 0000000..bb809ae --- /dev/null +++ b/lsinitramfs.8 @@ -0,0 +1,31 @@ +.TH LSINITRAMFS 8 "2010/06/16" "Linux" "lsinitramfs manual" + +.SH NAME +lsinitramfs \- list content of an initramfs image + +.SH SYNOPSIS +.B lsinitramfs +.IR initramfsfile + +.SH DESCRIPTION +The +.B lsinitramfs +lists the content of given initramfs images. It allows to quickly +check the content of this specific initramfs. + +.SH EXAMPLES + +List initramfs of current running kernel: + +.PP +.B lsinitramfs /boot/initrd.img-$(uname -r) + +.SH AUTHOR +The initramfs-tools are written by Maximilian Attems +and numerous others. + +.SH SEE ALSO +.BR +.IR initramfs-tools (8), +.IR mkinitramfs (8), +.IR update-initramfs (8). -- cgit v1.2.3 From cf097346fd4e32a4918ca02c304fe1cf95ec5c23 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 18 Jun 2010 12:37:34 +0200 Subject: Releasing version 0.97. Signed-off-by: Michael Prokop --- debian/changelog | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 901222a..a3e8189 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,68 @@ +initramfs-tools (0.97) unstable; urgency=low + + [ Martin Michlmayr ] + * [e65ee48] Produce an error when root cannot be determined with + MODULES=dep + * [bb66fc2] hook-functions/init/scripts/local: add support for ubifs. + (Closes: #582858) - thanks to Martin Michlmayr + + [ Ferenc Wagner ] + * [1d66ae1] scripts/nfs: cleanup retry logic + + [ Colin Watson ] + * [3054e3e] initramfs-tools: work around 'find -printf %Y' bug + + [ maximilian attems ] + * [a8a5ce4] script: Add update-initramfs.conf to bug report + * [cc6077a] update-initramfs: Fix another unbound variable (Closes: + #583695) + * [b1f74e6] get_fstype: reference blkid in comment - thanks to + Christoph Anton Mitterer + * [eb93a7e] pre_mountroot(): reduce timeout to 30 seconds + * [38563fe] scripts/functions: On panic change to tty1 if chvt around + - thanks to Colin Watson + * [2031379] mkinitramfs: No point in hardcoding busybox path + * [68c87cd] mkinitramfs: check syntax of boot and hook scripts + * [ae02e4b] scripts/functions: beautify a bit reduce_satisfied() + * [22d996c] maintainer doc: use git commands without the dash + * [6147641] nfsmount: more small cleanups + * [e967b03] mkinitramfs, lsinitramfs: Better error message for + non-GNU getopt + * Add lsinitramfs (to list content of an initramfs image) ([a39db63] + [969f8fd] [fafede5] [2f3eb88]) + + [ Michael Prokop ] + * [2a8c990] hook-functions/mkinitramfs/update-initramfs: consequently + output error messages to stderr + * [04b8619] init: display warning message if devtmpfs could not be + mounted. - thanks to Ferenc Wagner + * [60afd2a] code cleanup: drop trailing whitespaces. + * [ab28c77] code cleanup: consequently replace spaces in indentions + with tabs to unify coding stile + * [3a02c6f] code cleanup: consequently use "W:" for warnings. + * [b1fff5e] add bash-completion for update-initramfs (Closes: #537139) + - thanks to Stéphane Jourdois + * [5697c3b] hook-functions: replace awk calls with sed in + dep_add_modules() (Closes: #585991) - thanks to Thorsten Glaser + + * [7afab22] debian/script: append /proc/mdstat (iff present) to + bugreports + * [5b565be] scripts/functions: allow hooks to abort build (Closes: + #396388) + * [528ba78] hook-functions: do not install ubi module by default via + auto_add_modules() + * [ecb8416] lsinitramfs: be more defensive against cmdline options + * [2ff4ba2] scripts/functions: fix usage of test for script execution + * [74f71c9] scripts/functions: fix another sh -n usage and fix typo + * [91f5947] hook-functions: install virtio_pci module if + /sys/bus/virtio is present and using modules=dep (Closes: #585992) - + thanks to Vincent Danjean + * [d25f610] slightly improve manpage lsinitramfs.8 + * Provide maintainer-notes.html, being "Maintainer documentation for + initramfs-tools" ([7fc1ee5] [afafea4] [e506ee7] [d53a839] [6af23c2]) + + -- Michael Prokop Fri, 18 Jun 2010 12:28:04 +0200 + initramfs-tools (0.96.1) unstable; urgency=low * hook-functions: Make sure copy_exec hook function does not -- cgit v1.2.3 From f1360c981fb00126d9a43e2afc6ad5b6639bddd6 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 18 Jun 2010 15:53:51 +0200 Subject: debian/NEWS: drop asterisk chars to make lintian happy Signed-off-by: Michael Prokop --- debian/NEWS | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'debian') diff --git a/debian/NEWS b/debian/NEWS index a2a16af..350189b 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,13 +1,13 @@ initramfs-tools (0.94) unstable; urgency=low - * To improve boot speed and avoid some complications, video drivers are + To improve boot speed and avoid some complications, video drivers are no longer included in the initramfs by default (MODULES=most). -- maximilian attems Mon, 05 Apr 2010 08:10:34 +0200 initramfs-tools (0.76) unstable; urgency=low - * This release features nfs auto detection in the initramfs. + This release features nfs auto detection in the initramfs. The boot paramaters are parsed according to the linux source Documentation/kernel-parameters.txt and more specifically Documentation/nfsroot.txt. @@ -20,7 +20,7 @@ initramfs-tools (0.76) unstable; urgency=low initramfs-tools (0.61) unstable; urgency=low - * This release moves the initramfs-tools confdir from /etc/mkinitramfs to + This release moves the initramfs-tools confdir from /etc/mkinitramfs to /etc/initramfs-tools. Packages are encouraged to ship files as scripts under /usr/share/initramfs-tools. @@ -31,7 +31,7 @@ initramfs-tools (0.61) unstable; urgency=low initramfs-tools (0.10) breezy; urgency=low - * This release includes hardware auto detection in the initramfs. + This release includes hardware auto detection in the initramfs. This means two things in particular that are important: 1) the resulting initramfs will be huge. Like 10 megs huge. -- cgit v1.2.3 From c4a198163ba0db791085205d277545c6949f4830 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 18 Jun 2010 15:54:15 +0200 Subject: install doc-base file for doc-base-registration Fix possible-documentation-but-no-doc-base-registration to make lintian happy. Signed-off-by: Michael Prokop --- debian/initramfs-tools.doc-base | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 debian/initramfs-tools.doc-base (limited to 'debian') diff --git a/debian/initramfs-tools.doc-base b/debian/initramfs-tools.doc-base new file mode 100644 index 0000000..41f2134 --- /dev/null +++ b/debian/initramfs-tools.doc-base @@ -0,0 +1,10 @@ +Document: initramfs-maintainer +Title: Maintainer documentation for initramfs-tools +Author: Michael Prokop +Abstract: This document describes the workflow of + the initramfs-tools maintainers. +Section: Debian + +Format: HTML +Index: /usr/share/doc/initramfs-tools/maintainer-notes.html +Files: /usr/share/doc/initramfs-tools/maintainer-notes.html -- cgit v1.2.3 From f813bd9b1c289a07a23b826d67be87d99fde9465 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 18 Jun 2010 15:56:59 +0200 Subject: add debian/source/format with "3.0 (native)" to make lintian happy Signed-off-by: Michael Prokop --- debian/source/format | 1 + 1 file changed, 1 insertion(+) create mode 100644 debian/source/format (limited to 'debian') diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) -- cgit v1.2.3 From be710159d21269670b74b2dbe13898285c1911e4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 22 Jun 2010 00:07:32 +0200 Subject: reportbug: list the mkinitramfs hook scripts of reporting box It is interesting to see which are installed, may help to pindown some bugs earlier. Signed-off-by: maximilian attems --- debian/script | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian') diff --git a/debian/script b/debian/script index fa706cd..46b6650 100755 --- a/debian/script +++ b/debian/script @@ -57,3 +57,7 @@ if grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ; then ls /sys/block echo fi + +echo "-- mkinitramfs hooks" +ls /usr/share/initramfs-tools/hooks /etc/initramfs-tools/hooks/ +echo -- cgit v1.2.3 From 89a79c1c9f15220a377fd11d49687e17b2958062 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 5 Jul 2010 21:53:52 +0200 Subject: release 0.97.1 urgency high as it fixes initramfs-tools compress handling. Signed-off-by: maximilian attems --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index a3e8189..bccde47 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.97.1) unstable; urgency=high + + * [90d99e4] mkinitramfs: Fix initramfs generation without COMPRESS set. + (Closes: 587608) - thanks Valentin QUEQUET + + -- maximilian attems Mon, 05 Jul 2010 21:50:47 +0200 + initramfs-tools (0.97) unstable; urgency=low [ Martin Michlmayr ] -- cgit v1.2.3 From d78e243c8f73a16a307579c6df7683af6db8227a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 6 Jul 2010 12:59:13 +0200 Subject: release 0.97.2 --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index bccde47..9d667e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +initramfs-tools (0.97.2) unstable; urgency=high + + * [ce732c3] initramfs-tools: output name of script that errexits. + (Closes: 586554) + + -- maximilian attems Tue, 06 Jul 2010 12:58:37 +0200 + initramfs-tools (0.97.1) unstable; urgency=high * [90d99e4] mkinitramfs: Fix initramfs generation without COMPRESS set. -- cgit v1.2.3 From 210c83c797e16623bb727fa47960d514d8e8c510 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 8 Jul 2010 10:56:28 +0200 Subject: control: conform to latest policy without changes Signed-off-by: maximilian attems --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 30d873b..99898ea 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: maximilian attems , Michael Prokop Maintainer: Debian kernel team Build-Depends: debhelper (>= 7.0) -Standards-Version: 3.8.4 +Standards-Version: 3.9.0 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -- cgit v1.2.3 From b343994b0e30594a0340c63249962421735cbcda Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 7 Aug 2010 10:04:53 -0400 Subject: Bump Standards-Version to 3.9.1. --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian') diff --git a/debian/control b/debian/control index 99898ea..a9d16c4 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Uploaders: maximilian attems , Michael Prokop Maintainer: Debian kernel team Build-Depends: debhelper (>= 7.0) -Standards-Version: 3.9.0 +Standards-Version: 3.9.1 Vcs-Browser: http://git.debian.org/?p=kernel/initramfs-tools.git Vcs-Git: git://git.debian.org/git/kernel/initramfs-tools.git -- cgit v1.2.3 From 71de264f4777f16e1329a59df70d59972a88f854 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 7 Aug 2010 10:25:35 -0400 Subject: release 0.98 Signed-off-by: Michael Prokop --- debian/changelog | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 9d667e6..8697676 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,55 @@ +initramfs-tools (0.98) unstable; urgency=low + + [ Michael Prokop ] + * [7faeb32] fix typos in manpage, scripts/functions and + conf/initramfs.conf - thanks lintian + * [f1360c9] debian/NEWS: drop asterisk chars to make lintian happy + * [c4a1981] install doc-base file for doc-base-registration + * [f813bd9] add debian/source/format with "3.0 (native)" to make + lintian happy + * [38ee1a0] maintainer-notes: document "git remote prune origin" - + thanks to maximilian attems + * [2390db8] maintainer-notes: use git config instead of environment + variables - thanks to Gerfried Fuchs + * [c85bb1f] some minor rewording of sentences about development + mailinglists + * [7af6ef4] mkinitramfs: do not execute compress command under quotes + (Closes: #588517) + * [b65a486] update-initramfs: stop buildprocess if any script is + failing + * [e7daaf7] init: provide validate_init() wrapper to support absolute + symlinks. (Closes: #590744) + * [a0c3140] init: provide fastforward path for the common case when + validating init binary. + * [b343994] Bump Standards-Version to 3.9.1. + + [ maximilian attems ] + * [837f261] mkinitramfs: set nounset and errexit + * [be71015] reportbug: list the mkinitramfs hook scripts of reporting + box + * [295bca7] initramfs-tools.8: Enhance documentation of boot option + * [c327689] update-initramfs: run_bootloader() return after zipl and + flash-kernel + * [089a903] mkinitramfs: set COMPRESS=gzip to be more consistent. - + thanks to Colin Watson + * [210c83c] control: conform to latest policy without changes + * [9613412] mkinitramfs: Provide error code of failed mkinitramfs + creation + * [51a8d5f] revert mkinitramfs errexit and nounset + * [6bcb867] Maintainer notes document dev mailinglists + * [7c6221d] maintainer notes: underline that mail to one of the 2 + lists is good + * [762ae2a] update-initramfs: revert nounset (Closes: #588915) + * [a4e1a9e] initramfs-tools: only allow hook scripts to errexit on + mkinitramfs + * [6f0b646] update-initramfs: run_bootloader() invoke Initramfs hooks + + [ Stephen Powell ] + * [09d251a] postinst hook: respect INITRD variable + * [ff6116f] Redirect STDOUT to STDERR for post{inst,rm} hooks + + -- Michael Prokop Sat, 07 Aug 2010 09:41:39 -0400 + initramfs-tools (0.97.2) unstable; urgency=high * [ce732c3] initramfs-tools: output name of script that errexits. -- cgit v1.2.3 From 3d176938d95d6b54a0b44e0aa7fe47eb4c4659b4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 25 Aug 2010 22:14:32 +0200 Subject: Releasing version 0.98.1. Signed-off-by: maximilian attems --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 8697676..0ede144 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.98.1) unstable; urgency=high + + [ Vagrant Cascadian ] + * [85fbb23] configure_networking(): Look for presence of + /tmp/net-*.conf files to not recall ipconfig. (Closes: #584583) + + -- maximilian attems Wed, 25 Aug 2010 22:13:18 +0200 + initramfs-tools (0.98) unstable; urgency=low [ Michael Prokop ] -- cgit v1.2.3 From 3963c563cf1ea4b1126a4c1949181029a0ff2305 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 7 Sep 2010 12:53:14 +0200 Subject: release version 0.98.2 Signed-off-by: maximilian attems --- debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0ede144..dfa3ab4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +initramfs-tools (0.98.2) unstable; urgency=high + + [ Eckhart Wörner ] + * [97f20c5] initramfs-tools: Add hid-cherry and hid-logitech to + initramfs (Closes: #595827) + + -- maximilian attems Tue, 07 Sep 2010 12:54:01 +0200 + initramfs-tools (0.98.1) unstable; urgency=high [ Vagrant Cascadian ] -- cgit v1.2.3