]> 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>
Fri, 24 Jan 2014 11:49:17 +0000 (12:49 +0100)
commit659dc319d950999f8d191a81fdc4d3114e9213de
treed53af9f5fe50b2caf55343d73a1caf72f60f5647
parente3469d76c742ede6cbe4f62040b1fca0838e684d
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'.
dracut.sh