Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mnt/build_rootfs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash

# ensure the mknod, cpio, tar behave correctly by invoking this script differently
# by doing so, it also ensures the cpio.gz and the tar.xz preserve the root:root afterwards
# ./podman_shell.sh fakeroot /bin/bash build_rootfs.sh

CORES=$(nproc)
ROOTFS=/mnt/rootfs
BBCONF=/mnt/bb
Expand All @@ -19,4 +24,3 @@ cd "$ROOTFS"/dev && mknod -m 666 console c 5 1 && mknod -m 666 null c 1 3
cd "$ROOTFS" && find . | cpio -o -H newc | gzip > ../rootfs.cpio.gz
cd "$ROOTFS" && tar -Jcf ../rootfs.tar.xz .
cd /mnt && ls -l rootfs.*