0

我想用 newfs 文件系统创建一个可挂载的映像,它可以用 newfs 文件系统挂载。我怎样才能做到这一点?

我试图用命令创建一个图像

dd if=localfiles.tar.gz of=/root/upload/test.img

但我无法创建 newfs 文件系统。我怎样才能做到这一点?

4

1 回答 1

2

类似的东西:

$ dd if=/dev/zero bs=8M count=<depends on the size of the fs you need> of=/root/upload/test.img
$ mkfs.newfs /root/upload/test.img
# mount -o loop /root/upload/test.img /mnt
$ cd /mnt
$ tar xzf /path/to/localfiles.tar.gz
$ cd
# umount /mnt
于 2012-02-06T08:06:22.803 回答