Jump to content

OS X Live: Developers' Private Discussion


  • Please log in to reply
135 replies to this topic

#21
(MoC)

(MoC)

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,653 posts
  • Gender:Male
  • Location:/dev/moc
  • Interests:Plenty.

My worry was that regardless of the auto kext detection, we might have conflicts between certain kexts (this stuff comes from everywhere: vendors, devs, usermods, etc). A rather tedious task would be, for example, integrating all the known VIDs and DIDs of stuff that works with different kexts.


What if we do an initial auto-detect and then allow the user to input their hardware config at first boot, let the computer write the config to a file, reboot, load, and voila. Then we'd have to dump the Live DVDs and stay flashdrive only. :hysterical:

#22
skyhighmac

skyhighmac

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,874 posts
  • Gender:Male
If you had an autodetect, read from an xml file (or something else) with the appropriate kext and device id, you could make that happen, all without writing a config file. Though that would help boot up times if they wanted to run the live dvd more than once w/o waiting for the whole startup.

#23
(MoC)

(MoC)

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,653 posts
  • Gender:Male
  • Location:/dev/moc
  • Interests:Plenty.
Or just do an initial setup?

#24
skyhighmac

skyhighmac

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,874 posts
  • Gender:Male

make users run through "is this your hardware, is this correct"

(MoC on AIM)

That would be a good idea. Then you would have to have to have like Is your video card nVIDIA 7900GT? with a y/n input answer. That could work, but where would we write that config file created to, if, for example you wanted to shut down and start up later?

#25
nightwalker12

nightwalker12

    InsanelyMac Protégé

  • Members
  • Pip
  • 48 posts
  • Gender:Male
  • Interests:computers and used to be every 1s computers
here guys i have access to all the original documentation and all darwin source code 9.5 if u need anything let me know i can get any original source code u want or the tools :(

Attached Files



#26
skyhighmac

skyhighmac

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,874 posts
  • Gender:Male
Cool. will have a look. so you guys dont mind if I join the team?

#27
(MoC)

(MoC)

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,653 posts
  • Gender:Male
  • Location:/dev/moc
  • Interests:Plenty.

Cool. will have a look. so you guys dont mind if I join the team?


We're perfectly fine with it. I know skyhighmac for quite a while, and I think I can speak for all of us that you're a welcome member to the team.

#28
spartango

spartango

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 147 posts
  • Location:CA USA
I like the idea of an xml/plist file from which to load custom drivers a bit onwards in the boot. People could easily add on more devices before building the dvd(if we haven't included them), even tho the kexts would already be there. I'd rather not prompt the user unless it is absolutely necessary, and would rather not write any files to a persistent storage device because that would build differences between liveDVD and usb. Hopefully we can keep them similar.
Let's keep in mind that the auto-detection is really only necessary for graphics and sound(and a few random things), so it can be run pretty far on in the boot, loading via kextload calls from a script.
I'm a bit concerned about the other facets of the boot however, especially what happens after a compressed dmg is mounted after boot-132. I'm not sure how OSX will handle that as a root filesystem, so we should probably see what kind of errors it throws when we try. I'd like to get those worked out...I really want to use a system like that...it'll make life really nice.

#29
skyhighmac

skyhighmac

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,874 posts
  • Gender:Male
thanks MoC :(

spartango: I get where you are coming from. I think an xml file with device ids & kext names for audio & graphics would be good, with automatic detection and maybe a boot option in case the dvd cant get the kext right?

For the dmg i have no idea...

#30
spartango

spartango

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 147 posts
  • Location:CA USA
skyhighmac: your input is much appreciated!
for the dmg...I have an idea but wanna try it some time... In THEORY it SHOULD work, but according to rammjet it doesn't, and i'd like to find out y. My suspicion is that it has to do with the read-only state of the image, considering the fact that when they moved to a full install dmg, it broke...but then again, the modbin approach also was read only until ramdisk is up, and i also know that kernel has special procedures that it does when it finds that the rootfs is readonly...gotta find out what those are.

#31
skyhighmac

skyhighmac

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,874 posts
  • Gender:Male
Thanks. I hope that guys will let me be a full part of the team.

THEORY - mean it should work but never does ;)

Well I can help look through that pdf above. Is there a way to mount it sometime using command line? I mean there is a command, but where would it be possible to execute?

#32
spartango

spartango

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 147 posts
  • Location:CA USA
So, hdiutil is normally the tool that will mount a disk image, but its a userland tool, and we'll run something at the Boot-132 level(ie very low level) to mount the compressed diskimage. Rammjet leads me to believe that this function is already present in some form in boot-132...he did try it..
I'm betting this is akin to the feature that lets you load a ramdisk image with your custom kexts before really loading the os, by using syslinux/[GRUB?], but that loads stuff into memory, which is kinda bad for us. Let's get some feedback from him on how he did it with the install DVD...

Btw, i looked through that paper. and while it is definitely a good thing to be familiar with, I believe there is something more pressing to be understood:
please read this if you get a moment, we'll need to maximize our use of it.
http://tgwbd.org/darwin/boot.html


Aiight...
This is from [user] himself:
"
25 seconds from Darwin boot prompt to Language selection dialog box.

Files placed outside the compressed image:
/.Spotlight-V100
/.Trashes
/.com.apple.timemachine.supported
/.fseventsd
/Library/Preferences/SystemConfiguration/com.apple.Boot.plist
/System/Library/Extensions.mkext
/mach_kernel
/test.dmg (the compressed image)
Place "-f -v rp=file:///test.dmg" in the Boot.plist.

The dot files/dirs can be deleted but they will be regenerated. That wouldn't happen on a DVD.

I modified the IOHDIXController.kext and built a new mkext. Because of the unique mkext, when the installer boots, I have full video and partial wireless.

The files are from an early 9A581 installation and the test.dmg is the 9A581 installer"

Let's try this. It turns out he exploits not a functionality of Boot-132, but of the darwin loader itself...Netbooting. This works great because the install disk is always read only, so booting has no problems...
I'm gonna try this soon. Once we've tried this we can progress to using a normal install image as opposed to an installer. That'll bring up the read-write issue, but i've got an idea for that.
gnite for now

#33
nightwalker12

nightwalker12

    InsanelyMac Protégé

  • Members
  • Pip
  • 48 posts
  • Gender:Male
  • Interests:computers and used to be every 1s computers
sounds good ill be doing a trail live dvd but it wont be for two days have to fly out for convention good luck guys ;) ihave to leave soon so ill take my laptop lol never leave home without it will try some more work while im flying ps good work spartango good luck

#34
REVENGE

REVENGE

    Made of Win

  • Retired Developers
  • 684 posts
  • Gender:Male
  • Location:California, USA
Yeah hey skyhigh, just speak your mind here, you seem to have good ideas to share. :) You don't need my "approval" to be on the team, just your own action and the acceptance of the other devs. :unsure:

The auto detection ideas sound good in concept, put them in practice and make a judgment regarding which solution is best.

#35
Hagar

Hagar

    Project Dogsbody

  • Administrators
  • 2,352 posts
  • Location:Over the hills & far away
Just a quick butt-in, if I may.. I have been trying out booting compressed dmg's from usb sticks with Rammjet's method and it works fine for install dvd images. Combining this technique with a prelinked kernel works too, so if a default image can be made to work as a live dvd, the hardware configurations can be dealt with by typing the name of the prelinked kernel at boot? I made an image of a minimal unmodified 10.5.4 retail install (it's 3.07GB as a compressed .dmg) and booted it this way, (with appledecrypt & disabler in the prelinked kernel) but naturally it failed due to being on a read-only image.

so all you have on the stick is:

/Library/Preferences/SystemConfiguration/com.apple.Boot.plist
/mach_kernel.prelinked <- can have loads of these called anything, contain kernel & kext cocktail for various setups
/whatever.dmg <- the clever bit
/boot
- in case it's useful

oh, P.S. can anyone confirm that this method doesn't work with Tiger? It doesn't for me.

#36
Adam.co.jp

Adam.co.jp

    InsanelyMac Protégé

  • Members
  • Pip
  • 39 posts
  • Gender:Male
  • Location:London, UK

Just a quick butt-in, if I may.. I have been trying out booting compressed dmg's from usb sticks with Rammjet's method and it works fine for install dvd images. Combining this technique with a prelinked kernel works too, so if a default image can be made to work as a live dvd, the hardware configurations can be dealt with by typing the name of the prelinked kernel at boot? I made an image of a minimal unmodified 10.5.4 retail install (it's 3.07GB as a compressed .dmg) and booted it this way, (with appledecrypt & disabler in the prelinked kernel) but naturally it failed due to being on a read-only image.

so all you have on the stick is:

/Library/Preferences/SystemConfiguration/com.apple.Boot.plist
/mach_kernel.prelinked <- can have loads of these called anything, contain kernel & kext cocktail for various setups
/whatever.dmg <- the clever bit
/boot
- in case it's useful

oh, P.S. can anyone confirm that this method doesn't work with Tiger? It doesn't for me.



Heya guys sorry for not popping in yesterday I had clinics ;) Fail!

Hagar I have to say this would make life much much easier. Good find :)

We could do a poll to start off with and see what the most common set ups are then make loads of these prelinked mach_kernels. (probably 50+) though I'm sure it can't take too long. I'm off to have a go.

Then at boot just type in the one they want and hey presto its done.

#37
(MoC)

(MoC)

    InsanelyMacaholic

  • Members
  • PipPipPipPipPipPipPipPipPipPipPip
  • 2,653 posts
  • Gender:Male
  • Location:/dev/moc
  • Interests:Plenty.

Just a quick butt-in, if I may.. I have been trying out booting compressed dmg's from usb sticks with Rammjet's method and it works fine for install dvd images. Combining this technique with a prelinked kernel works too, so if a default image can be made to work as a live dvd, the hardware configurations can be dealt with by typing the name of the prelinked kernel at boot? I made an image of a minimal unmodified 10.5.4 retail install (it's 3.07GB as a compressed .dmg) and booted it this way, (with appledecrypt & disabler in the prelinked kernel) but naturally it failed due to being on a read-only image.

so all you have on the stick is:

/Library/Preferences/SystemConfiguration/com.apple.Boot.plist
/mach_kernel.prelinked <- can have loads of these called anything, contain kernel & kext cocktail for various setups
/whatever.dmg <- the clever bit
/boot
- in case it's useful

oh, P.S. can anyone confirm that this method doesn't work with Tiger? It doesn't for me.


In theory it should work on Tiger. Let me try that now and get back to you ;)

(Oh, and sorry if we had any hard feelings before, I was a complete idiot for calling you out) :)

#38
spartango

spartango

    InsanelyMac Geek

  • Members
  • PipPipPip
  • 147 posts
  • Location:CA USA
ooo...interesting concept...ima reserve my judgement on this for the moment, we should definitely see how far it can get us...

umm...@Hagar, can you give us an idea of what your output looked like when you tried the minimal install image? I wanna see where exactly its choking to get an idea of how long we have in the boot before we absolutely need a tmpfs or something..

looking good tho

#39
skyhighmac

skyhighmac

    InsanelyMac Deity

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 1,874 posts
  • Gender:Male
ooo. nice concept. but could we have that kernel link to kexts in another location so we don't have to create a bajillion kernels?

#40
Hagar

Hagar

    Project Dogsbody

  • Administrators
  • 2,352 posts
  • Location:Over the hills &amp; far away

ooo...interesting concept...ima reserve my judgement on this for the moment, we should definitely see how far it can get us...

umm...@Hagar, can you give us an idea of what your output looked like when you tried the minimal install image? I wanna see where exactly its choking to get an idea of how long we have in the boot before we absolutely need a tmpfs or something..

looking good tho


I had to rebuild the stick, but here are 2 screenshots:
Posted Image Posted Image

in the first you can see the .dmg being identified as the root device, then comes a load of spam simiar to the top of picture 2 & finally it repeats the last line of picture 2 forever.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy