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/control | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 debian/control (limited to 'debian/control') 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. -- 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/control') 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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/control') 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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/control') 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 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/control') 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 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/control') 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/control') 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/control') 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 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/control') 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 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/control') 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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 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/control') 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/control') 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