OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Trying to writing .img file to a Compact Flash


Post Reply New Thread Subscribe

 
Thread Tools
gunnerjoe

 
gunnerjoe's Avatar
 
Member Since: Dec 24, 2004
Location: Albuquerque
Posts: 75
gunnerjoe is on a distinguished road
Mac Specs: Macbook Pro, Powerbook 1.5ghz and I started with Powerbook G4 800Mhz

gunnerjoe is offline
Hi All,

Using a Powerbook and OS X.3.8.

Trying to write the monowall (firewall) image to a Compact Flash card. The example given on their web site is for Freebsd, shown below.

=================================
http://m0n0.ch/wall/installation_generic.php

gzcat generic-pc-xxx.img | dd of=/dev/rad[n] bs=16k

where n = the ad device number of your CF card (check dmesg)
=================================

The Compact Flash card mounts under OS X as
/dev/disk1s1 122M 18K 122M 0% /Volumes/NO NAME

Do you write when the drive is mounted; If so, I always get drive busy error?

gzcat net48xx-1.11.img |dd of=/dev/disk1s1 bs=16k


Any ideas on what I'm doing wrong!

Thanks,

Joe
QUOTE Thanks
gunnerjoe

 
gunnerjoe's Avatar
 
Member Since: Dec 24, 2004
Location: Albuquerque
Posts: 75
gunnerjoe is on a distinguished road
Mac Specs: Macbook Pro, Powerbook 1.5ghz and I started with Powerbook G4 800Mhz

gunnerjoe is offline
Disreguard this post, dd did not work as that is a gz compress image.


Ok maybe I just don't understand the gzcat command.

I just did dd if=net48xx-1.11.img of=/dev/disk1s1 bs=16 and it seemed to work. What is the differance in using the gzcat command or doing the dd command I used above?

Thanks,

joe

Last edited by gunnerjoe; 04-19-2005 at 12:15 PM.
QUOTE Thanks
gunnerjoe

 
gunnerjoe's Avatar
 
Member Since: Dec 24, 2004
Location: Albuquerque
Posts: 75
gunnerjoe is on a distinguished road
Mac Specs: Macbook Pro, Powerbook 1.5ghz and I started with Powerbook G4 800Mhz

gunnerjoe is offline
Ok, I shouldn't try writing while device is mounted, but /dev/disk1s1 device cannot be found when the device is not mounted. So, how do I tell what the raw device path is on OS X?

Any Thoughts?

Thanks,

Joe

Last edited by gunnerjoe; 04-19-2005 at 12:16 PM.
QUOTE Thanks
gunnerjoe

 
gunnerjoe's Avatar
 
Member Since: Dec 24, 2004
Location: Albuquerque
Posts: 75
gunnerjoe is on a distinguished road
Mac Specs: Macbook Pro, Powerbook 1.5ghz and I started with Powerbook G4 800Mhz

gunnerjoe is offline
Hi All,

Ok, figured this out. Since so many have viewed this, I'll post the solution.

If you go to /dev directory and do a 'ls' you will see a list of all your devices. The devices I was interested in are the 'raw' devices. While no extra devices are plugged in to my laptop, the only raw devices I see are the ones associated with my hard drive, which is mounted under /dev/disk0s5. RAW disk listed below:
rdisk0
rdisk0s1
rdisk0s2
rdisk0s3
rdisk0s4
rdisk0s5

Now if I plug in some other external drive, such as a Compact Flash card and after the drive mounts under /dev/disk2s1 , re-run that 'ls' command I should see some new "raw" devices.

rdisk2
rdisk2s1

Then while drive is mounted I'll write the image to raw disk, rdisk2s1, (not the mounted disk /dev/disk2s1) as in the example below. Some Unix versions require the drive to be unmounted, but not here.

gzcat net48xx-1.11.img |dd of=/dev/rdisk2s1 bs=16k

Output looks like:
gzcat: net48xx-1.11.img: decompression OK, trailing garbage ignored
0+768 records in
0+768 records out
6291456 bytes transferred in 12.971943 secs (485005 bytes/sec)

I'm surprised one of you Darwin guru's couldn't help with that, I had to ask a Sun Microsystems guru for help; THE SHAME, THE SHAME

Later All,

Joe


Quote:
Originally Posted by gunnerjoe
Ok, I shouldn't try writing while device is mounted, but /dev/disk1s1 device cannot be found when the device is not mounted. So, how do I tell what the raw device path is on OS X?

Any Thoughts?

Thanks,

Joe
QUOTE Thanks

Post Reply New Thread Subscribe


« Notification of File Accesses | Switching but Cocoa/xcode help »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Compact Flash Card... Not Able to Use Full Capacity? GTwinkie Switcher Hangout 2 02-20-2005 09:28 PM
exe file running on a Mac chapytoutou OS X - Operating System 5 08-30-2004 12:53 PM
Compact flash icon won't apper on desktop pressman Apple Desktops 0 12-26-2003 06:31 AM
Compact flash icon won't apper on desktop pressman Other Hardware and Peripherals 0 12-26-2003 06:29 AM
Severe Flash Security Flaw schweb Apple Rumors and Reports 1 03-04-2003 01:03 PM

All times are GMT -4. The time now is 03:28 AM.

Powered by vBulletin
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?