【发布时间】:2012-02-06 07:36:54
【问题描述】:
我想用 newfs 文件系统创建一个可挂载的镜像,它可以用 newfs 文件系统挂载。我该怎么做?
我尝试使用命令创建图像
dd if=localfiles.tar.gz of=/root/upload/test.img
但我无法创建 newfs 文件系统。我该怎么做?
【问题讨论】:
标签: linux image filesystems mount mount-point
我想用 newfs 文件系统创建一个可挂载的镜像,它可以用 newfs 文件系统挂载。我该怎么做?
我尝试使用命令创建图像
dd if=localfiles.tar.gz of=/root/upload/test.img
但我无法创建 newfs 文件系统。我该怎么做?
【问题讨论】:
标签: linux image filesystems mount mount-point
类似的东西:
$ 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
【讨论】: