OpenWRT 查看镜像文件系统 不重启重读分区表 挂载镜像

查看文件系统

opkg update
opkg install parted
parted -m <image> print | tail -n +3 | awk -F ":" '{print $(NF-2)}'

查看已支持的文件系统

cat /proc/filesystems

安装文件系统

opkg install kmod-fs-ntfs
opkg install kmod-fs-xfs

Arch Linux文件系统

parted -m Arch-Linux-x86_64-cloudimg.qcow2 print | tail -n +3 | awk -F ":" '{print $(NF-2)}'
btrfs

Debian 11文件系统

parted -m debian-11-genericcloud-amd64.raw print | tail -n +3 | awk -F ":" '{print $(NF-2)}'
fat16
ext4

Ubuntu 22.04文件系统

parted -m ubuntu-22.04-server-cloudimg-amd64.raw print | tail -n +3 | awk -F ":" '{print $(NF-2)}'
fat32
ext4

CentOS Stream 9文件系统

opkg install kmod-fs-xfs
parted -m CentOS-Stream-GenericCloud-9-20220425.0.x86_64.raw print | tail -n +3 | awk -F ":" '{print $(NF-2)}'
xfs

RHEL 9文件系统

parted -m rhel-baseos-9.0-beta-5-x86_64-kvm.raw print | tail -n +3 | awk -F ":" '{print $(NF-2)}'
fat16
xfs
xfs

MikroTik RouerOS文件系统

parted -m chr-7.3beta37.img print | tail -n +3 | awk -F ":" '{print $(NF-2)}'
ext2
ext3

 

重读分区表

opkg update
opkg install parted
partprobe /dev/sda

查看分区

lsblk

挂载镜像

opkg update
opkg install losetup

查看空闲loop设备

losetup -f

挂载chr-7.3beta37.img到/mnt

losetup -P loop0 chr-7.3beta37.img /mnt

强制取消挂载

umount -l /mnt

取消img镜像挂载

losetup -d /dev/loop0

 

 

本站文章资源均来源自网络,除非特别声明,否则均不代表站方观点,并仅供查阅,不作为任何参考依据!
如有侵权请及时跟我们联系,本站将及时删除!
如遇版权问题,请查看 本站版权声明
THE END
分享
二维码
海报
OpenWRT 查看镜像文件系统 不重启重读分区表 挂载镜像
查看文件系统 opkg update opkg install parted parted -m <image> print | tail -n +3 | awk -F ":" '{print $(NF-2)}' 查看已支持的文件系统 cat ……
<<上一篇
下一篇>>
文章目录
关闭
目 录