dd i/o error
we'll i've been kinda busy to mod the patchstick but now i'm kinda stuck..
the goal for the mod is to clean up the HD.. then make an new gpt index add the fresh partitions and restore the dmgs to the partitions...
almost everything works.. BUT the thing that gives a error is the DD app..
first it writes for about 2 seconds and then it says it's finished and it gives a I/O error
code on the launchd
/sbin/gpt show /dev/disk0
/sbin/gpt destroy /dev/disk0
/sbin/gpt create /dev/disk0
echo " *** New GPT CREATED"
/sbin/gpt add -b 888872 -i 3 -s 1843200 -t hfs /dev/disk0
/sbin/gpt add -b 2732072 -i 4 -s 75408055 -t hfs /dev/disk0
echo " *** OSBoot/Media Partition Created"
/sbin/gpt add -b 40 -i 1 -s 69632 -t efi /dev/disk0
echo " *** EFI Partition Created"
/sbin/gpt add -b 69672 -i 2 -s 819200 -t 5265636F-7665-11AA-AA11-00306543ECAC /dev/disk0
echo " *** Recovery Partition Created"
/sbin/dd if=/dev/zero of=/dev/disk0s1 bs=1m
/sbin/dd if=/stuff/efi.dmg of=/dev/disk0s1 bs=1m
echo " **** EFI Restored"
/sbin/dd if=/stuff/recovery.dmg of=/dev/disk0s2 bs=1m
echo " **** Recovery Restored"
It's not quite clear how this is running.
You reference "/dev/disk0" so this seems to be running under the AppleTV native OS. In that case, you are trying to re-format the disk from under a running OS. Unless you have OSX running from a ram disk, you can't do this as OSX has open files on OSBoot and Media.
More info please.