linux - 使用 newfs 文件系统创建可挂载镜像

标签 linux image filesystems mount mount-point

<分区>

我想用 newfs 文件系统创建一个可挂载的镜像,它可以用 newfs 文件系统挂载。我该怎么做?

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

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

但我无法创建 newfs 文件系统。我该怎么做?

最佳答案

沿线的东西:

$ 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

关于linux - 使用 newfs 文件系统创建可挂载镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9156938/

相关文章:

java - 在 install4j 应用程序中强制更新

css - 带有 Bootstrap 3 按钮的按钮图像

image - 如何对 RGB 值执行双线性插值?

java - 通过数组操作 BufferedImage 中的像素

python - Python 中是否有允许在单个文件中管理虚拟文件系统的库?

python - 在 Python 中,如何获取给定文件路径的文件系统

用于检查 C 代码括号的正则表达式

linux - 如何使 FIO 重播多线程跟踪

c# - 什么会导致正在执行的应用程序的当前目录发生变化?

c - linux C 串行结构缓冲区