Jump to content

HD Clonetool. PowerPC and Developer "Mac" Versions. GUI version coming soon


Guest goodtime
 Share

91 posts in this topic

Recommended Posts

i'm dual booting xp here with osx on the same drive. i have 3 partitions.

 

30 gb XP

10GB OSX

40 GB shared FAT32

 

i'd like to swap the OSX and FAT32 partitions to have more room my my new and much loved osx86 install - i never expected it to work so good! otherwise i would have setup a bigger partition for it in the 1st place.

i tried your disk util instructions :select disk, click partition tab, click on partition..

 

all options are grayed out for the FAT32 partition (want to make it HFS)

 

i then booted off the osx jas 10.4.8 install dvd and tried the utility there doing the same.. this time the options were available but it gave me a warning that all the volumes on the disk would be destroyed so i stopped - i still have xp partition there that i don't want to lose - had i said yes to changing my shared FAT32 to HFS would it have destryed my XP NTFS partition ?

 

if yes - any ideas on how i can make my FAT32 into an HFS partition without destroying anything?

 

Thanks for the tool. hope i can try it out.

 

btw, erase & reformat is not an option - the only thing available in the drop down menu where i would normally choose HFS journaled only lists MSDOS.. frustrating.

Link to comment
Share on other sites

Guest goodtime
i'm dual booting xp here with osx on the same drive. i have 3 partitions.

 

30 gb XP

10GB OSX

40 GB shared FAT32

 

i'd like to swap the OSX and FAT32 partitions to have more room my my new and much loved osx86 install - i never expected it to work so good! otherwise i would have setup a bigger partition for it in the 1st place.

i tried your disk util instructions :select disk, click partition tab, click on partition..

 

all options are grayed out for the FAT32 partition (want to make it HFS)

 

i then booted off the osx jas 10.4.8 install dvd and tried the utility there doing the same.. this time the options were available but it gave me a warning that all the volumes on the disk would be destroyed so i stopped - i still have xp partition there that i don't want to lose - had i said yes to changing my shared FAT32 to HFS would it have destryed my XP NTFS partition ?

 

if yes - any ideas on how i can make my FAT32 into an HFS partition without destroying anything?

 

Thanks for the tool. hope i can try it out.

 

btw, erase & reformat is not an option - the only thing available in the drop down menu where i would normally choose HFS journaled only lists MSDOS.. frustrating.

 

In 10.4.8 from Disk Utility (Applications->Utilities), you should be able to click on the FAT32 partition itself in the left panel, not the entire disk and erase just that partition. Theoretically, you can do the same thing from the command line:

 

From Mac OS X, Open Terminal and type:

cd /Volumes
ls -al

find the volume name of your target Volume that you want to erase.

for HFS+ type

 

## only use quotes if you have spaces in the volumes name
diskutil eraseVolume HFS+ newVolumeName "/Volumes/disk_Name_here"

for Journaled HFS+ type

 

## only use quotes if you have spaces in the volumes name
diskutil eraseVolume "Journaled HFS+" newVolumeName "/Volumes/disk_Name_here"

 

If MSDOS is the only option in Disk Utility, you might have to erase it another way. Do you remember what utility that you used to initialize your drive? If it was initialized with Windows, then use disk part from Windows.

Click here for Microsoft's guide on using disk part command line utility for Windows

You can list the available objects and determine an object's number or drive letter by using the list disk, list volume, and list partition commands. The list disk and list volume commands display all disks and volumes on the computer. However, the list partition command only displays partitions on the disk that has focus. When you use the list commands, an asterisk (*) appears next to the object with focus. You select an object by its number or drive letter, such as disk 0, partition 1, volume 3, or volume C.

From disk part, you will want to Select target partition, Delete the partition, then create a new AF partition.

list disk
select disk (disk number)
list partition
select partition (partition number)
delete partition
create partition primary id=AF
exit

 

For a single drive system, Clonetool .03a is not able to install the Darwin Bootloader to the target partition. Two physical Hard drives are required to use the full power of Clonetool. I highly recommend a portable USB 2.0 drive like the Firelite USB 2.0 drive or LaCie Porshe design Firewire/USB 2.0 combo drive. This way you can backup to the USB 2.0 drive. Boot from the backup, and move it to a larger partition to another internal HD while retaining the Darwinbootloader the whole way through.

 

YMMV,

 

gt

Link to comment
Share on other sites

thanks for your response. i ended up fixing the format to hfs problem with cfdisk on ubuntu live cd - set as type AF (primary).

 

i'm back here now trying to use your tool. The 1st step after giving pw is to select the destination drive number.

 

here is my output for choices..

 

/dev/disk0

#: type name size identifier

0: FDisk_partition_scheme *76.3 GB disk0

1: Windows_NTFS Windows 39.1 GB disk0s1

2: Apple_HFS disk0s2 10.0 GB disk0s2

3: Apple_HFS osx 27.3 GB disk0s3

 

i want to choose #3.. so i enter 3 at prompt, nothing happens, just asks the same thing again,

 

 

The following devices are available:

 

1. Maxtor 6V080E0 @ disk0 (76.3 GB)

Select the destination drive # for the clone.

 

 

What am I doing wrong here?

 

Thanks again for your help, appreciated.

Link to comment
Share on other sites

Guest goodtime
thanks for your response. i ended up fixing the format to hfs problem with cfdisk on ubuntu live cd - set as type AF (primary).

 

i'm back here now trying to use your tool. The 1st step after giving pw is to select the destination drive number.

 

here is my output for choices..

 

/dev/disk0

#: type name size identifier

0: FDisk_partition_scheme *76.3 GB disk0

1: Windows_NTFS Windows 39.1 GB disk0s1

2: Apple_HFS disk0s2 10.0 GB disk0s2

3: Apple_HFS osx 27.3 GB disk0s3

 

i want to choose #3.. so i enter 3 at prompt, nothing happens, just asks the same thing again,

The following devices are available:

 

1. Maxtor 6V080E0 @ disk0 (76.3 GB)

Select the destination drive # for the clone.

What am I doing wrong here?

 

Thanks again for your help, appreciated.

 

The first choice, it asks for your destination drive #:

 

Enter:

1

 

The second choice for the partition enter:

 

Next set of choices Enter:

/dev/disk0s3

 

Thanks,

 

gt

Link to comment
Share on other sites

Guest goodtime

Clonetool uses a media kit framework for BIOS based computers. The media kit takes helps out when erasing a disk and automatically installs boot drivers on HFS+. It functions correctly in 10.4.8 with 8.8.1 kernel. However, it does not cooperate with a 10.4.4 kernel system (current SSE2 machines).

 

On a 10.4.4 kernel system, when erasing a disk the media kit says

the disk is already bootable, not making it bootable again.

This is bad because when diskutil erases the boot1h and boot information from the drive, and the media kit thinks this data is still there on the disk and does not bother reinstalling boot1h and boot. Our media kit helper refuses to do its job.

 

I have been able to manually load the boot1h and boot drivers back onto the drive from the command line, but I have not been able to get it to work consistantly from a shell script. The mediakit is the directional that I want to continue with. Using dd, startuptool, fdisk, or bless to install boot1h and boot is not the direction that I want to go, because it can be very flakely. So, there will most likely not be a fix for SSE2 computers, unless a savvy user can come up with something that works everytime.

 

Furthermore, this will not be issue when a 8.8.1 kernel and 10.4.8 system for SSE2 computers is available. The workaround for SSE2 users is either maintain a separate boot volume or use a BootDVD to boot up a clone. Sorry if you've ran into this issue. If anyone comes up with a reliable fix, please let us know!

 

The good news is 10.4.8 SSE3/AMD machines with the 8.8.1 kernel are working correctly with Clonetool.

 

gt

Link to comment
Share on other sites

I have been able to manually load the boot1h and boot drivers back onto the drive from the command line, but I have not been able to get it to work consistantly from a shell script.

Perhaps you could share the command sequence necessary to reload the drivers? Many people with HFS+ Partition errors and blinking cursors on black screens would benefit from a repair procedure without having to reinstall.

Link to comment
Share on other sites

Guest goodtime
Perhaps you could share the command sequence necessary to reload the drivers? Many people with HFS+ Partition errors and blinking cursors on black screens would benefit from a repair procedure without having to reinstall.

 

How to Manually install boot1h and boot, YMMV.

 

diskutil list
## write down the volume name and disk identifier info example: (disk1s1)


## unmount the disk that needs the boot loader
## remove quotes if you do not have space
diskutil unmount "/Volumes/volume name"

## replace out 1s1 with your disk# and partition #
## this installs boot1h in the 1st 512 blocks
dd if=/usr/standalone/i386/boot1h of=/dev/rdisk1s1 bs=512 count=1

## replace out 1s1 with your disk# and partition #
## this installs the 2nd stage boot loader to the target disk
/Applications/Clonetool/sbin/startupfiletool /dev/rdisk1s1 /usr/standalone/i386/boot

## bless the target device
sudo /Applications/Clonetool/sbin/bless -device /dev/disk1s1 -setBoot -verbose

## replace out 1s1 with your disk# and partition #
## note this entry is NOT a raw disk
## mount device
diskutil mount /dev/disk1s1 

## remove quotes if you do not have space
## Bless the mount
sudo /Applications/Clonetool/sbin/bless -mount "/Volumes/volume name" -setBoot -verbose

 

This should install boot1h and boot correctly from the Terminal.

 

gt

Link to comment
Share on other sites

Thanks! Some questions:

 

1. The only places I've ever seen the boot and boot1h files is on the install DVD's. When I look at "/usr/standalone/i386" on my installations, I only see boot.efi. So, unless doing this from an install DVD or specifically copying the boot files over, how does Clonetool get access to the files?

 

2. Does "dd" need to be performed as "sudo"?

 

3. Have you ever looked at the source for "startupfiletool" to see what it does? Seems it might be doing the same as "dd".

 

4. When I read "man bless", it seems to me that "bless...--setboot" just sets the partition active and that doing it by pointing to the "device" or pointing to the "mount" are just 2 of the 3 ways of accomplishing the same thing. Did you find that bless does something else?

Link to comment
Share on other sites

Guest goodtime
Thanks! Some questions:

 

1. The only places I've ever seen the boot and boot1h files is on the install DVD's. When I look at "/usr/standalone/i386" on my installations, I only see boot.efi. So, unless doing this from an install DVD or specifically copying the boot files over, how does Clonetool get access to the files?

 

Good question. Clonetool installs boot1h and boot along with the other darwinbootloader files to the /usr/standalone/i386 on the users original startup disk. The Mediakit.framework that Clonetool also installs uses these bootloader files in this location. Currently the Mediakit only functions in 10.4.8/8.8.1 kernel.

 

2. Does "dd" need to be performed as "sudo"?

 

To my knowledge, no. (see example and output text at end of this post).

 

3. Have you ever looked at the source for "startupfiletool" to see what it does? Seems it might be doing the same as "dd".

I found the startuptool was used in the Darwin Install CD. I haven't dived into exactly what it does. In this example it is used for the 2nd stage boot loader only. The Darwin Install CD rc.cdrom script uses it in the same fashion. If you do not have the startupfiletool on your system and you have Clonetool installed, It can be found in: /Applications/Clonetool/sbin/startupfiletool

 

 

4. When I read "man bless", it seems to me that "bless...--setboot" just sets the partition active and that doing it by pointing to the "device" or pointing to the "mount" are just 2 of the 3 ways of accomplishing the same thing. Did you find that bless does something else?

 

You are correct, in order for boot1h and boot to load, the partition needs to be active. I like to use device set the partition to be active. Mount simply verifies if it is active. A simple way to double check it. Clonetool and the Darwin Install script rc.cdrom both do this. Clonetool uses the -verbose option which I use to troubleshoot problems. If /dev/diskXsY does not co-relate to the /Volumes/MacOSXtarget, the problem will show up in the -verbose output.

 

Bless can install the boot1h file as well, but I did not use it in this example.

 

Below is some text captured from this bootloader procedure:

 

Last login: Fri Nov 24 19:04:04 on console
Welcome to Darwin!

goodtimes-computer-2:~ gtdv$ diskutil list
/dev/disk0
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*74.5 GB  disk0
  1:		   Windows_NTFS Untitled		   74.5 GB   disk0s1
/dev/disk1
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*232.9 GB disk1
  1:			  Apple_HFS Stormtrooper	   232.9 GB  disk1s1
/dev/disk2
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*232.9 GB disk2
  1:			  Apple_HFS DarthVader		 116.4 GB  disk2s1
  2:			  Apple_HFS Untitled 2		 116.4 GB  disk2s2
/dev/disk4
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*111.8 GB disk4
  1:			  Apple_HFS PC_Share		   55.9 GB   disk4s1
  2:			  Apple_HFS Mac_Share		  55.9 GB   disk4s2
/dev/disk5
  #:				   type name			   size	  identifier
  0: Apple_partition_scheme					*18.7 MB  disk5
  1:	Apple_partition_map					31.5 KB   disk5s1
  2:			  Apple_HFS clonetool		  18.6 MB   disk5s2
/dev/disk6
  #:				   type name			   size	  identifier
  0: Apple_partition_scheme					*18.7 MB  disk6
  1:	Apple_partition_map					31.5 KB   disk6s1
  2:			  Apple_HFS clonetool		  18.6 MB   disk6s2
/dev/disk7
  #:				   type name			   size	  identifier
  0: Apple_partition_scheme					*18.7 MB  disk7
  1:	Apple_partition_map					31.5 KB   disk7s1
  2:			  Apple_HFS clonetool		  18.6 MB   disk7s2
/dev/disk8
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*232.9 GB disk8
  1:			  Apple_HFS Untitled 1		 77.6 GB   disk8s1
  2:			  Apple_HFS Untitled 2		 77.6 GB   disk8s2
  3:			  Apple_HFS Untitled 3		 77.6 GB   disk8s3

goodtimes-computer-2:~ gtdv$ diskutil unmount "/Volumes/Untitled 1"
Volume /Volumes/Untitled 1 unmounted

goodtimes-computer-2:~ gtdv$ dd if=/usr/standalone/i386/boot1h of=/dev/rdisk8s1 bs=512 count=1
1+0 records in
1+0 records out
512 bytes transferred in 0.011769 secs (43504 bytes/sec)

goodtimes-computer-2:~ gtdv$ /Applications/Clonetool/sbin/startupfiletool /dev/rdisk8s1 /usr/standalone/i386/boot
HFS+ filesystem detected
Looking for 1 words free
reading 4096,4096
Marking word 340
writing back 4096,4096
allocated blocks 32 at start 10880

goodtimes-computer-2:~ gtdv$ sudo /Applications/Clonetool/sbin/bless -device /dev/disk8s1 -setBoot -verbose
Password:
Device IS NOT whole
Apple_HFS partition. No external loader
IODeviceTree:/openprom not present in IORegistry. OpenFirmware not present
Partition map is MBR
Opening whole device /dev/disk8
MBR changed: YES
/dev/disk8s1 set as active boot partition

goodtimes-computer-2:~ gtdv$ diskutil mount /dev/disk8s1 
Volume /dev/disk8s1 mounted
goodtimes-computer-2:~ gtdv$ sudo /Applications/Clonetool/sbin/bless -mount "/Volumes/Untitled 1" -setBoot -verbose
Mount point for /Volumes/Untitled 1 is /Volumes/Untitled 1
Mount point is '/Volumes/Untitled 1'
No BootX creation requested
Device IS NOT whole
Apple_HFS partition. No external loader
IODeviceTree:/openprom not present in IORegistry. OpenFirmware not present
Partition map is MBR
Opening whole device /dev/disk8
MBR changed: NO
/dev/disk8s1 set as active boot partition

goodtimes-computer-2:~ gtdv$

Link to comment
Share on other sites

The other thing that strikes me is that when diskutil erases a partition, it performs the same kind of operations. It must have access to the boot files somewhere and a way to install them that may involve "dd" but doesn't involve startupfiletool.

 

BTW: source for startupfiletool - http://www.opensource.apple.com/darwinsour...artupfiletool.c

Link to comment
Share on other sites

The first choice, it asks for your destination drive #:

 

Enter:

1

 

The second choice for the partition enter:

 

Next set of choices Enter:

/dev/disk0s3

 

Thanks,

 

gt

 

 

/dev/disk0

#: type name size identifier

0: FDisk_partition_scheme *76.3 GB disk0

1: Windows_NTFS Windows 39.1 GB disk0s1

2: Apple_HFS disk0s2 10.0 GB disk0s2

3: Apple_HFS osx 27.3 GB disk0s3

 

In my case 1 would overwrite my NTFS partition right? I want to put use 3 as my destination drive. Regardless no matter what number I enter it just asks the same question again.

 

Does clonetool output an error log?

 

Also, can I continue using a boot loader other than darwin ? - using acronis now.

 

Thanks!

Link to comment
Share on other sites

Guest goodtime
/dev/disk0

#: type name size identifier

0: FDisk_partition_scheme *76.3 GB disk0

1: Windows_NTFS Windows 39.1 GB disk0s1

2: Apple_HFS disk0s2 10.0 GB disk0s2

3: Apple_HFS osx 27.3 GB disk0s3

 

In my case 1 would overwrite my NTFS partition right? I want to put use 3 as my destination drive. Regardless no matter what number I enter it just asks the same question again.

 

Does clonetool output an error log?

 

Also, can I continue using a boot loader other than darwin ? - using acronis now.

 

Thanks!

 

Clonetool 1st lists all the disks and partitions to show you want is on your machine. This is just an overall disk listing; it's for reference only just incase a use needs to know which volume co-relates to which disk slice identifier.

 

Read below that where it says, "The following devices are available:" Underneath that line are your choices for the disk. If you only have 1 disk and it will only list 1 disk, so you must enter: 1, otherwise it will keep asking you over and over again until you type in a valid answer of: 1

 

Then it will list the partitions in the /dev/disk1s3 format (disk slices).

 

Example: Enter "/dev/disk1s3" for the third partition on disk one.

 

Again, if you don't get the format correct, it will just keep asking until it receives a valid answer to the question.

 

See Example below:

 

THIS INFO IS FOR REFERENCE ONLY. You might just want to ingore this info for now.

Last login: Sat Nov 25 22:51:23 on ttyp1
Welcome to Darwin!
goodtimes-computer-2:~ gtdv$ sudo /Applications/Clonetool/clonetool
Password:

OSx86 HD Clonetool v.03.1a
by Goodtime

/dev/disk0
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*74.5 GB  disk0
  1:		   Windows_NTFS Untitled		   74.5 GB   disk0s1
/dev/disk1
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*232.9 GB disk1
  1:			  Apple_HFS Stormtrooper	   232.9 GB  disk1s1
/dev/disk2
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*232.9 GB disk2
  1:			  Apple_HFS DarthVader		 116.4 GB  disk2s1
  2:			  Apple_HFS Untitled 2		 116.4 GB  disk2s2
/dev/disk3
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*111.8 GB disk3
  1:			  Apple_HFS PC_Share		   55.9 GB   disk3s1
  2:			  Apple_HFS Mac_Share		  55.9 GB   disk3s2
/dev/disk4
  #:				   type name			   size	  identifier
  0: FDisk_partition_scheme					*232.9 GB disk4
  1:			  Apple_HFS 1048			   40.0 GB   disk4s1
  2:			  Apple_HFS Untitled 2		 40.0 GB   disk4s2
  3:			  Apple_HFS Untitled 3		 40.0 GB   disk4s3
  4:			  Apple_HFS Untitled 4		 112.9 GB  disk4s5

 

THIS PART IS WHERE YOU NEED TO PAY CLOSE ATTENTION and the multiple choice info is in here:

Tip:
If you need to boot directly from the clone,
you should pick a drive that is NOT physically
connected to your current startup disk, like
a separate Hard drive or USB 2.0 drive. -gt

The following devices are available:

1. WDC WD12 00JB-00FUA0 @ disk3 (111.8 GB)
2. WDC WD2500JB-00EVA0 @ disk4 (232.9 GB)
3. WDC WD2500SD-01KCB0 @ disk2 (232.9 GB)
4. WDC WD2500JS-00MHB0 @ disk1 (232.9 GB)
5. ST3808110AS @ disk0 (74.5 GB)
Select the destination drive # for the clone.
> 2

The following partitions are available:
/dev/disk4s1
/dev/disk4s2
/dev/disk4s3
/dev/disk4s5

Enter the destination partition's name from the above list:
Format: /dev/diskXsY
> /dev/disk4s3

Using: 
/dev/disk4s3 as the cloned partition.

***WARNING***
Answering 'y' here will erase all data on /dev/disk4s3.
Answering 'n' will stop & exit Clonetool.
Erase the entire partition /dev/disk4s3 [y/n]: y
Desired Volumename: OSx86
Creating new HFS+ Filesystem on /dev/disk4s3 using OSx86.
Started erase on disk disk4s3 Untitled 3

Erasing

Mounting Disk

Finished erase on disk disk4s3 OSx86

===Boot Partition===
Answering 'y' will activate this boot partition.
Answering 'n' will NOT boot from this partition.

Tip:
If you are cloning to a partition that is
physically part of the startupdisk pick 'n'.
If you are cloning to a separate drive like
a USB 2.0 drive, you should answer 'y'. -gt

Set OSx86 as the Active partition? [y/n]: y

The Clone is being born, please wait...

 

Yes, you can use your Acronis boot loader. When Clonetool asks if you want the /dev/disk1s3 to be active?: answer 'n' and it will not affect your bootloader on your MBR.

 

This unix style interface will be simplied once a GUI has been created for Clonetool. I know it seems confusing at first. Once you get it, it is pretty simple. Nonetheless, it will be fixed once I get around to the GUI version. I am going to take some care when making a GUI as user friendly as possible. It will be more flexible too as you will be able to choose which is the source partition and which is the destination and it will all be by volume name, not by disk numbers and slices.

 

gt

Link to comment
Share on other sites

Suggestions based on above exchange:

 

- don't do the diskutil list at the beginning

- after user selects disk, do a "diskutil list <device>" where device is what user selected

- instead of having user type "/dev/disk1s2", instead, from the diskutil list <device>, let user choose partition number displayed in left column

Link to comment
Share on other sites

Guest goodtime
The other thing that strikes me is that when diskutil erases a partition, it performs the same kind of operations. It must have access to the boot files somewhere and a way to install them that may involve "dd" but doesn't involve startupfiletool.

 

BTW: source for startupfiletool - http://www.opensource.apple.com/darwinsour...artupfiletool.c

 

True, diskutil does perform similiar boot loader operations using the Media kit. Unfortunately with the 10.4.4 kernel, the mediakit for diskutil is broken. In 10.4.8 (8.8.1 kernel) diskutil / the media kit works flawlessly. This is why I am trying to avoid using dd, fdisk, startupfile tool , etc.

 

If you want to know where the mediakit gets it bootloader info from. Install Clonetool. Then look inside:

 

/System/Library/PrivateFrameworks/MediaKit.framework/Versions/A/Resources/MKDrivers.bundle/Contents/Resources/inventory.plist

 

You'll find where diskutil via the mediakit is getting it bootloader info locations from.

 

portion of inventory.plist from the Mediakit.framework that Clonetool installs:

(even though this media kit is from around the 10.4.4 era, it currently only functions correctly in 10.4.8/8.8.1/SSE3) SSE2 soon!

	<key>Loaders</key>
<dict>
	<key>MBR BOOT 0</key>
	<dict>
		<key>Loader Path</key>
		<string>/usr/standalone/i386/boot0</string>
	</dict>
	<key>PBR HFS BOOT 1</key>
	<dict>
		<key>Loader Path</key>
		<string>/usr/standalone/i386/boot1h</string>
	</dict>
	<key>PBR HFS BOOT 2</key>
	<dict>
		<key>Loader Path</key>
		<string>/usr/standalone/i386/boot</string>
		<key>Major Vers</key>
		<integer>1</integer>
		<key>Minor Vers</key>
		<integer>0</integer>
	</dict>
	<key>PBR UFS BOOT 1</key>
	<dict>
		<key>Loader Path</key>
		<string>/usr/standalone/i386/boot1u</string>
	</dict>
	<key>boot</key>
	<dict>
		<key>Checksum</key>
		<integer>-1451063644</integer>
		<key>Loader Present</key>
		<true/>
		<key>Major Vers</key>
		<integer>1</integer>
		<key>Minor Vers</key>
		<integer>0</integer>
		<key>Partition Name</key>
		<string>eXternal booter</string>
		<key>Partition Processor</key>
		<string>powerpc</string>
		<key>Partition Signature</key>
		<string>BOOT</string>
		<key>Partition Size</key>
		<integer>17408</integer>
		<key>Partition Type</key>
		<string>Apple_Boot</string>
		<key>Partition Type Throw Aways</key>
		<array>
			<string>Apple_Loader</string>
		</array>
		<key>Post Action Code</key>
		<integer>0</integer>
	</dict>
	<key>bootspace</key>
	<dict>
		<key>Loader Present</key>
		<false/>
		<key>Minimum Host Size</key>
		<integer>2097152</integer>
		<key>Partition Name</key>
		<string>Reserved Bootspace</string>
		<key>Partition Signature</key>
		<string>BOOT</string>
		<key>Partition Size</key>
		<integer>262144</integer>
		<key>Partition Type</key>
		<string>Apple_Free</string>
	</dict>
	<key>efi</key>
	<dict>
		<key>Checksum</key>
		<integer>1188953457</integer>
		<key>Minimum Host Size</key>
		<integer>4194304</integer>
		<key>Partition Name</key>
		<string>EFI System Partition</string>
		<key>Partition Size</key>
		<integer>409600</integer>
		<key>Partition Type</key>
		<string>EFI</string>
	</dict>
	<key>miniboot</key>
	<dict>
		<key>Checksum</key>
		<integer>649234272</integer>
		<key>Loader Name</key>
		<string>mini</string>
		<key>Loader Present</key>
		<true/>
		<key>Major Vers</key>
		<integer>1</integer>
		<key>Minor Vers</key>
		<integer>0</integer>
		<key>Partition Name</key>
		<string>eXternal booter</string>
		<key>Partition Processor</key>
		<string>powerpc</string>
		<key>Partition Signature</key>
		<string>BOOT</string>
		<key>Partition Size</key>
		<integer>1032</integer>
		<key>Partition Type</key>
		<string>Apple_Boot</string>
		<key>Post Action Code</key>
		<integer>0</integer>
	</dict>
	<key>raidboot</key>
	<dict>
		<key>Checksum</key>
		<integer>-1451063644</integer>
		<key>Loader Name</key>
		<string>boot</string>
		<key>Loader Present</key>
		<true/>
		<key>Major Vers</key>
		<integer>1</integer>
		<key>Minor Vers</key>
		<integer>0</integer>
		<key>Partition Name</key>
		<string>eXternal booter</string>
		<key>Partition Processor</key>
		<string>powerpc</string>
		<key>Partition Signature</key>
		<string>BOOT</string>
		<key>Partition Size</key>
		<integer>262144</integer>
		<key>Partition Type</key>
		<string>Apple_Boot</string>
		<key>Post Action Code</key>
		<integer>0</integer>
	</dict>
	<key>uniboot</key>
	<dict>
		<key>Checksum</key>
		<integer>-1451063644</integer>
		<key>Loader Name</key>
		<string>boot</string>
		<key>Loader Present</key>
		<true/>
		<key>Major Vers</key>
		<integer>1</integer>
		<key>Minimum Host Size</key>
		<integer>2097152</integer>
		<key>Minor Vers</key>
		<integer>0</integer>
		<key>Partition Name</key>
		<string>eXternal booter</string>
		<key>Partition Processor</key>
		<string>powerpc</string>
		<key>Partition Signature</key>
		<string>BOOT</string>
		<key>Partition Size</key>
		<integer>262144</integer>
		<key>Partition Type</key>
		<string>Apple_Boot</string>
		<key>Post Action Code</key>
		<integer>0</integer>

 

 

Note the newer mediakit that 10.4.8 installs has all the MBR stuff that we need removed. Hence is why you only have boot.efi in your /usr/standalone/i386 folder by default. Clonetool installs the missing bootloaders and the mediakit that goes with it. After further examination, the mediakit has information to install MBR, EFI and PowerPC bootloaders.

 

What would really be cool if we could figure out how to invoke these boot loader functions that is in the media kit without erasing a disk, and for SSE2 computers where it fails to co-operate with diskutil.

 

I got this framework from JaS install DVD. I don't know if Mediakit.framework exists in OpenDarwin or if its source code is available.

Link to comment
Share on other sites

Guest goodtime
Suggestions based on above exchange:

 

- don't do the diskutil list at the beginning

- after user selects disk, do a "diskutil list <device>" where device is what user selected

- instead of having user type "/dev/disk1s2", instead, from the diskutil list <device>, let user choose partition number displayed in left column

 

Great idea. This will be in the next release .04a. That would make more sense.

 

Thanks for the suggestion; adding it to my to do list.

 

gt

Link to comment
Share on other sites

True, diskutil does perform similiar boot loader operations using the Media kit. Unfortunately with the 10.4.4 kernel, the mediakit for diskutil is broken. In 10.4.8 (8.8.1 kernel) diskutil / the media kit works flawlessly.

The 10.4.6 and 10.4.7 JaS install DVD's boot with 10.4.4 and use the 8.4.1 kernel and somehow diskutil on the DVD gets the job done. But the boot files are also included at /usr/standalone/i386/ on the DVD.

 

Note the newer mediakit that 10.4.8 installs has all the MBR stuff that we need removed. Hence is why you only have boot.efi in your /usr/standalone/i386 folder by default.

I have installed JaS 10.4.6, 10.4.7 (old kernel) and 10.4.8 (old and new kernels) and have NEVER had the boot files in /usr/standalone/i386/. I have been looking for them for a long time.

 

Yet, I have never had a problem partitioning/formatting with Disk Utility on the install DVD's (with boot files in /usr/standalone/i386/), nor have I had any problems with the Disk Utility that gets installed, even without the boot files in my installed /usr/standalone/i386/ directory.

 

So, again, 10.4.6 and 10.4.7 with old kernel and no boot files in /usr/standalone/i386/ and yet Disk Utility gets the job done.

 

Either media kit is working or some other magic that I have yet to understand.

 

 

Edit: here is the /usr/standalone/i386 from my 10.4.6 archive:

Intel:/usr/standalone/i386 rammjet$ ll
total 264
dr-xr-xr-x   3 root  wheel	 102 Jul  1 20:41 .
drwxr-xr-x   4 root  wheel	 136 Feb  8  2006 ..
-r-xr-xr-x   1 root  wheel  134302 Feb 10  2006 boot.efi
Intel:/usr/standalone/i386 rammjet$

Link to comment
Share on other sites

Clonetool 1st lists all the disks and partitions to show you want is on your machine. This is just an overall disk listing; it's for reference only just incase a use needs to know which volume co-relates to which disk slice identifier.

 

Read below that where it says, "The following devices are available:" Underneath that line are your choices for the disk. If you only have 1 disk and it will only list 1 disk, so you must enter: 1, otherwise it will keep asking you over and over again until you type in a valid answer of: 1

 

Then it will list the partitions in the /dev/disk1s3 format (disk slices).

 

Example: Enter "/dev/disk1s3" for the third partition on disk one.

 

Again, if you don't get the format correct, it will just keep asking until it receives a valid answer to the question.

 

Very helpful information, clears things up. I tried this following your instructions but ended up having my vurrent 10 gb partition filled to absolute capacity and nothing was copied over to the destination partition that i specified.

 

i entered 1 for drive, then /dev/disk0s3 - this is an empty hfs extended partition - 27 GB

 

i entered OSX for the desired volume name and answered NO to making the partition active..

 

DD went on for a while with lots of no space left messages and then the app ended.

 

now i have my current osx install partition filled to capacity and I don't know where the new data has been written to - any ideas on how to clean this up?

 

now i am REALLY out of space on this partition.

 

Thanks

Link to comment
Share on other sites

just searched my system log for "clone" and it looks like clonetool made a hidden folder?

 

TTY=ttyp2 ; PWD=/Volumes/OSX ; USER=root ; COMMAND=/Applications/Clonetool/sbin/SetHidden /Volumes/OSX /Applications/Clonetool/sbin/hideme

 

I have looked for any new files and cannot find them - how to remove hidden files that clonetool made and did not clean up?

Link to comment
Share on other sites

Guest goodtime
I have looked for any new files and cannot find them - how to remove hidden files that clonetool made and did not clean up?

 

Did you give your destination volume a unique name? You cannot give it the same volume name as your source partition's volume name.

 

It looks like your files may have been written to the folder /Volumes

 

try this in the terminal

 

open /Volumes

remove any folders there

 

also remove hidden folders using

cd /Volumes

ls -al

sudo rm -R /path_to_folder

## do not do command to a real volume, otherwise it will erase the volume.

 

gt

 

The 10.4.6 and 10.4.7 JaS install DVD's boot with 10.4.4 and use the 8.4.1 kernel and somehow diskutil on the DVD gets the job done. But the boot files are also included at /usr/standalone/i386/ on the DVD.

I have installed JaS 10.4.6, 10.4.7 (old kernel) and 10.4.8 (old and new kernels) and have NEVER had the boot files in /usr/standalone/i386/. I have been looking for them for a long time.

 

Yet, I have never had a problem partitioning/formatting with Disk Utility on the install DVD's (with boot files in /usr/standalone/i386/), nor have I had any problems with the Disk Utility that gets installed, even without the boot files in my installed /usr/standalone/i386/ directory.

 

So, again, 10.4.6 and 10.4.7 with old kernel and no boot files in /usr/standalone/i386/ and yet Disk Utility gets the job done.

 

Either media kit is working or some other magic that I have yet to understand.

Edit: here is the /usr/standalone/i386 from my 10.4.6 archive:

Intel:/usr/standalone/i386 rammjet$ ll
total 264
dr-xr-xr-x   3 root  wheel	 102 Jul  1 20:41 .
drwxr-xr-x   4 root  wheel	 136 Feb  8  2006 ..
-r-xr-xr-x   1 root  wheel  134302 Feb 10  2006 boot.efi
Intel:/usr/standalone/i386 rammjet$

 

 

Rammjet,

 

I believe, Disk Utility in 10.4.3-10.4.6 booted from the DVD works when initializing/repartitioning the entire hard drive, the media kit does it's job then.

 

Booted from a 10.4.3 or 10.4.6 JaS DVD, try this from the terminal to partitioned hard disk and try erasing one of the volumes.

 

diskutil eraseVolume HFS+ test /Volumes/volumename

bless -mount /Volumes/volumename -setBoot

 

You will receive a "volume is already bootable, not making it bootable again." Then try to boot from that drive. The boot loader won't be there. The mediakit fails to reinstall boot1h and boot.

 

This behavior works correctly from the 10.4.8 (8.8.1 kernel) it will reinstall the boot1 and boot1h files every time, no matter how many times the individual partitons is erased using Disk Utility or diskutil.

 

The mediakit with the 8.8.1 kernel does it's magic correctly, everytime. The mediakit with the 8.4.1 kernel does not behave the same way.

 

gt

Link to comment
Share on other sites

It looks like your files got written to a folder /Volumes

Looks like it is writing to /Volumes/OSX / <--- notice the space.

 

Probably has a partition named something like "OSX New"

 

He has a space in the name of his partition and it either needs to be escaped it or put it in quotes.

Link to comment
Share on other sites

Guest goodtime
Looks like it is writing to /Volumes/OSX / <--- notice the space.

 

Probably has a partition named something like "OSX New"

 

He has a space in the name of his partition and it either needs to be escaped it or put it in quotes.

 

Clonetool should handle spaces. The script puts the "$vol_name" variable in quotes, but I recommend avoiding them to be safe.

 

In the future, For troubleshooting, try to save the output text to a text file from from Terminal after clonetool is finished. File ->save text as.

 

This way you can post the results here or send the file to me to help troubleshoot what exactly happened. It will tell me what version of CT your are running, what clonetool did, etc.

 

Thank you,

 

gt

Link to comment
Share on other sites

Look, I'm not trying to start an argument nor am I replying in anger to any of your replies. I thank you for them. But I have been pondering the following for quite a while and am still not clear on the answers. And, I'm not expecting you to come up with all of the answers, but in debating some of your findings, maybe I will get to the answers I seek. If you remember, I made the 2nd post to this thread with some information that may or may not have helped. The existence of the MediaKit is new to me and I thank you for pointing it out.

 

My observation is that:

- with 10.4.6, 10.4.7 and old kernel installed from the JaS DVD's, Disk Utility can successfully install the boot files to the MBR and partition

- there are no Darwin boot files in /usr/standalone/i386

- Q: where does Disk Utility/diskutil get the boot files it installs? They are very small and could be embedded in some file or app somewhere. But why? Apple doesn't need a Darwin bootloader on a real Mac.

- Q: what method(s)/utilities does Disk Utility/diskutil use to install the boot files? It has Fdisk and "dd" and "bless" available to use. But it doesn't have the famous "startupfiletool" although the code could be embedded somewhere. Or, all of the copying code could be embedded somewhere. So, what does the diskutil binary executable call to accomplish installing the boot files and where do they come from?

- same with 10.4.8 and new kernel. Except there are a lot of people who have reported ending up with the dreaded "white blinking cursor on black background" after using Disk Utility from 10.4.8. That is one reason I was also looking for a manual way to reinstall the boot files.

- Disk Utility can install the boot files without unmounting the whole disk. It does have to unmount the target partition. But it can accomplish the boot file and bootloader installation while booted to another partition on the same hard drive.

I believe, Disk Utility in 10.4.3-10.4.6 booted from the DVD works your initalized the entire disk, the media kit does it's job there. Or one of the installers invokes the Mediakit to install the appropriate boot and boot1h files.

To the best of my knowledge, all of the 10.4.4 - 10.4.8 install DVD's use Disk Utility from 10.4.4. The first JaS 10.4.8 install DVD, which was corrupted and pulled, used the 10.4.8 Disk Utility. People using it to create new partitions had trouble. People using it to erase and set up a fresh partition created by another utility had no problems. I erased an existing partition using it and it worked fine afterward. The people with the problems (new partitioning) ended up with the white blinking cursor/black background situation.

 

The installers do not invoke Media.kit nor install any boot files. You can examine the installer packages using Pacifist. All of them use Apple's Installer.app. While not impossible for them to do, the installer packages primarily uncompress files in pax archives to the correct directories on the target partition. They often contain some shell scripts to remove or backup some files or to invoke permissions repair and prebinding. But the installers are dumb and contain no sophisticated code for installing boot files to the hard drive MBR and partition. (Edit - otherwise, I would be "borrowing" it)

 

From your boot DVD, try this from the terminal:

 

diskutil eraseVolume test /Volumes/volumename

 

You will receive a "volume is already bootable, not making it bootable again." Then the boot1h and boot information gets removed from the volume! The mediakit fails to run.

 

This behavior works correctly from the 10.4.8 (8.8.1 kernel) it will reinstall the boot1 and boot1h files every time, no matter how many times the individual partitons is erased using Disk Utility.

 

I spent many hours working with bootloaders and the mediakit with the 8.8.1 kernel does it's magic correctly.

I will try it out soon. But since the beginning of my OSx86 involvement, I have used the Disk Utility on the 10.4.6 thru 10.4.8 install DVD's which use the 10.4.4 Disk Utility version. I have essentially used the GUI to erase my partitions (ie /Volumes/volumename). And it has worked beautifully. I have never had an MBR or bootloader problem. And I have never found the boot files in my /usr/standalone/i386 directory.

 

However, I have no doubt such a bug exists when erasing the entire disk (eraseDisk). I've seen too many people with problems after doing that. Just another reason that I suggest to people who want to install OSX as the only thing on a hard drive that they should first format the entire hard drive as FAT32 using a separate Windows/Linux utility. Then, during installation, select the primary partition (displayed below the hard drive in Disk Utility) and erase that partition to format it as HFS+.

 

 

PS - where did you find the app SetHidden? I have had to use the Apple utility SetFile.

Link to comment
Share on other sites

I have looked for any new files and cannot find them - how to remove hidden files that clonetool made and did not clean up?

The hidden file is goodness. It is not dangerous and helps to make everything nice and neat.

 

Open Terminal:

cd "/Volumes/(name-of-new-OSX-partition)"   (use quotes if partition name has spaces)
ls -al

Link to comment
Share on other sites

Did you give your destination volume a unique name? You cannot give it the same volume name as your source partition's volume name.

 

It looks like your files may have been written to the folder /Volumes

 

try this in the terminal

 

open /Volumes

remove any folders there

 

also remove hidden folders using

cd /Volumes

ls -al

sudo rm -R /path_to_folder

## do not do command to a real volume, otherwise it will erase the volume.

 

i did not give it the same name.. thanks for the tips on how to clean this up - space recovered. i just tried again and the same thing happened. the output from terminal is below.

 

 

 

Last login: Sun Nov 26 23:23:38 on ttyp1

Welcome to Darwin!

ants-computer:~ anthony$ sudo /Applications/Clonetool/clonetool

Password:

 

OSx86 HD Clonetool v.03a

by Goodtime

 

/dev/disk0

#: type name size identifier

0: FDisk_partition_scheme *76.3 GB disk0

1: Windows_NTFS Windows 39.1 GB disk0s1

2: Apple_HFS disk0s2 10.0 GB disk0s2

3: Apple_HFS clone 27.3 GB disk0s3

 

Tip:

If you need to boot directly from the clone,

you should pick a drive that is NOT physically

connected to your current startup disk, like

a separate Hard drive or USB 2.0 drive. -gt

 

The following devices are available:

 

1. Maxtor 6V080E0 @ disk0 (76.3 GB)

Select the destination drive # for the clone.

> 1

 

The following partitions are available:

/dev/disk0s1

/dev/disk0s2

/dev/disk0s3

 

Enter the destination partition's name from the above list:

Format: /dev/diskXsY

> /dev/disk0s3

 

Using:

/dev/disk0s3 as the cloned partition.

 

***WARNING***

Answering 'y' here will erase all data on /dev/disk0s3.

Answering 'n' will stop & exit Clonetool.

Erase the entire partition /dev/disk0s3 [y/n]: y

Desired Volumename: part3

Creating new HFS+ Filesystem on /dev/disk0s3 using part3.

Started erase on disk disk0s3 clone

 

Erasing

 

Mounting Disk

 

Finished erase on disk disk0s3 part3

Could not unmount disk for making it bootable

 

===Boot Partition===

Answering 'y' will activate this boot partition.

Answering 'n' will NOT boot from this partition.

 

Tip:

If you are cloning to a partition that is

physically part of the startupdisk pick 'n'.

If you are cloning to a separate drive like

a USB 2.0 drive, you should answer 'y'. -gt

 

Set part3 as the Active partition? [y/n]: n

 

The Clone is being born, please wait...

 

Started verify/repair permissions on disk disk0s2 disk0s2

Determining correct file permissions.

parent directory ./Users/Shared/SC Info does not exist

 

Fixing owners on 'part3'

vsdbutil: Couldn't get volume information for '/Volumes/part3': No such file or directory

vsdbutil: no valid volume UUID found on '/Volumes/part3': No such file or directory

Update Prebinding on Source.

 

Copying /Applications

ditto: /Volumes/part3/Applications/Microsoft Office 2004/Office/Wizard Templates/Newsletters/Blocks: No space left on device

ditto: /Volumes/part3/Applications/Microsoft Office 2004/Office/Wizard Templates/Newsletters/Corners: No space left on device

ditto: /Volumes/part3/Applications/Microsoft Office 2004/Office/Wizard Templates/Newsletters/Dots: No space left on device

ditto: /Volumes/part3/Applications/Microsoft Office 2004/Office/Wizard Templates/Newsletters/Elegant: No space left on device

ditto: /Volumes/part3/Applications/Microsoft Office 2004/Office/Wizard Templates/Newsletters/Forms: No space left on device

ditto: /Volumes/part3/Applications/Microsoft Office 2004/Office/Wizard Templates/Newsletters/Marquee: No space left on device

ditto: /Volumes/part3/Applications/Microsoft Office 2004/Office/Wizard Templates/Newsletters/Rocket: No space left on device

 

Then it goes on like the above for a very long time... space on drive goes to zero..

 

any ideas?

Link to comment
Share on other sites

Guest goodtime
- Q: where does Disk Utility/diskutil get the boot files it installs? They are very small and could be embedded in some file or app somewhere. But why? Apple doesn't need a Darwin bootloader on a real Mac.

- Q: what method(s)/utilities does Disk Utility/diskutil use to install the boot files? It has Fdisk and "dd" and "bless" available to use. But it doesn't have the famous "startupfiletool" although the code could be embedded somewhere. Or, all of the copying code could be embedded somewhere. So, what does the diskutil binary executable call to accomplish installing the boot files and where do they come from?

 

I stumbled across the mediakit.framework when doing a text search on the entire JaS Release 2 10.4.8 DVD for "boot1h". The only text reference for "boot1h" is in the inventory.plist which is buried inside the Media kit's framework bundle. I too was looking for some magic code that installs the bootloader manually, and discovered the mediakit thing purely by accident. As far as I can tell, the disk utility and the mediakit work together and only seem to always co-operate on a 8.8.1 kernel system. Something in the 8.8.1 kernel is new and this allows the Disk Utility/diskutil and the Mediakit.framework to work together better.

 

I don't have the Release 1 DVD from JaS anymore, but I suspect it had the newer 10.4.8 mediakit, which has all the MBR stuff stripped out of it in favor of EFI. Apple did this for a good reason. To fix it, by installing the mediakit and the bootloaders to their proper locations from 10.4.4 (this is what the JaS R2, 10.4.8 DVD has) it allows diskutil and disk utility, no matter which version to install the bootloader files from the /usr/standalone/i386 location. My findings are: 8.8.1 kernel + Disk Utility + mediakit.framework from 10.4.4 + /usr/standalone/i386 bootloaders (boot1h, boot and boot0) = magic

 

I wish I understood it more. I am more of a hacker that learns by testing, troubleshooting, trial and error and a good gut feeling of what is on the other side of the fence. I not a good researcher, I wish I knew more about this new finding of the Mediakit. Without it, Clonetool on a 10.4.8 SSE3, 8.8.1 kernel, would never have been released. It was like finding Carolina gold. I use California gold, but I on the East Coast.

 

I am not trying to agrue with you either and consider this a really good debate. I have a family that is very demanding, so if my answers seem short at times, it is because I am trying to squeeze my post in before they start harping on me. Computers and family don't mix, especially during the holidays.

 

gt

Link to comment
Share on other sites

 Share

×
×
  • Create New...