Manual install of OSX

one more thing: you don t have to use pacifist. if you are doing this for a script or something, then it might be more convenient not to. you can extract Essentials.pkg thusly:

Code:
% cd /Volumes/MacHD
% zcat /Volumes/Mac\ OS\ X\ Install\ CD/System/Installation/Packages/Essentials.pkg/Contents/Resources/Essentials.pax.gz | pax -r './'

for more details, read pax (1)

as far as i know, pacifist is just a front end to the pax command. i think it may also do the update_prebinding command. for special cases like yours, we might be better off doing it with the commands, instead of pacifist, because we then have much tighter control over what is happening.
 
when using: sudo bless -folder "/Volumes/MacHD/System/Library/CoreServices" -bootinfo /Volumes/MacHD/System/Library/BootX

I get:

ERROR(bless):Error while opening /Volumes/MacHD/System/Library/BootX for reading
ERROR(bless):Could not create BootX at /Volumes/MacHD/System/Library/CoreServices/BootX
 
um.. i think i was misunderstood the man page on that bootinfo flag. i now think you had it right the first time. getting bootinfo.boot from /usr/standalone

of course, when the installer first runs from disk, it doesn t have an existing OSX installation to get this file from, so perhaps to best emulate a clean install from disk, we should use /Volumes/Mac OSXInstall Disk/usr/standalone/ppc/bootx.bootinfo

just a thouht.
 
but this brings up an important point. /usr/standalone is not found in Essentials.pkg. yet it is found in the installed system. so this directory, as well as the kernel, must be installed manually (rather than extracting for a package)

might there be more such parts of the filesystem, that are necessary for booting? i don t know. i strongly suspect that all the information is contained in preflight and postflight, but like i said, they are binary, so i can t read them. (and they are not executables either, so what are they?)
 
OK, I did the Command-V thingy...
Results:
devfs_kernel_mount: failed to find directory '/dev', 2ip6_init2 called

//blahblahblah (just keyboard ini and stuff...)

Load of /sbin/mach_init, errno 2, trying /etc/mach_init
Load of /etc/mach_init, errno 2

//here ends the log, and the computer freezes...

so, what have we learned from this...
Well, we've learned that the /dev is not in the essentials.pkg :)
AND that we have no mach_init... (btw, what does the commando "mach_init" do???)

The later I think is the most important...
What do you think?
 
Oh, and btw, here's the things that hides inside preflight and postfligt:

Preflight:

#!/bin/sh

"$1/Contents/Resources/Pusher" "$1" "$2" "$3" "$4"



Postflight:
#!/bin/sh

"$1/Contents/Resources/SetHidden" "$3" \
"$1/Contents/Resources/hidden_MacOS9"

if [ ! -e "$3/usr/local" ]
then
/bin/mkdir -m 755 "$3/usr/local"
fi

if [ -d "$3/Applications/Internet Explorer/Internet Explorer.app" ]; then
/bin/rm -f "$3/Applications/Internet Explorer/EULA.rtf"
/bin/rm -rf "$3/Applications/Internet Explorer/Internet Explorer.app"
/bin/rm -rf "$3/Applications/Internet Explorer/Documentation - Read Me"
/bin/rm "$3/Applications/Internet Explorer/.DS_Store"
/bin/rm -d "$3/Applications/Internet Explorer"
fi

#cleanup Dock Extras folder
if [ -e "$3/Applications/Dock Extras/iTunes.dock" ] ; then
/bin/rm -rf "$3/Applications/Dock Extras/iTunes.dock"
fi
/bin/rm -d "$3/Applications/Dock Extras"

# Fix default text encoding
if [ "x$CF_USER_DATA_STRING" != "x" ]; then
echo "$CF_USER_DATA_STRING" > "$3/var/root/.CFUserTextEncoding";
"$3/usr/sbin/chown" -f root.wheel "$3/var/root/.CFUserTextEncoding";
"$3/bin/chmod" -f 644 "$3/var/root/.CFUserTextEncoding";
fi

###### Fix the permissions ######

# Set permissions/owner of /
"$3/usr/bin/chgrp" admin "$3"
"$3/bin/chmod" 1775 "$3"

##
# Create or update the mkext cache, which will make subsequent
# boots slightly faster.
##

if [ "${SafeBoot}" != "-x" ]; then
rm -f "$3/System/Library/Extensions.mkext"
/usr/sbin/mkextcache -l -t `arch` -o "$3/System/Library/Extensions.mkext" \
-d "$3/System/Library/Extensions"
fi

exit 0








Can u make any statements from this?
 
you re right, init is very important. vital in fact. it is basically the first process that should run on the machine.

init is usually found at /sbin/init. i checked, that whole directory is not in Essentials. also the entire /dev/ directory is not in Essentials. /dev contains all the block and character devices, basically without that, the OS is unable to interact with any hardware. these both seem like very serious holdups. one option (that i don t really like, but it s worth a try), is to cp -r /dev and /sbin to your hard drive. i m not sure whether that will work, but we can try it.

BTW, how did you read those files? when i opened them, they were illegible binary junk...

anyway those files don t look like they do all the important stuff that we need, like getting the kernel, and /dev and /sbin and /usr/standalone. we will have to find out where the installation disk installs those files and directories.
 
OK, when I copied, sbin and dev it stopped complaining about the /dev folder (strange, as it is empty anyway like the one on the cd)
BUT it still complained about sbin, now with another error code:
Load of /sbin/mach_init, errno 88, trying /etc/mach_init
Load of /etc/mach_init, errno 2
 
OK, i m assuming that errno 2 means file not found (since that is the error we saw before when we had not installed either directory). as to what errno 88 is? i have no idea.

i ll keep looking. this is starting to look not possible.
 
i m sort of guessing about this, but i think perhaps you should make sure to do an update_prebinding after you copy those directories. update_prebinding makes applications available somehow. i think it may only be for cocoa apps, and therefore not apply to mach_init, but if i am wrong about that, then it might help.
 
I copied those other directorys... still no luck, same error at startup...
hmmm, I'll take a look at apple's developer pages, maybe they have some info om mach_init...
 
you are right, it must be possible. in fact, what we should do is look at the source code for the darwin installer. all that init and mach_init stuff is darwin related, not really OSX related. all the OSX stuff is done with Essentials, so off to apples webpage for a little browsing.

PS, its funny, those postflight preflight files are not binary. for some reason when i open them with TextEdit, i get junk, but if i just cat them from terminal.app i see that they are shell sccripts. don t know why that should be, for most other shell scripts, TextEdit works. but anyway, its not important.

i ll take a look, more later.
 
I just discovered something that might help us out in the long run...
you see, in essentials.pkg, there's no Installer.app or Disk Utility...
But these are in the Application directory on the cd instead...
so, they must be copied from the cd...
the further we go, the more files seems to be copied from the cd.
Here's my theory: Automaticly the app copies EVERYTHING from the cd before installation, THEN installs, having some files replaced and some not. THEN the installer removes some files previously installed.( like the Reset Password app and so)

The question is then, what file describes wich files to delete/modify...
 
my fear is that some of the specialty UNIX and mach files won t like just being copied over. they might have to be linked up or something like that. and we might have to change permissions. i don t know. i wish i could find a script that does the base system, but there doesn t seem to be one.

i thought i could get the answer by looking at the souce to darwin, but it seems that they don t include the source to the installer.

i don t really know where to look next.

i ll post if i get any more ideas though
 
one thing that might be worth trying: you could forget about the base install on the OSX install disk, and get the darwin install script. it actually isn t just an install script, it builds and installs darwin. it is all open source, and you could build it, and install it separately i bet. i will bet that OSX would work on top of a darwin install.

it seems like this would be a lot of work, though. it would still be much preferable to figure out how the OSX disk does it, and emulate that....
 
ghazban: you seem to be set up to not accept PMs, so i can t reply via PM.

so let me just say, that yes, darwin 1.4.1, which comes with a binary installer is quite old, maybe too old.

but you could also build a darwin installation onto the disk from CVS. then you ve got the newest one available, and a newer OSX version would be more likely to work.

however, building darwin is a pretty huge task, maybe more than you are ready for. especially considering the fact that what we want to do should be possible just with the files from the CD.

anyway, i think this is an interesting problem. i don t know if i can find an answer, but don t worry, i would like to see this one solved as well as you would, so i will keep my eyes open for an answer
 
hmmm, strange, I thought I had pm on...
Well, I will try something new today...
I'll install osx (booting from the cd) and then compare the mach_kernel on disk, with the one on the cd... Then I can see if there's any difference, and if so, I'll be able to figure out what that is...
 
I just found out something that might help a LOT...
See the "pusher" file inside the OSInstall.mpkg?
Open the terminal, and drop that file on top of it...
What do we see, well, I think we see that pusher IS the installation program...
So, how do we use it then, that's the next thing to figure out...
Sorry if you already knew this...

AND, I think this line of code:
Code:
"$1/Contents/Resources/Pusher" "$1" "$2" "$3" "$4"
in preflight calls Pusher with the arguments $1 $2 $3 $4

of wich I have figured out that $1 is the path to the OSInstall.mpkg and $3 is the path to the destinationdisk. What might then $2 and $ 4 be?
maybe paths to the other files like exceptions and something...
 
Back
Top