overdue-scratch

Author Topic: General Noob Questions  (Read 31412 times)

0 Members and 1 Guest are viewing this topic.

kbear

  • Observer
  • Posts: 17
Re: General Noob Questions
« Reply #60 on: January 29, 2010, 06:38:00 PM »
r0m30, rocksteady and Blackosx  first of all, I appreciate all your help.  :-*

Now for the next round of stupid questions  ;)

I tried to put cdboot (instead of boot) in the root directory of my Chemeleon USB stick. As Blackosx predicted, it didn't work. (Chameleon failed to load).

Of course, the obvious solution would be to create a Chameleon bootable CDRW to start the Mac OS X retail installer, install Mac OS X on a partition, and then use the Chameleon USB stick for all the kext experiments.

The only problem is, how do I make a Chameleon bootable CDRW without using an existing Mac OS X installation? I'll have to google it (of course), but if you know of a tutorial about this, please post the link.

OK, so if you use the guide substituting the USB drive for the internal drive on your target PC you will have chameleon installed.  Then:
mkdir -p  /c/System/Library/CoreServices
touch /c/System/Library/CoreServices/SystemVersion.plist  on the USB drive
I tried this. The Mac OS X install DVD icon did not appear. I only got a new icon which represented the Chameleon USB partition. I also got an error message "failed to parse the .plist" (or something similar) which is not surprising, since I created an empty SystemVersion.plist with touch. So I copied a real SystemVersion.plist from a Leopard installation on my Mac, and got rid of the error. Still the Mac OS X install DVD icon does not appear on the Chameleon partition list.  (Needless to say, I tried F5 and F10. No joy.).

You will have a bootable USB that can mount the retail DVD once you get past the KP's.

Then it's boot, KP, google, fix ... rinse & repeat.
On the risk of sounding incredibly stupid... what's KP? The olly KP I know is the one you do in the Army ???

When you get the "still waiting for root device" message you have the kext combo that will get you to the installer so you can either run the installer from the USB drive or transfer the kexts to the target drive and use it to install. You can either remove the "Scan Single Drive" key from com.apple.boot.plist and use the USB drive to boot your osx install or install Chameleon on the hard drive.

One caveat, you may still run into issues with your internal hard drives because up until this point you have not accessed them.
I did not get that far (obviously) but I'm not very clear on what you mean either. Right now these are the installation steps as I understand them:

1. Create a bootable USB stick and install Chameleon on it, along with any necessary kexts.
2. Boot the PC from the USB stick.
3. Select the retail DVD from the Chameleon boot menu.
4. Boot from the retail OSX DVD, and start the Mac OS X install process.
5. Reboot from the USB stick and this time choose the new OSX partition.
6. After Mac OS X boots, install Chameleon to the new OSX partition.

Now it seems I may have to replace the USB stick in step 1 with a CDRW, in order to get Chameleon to see the Mac OS X install DVD.  However, I don't see why I'd need to put the Mac OS X installer on the USB stick (unless I wanted to make modifications to the installer so that it does not require a GPT partition so I could install Mac OS X on an MBR partition).

BTW, I had already removed the "Scan Single Drive" key from com.apple.boot.plist during all my previous tests.

I don't understand why this would be preferable to rebooting the pmagic USB, mounting the Chameleon partition and modifying the kexts in /Extra/Extensions on the target drive.
I assume by this you mean using VirtualBox. Well, apart from being able to have the pdf open while you type the commands in Parted Magic, it can be a bit faster if you have a second PC (say, a laptop) with VirtualBox open while you're installing Mac OS X on a Hackintosh PC. This way you can have all the advantages of your normal working environment in Windows, plus the parted Magic Environment, while you're experimenting with the Chameleon USB stick. Also, in my specific case, it's nessesary in order to take screenshots of Parted Magic for my article.  :)
« Last Edit: January 29, 2010, 06:39:32 PM by kbear »

outragedtony

  • Observer
  • Posts: 13
Re: General Noob Questions
« Reply #61 on: January 29, 2010, 06:51:33 PM »
You won't need any data from the retail DVD to create a chameleon-boot-cd, I do not really understand why there even should be /System/Library/... on the chameleon partition.

Not exactly what you are looking for, but there is a ready-made preboot.dmg attached to this post from Gringo. Under linux you can decompress it with dmg2img, mount it, customize, burn. 

heureka! chameleon's boot does scan usb-drives, does it? so you could dump the retail dvd to a usb-drive or key. That way it should work without needing Os X.
« Last Edit: January 30, 2010, 06:50:53 PM by Gringo Vermelho »

rocksteady

  • Global Moderator
  • Posts: 233
  • Root Down
Re: General Noob Questions
« Reply #62 on: January 29, 2010, 07:04:07 PM »
Oops! We're in the newcomers thread. Apologies,  should have been clearer: yes /cdboot for .iso images to be burnt into a cd. /boot for usb sticks/hds.

I mentioned that you can restore the retail DVD into a usb stick since it's ridiculously faster than booting the dvd.

By the way:
... but I have to write an article about building  a hackintosh, and I want to find a generic solution that does not require a Mac, and can be completed entirely from Windows.

Where do you plan to publish your guide (online/print)? Are you willing to provide support for your guide? Both questions based on one simple fact: We're full of guides claiming easy-this easy-that. If all this was so easy all OSx86 forums would have a couple of HELP! threads. If you spend some time here you'll find out that we re-direct users asking for support about guides followed elsewhere, back to where said guides are hosted. We wouldn't like having users saying "yo d00dz I followed kbear's guide but..."

Help us end this nonsense
Stop bitching, start coding or documenting or both..

P5Q-EM : Q6600 : 8GB RAM : 8800GT : SATA Drives

kbear

  • Observer
  • Posts: 17
Re: General Noob Questions
« Reply #63 on: January 29, 2010, 07:39:05 PM »
Where do you plan to publish your guide (online/print)? Are you willing to provide support for your guide? Both questions based on one simple fact: We're full of guides claiming easy-this easy-that. If all this was so easy all OSx86 forums would have a couple of HELP! threads. If you spend some time here you'll find out that we re-direct users asking for support about guides followed elsewhere, back to where said guides are hosted. We wouldn't like having users saying "yo d00dz I followed kbear's guide but..."

Help us end this nonsense

I'm a freelance writer, mostly for print magazines and computer books. The hackintosh article is for a magazine called Total Xaker [sic]. I usually write reviews for Mac hardware and software, and sometimes hacking howtos, such as firmware hacking for AppleTV, Sony eBook Reader, iPhone, WDTV Live, etc. The magazine is published in Greece, so I doubt you'll have to worry about people asking questions about my guide  :)

In any case, my goal is to create a step-by-step guide that will be as simple to follow as possible, for people who have no experience with Macs or Unix. The guide will be as generic as possible, i.e. I will not mention specific hardware configurations if I can avoid it. I also want the steps to be implemented using only freeware tools in Windows (which is what most readers will have). Your help and this forum in general has already been an invaluable resource for my article, and I appreciate it.

Been a long-time (since 1989) Mac user, I was never that interested in Hackintoshes, but now that I am researching the subject, I find it fascinating. It feels really weird to see the Apple boot logo appearing on a PC screen.

rocksteady

  • Global Moderator
  • Posts: 233
  • Root Down
Re: General Noob Questions
« Reply #64 on: January 29, 2010, 08:10:06 PM »
Thank you for leveling with us kbear, I appreciate straightalkin'. I wasn't looking for details of your business, just wanted to make clear what we do and what we don't deal with in this forum.

If you're willing to start + stand behind a thread in your language here, you -just like anyone else- are more than welcome to do so. It's what all members of the Moderation Team do, while helping w/ Documentation, Code, Graphics etc.

...It feels really weird to see the Apple boot logo appearing on a PC screen.
heh

It also feels weird hearing all those fanatical ex-Apple-haters asking all those questions. You can easily tell when someone never used a Mac before the hack-era.

Back to troubleshooting...
Stop bitching, start coding or documenting or both..

P5Q-EM : Q6600 : 8GB RAM : 8800GT : SATA Drives

r0m30

  • Forum Moderator
  • Posts: 98
    • r0m30's OSX86 site
Re: General Noob Questions
« Reply #65 on: January 29, 2010, 08:59:21 PM »
First, sorry KP is Kernel Panic......

As I understand it, what you are trying to do is not possible with the current version of Chameleon.  I believe that there is an issue with the BIOS enumerating CD/DVD drives during boot.  The only time a CD/DVD drive is in the device list passed to Chameleon is when it is the selected BIOS boot device.  That's why all of the CD boot methods require you to burn a CD/DVD to start the process.

The process I developed works around this issue by adding the mach_kernel and /System/Library/Extensions to the Chameleon boot partition.  This allows you to select the Chameleon partition as the boot device.  The kernel and kexts then load from the boot partition on your first boot.  During kernel initialization the entire device tree is enumerated, the kernel does not rely on the BIOS device list so it finds the CD/DVD drive.  By passing the kernel parameter rd=disk?s3 you tell the kernel to use the DVD as its root device. then you run the installer from the DVD.

I tried this. The Mac OS X install DVD icon did not appear. I only got a new icon which represented the Chameleon USB partition.

That is exactly what you want, if you chose the Chameleon partition as your boot device it will load the kernel and /System/Library/Extensions from there and then by passing the rd= parameter the loaded kernel will mount the DVD and allow you to run the installer.
If you read this post, at the end I explain the boot process and how I twist it to get the installer app to run without actually booting off of the DVD

I also got an error message "failed to parse the .plist" (or something similar) which is not surprising, since I created an empty SystemVersion.plist with touch. So I copied a real SystemVersion.plist from a Leopard installation on my Mac, and got rid of the error. Still the Mac OS X install DVD icon does not appear on the Chameleon partition list.  (Needless to say, I tried F5 and F10. No joy.).
Sorry, I knew SystemVersion.plist had to be there for Chameleon to offer it as a boot device, I didn't know it read it too.

I did not get that far (obviously) but I'm not very clear on what you mean either. Right now these are the installation steps as I understand them:

1. Create a bootable USB stick and install Chameleon on it, along with any necessary kexts.
2. Boot the PC from the USB stick.
3. Select the retail DVD from the Chameleon boot menu.
4. Boot from the retail OSX DVD, and start the Mac OS X install process.
5. Reboot from the USB stick and this time choose the new OSX partition.
6. After Mac OS X boots, install Chameleon to the new OSX partition.

Step 3 is the issue, as noted above unless you boot from a CD/DVD it is not in the device list passed to Chameleon, you have to select the the Chameleon partition and then tell it to use the DVD as it's root device with the rd= parameter.

Now it seems I may have to replace the USB stick in step 1 with a CDRW, in order to get Chameleon to see the Mac OS X install DVD.
If you're dead set on having the OSX install DVD show up as a selection in  Chameleon then yes, you need to replace the USB drive with a CDRW.  If you're willing to select the Chameleon partition then no you can use a USB drive.

However, I don't see why I'd need to put the Mac OS X installer on the USB stick (unless I wanted to make modifications to the installer so that it does not require a GPT partition so I could install Mac OS X on an MBR partition).
Nothing in what I've posted says anything about copying the installer to the USB drive, just mach_kernel, /System/Library/Extensions and SystemVersion.plist.  The entire DVD is over 6GB, I have you copy less than 300mb to the USB drive.

I assume by this you mean using VirtualBox.
No, by this I meant experimenting on a USB drive instead of the Chameleon partition of the drive you are going to install OSX on.  You said...

However, r0m30's instructions assume that you're not going to have a trial-and error approach to the kexts, and that you already know exactly which kexts will work with your hardware configuration. So if you mess up and end up with an unbootable partition, you have to start from scratch. That's why I wanted to have Chameleon installed on the USB stick first, do all my kext tests there, and add chameleon and the kexts to the OS X partition of the Hackinotsh PC only after everything is tested on the USB stick (which I can modify from the Parted Magic environment until I get it right) .
You don't have to start from scratch, you can reboot the pmagic USB stick, mount the Chameleon partition and add/remove kexts, add DSDT, modify com.apple.Boot.plist or make any other modifications you want.



The method I developed relies on (apparently esoteric) knowledge of how OS's bootstrap.  I jump in at a convenient place and move where the OS would "normally" run to the place where I want it to run.
--- r0m30 ---
HP Mini 1033CL (Costco) OSX Retail 10.6 Chameleon-2.0-RC3-r658
HP m9077c -  ASUS IPIBL-LA MoBo with Core 2 Quad Q6600
    Retail 10.6.2 Chameleon-2.0-RC4-r684

r0m30

  • Forum Moderator
  • Posts: 98
    • r0m30's OSX86 site
Re: General Noob Questions
« Reply #66 on: January 29, 2010, 09:08:33 PM »
I do not really understand why there even should be /System/Library/... on the chameleon partition.
Because you don't have a working OSX yet, you need to load the kernel from somewhere, see my previous post for all the gory details.  This is about getting your very first h@ck without having access to any other computer running OSX.

heureka! chameleon's boot does scan usb-drives, does it? so you could dump the retail dvd to a usb-drive or key. That way it should work without needing Os X.
And then the installer app will suggest very unhelpfully that you clean the DVD and try again  ???
--- r0m30 ---
HP Mini 1033CL (Costco) OSX Retail 10.6 Chameleon-2.0-RC3-r658
HP m9077c -  ASUS IPIBL-LA MoBo with Core 2 Quad Q6600
    Retail 10.6.2 Chameleon-2.0-RC4-r684

outragedtony

  • Observer
  • Posts: 13
Re: General Noob Questions
« Reply #67 on: January 29, 2010, 09:16:25 PM »
hahah... I see.
Thanks for the explanation!

Will try it out when I got more time to spare.

outragedtony

  • Observer
  • Posts: 13
Re: General Noob Questions
« Reply #68 on: January 30, 2010, 12:03:04 AM »
Just found out how to generate the chameleon boot cd without Mac OSx - surprisingly simple:

sorry for the noise, this is not working.


simple reason: standard cd iso9xxx does not support funky filenames. oddly enough, the cd looks fine when mounted in linux, but it is not when booted. the preboot image is mandatory.

this means com.apple.Boot.plist turns into com~~1 something, and will not be used. one could specify all chameleon options at boot prompt, but the same problem applies for kexts...
kind of defeats the whole idea.

sorry again, and I hope if someone attempted to use this, he/she will come back to this post...

kbear, it can be done relatively easy with linux only and two usb sticks (although one must be 8gb, and it involves dd..). install chameleon to one drive (boot and /Extra only), and dd the osx dvd image onto the other.


Linux
1. Make a folder, lets call it iso
2. Set up your Chameleon files inside the iso folder:
     * cdboot
     * /Extra/Extensions/<your kexts>
     * Themes, smbios.list, com.apple.Boot.plist (with rescan=yes) and so on inside /Extra
3. From one folder above iso, run the following command:

Code: [Select]
mkisofs -R -b cdboot -no-emul-boot -boot-load-size 4 -boot-info-table -o chameleon.iso iso4. Burn chameleon.iso & off you go
5. panics? change files/configs, rebuild iso, rinse, repeat


Windows
1. Set up your Chameleon files in a folder, with cdboot at its root (see ^^)
2. Get the open-source burning tool InfraRecorder
3. Select Data CD and add Chameleon files (Extra folder & cdboot)
4. Go to File -> Project Properties -> Boot
5. Add Chameleon's cdboot and set Emulation Type to "None" 
7. Burn the cd


Rudimentary com.apple.Boot.plist for cd boot image

Code: [Select]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Kernel</key>
<string>mach_kernel</string>
<key>Kernel Flags</key>
<string></string>
<key>Rescan<key>
<string>Yes<string>
<key>Instant Menu<key>
<string>Yes<string>
</dict>
</plist>

NOTES: Do not edit .plist files with notepad in windows, as it is likely to screw them up. EditPadLIte and Wordpad are mentioned as alternative solutions, but I have no idea if/why they would work better. If you know more about this, please tell us and I will add it in here. Similary, could someone give feedback if copy&paste works with the above com.apple.Boot.plist, as I had some problems with examples pasted from other guides.
« Last Edit: February 01, 2010, 12:12:32 AM by outragedtony »

kbear

  • Observer
  • Posts: 17
Re: General Noob Questions
« Reply #69 on: January 30, 2010, 01:13:48 PM »
As I understand it, what you are trying to do is not possible with the current version of Chameleon.  I believe that there is an issue with the BIOS enumerating CD/DVD drives during boot.  The only time a CD/DVD drive is in the device list passed to Chameleon is when it is the selected BIOS boot device.  That's why all of the CD boot methods require you to burn a CD/DVD to start the process.

The method I developed relies on (apparently esoteric) knowledge of how OS's bootstrap.  I jump in at a convenient place and move where the OS would "normally" run to the place where I want it to run.
I see now. Thanks for the detailed explenation. (It must be a pain to have to explain the same stuff over and over again. :) I appreciate it.)

The process I developed works around this issue by adding the mach_kernel and /System/Library/Extensions to the Chameleon boot partition.  This allows you to select the Chameleon partition as the boot device.  The kernel and kexts then load from the boot partition on your first boot.  During kernel initialization the entire device tree is enumerated, the kernel does not rely on the BIOS device list so it finds the CD/DVD drive.  By passing the kernel parameter rd=disk?s3 you tell the kernel to use the DVD as its root device. then you run the installer from the DVD.

It's a very geeky way to do it (I mean that as a compliment). I'm impressed by your inventiveness. However, I think that for my article I'd better stick to the simpler-to-understand CDRW approach.

I assume by this you mean using VirtualBox.
No, by this I meant experimenting on a USB drive instead of the Chameleon partition of the drive you are going to install OSX on.  You said...
However, r0m30's instructions assume that you're not going to have a trial-and error approach to the kexts, and that you already know exactly which kexts will work with your hardware configuration. So if you mess up and end up with an unbootable partition, you have to start from scratch. That's why I wanted to have Chameleon installed on the USB stick first, do all my kext tests there, and add chameleon and the kexts to the OS X partition of the Hackinotsh PC only after everything is tested on the USB stick (which I can modify from the Parted Magic environment until I get it right) .
You don't have to start from scratch, you can reboot the pmagic USB stick, mount the Chameleon partition and add/remove kexts, add DSDT, modify com.apple.Boot.plist or make any other modifications you want.

Yes, I get that now (I didn't before). To answer your question, I think that choosing the USB stick instead of the Chameleon partition to do the kext tests is a purely subjective matter. I agree with you that from a technical viewpoint there's no real advantage. However, knowing that my partition is untouched while I experiment with the USB stick somehow gives me a warm, safe feeling.  :)

kbear

  • Observer
  • Posts: 17
Re: General Noob Questions
« Reply #70 on: January 30, 2010, 01:24:56 PM »
Just found out how to generate the chameleon boot cd without Mac OSx - surprisingly simple:

outragedtony, many thanks. This saves me from a LOT of trouble. I hope you don't mind if I rip this off for my article. (I will give the credit for this procedure to you, don't worry  :) )

NOTES: Do not edit .plist files with notepad in windows, as it is likely to screw them up. EditPadLIte and Wordpad are mentioned as alternative solutions, but I have no idea if/why they would work better. If you know more about this, please tell us and I will add it in here. Similary, could someone give feedback if copy&paste works with the above com.apple.Boot.plist, as I had some problems with examples pasted from other guides.

This is because UNIX (and Mac OS X) use the line feed (LF) character to mark the end of a line of text. Windows (and the Classic Mac OS) use the carriage return (CR) character. Some word processors are aware of this and fix it on the fly, but Notepad does not. Wordpad acknowledges the existence of the linefeed character, but it also adds carriage returns to every line. UNIX does not mind this, since it ignores the carriage return characters. But the .pist has to have linefeed characters at the end of every line to be readable by UNIX. You can find a more detailed (and possibly more correct) explanation here.
« Last Edit: January 31, 2010, 02:04:28 PM by kbear »

outragedtony

  • Observer
  • Posts: 13
Re: General Noob Questions
« Reply #71 on: January 31, 2010, 12:22:48 PM »
outragedtony, many thanks. This saves me from a LOT of trouble. I hope you don't mind if I rip this off for my article. (I will give the credit for this procedure to you, don't worry  :) )

sure, go ahead. give the credit to chameleon developers for creating cdboot. I simply translated the hfiutils command from Distemperus' guide to mkisofs, stripping out the hybrid-disk stuff.
and test it first, I have not tried to load the retail DVD with it! it boots my linux install fine, though, and *should* work (but, never trust someone claiming something "should work"). 

Thanks for explaining the linefeed/cr thing... "funny" how they still are incompatibilities on such a basic level.
What would be the recommendation for windows users, then? does wordpad also adds lf characters, or only understands them? for quick conversions I found this online dos2unix.

kbear

  • Observer
  • Posts: 17
Re: General Noob Questions
« Reply #72 on: January 31, 2010, 02:11:48 PM »
Thanks for explaining the linefeed/cr thing... "funny" how they still are incompatibilities on such a basic level.
What would be the recommendation for windows users, then? does wordpad also adds lf characters, or only understands them? for quick conversions I found this online dos2unix.

WordPad adds CRs and LFs (I just checked it by creating a new file in Windows XP and opening it up from Mac OS X's TextEdit), and as long as you remember to save the file as plain (unicode) text, UNIX should have no problem reading it.

rocksteady

  • Global Moderator
  • Posts: 233
  • Root Down
Re: General Noob Questions
« Reply #73 on: January 31, 2010, 06:54:15 PM »
No idea what happens on the Windows side (I'm lucky enough to not have to use that thing at all) but for MacOS X, a decent native editor is TextWrangler, free and includes one of the nicest search/replace implementations I've seen (grep included), zaps text gremlins, etc.

kbear: glad to hear that you'll go for the BootCD/cdboot approach for your article, will save you lots of initial headaches + reams of questions from the ones who'll use your guide. Feel free to dive deep into technical stuff and do a second one for the USB stick approach. Just be prepared to support your guides :) If you decide to use r0m30's ideas/techniques, please take any further discussion @ his dedicated thread.

tony: could you create a brand new topic in this sub-forum with your Lunix/Windows steps referenced above? Just tag it [HowTo] till we polish the FAQ again.

gong! thought you'd tested this

Edit: removed redundant heads-up post for tony's update
« Last Edit: February 05, 2010, 11:26:14 PM by rocksteady »
Stop bitching, start coding or documenting or both..

P5Q-EM : Q6600 : 8GB RAM : 8800GT : SATA Drives

kbear

  • Observer
  • Posts: 17
Re: General Noob Questions
« Reply #74 on: February 01, 2010, 08:06:10 PM »

sorry for the noise, this is not working.


simple reason: standard cd iso9xxx does not support funky filenames. oddly enough, the cd looks fine when mounted in linux, but it is not when booted. the preboot image is mandatory.

this means com.apple.Boot.plist turns into com~~1 something, and will not be used. one could specify all chameleon options at boot prompt, but the same problem applies for kexts...
kind of defeats the whole idea.

Thanks for the heads-up. Probably I'll have to use ISO+Joliet format in the InfraRecorder application. Right now I'm completing a different writing assignment. I'll check this out once I'm finished. Have you tried to do it from ImgBurn? I wrote about it few years ago, and it had many advanced features as I recall.