dracut/use_initrd_insteadof_initramfs.patch

172 lines
6.2 KiB
Diff

diff -urB dracut-024/dracut.8.asc new/dracut.8.asc
--- dracut-024/dracut.8.asc 2012-10-16 16:31:06.000000000 +0200
+++ new/dracut.8.asc 2012-11-02 14:34:30.037441264 +0100
@@ -18,7 +18,7 @@
Create an initramfs <image> for the kernel with the version <kernel version>.
If <kernel version> is omitted, then the version of the actual running
kernel is used. If <image> is omitted or empty, then the default location
-/boot/initramfs-<kernel version>.img is used.
+/boot/initrd-<kernel version> is used.
dracut creates an initial image used by the kernel for preloading the block
device modules (such as IDE, SCSI or RAID) which are needed to access the root
@@ -40,7 +40,7 @@
This will generate a general purpose initramfs image, with all possible
functionality resulting of the combination of the installed dracut modules and
-system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
+system tools. The image is /boot/initrd-_++<kernel version>++_ and
contains the kernel modules of the currently active kernel with version
_++<kernel version>++_.
diff -urB dracut-024/dracut.asc new/dracut.asc
--- dracut-024/dracut.asc 2012-10-16 16:31:06.000000000 +0200
+++ new/dracut.asc 2012-11-02 14:35:49.947445131 +0100
@@ -130,7 +130,7 @@
This will generate a general purpose initramfs image, with all possible
functionality resulting of the combination of the installed dracut modules and
-system tools. The image is /boot/initramfs-_++<kernel version>++_.img and
+system tools. The image is /boot/initrd-_++<kernel version>++_ and
contains the kernel modules of the currently active kernel with version
_++<kernel version>++_.
@@ -170,12 +170,12 @@
=== Inspecting the Contents
To see the contents of the image created by dracut, you can use the lsinitrd tool.
----
-# lsinitrd /boot/initramfs-$(uname -r).img | less
+# lsinitrd /boot/initrd-$(uname -r) | less
----
To display the contents of a file in the initramfs also use the lsinitrd tool:
----
-# lsinitrd /boot/initramfs-$(uname -r).img /etc/ld.so.conf
+# lsinitrd /boot/initrd-$(uname -r) /etc/ld.so.conf
include ld.so.conf.d/*.conf
----
@@ -186,7 +186,7 @@
You can also add dracut modules on the command line
by using the -a or --add option:
----
-# dracut --add bootchart initramfs-bootchart.img
+# dracut --add bootchart initrd-bootchart
----
To see a list of available dracut modules, use the --list-modules option:
@@ -215,7 +215,7 @@
on the command line or the drivers vaiable in the _/etc/dracut.conf_
or _/etc/dracut.conf.d/myconf.conf_ configuration file (see <<dracutconf5>>):
----
-# dracut --add-drivers mymod initramfs-with-mymod.img
+# dracut --add-drivers mymod initrd-with-mymod
----
== Boot parameters
@@ -328,7 +328,7 @@
The --include option let you specify a source path and a target path. For example
----
-# dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initramfs-cmdline-pre.img
+# dracut --include cmdline-preset /etc/cmdline.d/mycmdline.conf initrd-cmdline-pre.img
----
will create an initramfs image, where the file cmdline-preset will be copied
inside the initramfs to _/etc/cmdline.d/mycmdline.conf_. --include can only be specified once.
@@ -350,7 +350,7 @@
└── conf.d
└── testvar.conf
-# dracut --include rd.live.overlay / initramfs-rd.live.overlay.img
+# dracut --include rd.live.overlay / initrd-rd.live.overlay.img
----
This will put the contents of the rd.live.overlay directory into the root of the
@@ -362,7 +362,7 @@
----
-# dracut --install 'strace fsck.ext3 ssh' initramfs-dbg.img
+# dracut --install 'strace fsck.ext3 ssh' initrd-dbg
----
This will create an initramfs with the strace, fsck.ext3 and ssh executables,
@@ -414,7 +414,7 @@
----
-# dracut -m "nfs network base" initramfs-nfs-only.img
+# dracut -m "nfs network base" initrd-nfs-only
----
Then you would boot from this image with your target machine and reduce the size
@@ -422,7 +422,7 @@
----
-# dracut -m "nfs network base" --host-only initramfs-nfs-host-only.img
+# dracut -m "nfs network base" --host-only initrd-nfs-host-only
----
This will reduce the size of the initramfs image significantly.
diff -urB dracut-024/dracut-initramfs-restore.sh new/dracut-initramfs-restore.sh
--- dracut-024/dracut-initramfs-restore.sh 2012-10-16 16:31:06.000000000 +0200
+++ new/dracut-initramfs-restore.sh 2012-11-02 14:34:30.036441264 +0100
@@ -4,7 +4,7 @@
set -e
cd /run/initramfs
-IMG="/boot/initramfs-$(uname -r).img"
+IMG="/boot/initrd-$(uname -r)"
[ -f .need_shutdown -a -f "$IMG" ] || exit 1
if zcat "$IMG" | cpio -id >/dev/null 2>&1; then
rm .need_shutdown
diff -urB dracut-024/dracut.sh new/dracut.sh
--- dracut-024/dracut.sh 2012-10-16 16:31:06.000000000 +0200
+++ new/dracut.sh 2012-11-02 14:34:30.038441264 +0100
@@ -417,7 +417,7 @@
fi
if ! [[ $outfile ]]; then
- outfile="/boot/initramfs-$kernel.img"
+ outfile="/boot/initrd-$kernel"
fi
for i in /usr/sbin /sbin /usr/bin /bin; do
diff -urB dracut-024/lsinitrd.1.asc new/lsinitrd.1.asc
--- dracut-024/lsinitrd.1.asc 2012-10-16 16:31:06.000000000 +0200
+++ new/lsinitrd.1.asc 2012-11-02 14:34:30.039441264 +0100
@@ -15,7 +15,7 @@
DESCRIPTION
-----------
lsinitrd shows the contents of an initramfs image. if <image> is omitted, then
-lsinitrd uses the default image /boot/initramfs-<kernel version>.img.
+lsinitrd uses the default image /boot/initrd-<kernel version>.
OPTIONS
-------
diff -urB dracut-024/lsinitrd.sh new/lsinitrd.sh
--- dracut-024/lsinitrd.sh 2012-10-16 16:31:06.000000000 +0200
+++ new/lsinitrd.sh 2012-11-02 14:34:30.039441264 +0100
@@ -36,7 +36,7 @@
done
shift $((OPTIND-1))
-image="${1:-/boot/initramfs-$(uname -r).img}"
+image="${1:-/boot/initrd-$(uname -r)}"
[[ -f "$image" ]] || { echo "$image does not exist" ; exit 1 ; }
CAT=zcat
diff -urB dracut-024/mkinitrd-dracut.sh new/mkinitrd-dracut.sh
--- dracut-024/mkinitrd-dracut.sh 2012-10-16 16:31:06.000000000 +0200
+++ new/mkinitrd-dracut.sh 2012-11-02 14:34:30.039441264 +0100
@@ -11,7 +11,7 @@
$cmd " [--nocompress]"
$cmd " <initrd-image> <kernel-version>"
$cmd ""
- $cmd " (ex: ${0##*/} /boot/initramfs-$kver.img $kver)"
+ $cmd " (ex: ${0##*/} /boot/initrd-$kver $kver)"
[[ $1 = '-n' ]] && exit 0
exit 1