Cannot install SOAS using instructions for Mac OS X

Asked by John Bacus

Using the instructions found at http://wiki.sugarlabs.org/go/Sugar_on_a_Stick/Blueberry I am unable to complete the installation of SOAS using my Mac OS X machine. Here's the steps I followed:

0. downloaded "image-writer-mac" and "soas-2-blueberry.iso" to my ~/Downloads directory
1. bought a brand new 2gb USB flash drive
2. stuck it in a free USB port on my MacBook Pro (OS X 10.5.8, Intel)
3. ran the cmd "cd Downloads; python image-writer-mac soas-2-blueberry.iso" in Terminal from my home directory
4. saw this echoed back to the terminal:

Traceback (most recent call last):
  File "image-writer-mac", line 224, in <module>
    sys.exit(main())
  File "image-writer-mac", line 54, in main
    usbd=get_usb_disk()
  File "image-writer-mac", line 110, in get_usb_disk
    udisks = get_current_udisks();
  File "image-writer-mac", line 174, in get_current_udisks
    if info["Protocol"] == "USB" and info["Read-Only Media"] == "No":
KeyError: 'Read-Only Media'

5. Stopped trying, puzzled. My expectation was that this was going to leave me with a "Blueberry" disk image dd'd to my flash drive.

...so... Am I using the wrong shell? Maybe the wrong version of Python? Are there different instructions for Leopard vs. Snow Leopard?

thanks!
john
.

Question information

Language:
English Edit question
Status:
Solved
For:
Sugar on a Stick Edit question
Assignee:
No assignee Edit question
Solved by:
John Bacus
Solved:
Last query:
Last reply:
Revision history for this message
James Cameron (quozl) said :
#1

G'day John,

image-writer-mac depends on certain features of Mac OS X, and the error
you have suggests that a feature is not present.

Could you please try this test from the Terminal on your Mac OS X
system:

0. insert the new USB stick, wait for it to appear in Finder,

1. run the command "diskutil list" and post back the output,

2. identify from the output what the device name of the USB stick is,
in my case it is /dev/disk1,

3. run the command "diskutil info /dev/disk1", where /dev/disk1 is the
name you found in step 2 above, and post back the output.

When I do this, there is a line in the output "Read-Only Media: No".
The error you got from image-writer-mac suggests there is no such line
in the output, or that the diskutil program could not be run.

--
James Cameron
http://quozl.linux.org.au/

Revision history for this message
gen (gen-gc4) said :
#2

I have same problem.

OS X 10.4
iBook G4
python version is 2.6.4

I checked info of diskutil.

Read Only : No
(Not "Read Only Media: No" There is no "Media")
Bootable: Not Bootable

Forgive me my poor English.

Revision history for this message
NCOSE.ORG (fossvt) said :
#3

I have had the same results as John with the addition that I got an error when trying to use the referenced shasum command. A google search recommended 'openssl sha1'

I also got the same results as gen with the diskutil:

   Device Identifier: disk3
   Device Node: /dev/disk3
   Part Of Whole: disk3
   Device / Media Name: Kingston DataTraveler 2.0 Media

   Volume Name: SOAS
   Mount Point: /Volumes/SOAS
   File System: MS-DOS FAT32

   Partition Type:
   Bootable: Not bootable
   Media Type: Generic
   Protocol: USB
   SMART Status: Not Supported

   Total Size: 1.9 Gi (2003042304 B) (3912192 512-byte blocks)
   Free Space: 1.3 Gi (1356541952 B) (2649496 512-byte blocks)

   Read Only: No
   Ejectable: Yes
   Whole: Yes
   Internal: No
   OS 9 Drivers: No
   Low Level Format: Not Supported

All suggestions welcomed.

Bryant

Revision history for this message
James Cameron (quozl) said :
#4

On Thu, Dec 17, 2009 at 01:48:15PM -0000, gen wrote:
> OS X 10.4
> Read Only : No
> (Not "Read Only Media: No" There is no "Media")

The older version of diskutil is incompatible with the new
image-writer-mac program, sorry.

You can do one or more of these actions:

1. upgrade to a later version of diskutil that shows "Read Only Media",
though I don't know if one is available for G4,

2. modify the image-writer-mac program to search for "Read Only" instead
of "Read Only Media",

3. use another operating system to write the image,

4. raise the problem with the author of image-writer-mac; they may be
willing to fix it for you.

--
James Cameron
http://quozl.linux.org.au/

Revision history for this message
John Bacus (john-bacus) said :
#5

This is really only a guess, but I wonder if 'image-writer-mac' presupposes that the user is running Snow Leopard? I am running Leopard (10.5.8). Regardless, I found that I could manually invoke 'dd' to get the job done. Here's what worked for me:

1. stick in the USB drive
2. run the command 'mount' in Terminal, and look for the USB drive. In my case, it was mounted at '/dev/disk1'
3. run the command 'umount /dev/disk1' to unmount the drive. Depending on how you're logged in, you may need to 'sudo umount /dev/disk1' instead.
4. run the command 'dd bs=262144 if=/Path/To/Your/Your/Blueberry/ISO.iso of=/Path/To/Your/USB/Drive'
5. wait a bit for the command to complete, and you should be done.

'mac-image-writer' surely makes this process simpler, and I hope there's a way to generalize it for all Mac OS X installations. Unfortunately, I'm not bright enough with python to fix it myself.

Revision history for this message
gen (gen-gc4) said :
#6

>2. modify the image-writer-mac program to search for "Read Only" instead of "Read Only Media",

I tried this. I edited 'image-writer-mac' with textedit.
It went well.
I finished installation to USB drive.

But It didn't boot from USB drive.
I tried below.
-Restart ; Boot OSX 10.4
-Check Boot Disk in preferences ; No USB drive
-Push Shift+Apple+delete when boot ; Boot OSX

I think it didnt work becouse information of USB drive of 'bootable ; not bootable', isnt it?

Someone please help me.

Revision history for this message
James Cameron (quozl) said :
#7

On Sat, Dec 19, 2009 at 03:40:33AM -0000, John Bacus wrote:
> This is really only a guess, but I wonder if 'image-writer-mac'
> presupposes that the user is running Snow Leopard?

It may be a side effect of not checking it on Leopard. Anyway, unless
the author is told, any effort in identifying this is wasted.

--
James Cameron
http://quozl.linux.org.au/

Revision history for this message
lisfolks (lisfolks-dev) said :
#8

I modified the 'image-writer-mac' file to look for the text 'Read Only' instead of 'Read-Only Media', as James suggested. The file began to ran, but then stopped. Here is what I got:

Warning: The USB drive (Untitled [/dev/disk1]) will be completely erased!
 Do you want to continue anyway? (y/n) y
Source: /my/path/to/soas-2-blueberry.iso
Size: 589 MB
Destination: Untitled [/dev/disk1]
Writing image ...
Traceback (most recent call last):
  File "image-writer-mac-lml.py", line 224, in <module>
    sys.exit(main())
  File "image-writer-mac-lml.py", line 68, in main
    if not write_image_to_disk (image, usbd):
  File "image-writer-mac-lml.py", line 202, in write_image_to_disk
    p.send_signal(signal.SIGINFO)
AttributeError: 'Popen' object has no attribute 'send_signal'

What is the AttributeError line telling me??? And, what do I need to do to fix this?

Revision history for this message
James Cameron (quozl) said :
#9

On Sun, Dec 27, 2009 at 03:18:19AM -0000, lisfolks wrote:
> File "image-writer-mac-lml.py", line 202, in write_image_to_disk
> p.send_signal(signal.SIGINFO)
> AttributeError: 'Popen' object has no attribute 'send_signal'
>
> What is the AttributeError line telling me??? And, what do I need to do
> to fix this?

Oh, that's unfortunate. It means there are other operating system
version dependencies.

To be exact, the program is trying to send a signal to a process
connected to a pipe, and this isn't provided by the version of Python
you are using.

According to the documentation
http://docs.python.org/library/subprocess.html the send_signal method is
provided in Python 2.6.

You can find what version of Python you have by typing this command:

 python --version

You might be able to fix this error by changing the code, from:

 p.send_signal(signal.SIGINFO)

to

 os.kill(p.pid, signal.SIGINFO)

or

 os.system("kill -INFO %d" % p.pid)

--
James Cameron
http://quozl.linux.org.au/

Revision history for this message
lisfolks (lisfolks-dev) said :
#10

python --version brought back Python 2.5.1, James, so yep - not 2.6

Modified code to replace p.send... method with os.kill... method. It didn't work. So, I rechecked my 'diskutil info /dev/disk1' and now 'read only' is set to 'yes'. So... here's where I get to admit that I earlier (before your response) tried the 'dd bs=262144 if=/Path/To/Your/Your/Blueberry/ISO.iso of=/Path/To/Your/USB/Drive' that John Bacus suggested above. It seemed to work, but I wanted to try your suggestion and re-write the disk. Did that command make my drive un-writable? Here's what my diskutil info says now:

   Device Identifier: disk1
   Device Node: /dev/disk1
   Part Of Whole: disk1
   Device / Media Name: Crucial Gizmo! Media

   Volume Name: soas-2-blueberry
   Mount Point: /Volumes/soas-2-blueberry
   File System: ISO Rockridge

   Partition Type:
   Bootable: Not bootable
   Media Type: Generic
   Protocol: USB
   SMART Status: Not Supported

   Total Size: 588.9 Mi (617512960 B) (1206080 512-byte blocks)
   Free Space: 0.0 B (0 B) (0 512-byte blocks)

   Read Only: Yes
   Ejectable: Yes
   Whole: Yes
   Internal: No
   OS 9 Drivers: No
   Low Level Format: Not Supported

Oh, and one more thing: ls -al /dev/disk1 returns
  brw-r----- 1 leanne operator 14, 3 Dec 28 11:48 /dev/disk1

I have tried changing the permissions ('chown :admin' to change the group, 'chmod 777' to give full permissions). The 'ls' then shows the new owner and permissions as follows:
  brwxrwxrwx 1 leanne admin 14, 3 Dec 28 11:48 /dev/disk1

but I still have 'read only' set to 'yes' in diskutil info. Sorry to throw this extra piece in - I know it's a side issue to the original post, but I'm hoping you can give me some good advice (besides "go away!" ;)

Revision history for this message
James Cameron (quozl) said :
#11

Wild guess ... the diskutil says "Read Only" because the File System is
"ISO Rockridge" and the operating system does not have support for
udpating ISO-9660 filesystems.

It should not stop a dd.

It should not stop diskutil from reformatting the device as FAT.

It is an effect of what you wrote to the device.

--
James Cameron
http://quozl.linux.org.au/

Revision history for this message
lisfolks (lisfolks-dev) said :
#12

Yes, it worked! So, in summary, I:

- modified the 'image-writer-mac.py' file to look for the text 'Read Only' instead of 'Read-Only Media'
- modified the 'image-writer-mac.py' file, replacing 'p.send_signal(signal.SIGINFO)' with 'os.kill(p.pid, signal.SIGINFO)'

The image was successfully created on my USB stick after these changes.

Now, I'm going to guess, though, that I'll need one of those "helper" CDs for booting into Sugar. On an Intel Mac, which I have, I understand that a GUID partition is required for booting from a USB stick. Since the filesystem for this image is "ISO Rockridge", I'm pretty sure my MacBook Pro won't see it.

Thanks so very much for your assistance and your patience, James!

Revision history for this message
James Cameron (quozl) said :
#13

I've been in contact with an author of image-writer-mac about this
question. Thanks for raising it.

--
James Cameron
http://quozl.linux.org.au/

Revision history for this message
Danbalam (baron-von-earwig) said :
#14

I see that the topic for this has the words solved as its status. Can someone please tell me where to find the solution? I've put the image on the USB but cannot boot the USB.

Just in case I will create a new topic as this could be a separate issue. New topic 'Cannot boot live USB SOAS on Mac OS X'

Revision history for this message
James Cameron (quozl) said :
#15

On Tue, Jan 26, 2010 at 04:27:22AM -0000, Danbalam wrote:
> I see that the topic for this has the words solved as its status. Can
> someone please tell me where to find the solution?

The "solved" happened when the thread originator solved their issue
based on the answers we had given. This apparently happened on 19th
December.

Since then, for the record, the problem that prevented the image writer
from completing the task has since been fixed in the upstream source for
the image writer, by Bert on 23rd January.

http://git.sugarlabs.org/projects/image-writer

His fix has since been placed on the web site by Sebastian.

http://download.sugarlabs.org/soas/releases/

This information is from the sugar-devel mailing list archives.
http://lists.sugarlabs.org/archive/sugar-devel/

> I've put the image on the USB but cannot boot the USB.

That sounds like a separate issue, as you have surmised already.

--
James Cameron
http://quozl.linux.org.au/