LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-19-2007, 07:58 PM   #1
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Rep: Reputation: 0
Lightbulb I have an ISO and DMG...now what?


My Mac OSX (10.8.4) had an external USB crash and it seems that ddrescue and dcfldd are the last hope, since none of the other utilities can mount the disc. After several days of researching, reading, and writing I have managed to produce ISO and DMG files from some test files on a DVD and a floppy, but they are unrecognized and fail to mount. Could someone please help me sort out my syntax problems from scratch?


To make my images I used the following:

[COLOR="rgb(65, 105, 225)"]dd bs=512 if=/Volumes/Beatles of=/Volumes/Macintosh\ HD1/foofoo.dmg conv=noerror,sync

/Users/pieper/Desktop/ddrescue-1.3/ddrescue /Volumes/Untitled/Letterfor\ Andrei.doc /untitled\ folder/untitled\ folder/fooo2.iso
mkdir imagedir
mount -t iso9660 beatles.iso imagedir/ -o loop,unhide
[/COLOR]


Another (far more experienced) poster wrote:

A CD or DVD ISO image is readonly so you can't edit it. You can mount them very easily.

http://www.linuxquestions.org/questions/showthread.php?p=2662849#post2662849

mkdir imagedir
mount -t iso9660 backup.iso imagedir/ -o loop,unhide


Unfortunately, I have not been able to make this work.
mkdir imagedir
mount -t iso9660 beatles.iso imagedir/ -o loop,unhide


[Beatles.iso (is located in Macontosh HD )1 B] /Beatles.iso[/B] Right?

If anyone has a little time I would be very grateful for the help.
 
Old 03-19-2007, 09:04 PM   #2
puntjuh
Member
 
Registered: Apr 2006
Location: holland
Distribution: Gentoo / debian / suse / mint
Posts: 558

Rep: Reputation: 41
to mount an iso do:

mount -o loop /name/of/iso/here/plus/location.iso /destination/folder/here

This has worked for me a lot .
 
Old 03-19-2007, 09:41 PM   #3
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 13.37 Android 4.0
Posts: 2,248

Rep: Reputation: 46
mount -o loop -t iso9660 iso-name destination-directory
 
Old 03-20-2007, 02:59 AM   #4
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the help. It was a welcome relief for these blood-shot eyes to see some advice!

Unfortunately, I am still not able to mount an IMG, DMG, or ISO. Did I miss something when assembling these images?

Here are the results:

mount - loop /folder\ 1/folder \ 2/floppy.image /untitled\ folder

usage: mount [-dfruvw] [-o options] [-t ufs | external_type] special node
mount [-adfruvw] [-t ufs | external_type]
mount [-dfruvw] special | node
------------------------------

mount -o loop /disk4.dmg /untitled\ folder/

/disk4.dmg on /folder\ 1: Block device required
---------------------------
-o loop -t iso9660 /beatles.iso

-bash: -o: command not found

----------------------------------

mount -o loop -t iso9660 /untitled\ folder/untitled\ folder/fooo2.iso

usage: mount [-dfruvw] [-o options] [-t ufs | external_type] special node
mount [-adfruvw] [-t ufs | external_type]
mount [-dfruvw] special | node
 
Old 03-20-2007, 03:30 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
From the commands you gave, the first one looks like an image of your external drive and the second one looks like you copied a file.

You plugged the external drive into a linux machine, correct? I'm wondering because you posted in a Linux forum but your mount commands response looks different. I don't know if Mac OSX or BSD even have a loopback device. What does it mean by "special"?

How was the external drive formatted? That determines the filesystem type to use. In Linux if it was a fat32 drive, as in a pen drive for example, then you would use -t vfat. However, this may be Linux specific.

On my "man mount" manpages, there are several "ufstype" options for UFS filesystems. If your mount options are similar, you should read your manpage to see if you need to use an option such as "44bsd". The problem is that there are several differences between different UFS implementations and some are undocumented. So you may need to provide further information in the "ufstype" option.
 
Old 03-20-2007, 05:38 AM   #6
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the tip about "man mount." My terminal experience = about a week. (I am like a monkey with a hand-grenade.) I will go to the man pages and see what I can dig up.


qoute:
You plugged the external drive into a linux machine, correct? I'm wondering because you posted in a Linux forum but your mount commands response looks different. I don't know if Mac OSX or BSD even have a loopback device. What does it mean by "special"?


If I find out what they mean by special we'll both know! (Maybe they mean, "It takes a special kind of idiot to screw up a machine like you did!" )

I am using both a USB floppy and ISO/DMG images located in my / directory for testing. If and when I learn how to do this properly, I will try the code on my failing EXT HD. Perhaps posting in a Linux (instead of Mac) forum complicates things a bit, but this was the only forum that I could find with such comprehensive dd help and how to's. http://linuxquestions.cachefly.net/i...ies/newbie.gif
Any advice is appreciated!
 
Old 03-20-2007, 06:05 AM   #7
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
The "file" command might help you determine what kind of files you have, and potentially what filesystem they're in so you can specify it when mounting:
Code:
file your_iso_file
Might show nothing useful, on the other hand, it might!
 
Old 03-21-2007, 06:25 AM   #8
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
By a linux forum, I meant the forum on this site and not the LQ itself. There is a forum for BSD for example, and another one for non-Linux. No biggie. Since the moderator didn't relocate it, maybe there wasn't a best fit. Because the drive was external, I thought that you might have plugged it into a Linux machine.

A Special may mean the same thing as device. A device file is a special file. I haven't used BSD or OS-X so I don't know what a DMG file is. If it isn't a filesystem, then you can't mount it.

If a node is the same thing as a mount point, then your mount command is similar. Still, read through the mount man page. The filesytem types may be referred to differently.

I you are practicing mounting an image, you could still make an image of the usb drive. If you muck up the image file, you can always delete it and produce another. As long as you don't use the usb's device as the output.
 
Old 03-21-2007, 06:29 AM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
I looked up DMG in Wikipedia. It is an image file, but may be compressed or encrypted. There are utilities for converting DMG files to ISOs if the DMG is an image of a CD or DVD, but it could contain other filesystems. Look at the instructions for using the command line tool "hdiutil".
 
Old 03-23-2007, 08:11 AM   #10
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Original Poster
Rep: Reputation: 0
jschiwal,

Thanks for the advice and help. I have tested so many scripts that I am now seeing command lines in my sleep.

For others who may also be having the same problems here is one link:

http://www.macosxhints.com/article.p...50302225659382

I was not able to revolve my problems with the information provided there, but as mentioned I am a true newbie.

For practice I am working with a USB floppy located at:

/dev/disk1/Volumes/diskk

If I type:

dd bs=512 if=/dev/disk1 of=/zzzzz/foo.dmg conv=noerror,sync

the terminal returns that the device is busy.

If I type:
dd bs=512 if=/Volumes/diskk of=/zzzzz/foo.dmg conv=noerror,sync

the terminal begins spiting out a barrage of numbers:

dd: /Volumes/diskk: Is a directory
^C10792+0 records in
10792+0 records out
5525504 bytes transferred in 4.974113 secs (1110852 bytes/sec)

If I add the address of a document in that disk an unmountable image is produced:

dd bs=512 if=/Volumes/diskk/0000sem.rtf of=/zzzzz/foo.dmg conv=noerror,sync

If I omit .dmg or [B].iso[B] a file foo is produced

dd bs=512 if=/Volumes/diskk/0000sem.rtf of=/zzzzz/foo conv=noerror,sync

If I click on this plain /foo my document opens in word or text edit.

Could someone please explain what I am missing?
Is there a special command that selects all the files inside of a diectory?

dd bs=512 if=[select all]/Volumes/diskk/

And is there some kind of wrapper that I can place these files into so that they can be mounted?

Thanks
 
Old 03-23-2007, 06:41 PM   #11
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Original Poster
Rep: Reputation: 0
jschiwal,

You were right about looking in the hdiutil pages. I still do not have an image mounted, but am getting closer...

For those struggling with grub and making boot disks here is a good link:
http://heath.hrsoftworks.net/archives/000018.html

for those newbies struggling with ddrescue on a mac I can offer the following advice

1. take a couple sedatives

2. type su and hit return

3. cd and drag the ddrescue folder into the terminal and hit return

4. drag configure from the ddrescue file into the terminal -return

5. make - return

6. make install - return

7. ddrescue -v /dev/rdisk1 /yourfolder/foo.iso

rdisk1 is the location of my floppy disk to be copied (source) foo.iso

you can find the location of your floppy or other volumes by typing df

IMPORTANT addr to your disk /dev/rdisk1

locate your destination (target) by dragging the folder into the terminal

Now I am back to my original question: I have a an ISO and DMG...now what?
 
Old 03-23-2007, 06:45 PM   #12
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Original Poster
Rep: Reputation: 0
monitor looks like I made a typo or two:

rdisk1 is the location of my floppy disk to be copied (source) foo.iso

Can you please delete foo.iso?

thanks
 
Old 03-23-2007, 06:57 PM   #13
pieper
LQ Newbie
 
Registered: Mar 2007
Location: St. Petersburg, Russia
Posts: 16

Original Poster
Rep: Reputation: 0
As my Russian friends say УУУУУРРРРРААААААА (UUURRRAAA)! My last command produced a working DMG.

Спасибо for the help!
 
Old 03-24-2007, 08:45 AM   #14
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Нет проблема!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
burning *.dmg files kurrupt Linux - Software 4 05-25-2005 01:24 AM
How to install UnRarX20.dmg Gins Linux - General 1 05-02-2005 05:37 PM
Burning .DMG kizuna Slackware 3 04-30-2005 07:17 AM
what tha hell .dmg files?!? Y3k Linux - Newbie 1 06-04-2004 08:36 AM
can linux do anything with .dmg files? Mugatu Linux - Software 3 06-01-2004 08:44 AM


All times are GMT -5. The time now is 09:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration