1

I'm running Ubuntu 10.10. As part of SD card creation, I have a script that successfully creates a raw disk image file, correctly formatted with an ext2 file system. I have built SD cards from the raw disk image file with dd.

Now, I'd like to mount it and browse the files using Nautilus.

I know I can use mount -o,loop to mount it to a mount point. I would like to get it mounted by gnome to an automatically created /media/xxx mount point. I have used partprobe /dev/loopn to get the file noticed. It appears in my Places menu and if I select it from there, nautilus opens the disk, just fine.

What I would like to do is get my script to kick nautilus so its file browser window opens the image file's root without having to select it from the Places menu.

goldharv
  • 31
  • 3

3 Answers3

1

You could also use gvfs-mount.

List mountable devices

gvfs-mount -li 

Mount device file found above from label

gvfs-mount -d /dev/sdaX

Nautilus uses the same underlying library (gvfs)

After that you can use

nautilus /media/LABEL
Mark Hall
  • 53,938
  • 9
  • 94
  • 111
0

You can use gnome-disk-image-mounter (probably with option --writable) to mount an image using Gnome, which itself will be available by Nautilus.

If you want a graphical application like Nautilus to browse the files, why do you not configure it to mount images by itself? With 'right-click|Properties|Open With' you can just use gnome-disk-image-mounter to do the task you want, including opening the folder.
See my answer to another question to open the image writeable.

doak
  • 809
  • 9
  • 24
0

if you know the path to the directory you can use gnome-open like:

gnome-open /media/xxx
cenanozen
  • 1,130
  • 18
  • 29
  • Thanks. Unfortunately, while the volume label appears in the Places menu, it is not yet mounted anywhere. So there is nothing in the /media directory, yet. – goldharv Sep 08 '11 at 16:45