Re: [PATCH 0/8] build initramfs: speedup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On 31.08.2011 06:39, John Reiser wrote:
> This patch series saves 50% (a factor of 2) in real time before final gzip
> when building initramfs for Fedora 16.
> Probably you should apply only the first six patches (1,2,3,4,5,6)
> because directory symlinks and permissions aren't right after patch 7.
> [I don't care about directory symlinks now; permissions are 775 instead of 755.]
> I'm working on a different approach for those; it's not ready.
> However, the first six patches save 25% (a factor of 4/3),
> and patch 7 saves another 25% by replacing most /bin/cp with cpio.

Regarding path 7 and 8:

directory permissions could be copied with:


-        echo "$1" >&${cpio_stdin}
+        local _part=$1
+        while [[ "$_part" != "${_part%/*}" ]]; do
+            echo "$_part" >&${cpio_stdin}
+            _part=${_part%/*}
+        done
         return 0


BUT, there is a general problem with this.
1. the check, if the file is already present fails. This changes behaviour for
e.g. install "bash" if /bin/sh is not yet there. In our case, of the "dash"
dracut module is installed, bash will not be installed.
So, we would have to bookkeep, what we already sent to cpio.

2. postprocessing of installed files. E.g. the lvm modules changes
/etc/lvm/lvm.conf. This could be prevented, by pulling out all post processing
and call all with install_post() after cpio copying.
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux