PDA

View Full Version : Changing the scratch disk for Finder CD/DVD burning


jkp23
10-29-2003, 02:42 PM
I have a problem I cant seem to solve here.

Do to the fact that I dont have a lot of disk real estate on my machine, when I partitioned my drives, I went for what seemed like the most econimical scheme availible.

Basically, all my 3rd party apps and User data is on a seperate partition, and my basic vanilla system is on the primary partition. That partition is sized at 5GB.

That size is absoultely fine for all my everyday use, and it never gives me a problem, EXCEPT, when I try and use the built in Finder CD/DVD burner facility.

It tries to use the primary partition as a scratch disk and of course fails. What I want to know is if anyone knows how I can tell the finder that it should cache to my other partition when burning disks?

Any ideas?

mervTormel
10-29-2003, 04:54 PM
well, if you can find where the directory of the scratch dir is, you may be able to define a symlink to an off-world partition to stand in for the dir.

i say "may" because it is unknown whether the burner will follow the symlink, or stomp it.

so, what is the full path to the scratch file?

jkp23
10-29-2003, 04:58 PM
merv:

I did think of something link that, but I have no idea where it looks to put its files. It doesnt even get as far as adding a file for me to find out where it is. It just checks the availble space and says no.

I like the line of thought tho, as its what I thought, so we're onto what seems like the only probable solution.

Anyone know where that temp file goes? I wondering if its not in the /Volumes folder, as thats what happens when you do anything disk image based (they also get cached to disk it seems).

mervTormel
10-29-2003, 05:25 PM
someone will have to take one for the team; i got nothing to burn at the moment.

this could also result in a coaster.

start your burn

drop into the shell and:

% sudo fs_usage

and look for where the many disk/hfs/hdi doohickeys are writing the temp file, hopefully in something like /tmp/$UID or /var/tmp/$UID

jkp23
10-29-2003, 05:33 PM
cool....im gonna give that a go. i have a cdrw and anough space to cope with that. lets see what happens....

will report back.

darndog
10-29-2003, 05:47 PM
Originally posted by mervTormel
% sudo fs_usage


Thanks Merv, It's cool learning new commands, after playing with it (nothing happened until I clicked on the desktop then bling! 6 pages of text...), and reading the man page, seems that:
sudo fs_usage -w Finder
(or whatever app is doing the burning) would cut down on the static a bit :), meanwhile I'm still trying to figure out what the 'cut -d/' bit does in that iTunes lsof related answer you gave the other day... dD

mervTormel
10-29-2003, 05:57 PM
beware. while running disk utility, it was observed that there are several agents doing things, so if you limit the tool via -w Something, you might miss TheOtherThing :D

once it is known what you want to observe, then you can separate the wheat from the chaff

cut -d/

use / as the field delimiter instead of TAB

see the manpages

darndog
10-29-2003, 06:44 PM
Originally posted by mervTormel

cut -d/

use / as the field delimiter instead of TAB

see the manpages

Blimey, I think it's sunk in...
So 'cut -f6-99 -d/' means keep everything from the 6th '/' to the 99th '/'. :D dD

mervTormel
10-29-2003, 06:52 PM
Originally posted by darndog
Blimey, I think it's sunk in...
So 'cut -f6-99 -d/' means keep everything from the 6th '/' to the 99th '/'. :D dD
right. because i can never remember that

-f6-

means from 6th to end :D

jkp23
10-29-2003, 09:03 PM
OK:

I have found my answer....

23:53:23 stat

/System/Library/CoreServices/Finder.app/Contents/Resources/cdr80-proxy.dmg

0.000053 Finder

So I have opened up the finder.app package and sure enough there are proxy images for every type disk. Following our logic, I would have to move the dvdr-proxy.dmg to my second bigger disk, and then symlink back into the finder app.

My thoughts are...****. Do I want to do that? I think it would prolly work, but do we think it might mess anything up? Least of all the apple updaters?

My (quick but) current thoughts on that are, that maybe I could write a simple shell script for pre and post upgrade / install situations. IE: A script that would quit the finder (as I assume I cant edit the package while it is running), make a copy and rename the orignal (as a backup) and then make the needed changes before launching the finder again. The pre-uprade script, would simply quit the finder, replace the modified finder with the old one and restart the finder. How does that sound?

Im still not sure...will await opinions before I try _anything_!

Cheers merv for the pointers.

/edit: fold -mt

jkp23
10-29-2003, 09:11 PM
ps -

there is an interesting proccess called "diskimages-h", which seems to be located in the path -

system/library/privateFrameworks/diskImages.framework.

This seems to control the whole operation. I'm not sure if i need to go that deep tho, as it seems fairly obvious to me from my experimintation with disk utitity, that apple uses disk images as the cache for all disk burning operations....

as i speak im picturing a reason why this might not work: namely, that was completely out of space earlier today, and I couldnt use toast to burn of data - for reasons i wont go into. anyway, i was playing with disk util as an alternative, and i created a blnak dvd image on my large partition, mounted it and then tried to fill it up. what happened was that it didnt just link the image with a mount point...it seemed somehow to want to copy the data to somwhere on my main partition. it said that the data was in /Volumes/blankDVDimage but that appeared to be filling up my main partition.

again, as I speak, I wonder if it was not using the DVD image i have just located in the finder.app as a cache before writing back to the actual image i was creating....if so my hack might work.

Hmmmm....the plot thickens.

mervTormel
10-29-2003, 09:17 PM
the file at

/System/Library/CoreServices/Finder.app/Contents/Resources/cdr80-proxy.dmg

is definitely not what we're looking for.

that is a template image, probably containers for particular filesystems.

we're looking for something like:

/tmp/501/CDdiskName.something


/System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/diskimages-helper

probably some interface to hdiutil

jkp23
10-29-2003, 09:29 PM
OK merv:

This seems more like it then...

private/tmp/burndiskXMBSPY

If that is the target...which it seems, how would i go about redirecting that, seeing as I can tell from my log it seems to be created on the fly...and also im guesing that the 'statfs' analysis finder makes of the 'private/tmp' directory is what tells it whether it has free space?

so...how do I redirect things...can i just symlink that dir to another drive and have all that kind of caching going on on my bigger drive?

jkp23
10-30-2003, 07:25 AM
So, just to finish this one off, I did a search to find anything on moving /private/tmp, and only found one thread about a guy with an increadibly complex paritioning scheme doing something like that, which is pointless to me as I would have to repartition!

So, what I want is either to use fstab (which I already use for other purposes) to mount a folder on the other drive to that path (can it be done? - I have only managed to get mouting using drive labels to work); or I could do some kind of symlink - would the system follow it?

If someone would share their experiences or thoughts on that I would be very grateful.

bbrkw
07-15-2004, 01:20 PM
This thread seems to be quite old already, but anyway:
I had the same problem (error message "startup disk is full" when inserting a blank DVD (only 900MB are free on my boot partition);
I made a symlink /private/tmp -> to another volume, and everything works fine since that moment. Although - and that's the strange part about it - I can't see the temporary file in the new tmp-directory.
But anyway, it works....

jkp23
07-16-2004, 03:34 AM
heh.

ok - well,i reformatted in the end since i needed to do some tweaking to my setup anyway. i'll just remember in future not to be to conservative with any space estimates!

jkp

lettertiep
09-25-2004, 04:20 PM
This thread seems to be quite old already, but anyway:
I had the same problem (error message "startup disk is full" when inserting a blank DVD (only 900MB are free on my boot partition);
I made a symlink /private/tmp -> to another volume, and everything works fine since that moment. Although - and that's the strange part about it - I can't see the temporary file in the new tmp-directory.
But anyway, it works....

:confused: same problem here,
can you (plz) explain a rookie how to do this step by step?

thnx!

darndog
09-26-2004, 11:23 AM
there is another way of getting round this, which is to use Disk Utility to create a new Disk image setting the size as DVD-R (or whatever) and saving the image to your other disk with all the space, then drag the stuff you want to copy to the disk image (should be mounted in the finder) before un-mounting the image, selecting the image from the list on the left in Disk Utility and clicking the 'Burn' icon.

This will let you burn a DVD without having enough free space on your start-up disk

Las_Vegas
09-26-2004, 12:23 PM
A utility I happen to like (A Shareware I actually paid for the first day I had it!) is TheHotFolder (http://www.kaisakura.com/thf/thehotfolder.html). This utility allows you to assign any folder from any drive as your burning target. Once TheHotFolder reports the folder is filled sufficiently, click the menubar icon, select your CD format (Mac, Windows or ISO9660) and then insert your CD or DVD blank.