【问题标题】:How do I mount the linux virtual machine cloned disk?如何挂载linux虚拟机克隆盘?
【发布时间】:2014-02-03 06:29:51
【问题描述】:

我创建了一个在 URL here 中指定的 CentOS 克隆磁盘映像,并且我能够按照下面指定的方式挂载基本磁盘映像

To get base disk image details:
   1) fdisk -lu raw.img

To mount the base disk image:
   2) losetup /dev/loop0 raw.img -o $((9766912   * 512))
   3) file -s /dev/loop0
   4) mount /dev/loop0 /mnt
   5) cd /mnt
   6) ls -l
       bin/    etc/    lost+found/     mnt/    orig_boot/  
       sbin/   sys/           var/    boot/   home/   media/          
       proc/   selinux/        tmp/  wlcv_root_info/ ....

 To umount the base disk image:
   7) umount /mnt
   8) losetup -d /dev/loop0

但是我无法在克隆的磁盘上得到相同的结果:(并且我收到以下错误消息

-sh-4.1# mount /dev/loop0 /mnt
     mount: you must specify the filesystem type

 -sh-4.1# mount -t ext3 /dev/loop0 /mnt
   mount: wrong fs type, bad option, bad superblock on /dev/loop0,
          missing codepage or helper program, or other error
          In some cases useful info is found in syslog - try
          dmesg | tail  or so

我尝试使用 ext2、ext3 和 ext4 文件系统类型,但似乎没有任何帮助。请指导我安装克隆磁盘,以便我可以查看克隆磁盘中创建的所有文件。

【问题讨论】:

    标签: virtual-machine qemu kvm


    【解决方案1】:

    你试过了吗?

    mount -r <fstype> <fsdev> <fsdir>
    
           -r:     Mount read only.
           fstype: The filesystem type to mount
           fsdev:  The name of a block device to mount.
           fsdir:  The directory to mount to.
    

    编辑:

    不要知道你身边发生了什么。你可能会试一试。看看这个问题Mount complains a wrong fs type, bad option, or a bad superblock。也可以试试mount -t auto

    【讨论】:

    • 是的,但没有用。 :(
    • 请检查编辑并告诉我它是否有帮助。
    猜你喜欢
    • 2018-05-18
    • 2017-02-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-11-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多