Compare commits

...

26 Commits
009 ... 010

Author SHA1 Message Date
Harald Hoyer
829c258554 lsinitrd: default to /boot/initramfs-$(uname -r).img 2011-03-31 19:50:31 +02:00
Harald Hoyer
5dcd565dab NEWS: inc version and add NEWS 2011-03-31 18:49:27 +02:00
Harald Hoyer
7838d85351 dracut.spec: drop net-tools requirement 2011-03-31 18:49:02 +02:00
Harald Hoyer
db59288d79 PKGBUILD, debian/*: changed URLs to kernel.org 2011-03-31 18:48:27 +02:00
Harald Hoyer
82794b4b90 dracut.spec: fixed URL 2011-03-31 18:45:49 +02:00
Harald Hoyer
b4fbdbbe1e Makefile: "make dist" now generates .tar.gz 2011-03-31 18:45:01 +02:00
Harald Hoyer
9853774351 base/init: reset PATH after the /run move 2011-03-31 14:10:22 +02:00
Harald Hoyer
79471f365e base/dracut-lib.sh: changed kmgs log levels
New kernel/dmesg understands syslog levels, so we log with "+24" to indicate
that dracut is a daemon (current init).
2011-03-31 13:12:38 +02:00
Harald Hoyer
98b108284c dmsquash-live/dmsquash-live-genrules.sh: fixed udev rule location
Fixed the rule directory to $UDEVRULESD
2011-03-31 08:24:15 +02:00
Harald Hoyer
8ee30d09a4 plymouth: use /run/plymouth/pid instead of /run/initramfs/plymouth 2011-03-30 16:24:57 +02:00
Harald Hoyer
01583ae4ad fips: fixed "boot=<dev>" handling 2011-03-30 14:57:01 +02:00
Harald Hoyer
249f8b5bfc base/init: fixed compat /dev/.initramfs copy 2011-03-30 03:23:37 +02:00
Harald Hoyer
561d7f4d7c doc: s#/init.log#/run/initramfs/init.log#g 2011-03-30 03:22:14 +02:00
Harald Hoyer
4ad453445a base/dracut-lib.sh: relax getargbool value parsing
if a non-boolean value was specified, like "yes" or "no",
getargbool() would error, because we check for "$val -eq 0"
2011-03-30 01:45:17 +02:00
Harald Hoyer
e620bb01da base/init: fix cdrom polling 2011-03-30 00:01:00 +02:00
Harald Hoyer
7931bf0420 plymouth gensplash: check for console_init before calling it
Thanks Jon Ander Hernandez!
2011-03-29 16:38:11 +02:00
Jon Ander Hernandez
c174aea07d Ensure rpc_pipefs is mounted
While on some systems (like Fedora) rpc_pipefs is mounted
automatically when sunrpc module is loaded, on Debian based systems it
needs to be mounted manually.
2011-03-29 16:17:03 +02:00
Harald Hoyer
85323dcbb9 40network/dhcp-root.sh: s#initqueue-finished#initqueue/finished#g 2011-03-29 15:46:53 +02:00
Harald Hoyer
8bc650d9dc dracut: add "/lib/firmware/updates" to default firmware path 2011-03-29 15:32:34 +02:00
Harald Hoyer
ea216a650e dracut: removed extra char in "Including modules done" 2011-03-29 14:45:08 +02:00
Harald Hoyer
a16ebfd56a dracut-functions: bashified ret=ret+$? to ret+=$? 2011-03-29 11:30:27 +02:00
Harald Hoyer
2aad23443e dracut: source reformat with line breaks 2011-03-29 11:27:15 +02:00
Harald Hoyer
8a5354a9a5 dracut: simplify $kernel version argument setting 2011-03-29 11:21:54 +02:00
Amadeusz Żołnowski
dbf381f7fb dracut: don't skip zero-length string outfile argument
When '' was passed as outfile, dracut generated name with following
pattern:

  /boot/initramfs-$kernel

With commit 486a1b9324 dracut skips ''
argument.
2011-03-29 10:52:50 +02:00
Harald Hoyer
1080ce600a Revert "dracut: don't skip zero-length string outfile argument"
This reverts commit 0dd37f13c5.
2011-03-29 10:52:22 +02:00
Harald Hoyer
0dd37f13c5 dracut: don't skip zero-length string outfile argument
When '' was passed as outfile, dracut generated name with following
pattern:

  /boot/initramfs-${kernel}.img

With commit 486a1b9324 dracut skips ''
argument.
2011-03-29 10:25:24 +02:00
19 changed files with 71 additions and 57 deletions

View File

@@ -1,4 +1,4 @@
VERSION=009
VERSION=010
GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8)
prefix ?= /usr
@@ -72,11 +72,14 @@ clean:
archive: dracut-$(VERSION)-$(GITVERSION).tar.bz2
dist: dracut-$(VERSION).tar.bz2
dist: dracut-$(VERSION).tar.gz
dracut-$(VERSION).tar.bz2:
git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ |bzip2 > dracut-$(VERSION).tar.bz2
dracut-$(VERSION).tar.gz:
git archive --format=tar $(VERSION) --prefix=dracut-$(VERSION)/ |gzip > dracut-$(VERSION).tar.gz
dracut-$(VERSION)-$(GITVERSION).tar.bz2:
git archive --format=tar HEAD --prefix=dracut-$(VERSION)-$(GITVERSION)/ |bzip2 > dracut-$(VERSION)-$(GITVERSION).tar.bz2

6
NEWS
View File

@@ -1,3 +1,9 @@
dracut-010
==========
- lots of bugfixes
- plymouth: use /run/plymouth/pid instead of /run/initramfs/plymouth
- add "/lib/firmware/updates" to default firmware path
dracut-009
==========
- dracut generator

View File

@@ -3,7 +3,7 @@ pkgver=$(date +%s)
pkgrel=$(git log --pretty=format:%h |head -n 1)
pkgdesc="Initramfs generation utility"
arch=('i686' 'x86_64')
url="http://sourceforge.net/apps/trac/dracut/"
url="https://dracut.wiki.kernel.org/"
license=('GPL')
conflicts=('dracut' 'mkinitcpio')
provides=('dracut=9999' 'mkinitcpio=9999')
@@ -18,4 +18,4 @@ build() {
cd ..
make sysconfdir=/etc || return 1
make DESTDIR="${pkgdir}" sysconfdir=/etc install || return 1
}
}

4
debian/control vendored
View File

@@ -4,8 +4,8 @@ Priority: optional
Maintainer: Philippe Seewer <philippe.seewer@bfh.ch>
Build-Depends: debhelper (>= 5.0), cdbs
Standards-Version: 3.8.4
Vcs-Browser: http://dracut.git.sourceforge.net/git/gitweb-index.cgi
Vcs-Git: git://dracut.git.sourceforge.net/gitroot/dracut/dracut
Vcs-Browser: http://git.kernel.org/?p=boot/dracut/dracut.git
Vcs-Git: git://git.kernel.org/pub/scm/boot/dracut/dracut.git
Package: dracut
Architecture: all

2
debian/copyright vendored
View File

@@ -3,7 +3,7 @@ Fri Nov 20 15:45:00 +0100
Sources can be downloaded from:
https://sourceforge.net/projects/dracut/
http://www.kernel.org/pub/linux/utils/boot/dracut/
Upstream Maintainer:
Harald Hoyer <harald@redhat.com>

15
dracut
View File

@@ -187,7 +187,6 @@ push_arg() {
fi
}
kernel="unset"
verbosity_mod_l=0
while (($# > 0)); do
@@ -223,7 +222,9 @@ while (($# > 0)); do
-H|--hostonly) hostonly_l="yes" ;;
--fstab) use_fstab_l="yes" ;;
-h|--help) usage; exit 1 ;;
-i|--include) push include_src "$2"; push include_target "$3"; shift 2;;
-i|--include) push include_src "$2"
push include_target "$3"
shift 2;;
--bzip2) compress_l="bzip2";;
--lzma) compress_l="lzma";;
--xz) compress_l="xz";;
@@ -237,9 +238,9 @@ while (($# > 0)); do
;;
-*) printf "\nUnknown option: %s\n\n" "$1" >&2; usage; exit 1;;
*)
if ! [[ $outfile ]]; then
if ! [[ ${outfile+x} ]]; then
outfile=$1
elif [[ $kernel = "unset" ]]; then
elif ! [[ ${kernel+x} ]]; then
kernel=$1
else
usage; exit 1;
@@ -248,7 +249,7 @@ while (($# > 0)); do
esac
shift
done
if ! [[ $kernel ]] || [[ $kernel = "unset" ]]; then
if ! [[ $kernel ]]; then
kernel=$(uname -r)
fi
[[ $outfile ]] || outfile="/boot/initramfs-$kernel.img"
@@ -349,7 +350,7 @@ stdloglvl=$((stdloglvl + verbosity_mod_l))
[[ $mdadmconf_l ]] && mdadmconf=$mdadmconf_l
[[ $lvmconf_l ]] && lvmconf=$lvmconf_l
[[ $dracutbasedir ]] || dracutbasedir=/usr/share/dracut
[[ $fw_dir ]] || fw_dir=/lib/firmware
[[ $fw_dir ]] || fw_dir="/lib/firmware/updates /lib/firmware"
[[ $do_strip ]] || do_strip=no
[[ $compress_l ]] && compress=$compress_l
[[ $show_modules_l ]] && show_modules=$show_modules_l
@@ -492,7 +493,7 @@ for moddir in "$dracutbasedir/modules.d"/[0-9][0-9]*; do
fi
done
unset moddir
dinfo "*** Including modules' done ***"
dinfo "*** Including modules done ***"
## final stuff that has to happen

View File

@@ -787,7 +787,7 @@ instmods() {
# it may require
for_each_kmod_dep install_kmod_with_fw $mod \
--set-version $kernel ${moddirname}
ret=$((ret+$?))
((ret+=$?))
;;
esac
shift

View File

@@ -134,7 +134,7 @@ This parameter can be specified multiple times.</para>
<envar>rd.debug</envar>
</term>
<listitem>
<para>set -x for the dracut shell and logs to dmesg, console and <filename>/init.log</filename></para>
<para>set -x for the dracut shell and logs to dmesg, console and <filename>/run/initramfs/init.log</filename></para>
</listitem>
</varlistentry>
<varlistentry>

View File

@@ -14,7 +14,7 @@
%endif
Name: dracut
Version: 009
Version: 010
%define release_prefix 0%{?rdist}
Release: %{release_prefix}
@@ -26,10 +26,11 @@ Group: System Environment/Base
Group: System/Base
%endif
License: GPLv2+
URL: http://apps.sourceforge.net/trac/dracut/wiki
URL: https://dracut.wiki.kernel.org/
# Source can be generated by
# http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut/dracut;a=snapshot;h=%{?dashgittag};sf=tgz
Source0: dracut-%{version}%{?dashgittag}.tar.bz2
# http://git.kernel.org/?p=boot/dracut/dracut.git;a=snapshot;h=%{?dashgittag};sf=tgz
Source0: http://www.kernel.org/pub/linux/utils/boot/dracut/dracut-%{version}%{?dashgittag}.tar.bz2
BuildArch: noarch
%if 0%{?fedora}
@@ -105,7 +106,7 @@ Requires: rpcbind
%if %{with_nbd}
Requires: nbd
%endif
Requires: net-tools iproute
Requires: iproute
Requires: bridge-utils
%if 0%{?fedora}

View File

@@ -307,7 +307,7 @@ rd.live.overlay/
<listitem>
<para>With dracut &gt;= 002-11, you can inspect the rd.debug output with:
</para>
<screen># less /init.log
<screen># less /run/initramfs/init.log
# dmesg | less</screen>
</listitem>
</orderedlist>

View File

@@ -19,11 +19,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
[[ $# -eq 1 || $# -eq 2 ]] || { echo "Usage: $(basename $0) <initramfs file> [<filename>]" ; exit 1 ; }
[[ -f $1 ]] || { echo "$1 does not exist" ; exit 1 ; }
[[ $# -le 2 ]] || { echo "Usage: $(basename $0) [<initramfs file> [<filename>]]" ; exit 1 ; }
image="${1:-/boot/initramfs-$(uname -r).img}"
[[ -f "$image" ]] || { echo "$image does not exist" ; exit 1 ; }
CAT=zcat
FILE_T=$(file $1)
FILE_T=$(file "$image")
if [[ "$FILE_T" =~ ": gzip compressed data" ]]; then
CAT=zcat
@@ -34,13 +35,13 @@ elif [[ "$FILE_T" =~ ": data" ]]; then
fi
if [[ $# -eq 2 ]]; then
$CAT $1 | cpio --extract --verbose --quiet --to-stdout ${2#/} 2>/dev/null
$CAT $image | cpio --extract --verbose --quiet --to-stdout ${2#/} 2>/dev/null
exit $?
fi
echo "$1:"
echo "$image:"
echo "========================================================================"
$CAT $1 | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null
$CAT "$image" | cpio --extract --verbose --quiet --to-stdout 'lib/dracut/dracut-*' 2>/dev/null
echo "========================================================================"
$CAT $1 | cpio --extract --verbose --quiet --list
$CAT "$image" | cpio --extract --verbose --quiet --list
echo "========================================================================"

View File

@@ -4,20 +4,18 @@
do_fips()
{
FIPSMODULES=$(cat /etc/fipsmodules)
BOOT=$(getarg boot=)
boot=$(getarg boot=)
KERNEL=$(uname -r)
case "$boot" in
block:LABEL=*|LABEL=*)
boot="${boot#block:}"
LABEL=*)
boot="$(echo $boot | sed 's,/,\\x2f,g')"
boot="/dev/disk/by-label/${boot#LABEL=}"
bootok=1 ;;
block:UUID=*|UUID=*)
boot="${boot#block:}"
boot="/dev/disk/by-uuid/${root#UUID=}"
bootok=1 ;;
;;
UUID=*)
boot="/dev/disk/by-uuid/${boot#UUID=}"
;;
/dev/*)
bootok=1 ;;
;;
*)
die "You have to specify boot=<boot device> as a boot option for fips=1" ;;
esac

View File

@@ -21,5 +21,5 @@ if [ "$root" = "dhcp" ] || [ "$root" = "dhcp6" ] || [ "$netroot" = "dhcp" ] ; th
# Shut up init error check
[ -z "$root" ] && root="dhcp"
echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > $hookdir/initqueue-finished/dhcp.sh
echo '[ -d $NEWROOT/proc -o -e /dev/root ]' > $hookdir/initqueue/finished/dhcp.sh
fi

View File

@@ -9,7 +9,7 @@ if getargbool 1 rd.splash -n rd_NO_SPLASH; then
info "Starting Gentoo Splash"
/lib/udev/console_init tty0
[ -x /lib/udev/console_init ] && /lib/udev/console_init tty0
CDROOT=0
. /lib/gensplash-lib.sh
splash init

View File

@@ -17,8 +17,8 @@ if getargbool 1 rd.plymouth -n rd_NO_PLYMOUTH; then
[ -e /dev/fb ] || ln -s fb0 /dev/fb
info "Starting plymouth daemon"
[ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session
>/run/initramfs/plymouth
/lib/udev/console_init tty0
mkdir -m 0755 -p /run/plymouth
[ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session --pid-file /run/plymouth/pid
[ -x /lib/udev/console_init ] && /lib/udev/console_init tty0
/bin/plymouth --show-splash 2>&1 | vinfo
fi

View File

@@ -8,7 +8,7 @@ case "$root" in
${root#live:/dev/}
printf 'SYMLINK=="%s", SYMLINK+="live"\n' \
${root#live:/dev/}
} >> /dev/.udev/rules.d/99-live-mount.rules
} >> $UDEVRULESD/99-live-mount.rules
{
printf 'KERNEL=="%s", RUN+="/sbin/initqueue --settled --onetime --unique /sbin/dmsquash-live-root $env{DEVNAME}"\n' \
${root#live:/dev/}

View File

@@ -90,6 +90,9 @@ options=${options:+$options,}$nfsrw
[ -x /sbin/rpcbind ] && [ -z "$(pidof rpcbind)" ] && rpcbind
if [ "$nfs" = "nfs4" ]; then
[ ! -d /var/lib/nfs/rpc_pipefs/nfs ] && \
mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs
# Start rpc.statd as mount won't let us use locks on a NFSv4
# filesystem without talking to it. NFSv4 does locks internally,
# rpc.lockd isn't needed

View File

@@ -98,7 +98,7 @@ getargbool() {
_b=$(getarg "$@")
[ $? -ne 0 -a -z "$_b" ] && _b=$_default
if [ -n "$_b" ]; then
[ $_b -eq 0 ] && return 1
[ $_b = "0" ] && return 1
[ $_b = "no" ] && return 1
fi
return 0
@@ -236,8 +236,8 @@ source_conf() {
die() {
{
echo "<1>dracut: FATAL: $@";
echo "<1>dracut: Refusing to continue";
echo "<24>dracut: FATAL: $@";
echo "<24>dracut: Refusing to continue";
} > /dev/kmsg
{
@@ -260,14 +260,14 @@ check_quiet() {
warn() {
check_quiet
echo "<4>dracut Warning: $@" > /dev/kmsg
echo "<28>dracut Warning: $@" > /dev/kmsg
[ "$DRACUT_QUIET" != "yes" ] && \
echo "dracut Warning: $@" >&2
}
info() {
check_quiet
echo "<6>dracut: $@" > /dev/kmsg
echo "<30>dracut: $@" > /dev/kmsg
[ "$DRACUT_QUIET" != "yes" ] && \
echo "dracut: $@"
}

View File

@@ -234,7 +234,7 @@ while :; do
strstr "$(udevadm info --query=env --path=${cdrom##/sys})" \
ID_CDROM_MEDIA && continue
if [ -e "$cdrom"/events_poll_msecs -a -n -e "/tmp/.poll_${cdrom##*/}" ]; then
if [ -e "$cdrom"/events_poll_msecs -a ! -e "/tmp/.poll_${cdrom##*/}" ]; then
msecs=$(while read a; do echo $a;done < "$cdrom"/events_poll_msecs)
if [ "$msecs" = "-1" ]; then
echo 250 > "$cdrom"/events_poll_msecs
@@ -373,21 +373,22 @@ info "Switching root"
wait_for_loginit
export PATH="$OLD_PATH"
if [ -d "$NEWROOT"/run ]; then
mount --move /run "$NEWROOT"/run
else
if [ -e /run/initramfs ]; then
mkdir -m 0755 /dev/.initramfs
cp -axr /run/initramfs/* /dev/.initramfs >/dev/null 2>&1
fi
if [ -e /run/mdadm ]; then
mkdir -m 0755 /dev/.mdadm
cp -axr /run/mdadm/* /dev/.mdadm >/dev/null 2>&1
cp -axr /run/initramfs /dev/.initramfs >/dev/null 2>&1
if [ -e /run/initramfs/live ]; then
mkdir -m 0755 /dev/.initramfs/live
mount --move /run/initramfs/live /dev/.initramfs/live
fi
fi
umount -l /run
fi
export PATH="$OLD_PATH"
if [ -f /etc/capsdrop ]; then
. /etc/capsdrop
info "Calling $INIT with capabilities $CAPS_INIT_DROP dropped."