John Jolly suggested to use "cpio" with "-R root:root" in order to generate rootfs with all files and folders owned by root (uid 0 and gid 0). This hasn't been tested yet.

This commit is contained in:
Ivan Davidov 2016-01-14 19:33:56 +02:00
parent 9797b843d1
commit 8b96da4dbe

View File

@ -7,6 +7,13 @@ rm -f rootfs.cpio.gz
cd rootfs cd rootfs
# Suggested update by John Jolly.
#
# find . | cpio -R root:root -H newc -o | gzip > ../rootfs.cpio.gz
#
# This produces a root fs with files and directories all owned by user 0, group 0.
# Note: test this change as soon as possible!
#
# Packs the current folder structure in "cpio.gz" archive. # Packs the current folder structure in "cpio.gz" archive.
find . | cpio -H newc -o | gzip > ../rootfs.cpio.gz find . | cpio -H newc -o | gzip > ../rootfs.cpio.gz