Set root as owner for all files/dirs in the initramfs
This commit is contained in:
parent
08a85a5acc
commit
4c7d6fcfa8
|
|
@ -15,7 +15,7 @@ If the partition is detected, the squashfs module will be loaded from /modules/<
|
||||||
This is used as the writeable area of the overlay and consists of three directories which are created if not preset:
|
This is used as the writeable area of the overlay and consists of three directories which are created if not preset:
|
||||||
* /upper: Used for the 'upperdir' of the overlayfs. This is where all deleted/modified/created files are stored. This is cleared on each boot.
|
* /upper: Used for the 'upperdir' of the overlayfs. This is where all deleted/modified/created files are stored. This is cleared on each boot.
|
||||||
* /work: Used for the 'workdir' of the overlayfs.
|
* /work: Used for the 'workdir' of the overlayfs.
|
||||||
* /persistent: Used as an additional 'lowerdir' of the overlayfs. As the 'upperdir' is cleared, this read-only lower dir allows customisations to be made compared to the read-only OS image.
|
* /persistent: Used as an additional 'lowerdir' of the overlayfs. As the 'upperdir' is cleared, this read-only lower dir allows customisations to be made compared to the read-only OS image. eg. SSH keys.
|
||||||
|
|
||||||
### The image partition
|
### The image partition
|
||||||
This must contain a single file, root-squashfs.img which contains the full operating system.
|
This must contain a single file, root-squashfs.img which contains the full operating system.
|
||||||
|
|
|
||||||
4
build.sh
4
build.sh
|
|
@ -47,7 +47,7 @@ for arch in ${!BUSYBOX_MD5[@]}; do
|
||||||
ln -s busybox $INIT_DIR/bin/$bbcmd
|
ln -s busybox $INIT_DIR/bin/$bbcmd
|
||||||
done
|
done
|
||||||
cd $INIT_DIR
|
cd $INIT_DIR
|
||||||
find . | cpio -H newc -o | gzip > ../init-$PROJECT_VERSION-$arch.gz
|
find . | cpio -H newc -o --owner=0:0 | gzip > ../init-$PROJECT_VERSION-$arch.gz
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
# Create debug (start shell before switching root, start shell on error instead of exiting)
|
# Create debug (start shell before switching root, start shell on error instead of exiting)
|
||||||
|
|
@ -56,6 +56,6 @@ for arch in ${!BUSYBOX_MD5[@]}; do
|
||||||
sed -i -r '/# End mounting OS filesystems/a sh' $INIT_DIR/init
|
sed -i -r '/# End mounting OS filesystems/a sh' $INIT_DIR/init
|
||||||
sed -i -r 's/exit 1/sh/' $INIT_DIR/init
|
sed -i -r 's/exit 1/sh/' $INIT_DIR/init
|
||||||
cd $INIT_DIR
|
cd $INIT_DIR
|
||||||
find . | cpio -H newc -o | gzip > ../init-$PROJECT_VERSION-$arch-debug.gz
|
find . | cpio -H newc --owner=0:0 -o | gzip > ../init-$PROJECT_VERSION-$arch-debug.gz
|
||||||
cd ../..
|
cd ../..
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue