From 7b658ecddad7e848e6c3c5d347c46d3b11aa1988 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 14 Jul 2006 00:34:42 +0200 Subject: - rename debian/bug to debian/script fix according install target gets the info really added by reportbug --- debian/script | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 debian/script (limited to 'debian/script') diff --git a/debian/script b/debian/script new file mode 100755 index 0000000..b1b477d --- /dev/null +++ b/debian/script @@ -0,0 +1,15 @@ +#!/bin/sh + +exec >&3 + +echo "-- /proc/cmdline" +cat /proc/cmdline +echo + +echo "-- /proc/filesystems" +grep -v nodev /proc/filesystems +echo + +echo "-- lsmod" +lsmod +echo -- cgit v1.2.3 From 8ae9783215c2845b50dfb70b919df0753c2b0dd9 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 1 Sep 2006 16:18:29 +0200 Subject: - fix destination of the mdrun.conf for partial sarge upgrades - checkout if /sbin/lilo is really there - guard more dirs against creation - add /etc/kernel-img.conf to reportbug output --- debian/changelog | 20 ++++++++++++++++++++ debian/script | 6 ++++++ init | 6 +++--- mkinitramfs | 4 ++-- update-initramfs | 3 +++ 5 files changed, 34 insertions(+), 5 deletions(-) (limited to 'debian/script') diff --git a/debian/changelog b/debian/changelog index bc635a3..b46db63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,23 @@ +initramfs-tools (0.78) unstable; urgency=medium + + * update-initramfs: Check in call_lilo() if /sbin/lilo is executable, + when /etc/lilo.conf exists (closes: 384967) - thus urgency medium. + + * init: Guard all dirs against creation. (closes: 385281) + + * debian/scripts: Add /etc/kernel-img.conf section, as update-initramfs + needs to act according to it. + + -- maximilian attems Thu, 31 Aug 2006 14:44:01 +0200 + +initramfs-tools (0.77b) unstable; urgency=high + + * mkinitramfs: Fix destination of mdrun.conf. Thanks for the report to + Scott Glenn . Urgency high as broken in testing + too and needed for partial mdadm upgrades. (closes: 385406) + + -- maximilian attems Thu, 31 Aug 2006 13:20:51 +0200 + initramfs-tools (0.77) unstable; urgency=medium * mkinitramfs, scripts/local-top/mdrun: Use mdrun.conf as config file. diff --git a/debian/script b/debian/script index b1b477d..a8e3dd9 100755 --- a/debian/script +++ b/debian/script @@ -13,3 +13,9 @@ echo echo "-- lsmod" lsmod echo + +if [ -r /etc/kernel-img.conf ]; then + echo "-- kernel-img.conf" + cat /etc/kernel-img.conf + echo +fi diff --git a/init b/init index a83dc39..0c336b3 100755 --- a/init +++ b/init @@ -6,9 +6,9 @@ echo "Loading, please wait..." [ -d /root ] || mkdir --mode=0700 /root [ -e /dev/console ] || mknod /dev/console c 5 1 [ -e /dev/null ] || mknod /dev/null c 1 3 -mkdir /sys -mkdir /proc -mkdir /tmp +[ -d /sys ] || mkdir /sys +[ -d /proc ] || mkdir /proc +[ -d /tmp ] || mkdir /tmp mkdir -p /var/lock mount -t sysfs none /sys mount -t proc none /proc diff --git a/mkinitramfs b/mkinitramfs index d088efa..c36e845 100755 --- a/mkinitramfs +++ b/mkinitramfs @@ -239,7 +239,7 @@ run_scripts "${CONFDIR}"/hooks if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then # use mkinitrd magic for Sarge backwards compat rootraiddev="$(df / | sed -rne 's,^(/dev/[^[:space:]]+).*,\1,p')" - echo "rootraiddev=${rootraiddev}" > /conf/mdrun.conf + echo "rootraiddev=${rootraiddev}" > ${DESTDIR}/conf/mdrun.conf mdadm=$(mdadm --detail "${rootraiddev}") echo "${mdadm}" | awk ' $1 == "Number" && $2 == "Major" { start = 1; next } @@ -248,7 +248,7 @@ if [ -x /sbin/mdadm ] && [ ! -f /usr/share/initramfs-tools/hooks/mdadm ]; then $2 == 0 && $3 == 0 { next } { devices = devices " " $NF } END { print "devices='\''" devices "'\''" }' \ - >> /conf/mdrun.conf + >> ${DESTDIR}/conf/mdrun.conf copy_exec /sbin/mdadm /sbin for x in md linear multipath raid0 raid1 raid456 raid5 raid6 raid10; do manual_add_modules ${x} diff --git a/update-initramfs b/update-initramfs index c1e42ab..5cd1e2e 100755 --- a/update-initramfs +++ b/update-initramfs @@ -85,6 +85,9 @@ generate_initramfs() # lilo call run_lilo() { + if [ ! -x /sbin/lilo ]; then + return 1 + fi lilo -t > /dev/null if [ $? -eq 0 ]; then lilo -- cgit v1.2.3 From 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/script') 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 27d1b93ad381d09b4bcf39b4e1697c06cecf957e Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Sun, 15 Apr 2007 22:58:08 +0200 Subject: Also print settings from initramfs.conf in reportbug script (thanks to Maik Zumstrull for the suggestion) --- debian/script | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'debian/script') diff --git a/debian/script b/debian/script index 7cfac12..f9dfc37 100755 --- a/debian/script +++ b/debian/script @@ -1,6 +1,6 @@ #!/bin/sh -exec >&3 +#exec >&3 echo "-- /proc/cmdline" cat /proc/cmdline @@ -19,3 +19,9 @@ if [ -r /etc/kernel-img.conf ]; then cat /etc/kernel-img.conf echo fi + +if [ -r /etc/initramfs-tools/initramfs.conf ]; then + echo "-- /etc/initramfs-tools/initramfs.conf" + sed 's/#.*$//;/^[[:space:]]*$/d' /etc/initramfs-tools/initramfs.conf + echo +fi -- cgit v1.2.3 From b9e2f8e2aa33dd26914883c6ced457c12c171c1d Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Mon, 16 Apr 2007 02:08:07 +0200 Subject: Remove stray comment --- debian/script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'debian/script') diff --git a/debian/script b/debian/script index f9dfc37..5990db3 100755 --- a/debian/script +++ b/debian/script @@ -1,6 +1,6 @@ #!/bin/sh -#exec >&3 +exec >&3 echo "-- /proc/cmdline" cat /proc/cmdline -- cgit v1.2.3 From 0b7e1a0bf6a45479301c5364c9888a4c6745227d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Aug 2007 01:19:23 +0200 Subject: debian/scripts: Add /etc/crypttab to reportbug script a big share of bugreports concern encrypted usage, that output is useful for /etc/fstab parsing. --- debian/changelog | 3 ++- debian/script | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'debian/script') diff --git a/debian/changelog b/debian/changelog index f0da4a9..e54a808 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,11 +8,12 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low maybe_break(). * hook-functions: dep_add_modules() fix for md, lv, luks root. (closes: #426917, #429237, #426446) + * debian/scripts: Add /etc/crypttab to reportbug script. [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Wed, 08 Aug 2007 00:50:22 +0200 + -- maximilian attems Wed, 08 Aug 2007 01:17:29 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/debian/script b/debian/script index 5990db3..129513b 100755 --- a/debian/script +++ b/debian/script @@ -25,3 +25,9 @@ if [ -r /etc/initramfs-tools/initramfs.conf ]; then sed 's/#.*$//;/^[[:space:]]*$/d' /etc/initramfs-tools/initramfs.conf echo fi + +if [ -r /etc/crypttab ]; then + echo "-- /etc/crypttab" + cat /etc/crypttab + echo +fi -- cgit v1.2.3 From 665af22852513601ad93eb54d97542f7ab255a4c Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 8 Aug 2007 01:24:01 +0200 Subject: debian/script: add list of /sys/block on MODULES=dep a find might be a bit to verbose, so be happy for now with a q&d list. --- debian/changelog | 5 +++-- debian/script | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'debian/script') diff --git a/debian/changelog b/debian/changelog index e54a808..87ffed4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,12 +8,13 @@ initramfs-tools (0.90~beta1) UNRELEASED; urgency=low maybe_break(). * hook-functions: dep_add_modules() fix for md, lv, luks root. (closes: #426917, #429237, #426446) - * debian/scripts: Add /etc/crypttab to reportbug script. + * debian/scripts: Add /etc/crypttab to reportbug script. Add /sys/block + list for MODULES=dep to reportbug script. [ David Härdeman ] * hook-functions: Protect all variable with local, plus coding style fixes. - -- maximilian attems Wed, 08 Aug 2007 01:17:29 +0200 + -- maximilian attems Wed, 08 Aug 2007 01:22:00 +0200 initramfs-tools (0.89) unstable; urgency=low diff --git a/debian/script b/debian/script index 129513b..3aaacd0 100755 --- a/debian/script +++ b/debian/script @@ -31,3 +31,9 @@ if [ -r /etc/crypttab ]; then cat /etc/crypttab echo fi + +if [ grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ]; then + echo "-- /sys/block" + ls /sys/block + echo +fi -- cgit v1.2.3 From c559ab5d603454e9d3281e4e399bf5cc9f0f1ce3 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Fri, 7 Sep 2007 15:11:13 +0200 Subject: debian/script: Fix syntax of MODULES=dep block. thanks madduck for reporting the error: [: 39: -q: unexpected operator --- debian/changelog | 3 ++- debian/script | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'debian/script') diff --git a/debian/changelog b/debian/changelog index f479eb9..78a6922 100644 --- a/debian/changelog +++ b/debian/changelog @@ -16,8 +16,9 @@ initramfs-tools (0.91) UNRELEASED; urgency=low * scripts/{functions,nfs}: Split networking code in separate function. Thanks Vagrant Cascadian for the patch. * update-initramfs: Don't check for ro /boot inside of a chroot. + * debian/script: Fix syntax of MODULES=dep block. - -- maximilian attems Tue, 04 Sep 2007 11:34:15 +0200 + -- maximilian attems Fri, 07 Sep 2007 15:10:11 +0200 initramfs-tools (0.90a) unstable; urgency=high diff --git a/debian/script b/debian/script index 3aaacd0..706a84d 100755 --- a/debian/script +++ b/debian/script @@ -32,7 +32,7 @@ if [ -r /etc/crypttab ]; then echo fi -if [ grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ]; then +if grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ; then echo "-- /sys/block" ls /sys/block echo -- cgit v1.2.3 From 497c367625f218368c577e0aaac79bc97e396a30 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 7 Apr 2010 20:09:20 +0200 Subject: bug script: include sizes of generated initramfs usually gives a good indications when things go wrong. --- debian/script | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian/script') diff --git a/debian/script b/debian/script index 706a84d..daf3924 100755 --- a/debian/script +++ b/debian/script @@ -2,6 +2,9 @@ exec >&3 +echo "-- initramfs sizes" +ls -lh /boot/initrd.img-2.6.* + echo "-- /proc/cmdline" cat /proc/cmdline echo -- cgit v1.2.3 From 845edd0e39a635fdd171140fc35b616840fa34d5 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Thu, 8 Apr 2010 03:07:16 +0200 Subject: debian/script: add generated resume param to bug /etc/initramfs-tools/conf.d/resume is often to be seen. Signed-off-by: maximilian attems --- debian/script | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'debian/script') diff --git a/debian/script b/debian/script index daf3924..43ae7d1 100755 --- a/debian/script +++ b/debian/script @@ -9,6 +9,11 @@ echo "-- /proc/cmdline" cat /proc/cmdline echo +if [ -r /etc/initramfs-tools/conf.d/resume ]; then + echo "-- resume" + cat /etc/initramfs-tools/conf.d/resume +fi + echo "-- /proc/filesystems" grep -v nodev /proc/filesystems echo -- cgit v1.2.3 From a8a5ce4030983af37715f2581099d453473fd0ea Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Sun, 13 Jun 2010 20:43:04 +0200 Subject: script: Add update-initramfs.conf to bug report we see lately unbound variables from there, so it's nice to have it. Signed-off-by: maximilian attems --- debian/script | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian/script') diff --git a/debian/script b/debian/script index 43ae7d1..da030d1 100755 --- a/debian/script +++ b/debian/script @@ -34,6 +34,12 @@ if [ -r /etc/initramfs-tools/initramfs.conf ]; then echo fi +if [ -r /etc/initramfs-tools/update-initramfs.conf ]; then + echo "-- /etc/initramfs-tools/update-initramfs.conf" + sed 's/#.*$//;/^[[:space:]]*$/d' /etc/initramfs-tools/update-initramfs.conf + echo +fi + if [ -r /etc/crypttab ]; then echo "-- /etc/crypttab" cat /etc/crypttab -- cgit v1.2.3 From 7afab22b3d9bbcc5e2843a9fa634a50082e9c6d3 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 15 Jun 2010 18:22:15 +0200 Subject: debian/script: append /proc/mdstat (iff present) to bugreports Signed-off-by: Michael Prokop --- debian/script | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian/script') diff --git a/debian/script b/debian/script index da030d1..fa706cd 100755 --- a/debian/script +++ b/debian/script @@ -46,6 +46,12 @@ if [ -r /etc/crypttab ]; then echo fi +if [ -r /proc/mdstat ]; then + echo "-- /proc/mdstat" + cat /proc/mdstat + echo +fi + if grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ; then echo "-- /sys/block" ls /sys/block -- cgit v1.2.3 From be710159d21269670b74b2dbe13898285c1911e4 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 22 Jun 2010 00:07:32 +0200 Subject: reportbug: list the mkinitramfs hook scripts of reporting box It is interesting to see which are installed, may help to pindown some bugs earlier. Signed-off-by: maximilian attems --- debian/script | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'debian/script') diff --git a/debian/script b/debian/script index fa706cd..46b6650 100755 --- a/debian/script +++ b/debian/script @@ -57,3 +57,7 @@ if grep -q "MODULES=dep" /etc/initramfs-tools/initramfs.conf ; then ls /sys/block echo fi + +echo "-- mkinitramfs hooks" +ls /usr/share/initramfs-tools/hooks /etc/initramfs-tools/hooks/ +echo -- cgit v1.2.3