Compare commits

..

21 Commits
0.8 ... 0.9

Author SHA1 Message Date
Harald Hoyer
5d12f1a485 version 0.9 2009-08-14 17:59:43 +02:00
Harald Hoyer
7addf9d430 rpmversion: dash does not want as I do 2009-08-14 17:47:07 +02:00
Harald Hoyer
6d0480426d rpmversion: fixed rpm query 2009-08-14 17:37:00 +02:00
Harald Hoyer
5a8b143888 TEST-10-RAID: new mdadm is picky about partitions 2009-08-14 17:27:50 +02:00
Michael Ploujnikov
5bf0b329c9 update the rdbreak breakpoint list 2009-08-14 17:27:50 +02:00
Harald Hoyer
51123629d7 dracut.spec: add more plymouth themes 2009-08-14 17:27:50 +02:00
Harald Hoyer
0ad78ae8e7 dracut.spec: requieres dash
how could we forget to add that?? :-)
2009-08-14 17:27:50 +02:00
Harald Hoyer
1c6e9e5c0a new module 10rpmversion
outputs rpm version of dracut
2009-08-14 17:27:50 +02:00
Harald Hoyer
0b610a002c removed 90dmsetup 2009-08-14 17:27:49 +02:00
Harald Hoyer
0f1361ee1c udev-rules: hardcode helper binaries 2009-08-14 17:27:49 +02:00
Harald Hoyer
b806825d2a nfs: only install libnfsidmap_nsswitch.so of all libnfsidmap_*.so 2009-08-14 17:27:49 +02:00
Harald Hoyer
f905c1d7d6 dmsquash-live: install the "real" eject
eject might be a symlink to consolehelper
2009-08-14 17:27:49 +02:00
Harald Hoyer
926b2c3337 dracut: set ownership to root.root for all files 2009-08-14 17:27:49 +02:00
Harald Hoyer
fc900b8be4 dracut-gencmdline: fix LUKS_UUID and MD_UUID output 2009-08-14 16:21:03 +02:00
Harald Hoyer
88838bf238 network: exclude kernel modules, which need iw_handler_get_spy 2009-08-14 16:21:03 +02:00
Harald Hoyer
ed2de829e1 cryptroot-ask.sh: fix rd_LUKS_UUID handling 2009-08-14 16:21:03 +02:00
Harald Hoyer
ff34c9dcd4 10redhat-i18n: remove unnecessary files 2009-08-14 16:21:03 +02:00
Harald Hoyer
3d4641fd98 add rdinfo command line parameter
print informational output though "quiet" is set
2009-08-14 16:21:03 +02:00
Harald Hoyer
860ace56f8 inst_simple(): add -p flag to cp 2009-08-13 14:22:54 +02:00
Harald Hoyer
ed6220fd25 plymouth: make the daemon attach to the session/terminal
https://bugzilla.redhat.com/show_bug.cgi?id=516104

it can be so simple :-)
2009-08-07 12:08:31 +02:00
Harald Hoyer
be9ca6c8a8 dracut.spec: require versioned util-linux-ng instead of switch_root 2009-08-07 12:08:04 +02:00
23 changed files with 91 additions and 35 deletions

View File

@@ -1,4 +1,4 @@
VERSION=0.8
VERSION=0.9
GITVERSION=$(shell [ -d .git ] && git rev-list --abbrev-commit -n 1 HEAD |cut -b 1-8)
prefix = /usr

10
NEWS
View File

@@ -1,3 +1,13 @@
dracut-0.9
==========
- let plymouth attach to the terminal (nice text output now)
- new kernel command line parameter "rdinfo" show dracut output, even when
"quiet" is specified
- rd_LUKS_UUID is now handled correctly
- dracut-gencmdline: rd_LUKS_UUID and rd_MD_UUID is now correctly generated
- now generates initrd-generic with around 15MB
- smaller bugfixes
dracut-0.8
==========
- iSCSI with username and password

2
dracut
View File

@@ -238,7 +238,7 @@ if [ "$do_strip" = "yes" ] ; then
done
fi
( cd "$initdir"; find . |cpio -H newc -o |gzip -9 > "$outfile"; )
( cd "$initdir"; find . |cpio -R 0:0 -H newc -o |gzip -9 > "$outfile"; )
[[ "$beverbose" = "yes" ]] && ls -lh "$outfile"

View File

@@ -59,7 +59,7 @@ inst_simple() {
[[ -f $target ]] && return 0
mkdir -p "${target%/*}"
dinfo "Installing $src"
cp -fL "$src" "$target"
cp -pfL "$src" "$target"
}
# Same as above, but specialzed to handle dynamic libraries.

View File

@@ -643,6 +643,7 @@ emitcrypto()
if [ -z "$luksuuid" ]; then
luksuuid="$2"
fi
luksuuid=${luksuuid##UUID=}
echo -n "rd_LUKS_UUID=$luksuuid "
}
@@ -652,7 +653,9 @@ done
if [ -n "$raiddevices" ]; then
for dev in $raiddevices; do
echo -n "rd_MD_UUID=${dev} "
uid=$(udevadm info --query=all --name=/dev/${dev}|grep MD_UUID)
uid=$(IFS="=";set $uid;echo $2)
echo -n "rd_MD_UUID=$uid "
done
fi

View File

@@ -249,6 +249,9 @@ do not load kernel module <drivername>
.SH Debug
.TP
.B rdinfo
print informational output though "quiet" is set
.TP
.B rdshell
allow dropping to a shell, if root mounting fails
.TP
@@ -258,7 +261,7 @@ set -x for the dracut shell
.B rdbreak
drop to a shell at the end
.TP
.B rdbreak={pre-udev|pre-mount|mount|pre-pivot|commandline|initqueue}
.B rdbreak={cmdline|pre-udev|pre-trigger|initqueue|pre-mount|mount|pre-pivot}
drop to a shell on defined breakpoint
.TP
.B rdudevinfo

View File

@@ -12,7 +12,7 @@
%endif
Name: dracut
Version: 0.8
Version: 0.9
Release: 1%{?rdist}
Summary: Initramfs generator using udev
Group: System Environment/Base
@@ -32,6 +32,7 @@ Requires: which
Requires: mktemp >= 1.5-5
Requires: mount
Requires: bash
Requires: dash
Requires: /bin/sh
Requires: fileutils, gzip, tar
Requires: lvm2 >= 2.02.33-9, dhclient
@@ -48,7 +49,7 @@ Requires: kbd
%endif
%if ! 0%{?with_switch_root}
Requires: /sbin/switch_root
Requires: util-linux-ng >= 2.16
BuildArch: noarch
%endif
@@ -63,6 +64,7 @@ Requires: iscsi-initiator-utils
Requires: nbd
Requires: net-tools iproute
Requires: plymouth-system-theme plymouth-theme-charge plymouth-theme-solar
Requires: plymouth-theme-fade-in plymouth-theme-spinfinity
%description generic
This package requires everything which is needed to build a generic
@@ -143,6 +145,10 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/lib/dracut/overlay
%changelog
* Fri Aug 14 2009 Harald Hoyer <harald@redhat.com> 0.9-1
- version 0.9
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS
* Thu Aug 06 2009 Harald Hoyer <harald@redhat.com> 0.8-1
- version 0.8
- see http://dracut.git.sourceforge.net/git/gitweb.cgi?p=dracut;a=blob_plain;f=NEWS

View File

@@ -76,10 +76,13 @@ else
for i in $(find /lib/kbd -type f -print); do
dracut_install $i
done
# remove unnecessary files
rm -f "$initdir/lib/kbd/consoletrans/utflist" 2>/dev/null
find "$initdir/lib/kbd/" -name README\* -exec rm -f '{}' \;
dracut_install gzip bzip2
fi
dracut_install /lib/udev/console_*
dracut_install /lib/udev/console_init
dracut_install setfont loadkeys
inst_rules 10-console.rules
inst_hook cmdline 20 "$moddir/parse-i18n.sh"

3
modules.d/10rpmversion/check Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
[ -f /etc/redhat-release ]

8
modules.d/10rpmversion/install Executable file
View File

@@ -0,0 +1,8 @@
dracut_rpm_version=$(rpm -qf --qf '%{name}-%{version}-%{release}' $(which $0))
if [ $? -eq 0 ]; then
echo $dracut_rpm_version > $initdir/$dracut_rpm_version
fi
inst_hook cmdline 01 "$moddir/version.sh"

View File

@@ -0,0 +1,6 @@
for i in dracut-*; do
if [ -f $i ]; then
vinfo < $i
fi
done
unset i

View File

@@ -1,7 +1,8 @@
#!/bin/bash
# Include wired net drivers, excluding wireless
for modname in $(find "$srcmods/kernel/drivers" -name '*.ko'); do
if nm -uPA $modname | egrep -q 'eth_type_trans|register_virtio_device'; then
if nm -uPA $modname | egrep -q 'eth_type_trans|register_virtio_device' \
&& ! nm -uPA $modname | egrep -q 'iw_handler_get_spy'; then
if echo "$modname" | egrep -q '/wireless/|/isdn/|/uwb/'; then
continue
else

View File

@@ -15,8 +15,9 @@ ask=1
if [ -n "$LUKS" ]; then
ask=0
luuid=${2##luks-}
for luks in $LUKS; do
if [ "${2##$luks}" != "$2" ]; then
if [ "${luuid##$luks}" != "$2" ]; then
ask=1
fi
done

View File

@@ -13,6 +13,6 @@ udevadm settle --timeout=30 2>&1 | vinfo
[ -c /dev/hvc0 ] || mknod /dev/hvc0 c 229 0
info "Starting plymouth daemon"
[ -x /bin/plymouthd ] && /bin/plymouthd
[ -x /bin/plymouthd ] && /bin/plymouthd --attach-to-session
/bin/plymouth --show-splash 2>&1 | vinfo

View File

@@ -15,8 +15,9 @@ ask=1
if [ -n "$LUKS" ]; then
ask=0
luuid=${2##luks-}
for luks in $LUKS; do
if [ "${2##$luks}" != "$2" ]; then
if [ "${luuid##$luks}" != "$2" ]; then
ask=1
fi
done
@@ -33,4 +34,4 @@ fi
# mark device as asked
>> /tmp/cryptroot-asked-$2
exit 0
exit 0

View File

@@ -1,5 +0,0 @@
#!/bin/sh
[ -x /lib/udev/devkit-disks-dm-export ] || exit 1
exit 0

View File

@@ -1,8 +0,0 @@
#!/bin/bash
# FIXME: would be nice if we didn't have to know which rules to grab....
# ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
# of the rules we want so that we just copy those in would be best
dracut_install /lib/udev/devkit-disks-dm-export /lib/udev/devkit-disks-part-id
inst_rules 95-devkit-disks.rules

View File

@@ -3,7 +3,14 @@ inst dmsetup
inst blkid
inst dd
inst losetup
inst eject
# eject might be a symlink to consolehelper
if [ -L /usr/bin/eject ]; then
dracut_install /usr/sbin/eject
else
inst eject
fi
inst blockdev
which checkisomd5 >/dev/null 2>&1 && inst checkisomd5
inst_hook cmdline 30 "$moddir/parse-dmsquash-live.sh"

View File

@@ -13,7 +13,8 @@ else
LIBDIR="/lib"
fi
dracut_install $(ls {/usr,}$LIBDIR/libnfsidmap*.so* 2>/dev/null )
dracut_install $(ls {/usr,}$LIBDIR/libnfsidmap_nsswitch.so* 2>/dev/null )
#dracut_install $(ls {/usr,}$LIBDIR/libnfsidmap*.so* 2>/dev/null )
nsslibs=$(for j in $(for i in \
$(egrep -v '^#.*' /etc/nsswitch.conf|cut -f2 -d :\

View File

@@ -2,7 +2,7 @@
# FIXME: would be nice if we didn't have to know which rules to grab....
# ultimately, /lib/initramfs/rules.d or somesuch which includes links/copies
# of the rules we want so that we just copy those in would be best
dracut_install udevd udevadm /lib*/udev/*_id /etc/udev/udev.conf /etc/group
dracut_install udevd udevadm /etc/udev/udev.conf /etc/group
dracut_install basename
inst_rules 50-udev-default.rules 60-persistent-storage.rules \
61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules
@@ -21,6 +21,21 @@ if [ ! -x /lib/udev/vol_id ]; then
dracut_install blkid
fi
for i in \
ata_id \
cdrom_id \
create_floppy_devices \
edd_id \
firmware.sh \
fw_unit_symlinks.sh \
hid2hci \
path_id \
scsi_id \
usb_id \
; do
[ -x /lib/udev/$i ] && dracut_install /lib/udev/$i
done
if ldd $(find_binary udevd) |grep -q /lib64/libc; then
dracut_install /lib64/libnss_files*

View File

@@ -65,6 +65,7 @@ info() {
if [ -z "$DRACUT_QUIET" ]; then
DRACUT_QUIET="no"
getarg quiet && DRACUT_QUIET="yes"
getarg rdinfo && DRACUT_QUIET="no"
fi
echo "<6>dracut: $@" > /dev/kmsg
[ "$DRACUT_QUIET" != "yes" ] && \

View File

@@ -5,11 +5,11 @@ for x in 64-lvm.rules 70-mdadm.rules 99-mount-rules; do
done
udevadm control --reload-rules
# save a partition at the beginning for future flagging purposes
sfdisk -C 640 -H 2 -S 32 -L /dev/sda <<EOF
,1
,213
,213
,213
sfdisk -C 1280 -H 2 -S 32 -L /dev/sda <<EOF
,16
,400
,400
,400
EOF
mdadm --create /dev/md0 --run --auto=yes --level=5 --raid-devices=3 /dev/sda2 /dev/sda3 /dev/sda4
# wait for the array to finish initailizing, otherwise this sometimes fails

View File

@@ -16,7 +16,7 @@ test_run() {
test_setup() {
# Create the blank file to use as a root filesystem
dd if=/dev/zero of=root.ext2 bs=1M count=20
dd if=/dev/zero of=root.ext2 bs=1M count=40
kernel=$KVERSION
# Create what will eventually be our root filesystem onto an overlay