Mounting .vdi image exfat disk

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Mounting .vdi image exfat disk

Postby mla » Mar 3rd, '17, 18:24

I have a .vdi image which VirtualBox happily boots as WinXP. I also need o be able to access it from my Mageia 5 machine as a mounted disk (not while booted, I hasten to add!)-- read-only would do. Having read several explanations found on the Net as to how to go about it, I tried the below as root:
Code: Select all
# modprobe nbd
# qemu-nbd -c /dev/nbd0 WinXP.vdi
# fdisk -l /dev/nbd0

Disk /dev/nbd0: 7.6 GiB, 8167477248 bytes, 15952104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x23222321

Device      Boot Start      End  Sectors  Size Id Type
/dev/nbd0p1 *       63 15920414 15920352  7.6G  7 HPFS/NTFS/exFAT

# ls /dev/nbd*
/dev/nbd0   /dev/nbd11  /dev/nbd14  /dev/nbd3  /dev/nbd6  /dev/nbd9
/dev/nbd1   /dev/nbd12  /dev/nbd15  /dev/nbd4  /dev/nbd7
/dev/nbd10  /dev/nbd13  /dev/nbd2   /dev/nbd5  /dev/nbd8
# mount /dev/nbd0 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/nbd0,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
# mount -t ntfs /dev/nbd0 /mnt
NTFS signature is missing.
Failed to mount '/dev/nbd0': Invalid argument
The device '/dev/nbd0' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
# rpm -qa | grep exfat
fuse-exfat-1.1.0-3.mga5
exfat-utils-1.1.0-3.1.mga5
# mount -t exfat /dev/nbd0 /mnt
FUSE exfat 1.1.0
ERROR: exFAT file system is not found.
#


There is an obvious anomaly in that Net advice claims that the "qemu-nbd -c" command should have also produced at least one /dev/nbd0p* file and it did not.

What am I doing wrong? Any advice (other than "you shouldn't need to do it in the first place" :-)) gratefully received.
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10

Re: Mounting .vdi image exfat disk

Postby doktor5000 » Mar 3rd, '17, 21:50

mla wrote:
# fdisk -l /dev/nbd0
[...]
Device Boot Start End Sectors Size Id Type
/dev/nbd0p1 * 63 15920414 15920352 7.6G 7 HPFS/NTFS/exFAT


There is an obvious anomaly in that Net advice claims that the "qemu-nbd -c" command should have also produced at least one /dev/nbd0p* file and it did not.


See above, it did. Try to mount that instead of the whole disk.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Mounting .vdi image exfat disk

Postby mla » Mar 3rd, '17, 22:25

Er... Look again at the result of "ls /dev/nbd*" which I included to preclude any misunderstandings. Yes, fdisk claims it to be there, but it isn't.
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10

Re: Mounting .vdi image exfat disk

Postby doktor5000 » Mar 4th, '17, 15:56

Did you try to mount /dev/nbd0p1 which is listed in the fdisk output, or did you only look at the ls output and assume it won't work?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Mounting .vdi image exfat disk

Postby mla » Mar 4th, '17, 16:11

I tried, even though the according to all instructions how to do it the file should have been there:
Code: Select all
#  fdisk -l /dev/nbd0

Disk /dev/nbd0: 7.6 GiB, 8167477248 bytes, 15952104 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x23222321

Device      Boot Start      End  Sectors  Size Id Type
/dev/nbd0p1 *       63 15920414 15920352  7.6G  7 HPFS/NTFS/exFAT

# mount /dev/nbd0p1 /mnt
mount: special device /dev/nbd0p1 does not exist
#
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest