Jump to content

OS X Live: Developers' Private Discussion


REVENGE
 Share

136 posts in this topic

Recommended Posts

testing instructions are in a previous post. I'll get user instructions when its actually suitable for consumption...and i post a photo(s)

 

Btw, does anyone kno how the system image creator for netboot included in Leo server works? that might be a bit cleaner and easier...For the meantime lets play with this method..

Link to comment
Share on other sites

Hey guys,

if you want full read/write access to the compressed dmg on usb or dvd without using all of the symlinks try /usr/libexec/vndevice. The shadow file it creates can be associated with the disk image using /usr/bin/nbdst.

 

Good luck :)

Link to comment
Share on other sites

Wow! cool. Thanks modbin. Looks like that tool's built for the netboot setup(if you have mac server play with the system image util :), which is just like what we need. Ima build a standard distro using that tonite i think, and we'll see how that goes. That would make life sooo nice. Just slip it in /etc/rc.something

hehe

Link to comment
Share on other sites

Unfortunately I didn't get around to trying out nbdst and the shadowing, but I think this is a good time sit down and collect whatever we have talked about and

done so far.

For myself,

I've been able to successfully recreate Modbin's method for producing a LiveDVD, following his instructions VERY CAREFULLY.

Then, I was able to make a boot-132 version of this DVD, testing on a USB stick by:

Making a fresh Leopard Install.

Applying the modbin instructions to that install to make it "live"(bootable with read only root and ramdisk).

Then, creating a compressed dmg(with Disk Utility) of that installation,

Setting up usb/dvd with Boot-132,

following hagar's instructions as to how to boot from a compressed image by putting the relevant files around the dmg(ie, kernel, extensions.mkext, boot.plist, others) on the usb/dvd.

And finally burning/ejecting.

 

The result was decent, albeit difficult to produce.

Since then, I've been studying how apple's netboot system works(pushed on by Modbin's suggestion), and now would propose that we use the existing disk shadowing tools(vndrive/nbdst) as a part of /etc/rc.common or rc.cdrom:

It appears this would be as simple as creating a new tmpfs(ramdisk, like modbins), but instead of using symlinks, tell vndrive to create the shadow file on the tmpfs volume, and let nbdst work its unioning magic as it was designed.

 

Hagar has brought up a good point, that we're really not working together at this point, just tossing stuff around and doing things on our own. I'm sorry to say that I've been guilty of this, and think that we should probably all regroup some, to establish what NEEDS to get done, and how we can work together to do that.

We need to step back and work on the boot process before we can build higher level driver detection and such, though those are excellent ideas.

 

Also, just a random boot thought: what if we could hack IOHDIXController to prep the TMPFS and unioning earlier in the boot, perhaps by partly rewriting/adding plugins to it? I'm not able to do that, but i'd love to learn, and if someone has ideas that sounds really slick.

Link to comment
Share on other sites

Unfortunately I didn't get around to trying out nbdst and the shadowing, but I think this is a good time sit down and collect whatever we have talked about and

done so far.

For myself,

I've been able to successfully recreate Modbin's method for producing a LiveDVD, following his instructions VERY CAREFULLY.

Then, I was able to make a boot-132 version of this DVD, testing on a USB stick by:

Making a fresh Leopard Install.

Applying the modbin instructions to that install to make it "live"(bootable with read only root and ramdisk).

Then, creating a compressed dmg(with Disk Utility) of that installation,

Setting up usb/dvd with Boot-132,

following hagar's instructions as to how to boot from a compressed image by putting the relevant files around the dmg(ie, kernel, extensions.mkext, boot.plist, others) on the usb/dvd.

And finally burning/ejecting.

 

The result was decent, albeit difficult to produce.

Since then, I've been studying how apple's netboot system works(pushed on by Modbin's suggestion), and now would propose that we use the existing disk shadowing tools(vndrive/nbdst) as a part of /etc/rc.common or rc.cdrom:

It appears this would be as simple as creating a new tmpfs(ramdisk, like modbins), but instead of using symlinks, tell vndrive to create the shadow file on the tmpfs volume, and let nbdst work its unioning magic as it was designed.

 

Hagar has brought up a good point, that we're really not working together at this point, just tossing stuff around and doing things on our own. I'm sorry to say that I've been guilty of this, and think that we should probably all regroup some, to establish what NEEDS to get done, and how we can work together to do that.

We need to step back and work on the boot process before we can build higher level driver detection and such, though those are excellent ideas.

 

Also, just a random boot thought: what if we could hack IOHDIXController to prep the TMPFS and unioning earlier in the boot, perhaps by partly rewriting/adding plugins to it? I'm not able to do that, but i'd love to learn, and if someone has ideas that sounds really slick.

 

ill look into that for u spartango see what i can do with the IOHDIXController been busy with my comp building a new and faster one and with a lot of other systems testing but im caught up now so i can proceed back to this project will let u know if i have any progress

Link to comment
Share on other sites

Hello guys ive done this and it works perfect for live usb os x leopard

 

OSx86 Portable 10.5.4 USB stick image INTEL only (sse2/sse3 or up..) with universal

chameleon bootloader..

Re-ripped, rebuild and tweaked

TO INSTALL:

 

Drivegenius 2 is fastest way to clone with unmounting both drives..mount USB image, choose that as source disk... and make your USB stick the destination disk !! If it won't boot..install Chameleon Bootloader on your (USB) destination disk !!

 

You can use CarbonCopyCloner 3, DriveGenius 2, or other cloner.. Select this included diskimage as source disk, or mount it first...then select mounted partition/Try to force a clone on block-level !! [try to force a clone on a location where you can unmount both source and destination (the only easy and proper way to do this is with 2 physcally USB and/or harddrives already installed..) But is also possible to have succes without unmouting the drives (source and destination) Always try

to unmount destination disk first.....

 

Clonetools H1. With Clonetools H1 choose Hackingtosh architecture, and clone it to your desired location !

 

Always Repair your Permissions after cloning..

 

If it won't boot after cloning.. Install Chameleon bootloader on the destination disk, it should be bootable from a USB stick.....or your PC isn't supported..

 

Login:

 

User = protocolxleohacked

Password = x

 

 

iTunes, iChat, Mail, iPhoto, DVD Player etc.. are removed..

All videodrivers are removed.. to prevent problems on some systems !! Except some Intel videodrivers are left in..

 

Spotlight is disabled, you can turn it on with cache Cleaner..

 

Install your own OSx86 videodriver after cloning..in Downloads folder you can find Graphics Update 10.5.4-10.5.5 after installation, OSx86 tools will help.......

After succes you can enable QuartzExtreme 2D for even more video acceleration with Quartzsimple in OSX Utilities folder..OpenGL with OSx86 tools.. With video-hardware acceleration Leopard should be running like hell..(NOW IN 10.5.4 UPDATE in Downloads folder there is a 10.5.5 Graphics update, install it and choose your string or injector)

 

Don't try to install OS system updates, unless you know exactly what you're doing !!

 

 

based on Universal x86 DVD 10.5.2 and INTEL 10.5.3 update version of Kalyway..

 

based on slipstream script

 

ich9 support

 

updated with iATKOS 10.5.4 Intel system

 

Rebuild, tweaked and updated

 

 

Notes: If you have problems with booting your (USB) Drive after cloning, install Chameleon bootloader on the destination disk.

 

To get a higher resolution without a videodriver hit F8 at Darwin's promt and type: "Graphics Mode"="1280x1024x32"

 

 

if you have problems with installing your videodriver on reboot with video gfx (blue or black screen)

 

All you have to do is just press F8 at Darwin's prompt and then type -x, (safe mode) and/or -s (single user mode) then

 

at root type mount -uw /

 

and /movevideodrivers

 

then it will be prompt to move video drivers by class ( nvidia ; ati ; or intel gma) voila!

 

type yes to confirm or enter to skip !

 

After trying updating your system, type: update -v at Darwin's prompt..

 

 

more options for Darwin's promt:

 

* -f This forces rebuilding of extensions cache

* -s Boots into a single user command line mode

* -v Verbose, boots in text mode showing all debug info and errors

* -x Boots into safe mode

* -F Ignore configurationfile

* rd=disk0s1 - Tells Darwin to boot from a certain partition specified in BSD format.

(Disk 0 specifies first HDD and s1 specifies first partition as 0 is the MBR.)

* cpus=1 Tells the system how many CPUs or cores to use, useful for Core Duo users.

* platform=X86PC - Can be used if problems with normal booting, ACPI is another option here

* -legacy Boots OS X in 32bit mode rather than 64bit if 64bit is used due to a 64bit processor

* idehalt=0 May stop stuttering

* "Graphics Mode"="WIDTHxHEIGHTxDEPTH" (e.g. "1024x768x32")

For VESA 3.0 graphics, you may append a refresh rate

after an "@" character (e.g. "1280x1024x32@75")

* kernel: kernel name (e.g. "mach_kernel" - must be in "/" )

If you need to copy the bootloader to the MBR use this command:

 

fdisk -u /dev/rdisk0

 

 

All the permanent settings are stored under /Library/Preferences/SystemConfiguration/com.apple.Boot.plist and a good way to edit this is using nano in the command line. Another way is to drag it to the desktop, edit with TextEdit and then overwrite the original but this usually saves time with ownership issues.

Just copy and delete orginal from location, and edit on desktop with textedit...

But for instance to open it in the terminal I would go:

 

sudo -s

 

nano /Library/Preferences/SystemConfiguration/com.apple.Boot.plist

 

You will then see something similar to this:

 

 

 

 

 

Kernel

mach_kernel

Kernel Flags

 

Boot Graphics

Yes

Timeout

10

Quiet Boot

No

 

 

 

Let's look at what each of these do.

 

* Kernel - this tells the bootloader which kernel to boot with.

* Boot Graphics - this tells it whether to show the pretty Apple loading screen or not

* Timeout - this is the time before the default boot option is chosen

* Quiet Boot - if set to yes the OS boots straight to the GUI without showing the bootloader, if set to no it boots to the bootloader first.

To use the chain0 boot method this MUST be set to 'No'. To access the bootloader when this is set to 'Yes' bash F8 repeatedly during boot till it displays.

 

You can set more than mentioned above but those are the standard ones and any of the following can be added using keys such as "" or "" to the config file. All commands in darwinbootloader you can put in plist file.....

 

An example of a configuration to boot OS X in safe mode, verbosely, with 1024x768 resolution forced and with the 2nd partition as default is as follows:

 

 

 

 

 

Kernel

mach_kernel

Kernel Flags

-v

-x

rd=disk0s2

Graphics Mode

1024x768x32

Boot Graphics

No

Timeout

10

Quiet Boot

 

No

 

 

 

 

Save your plist file on desktop, with extension .plist, delete orginal, place your own, Repair Permissions with Disk Utillity, Reboot...

 

 

Even if you have chosen a kernel.. you can still try the others kernels for testing ! (same thing for Kalyway dvd boot except that only modbinkernel , speedstepkernel , kabylkernel and nforcekernel are available as boot options !)

 

 

All you have to do is just press F8 at Darwin's prompt and then type the kernel's name you want to boot with :

 

sleepkernel (intel/amd/sse2/sse3)

speedstepkernel (intel/amd/sse2/sse3)

nforcekernel (intel/sse3)

modbinkernel (intel/amd/sse3)

vanillakernel (intel/sse3)

kabylkernel (intel/sse3) with sleep support

 

 

Kernels:

 

kernel_9.2_sleep

kernel_9.2_speedstep

kernel_9.2.2_kabyl

kernel_92_nforce

kernel_vanilla_922

kernel_9.3_modbin

kernel_9.4_modin

kernel_9.4_StageXNU

 

default boot is modbin 9.4 kernel.. -v at Darwin's prompt will boot modbin's 9.2 kernel..

Link to comment
Share on other sites

Cool.

Looks to me like the non-persistent osx distro is what we really need at this point. iPortable won't go on a DVD or CD.

Actually, I wasn't expecting at all to be able to put anything on CD, but it looks like hagar's got the installer at least stripped to CD size, and compressed installs are looking small enough as well. Yay.

I haven't gotten to playing much with nbdst, but now i have a bit more time i expect to get something working soon...

If anyone has time, it'd be interesting to see what happens if you start nbdst/vndevice in single-user mode on a normal install, just to see what happens.. I think that is the way to make both setup and running a live distro easiest--hell, apple built it.

Link to comment
Share on other sites

Forgive me for my ignorance, I've been busy with other things, but isn't this just a matter of taking a minimalist OS X install and then adding a ramdisk etc. to boot it from a DVD? And then we have all the GUI level stuff, device detection etc. etc. I've built this capability into OSx86Tools to automatically detect hardware based on device IDs and make appropriate suggestions based on that, as said before lspci is a user level program, but if we have a close to complete OS X environment is that an issue?

 

~pcwiz

Link to comment
Share on other sites

~pcwiz, It's that simple, except for the ramdisk part...

Unfortunately there's a bit more complexity involved in setting up the ramdisk and getting that working, and lovely as modbin's method is, I'd really like something that's easier to setup and more clean...I think that needs to be really worked on before we move on, or else running live dvd will be uber buggy/problematic.

Link to comment
Share on other sites

Actually that would be super excellent! can you do that plz? I'll script up the piece that uses compressed dmg for boot and we might have something that ppl could actually try.

I'd gotten the ramdisk to work on my system, but was unsure that was the right way to go because of the relative complexity involved in setting that up...If you can script that that'll be out of the way.

 

Meanwhile, I've been playing with nbdst and vndevice, and they seem pretty straight forward, in terms of function. I've gotten a system up and running after starting that stuff from a single user prompt, so i've turned my attn to setting up the RC scripts to coincide with that.

On another note, I'm trying to use Apple's System Image Utility to automatically build a "netboot"-distro that will actually be usable as a compressed dmg for a live dvd boot. That would be the easiest thing for ppl to setup and use, and would be the least buggy i expect. I think that's the same procedure as messing with the rc scripts to include nbdst, but this may have some niceties...

Link to comment
Share on other sites

@Spartango: Actually, System Image Utility is not so easy to use. I've tried it for myself a few months ago. It'd be easier to manually create a netboot image...

A ppc image looks like this:

booter
mach.macosx
mach.macosx.mkext
NBImageInfo.plist
Panther.dmg
ppc

where PPC is a directory containing a copy of booter, mach.macosx (the kernel) and mach.macosx.mkext (Extensions.mkext). I suspect something similar is involved in the x86 netboot process.

 

Just for documentation, I attach a copy of my NBImageInfo.plist. Hope it helps,

 

Sherry Haibara

NBImageInfo.plist.zip

Link to comment
Share on other sites

WISHING YOU THE VERY BEST IN

  ╔══╦══╦══╦══╗

  ╚═╗║╔╗║╔╗║╔╗║

  ╔═╝║║║║║║║╚╝║

  ║╔═╣║║║║║╠═╗║

  ║╚═╣╚╝║╚╝╠═╝║

  ╚══╩══╩══╩══╝

¤ø„¸¨°º¤ø„¸ ¸„ø¤º°¨¸„ø¤º°¨

¨°º¤ø„¸ HaPpY ¸„ø¤º°¨

¸„ø¤º°¨ NeW yEaR``°º¤ø„¸

¸„ø¤º ``°º¤ø„¸ ¤ø„¸¨°º¤ø

 

happy new year guys best of luck in 2009

Link to comment
Share on other sites

And a Happy New Year to you all!

 

I come finally a gift and most excellent NEWS:

I've got an ALL NEW method for preparing a functional live dvd, which is actually ridiculously easy and relatively bug free. There is a catch but I willd discuss that in a moment.

So...

Basically I've exploit apple's nicely constructed netboot system to not only boot from a disk image, but also make it R/W with a shadow file.

 

Following Hagar's idea, I prepare my media--DVD/USB--with kernel, Extensions.mkext, boot loader, Boot.plist, and so on. This will allow us to boot from the compressed DMG. Note that you do have to edit IOHDIXController and all of its plugins, changing Network-Root to Root in all Info.plists.

Using Disk util, I create a compressed disk image of my installed system. It really doesn't need to stripped or modded, though that might be useful. A fresh system for me compresses to ~2.2GB. This goes on right on the media.

All that ready, the media is essential ready to go. I've made some little tweaks to my rc.netboot, which i'll post by Jan 3/4 with pictures, but they are non-essential.

Now, the interesting bit:

Boot from the media, and at the bootloader(or in Boot.plist), pass the args -v -f -s rp=file:///live.dmg --> or whatever your image is called.

It should start up and bring you to a nice bash prompt, at which you

sh /etc/rc.netboot init

It'll hang for a moment..and then your disks and CD drives will whirrr, and you should get something at the end like "Couldn't assign computer name" ... That's fine.

now you type exit at the prompt, and the system should come up normally!! In fact, pretty much everything works fine without bug(it has to, or netboot is just a lame product).

 

Ok, and now the UGLY catch. At this point, You MUST have a disk formatted with HFS/HFS+/[or UFS?] on the machine your using for this to work(oh, and it'll need like 50-100mb of free space). UGH. so if you want this to work in a cafe just carry a US$5 HFS usb thumbdrive around. still UGH.

So how do we make this better? Simple, we need to implement a system where the shadow file is create on Ramdisk as opposed to Disk. Sounds simple. I've been working on this for a week now, and for whatever reason I can't get this to work[i'd love help!].

I hacked in a ramdisk creation in rc.netboot, format it hfs, and even get the netboot system to setup the shadow file just fine in the ramdisk. I get R/W root and can do whatever i like--in BASH. The moment I quit, headed for GUI, kernel spouts a nasty message:

kernel[0]:

disk3s9 <--that's my DMG : 0x1c (UNDEFINED)

and it does this repeatedly forever. other things apear to come up and die, but wierd part is that my dmg hasn't changed at all between this and non-ramdisk method. I think this has to do with disk image backing and the OS trying to do something funky with what it thinks is an HD, where its actually just ram://

BUT We now have a method that's simple enough for anyone and works really NICELY!!!

give it a try, i'll post an update with files soon.

Link to comment
Share on other sites

Things just keep getting better, 2009 is an excellent year already!

 

I am proud to announce that I have resolved the issue noted in my previous post, and we now have a fully functioning, catch-free OSX live dvd that is painless to produce, and incredibly functional!

 

I attach images and a script that are relevant to this success, and I post here the method by which such a live dvd will be produced. I hope that now that this is functional and simple enough, we should be able to move on and put some nice features on the dvd.

 

Pictures:

----

post-90402-1230868446_thumb.png

 

post-90402-1230868411_thumb.png

 

post-90402-1230868434_thumb.png

----

 

So HOWTO:

----

rc.liveboot.txt

This method works for both livd dvds and USB drives. It uses BOOT-132 as a boot loader and then exploits Apple's netboot and imageboot systems to boot from a disk image.

Install OSX fresh, boot into it and login/customize ur user a bit. It's set in stone from here on out.

 

first we need to be able to boot from a dmg: http://forum.insanelymac.com/index.php?showtopic=132698

0. You'll need to hack IOHDIXController.kext abit. Show its package contents, find Info.plist and change "Network-Root" to "Root". Do that for all its plugins as well. Regenerate Extensions.mkext.

1. Prepare the target media with boot-132. There are plenty of tuts in the genius bar for this...

2. Now following Rammjet's instructions, we plant some files on the root of the media:

/.Spotlight-V100
/.Trashes
/.com.apple.timemachine.supported
/.fseventsd
/Library/Preferences/SystemConfiguration/com.apple.Boot.plist
/System/Library/Extensions.mkext
/mach_kernel

3. That done, we need to plant the new rc script: download rc.liveboot.txt, remove the txt extension and put it under /etc. make sure its perms are the same as rc.netboot. Note, if you want to set the ramdisk size its in that script under RAMDisk. Just keep it >= 2000000 512k blocks...

4. Alright enough hacking already. Using disk utility create a compressed dmg of that installation.

5. Place that in the root of your media... live.dmg is a good name for it.

6. BURN/EJECT

 

7. Now, boot from that media. at the darwin prompt, provide the params: -v -f -s rp=file:///live.dmg

8. Let it get to the command prompt...Ok, type

 sh rc.liveboot init 

9. ...Ok, when it finishes, type exit and get out of bash.

The system should come up and be alive!!

 

---

Big thanks to entire OSX86 community & esp those who helped make this! Hagar, modbin, ~pcwiz, Rammjet, socalswimmer ...

Link to comment
Share on other sites

Sorry, I've been busy...

Basically I'd like an app so that ppl can build their own dvd's with a button press. A script could do the same thing.

I'm not sure about us releasing actual isos(it is illegal), so for now it might be better for the team to deal in creation and tools. Iso releases can be done under the table...

 

oh, BTW, The PRIVATE DISCUSSION IS NOT THE PLACE FOR NON-TEAM Members to ask QUESTIONS. There are other places for this. Sorry.

Link to comment
Share on other sites

 Share

×
×
  • Create New...