Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
fix: fill disk without sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
llenotre committed Jun 9, 2024
1 parent 403bce6 commit 62f5c23
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ cargo build --release -Zbuild-std --target "$TARGET"
dd if=/dev/zero of=disk bs=1M count=1024
mkfs.ext2 disk

# Mount
mkdir -p mnt
sudo mount disk mnt

# Fill filesystem
cp "target/$TARGET/release/maestro-test" mnt/

# Cleanup
sudo umount mnt
debugfs -wf - disk <<EOF
mkdir /sbin
write target/$TARGET/release/maestro-test /sbin/init
EOF

0 comments on commit 62f5c23

Please sign in to comment.