Mounting a disk image using the loop device

quoted

http://bochs.sourceforge.net/doc/docbook/user/loop-device-usage.html

 

This section was contributed by Volker Ruppert.

Today I have made some tests with the loop device, because I want to exchange
files with the bochs disk images.  This is what I found out:

1.  Using Floppy images is easy, because there is no partition table:

    losetup /dev/loop0 /usr/local/bochs/dlxlinux/floppya.img

    Now you can use the image like a real floppy:

    - format           : mkfs.minix /dev/loop0
    - filesystem check : fsck.minix /dev/loop0
    - mount            : mount /dev/loop0 -o loop /mnt/floppy

    Before you want to restart bochs you must do this:

    losetup -d /dev/loop0

    Don't forget to umount before.

2.  If you want access to a hard disk image, you have to calculate the size of
    the first cylinder. This value is the offset argument for losetup.

    offset = bytes per sector * sectors per cylinder

    The command for dlxlinux image looks like this:

    losetup /dev/loop0 /usr/local/bochs/dlxlinux/hd10meg.img -o 8704

    For images created by bximage you must use the value 32256.

3.  The hard disk image access doesn't work if the image contains more than
    one partition.

4.  I have made this tests with Linux and I don't know how
    this could be done with other operating systems.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用、和的描述,"/sbin/mount.vboxsf: mounting failed with the error: No such device"错误通常会在使用共享文件夹功能时出现。这个错误表示虚拟机无法找到指定的设备来挂载共享文件夹。 解决这个错误的方法有几个步骤: 1. 确保你已经安装了Linux Guest Additions。这是必要的步骤,因为它提供了在虚拟机中使用共享文件夹功能所需的驱动程序和工具。你可以在VirtualBox菜单中选择"设备"->"安装增强功能"来安装Linux Guest Additions。 2. 检查你的共享文件夹设置是否正确。在VirtualBox中,选择你的虚拟机,然后点击"设置"。在"共享文件夹"选项卡中,确保你已经添加了正确的共享文件夹路径和名称。如果你需要重新添加共享文件夹,首先从列表中删除现有的共享文件夹,然后再重新添加。 3. 确保你的用户帐户有权限访问共享文件夹。在Linux中,你需要将你的用户帐户添加到vboxsf用户组中。打开终端并执行以下命令: sudo usermod -aG vboxsf <your_username> 4. 最后,重新启动你的虚拟机并尝试挂载共享文件夹。执行以下命令: sudo mount -t vboxsf <shared_folder_name> <mount_point> 如果你按照上述步骤进行操作,仍然遇到"/sbin/mount.vboxsf: mounting failed with the error: No such device"错误,请确保在VirtualBox主机和虚拟机之间的共享文件夹路径是正确的,并且没有其他冲突。你还可以尝试在VirtualBox中删除共享文件夹,并重新添加它,然后重新启动虚拟机。 希望这些步骤可以帮助你解决这个问题。如果你需要进一步的帮助,请参考引用中提供的链接,它包含了更详细的解决方案。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [/sbin/mount.vboxsf: mounting failed with the error: No such device](https://blog.csdn.net/daiyudong2020/article/details/58073520)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [共享文件夹挂载失败的错误:/sbin/mount.vboxsf: mounting failed with the error: No such device](https://blog.csdn.net/qq_32162235/article/details/108495251)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [ubuntu 下VirtualBox 如何实现共享设置](https://download.csdn.net/download/weixin_38746701/14108685)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值