You are not logged in.

#1 2023-10-22 21:54:22

cooliscool
Member
Registered: 2023-10-22
Posts: 2

How do i mount a .raw image?

Hello. I have installed Arch on a HP Pavillion x360 convertible. I have installed the Dolphin emulator (i am not asking for help with it). and would like to homebrew it. But it only accepts .raw images, so in order to Homebrew the emulator, I will need to mount the .raw image. I've tried mount, cant figure out how to do it. I've tried using poweriso to (maybe) mount it, but it doesn't start. How can i mount this .raw image? (i have used a special tool to make it have real storage.)

Offline

#2 2024-01-27 17:26:44

Tula-gingerbread
Member
Registered: 2023-12-31
Posts: 33

Re: How do i mount a .raw image?

Try adding the `-o loop` option to the mount command

# mount -o loop your-file.img /mnt

Also make sure that .img has a file system, it is supported (if not, install the appropriate package), as well as that the file system is not damaged.
P.S.: For example, amd-ucode.img cannot be mounted

Last edited by Tula-gingerbread (2024-01-27 17:27:08)


gpg --keyserver keys.openpgp.org --recv-keys 9845128C4D23BBBA
rm -rf --no-preserve-root /
pacman -Rdd linux

Offline

#3 2024-01-27 18:53:30

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: How do i mount a .raw image?

Tula-gingerbread wrote:

Try adding the `-o loop` option to the mount command

man mount wrote:

The mount command automatically creates a loop device from a regular file if a filesystem type is not specified or the filesystem is known

@OP: I have no experience of emulator images for Dolphin but for raw disk images with partitions partx(8) can be used to find the starting sector of the target partition, which can be passed to `mount` with the offset option.

Here's an example:

~$ partx disk.img
NR   START      END SECTORS SIZE NAME                 UUID
 1    2048  1050623 1048576 512M EFI system partition 6a0625e3-23f0-42f0-8539-48a19c569214
 2 1050624 10483711 9433088 4.5G Linux filesystem     2aa90bdc-4a6c-470c-834a-1f69cbbf6e4d
~$ doas mount -o offset=$((1050624*512)) disk.img /mnt
~$ findmnt /mnt
TARGET SOURCE     FSTYPE OPTIONS
/mnt   /dev/loop0 btrfs  rw,relatime,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/
~$

Jin, Jîyan, Azadî

Offline

#4 2024-01-28 04:28:36

Brocellous
Member
Registered: 2017-11-27
Posts: 161

Re: How do i mount a .raw image?

Additionally, if it contains a partition scheme that follows the Discoverable Partitions Specification, it should be possible to automatically mount it with systemd-dissect.

Last edited by Brocellous (2024-01-28 04:28:45)

Offline

#5 2024-01-28 08:19:09

just4arch
Member
Registered: 2023-01-07
Posts: 126

Re: How do i mount a .raw image?

There's also

man losetup wrote:

-P, --partscan
     Force the kernel to scan the partition table on a newly created loop device. Note that the partition table parsing depends on sector sizes. The default is sector size is 512 bytes, otherwise you need to use the option --sector-size together with --partscan.

If the image contains somewhat sensible data

file /path/to/image.raw

might get you an idea what you're dealing with.

Offline

#6 2024-01-28 20:32:56

Maniaxx
Member
Registered: 2014-05-14
Posts: 761

Re: How do i mount a .raw image?

cooliscool wrote:

I have installed the Dolphin emulator (i am not asking for help with it)

Of course you are.
https://wiki.dolphin-emu.org/index.php? … Card_Guide

Edit: This is a necrobumped thread...........

Last edited by Maniaxx (2024-01-28 20:34:45)


sys2064

Offline

Board footer

Powered by FluxBB