Created
October 12, 2023 17:49
-
-
Save nijave/b12259e085e9836604cd379658f6047b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dnf install -y VirtualBox-server | |
# Make a vhd | |
qemu-img create -f vpc test.vhd 8G | |
virt-format -a test.vhd --partition=gpt --filesystem=ntfs | |
echo 'write /readme.txt "readme"' | guestfish -a test.vhd -m /dev/sda1 | |
mkdir test | |
vboximg-mount --image $(pwd)/test.vhd --rw --root test | |
mkdir testfs | |
sudo mount -t ntfs test/vol0 testfs | |
touch testfs/new-file | |
sudo umount testfs | |
umount test | |
echo 'ls /' | guestfish -a test.vhd -m /dev/sda1 | |
# new-file | |
# readme.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment