]> git.ipfire.org Git - thirdparty/dracut.git/commit
Dracut: Add a new argument "--rebuild"
authorHari Bathini <hbathini@linux.vnet.ibm.com>
Thu, 16 Jan 2014 06:41:27 +0000 (12:11 +0530)
committerHarald Hoyer <harald@redhat.com>
Thu, 4 Sep 2014 10:57:43 +0000 (12:57 +0200)
commitf2c5c5c961a91765640f381ec37af085dc91312b
treeb9539aed71f6c9d73bed33c968401a0301b69bee
parent81a6e87f0f183c1ddf8808bb52be09e3070caefd
Dracut: Add a new argument "--rebuild"

Add "rebuild" option to dracut to  append the current  arguments
to those with  which the input initramfs image was  built.  This
option helps in incrementally building initramfs for testing.

    Usage: dracut [output_file] --rebuild input_file

If optional output file  is not provided, input file provided to
rebuild will be used as output file.

This patch alters  the creation of the initramfs image by adding
the file "/tmp/params.txt" to the image. Command line parameters
excluding "--rebuild",  input  &  output image names and "kernel
version" are stored in this file.  In case "--rebuild" parameter
is specified, "/tmp/params.txt" file, if present in input image,
is read and its contents "prepend"ed to the current command line
parameters, that is if such a file is already present. Also,  it
stores the  cumulative parameters to the file "/tmp/params.txt",
in the  new image. This patch  has been tested successfully on a
PowerBox with f19. It does not alter the behaviour of any of the
existing  options.

Signed-off-by: Manik Bajpai <manibajp@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
[Edited-by: Harald Hoyer]
Simplified the cpio extraction process by using 'lsinitrd'.

(cherry picked from commit 659dc319d950999f8d191a81fdc4d3114e9213de)
dracut.sh