I create a virtual drive using these commands:
Code: Select all
dd if=/dev/zero of=$HOME/virtual_disk/2PVD.img bs=1M count=512
mkntfs -F $HOME/virtual_disk/2PVD.img
#to make it "bootable" (?)
(echo a; echo 1; echo w) | fdisk $HOME/virtual_disk/2PVD.img
mount -o loop $HOME/virtual_disk/2PVD.img /mnt/2PVD
Now I would like to create a *.img file from it.
Is is possible?
Note I foolishly named my output file as a an *.img file ($HOME/virtual_disk/2PVD.img) that I tried to dump as is to an USB stick but (obviously?) it failed.
I know all this may sound silly but it's by tinkering that we learn (and that I have been learning a lot/not enough yet!)...
Cordialement.