Soündless Posted December 23, 2007 Share Posted December 23, 2007 why do we need to restart to change OSes? why cant we just unload one OS and load another while leaving it on? Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/ Share on other sites More sharing options...
socal swimmer Posted December 23, 2007 Share Posted December 23, 2007 hmm.... we would need to hack shutdown (either in bios, or in the operating system) so that instead of powering down, it simply shuts down one operating system and starts up the boot loader again. how slow is virtualization? could you write a super-simple OS whose sole job is to act as a shell for the virtualization of operating systems? Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-548110 Share on other sites More sharing options...
microsoft whiz Posted December 23, 2007 Share Posted December 23, 2007 So You Want To Basically Be Able To Shut-Off The Operating System With Out Shutting Off The Computer. That Sounds Cool! Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-548800 Share on other sites More sharing options...
Hagar Posted December 23, 2007 Share Posted December 23, 2007 if you think about it, an EFI shell should be able to do this. Some of us will remember when syslinux or loadlin were popular ways of loading linux from within a running windows install, likewise the BeOS 4 demo that was distributed some years ago booted from a windows .exe. I see no reason why apps could not be written that would do something similar now, although they'd have to have some pretty hefty low-level permissions to wipe one of today's OS'es from memory & boot up another. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-548827 Share on other sites More sharing options...
hecker Posted December 23, 2007 Share Posted December 23, 2007 Just press "restart" and then pick your other OS: The same thing, IMO. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-548864 Share on other sites More sharing options...
Sabr Posted December 23, 2007 Share Posted December 23, 2007 I suppose if you could copy everything currently in the RAM/Memory to a temporary file, it could work? So when it comes to loading it back up again, it just places everything in from that temporary file into the memory? Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-548965 Share on other sites More sharing options...
socal swimmer Posted December 23, 2007 Share Posted December 23, 2007 I suppose if you could copy everything currently in the RAM/Memory to a temporary file, it could work? So when it comes to loading it back up again, it just places everything in from that temporary file into the memory? yea. You would also (probably) have to fine the location of the virtual memory and protect that. Say you have 26GB of virtual memory, and 2GB of RAM. the "restart" application would do this to switch from Mac to Windows: first, it quits all other applications. Then, it finds the location of the virtual memory, and saves the used portion as a file (it wouldn't have to touch the data, just add an entry to the filesystem). Then, it copies all data in active and wired memory (real RAM) to the end of this virtual memory file, makes a separate entry for this in the filesystem. It would also have to save the state of all active processes. then, it wipes the memory (except for itself), and calls the boot sector efi file (assuming you have pc_efi). From there, you can start up x64 Windows. After having my computer on for several days, I have 660 MB total of "Wired" and "Active" memory. about 410 MB of that is user processes (BOINC, XCode, firefox, Mail, etc.). So, this restart app would have to copy about 250MB of RAM data to the hard drive. I can write at 72MB/sec, so It would take about 4 seconds to copy the contents of the memory to hard drive. Inactive memory does not matter, because it is simply left over from other apps you have already closed (or so Help says). To go from Windows to Mac, it would quit all processes, then wipe the memory, then loads the OS X data back into RAM, and restore all processes. You would have to write it in Assembly, and at a hardware level. It would have to be operating system independent, and use no OS calls. You would probably have to make an app or .exe to launch it. I should stop right now. I'm going to f*ck up my operating system beyone all usability..... As long as you stay away from system files, you shouldn't damage anything. You would have to unmount all volumes somehow.... ======= So, what we have to do: save virtual memory as a (huge) file copy active and wired memory to disk, save it as a file save the state of all processes, and stop them call efi boot sector file (for osx86 pc_efi computers), startup windows. If you did it this way, you could boot back to where you left off. ======= or: you could just quit all processes wipe the memory call the efi file. this would be much easier. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-549335 Share on other sites More sharing options...
Soündless Posted December 23, 2007 Author Share Posted December 23, 2007 thats a tad bit out of my technological know-how. maybe netkas will do this, just like he did "my" efi idea... Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-549338 Share on other sites More sharing options...
socal swimmer Posted December 23, 2007 Share Posted December 23, 2007 loli got caried away. this would be much easier: you could just quit all processes wipe the memorycall the efi file. This would save me about a minute of boot time. As I was thinking about it, I realized something;You don't even need to wipe the memory. If there are no processes that remember data is in the memory, then it doesn't matter that its there. When you start up the next OS, it will be overwritten like nothing is there.I was playing with how to quit processes. sudo -s (switch to root) <press enter> ps -cax <press enter> (lists all processes, including there process id (pid) and their name) kill -9 <pid <press enter> (kills a process)I did "kill -9 191". 191 was the second launchd. After doing that, terminal froze (along with its menu bar). Sweet! But, i couldn't kill the first process (1) for some reason..... no permission I guess, even as root. also, the app switcher (Apple-tab), the force quit menu, and exposé don't work. this is on my iMac. EDIT: darn, after about 2 minutes, everything came back (after I force-quit terminal from activity monitor) Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-549340 Share on other sites More sharing options...
apowerr Posted December 25, 2007 Share Posted December 25, 2007 I don't get the point of this thread or question. Windows, OS X and Linux all boot up in fundamentally different ways. I guess I'm missing the point here. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-550943 Share on other sites More sharing options...
socal swimmer Posted December 25, 2007 Share Posted December 25, 2007 yea they do but if you call the boot sector efi file (boot0), it will all work from there. the point is to avoid the 40 - 60 seconds spent in BIOS at boot up. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-550996 Share on other sites More sharing options...
cmdshft Posted January 10, 2008 Share Posted January 10, 2008 If you're spending 40-60 seconds in BIOS, there's something wrong with your machine. My time spent in BIOS: 17 seconds. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-574099 Share on other sites More sharing options...
Sabr Posted January 10, 2008 Share Posted January 10, 2008 If you're spending 40-60 seconds in BIOS, there's something wrong with your machine. My time spent in BIOS: 17 seconds. He obviously means the time spent booting the Operating System as well... Oh, ok - nevermind then. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-574138 Share on other sites More sharing options...
socal swimmer Posted January 11, 2008 Share Posted January 11, 2008 no actually i do spend 40-60 seconds in bios 20-30 in LAN boot rom (required for ethernet to work in a dual boot setup for my mobo) 10-15 in SATA AHCI BIOS. then the other random stuff. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-574512 Share on other sites More sharing options...
Mebster Posted January 11, 2008 Share Posted January 11, 2008 If anyone gets this working please send me a PM Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-574638 Share on other sites More sharing options...
mifki Posted January 11, 2008 Share Posted January 11, 2008 port xen to efi, all you need is the lightweight hypervisor Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-574645 Share on other sites More sharing options...
(MoC) Posted January 14, 2008 Share Posted January 14, 2008 Would be nice but buggy as hell... Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-578564 Share on other sites More sharing options...
qbattersby Posted January 25, 2008 Share Posted January 25, 2008 This is some trickiness. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-593241 Share on other sites More sharing options...
VenturAce Posted February 14, 2008 Share Posted February 14, 2008 I didn't get the plot of the thread either... Are you talking about Virtualization Machines? How do they switch from one OS to another? Running BootCamp you need to reboot your system to switch to another OS. With Parallels and Fusion you don't need to reboot. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-623778 Share on other sites More sharing options...
cabron Posted February 14, 2008 Share Posted February 14, 2008 Im curious to see hows the behavior of a 8gigs ram + mac pro 8 cores run and deal with the virtualization its going to be the native speed, like as we boot the windows from bios right? I think with the improvements of virtualization and hw, the host machine will deal fine with guest, and the guest will act as full loaded realtime os. And its the dream of ms for windows7 right? But I think this is gonna happen or at least be damn hot useful for us mac/hackintosh users. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-623854 Share on other sites More sharing options...
(MoC) Posted February 14, 2008 Share Posted February 14, 2008 I think it would be just easier to push that nice button with a power symbol on it.... But still it would be pretty sweet in any-form if possible... Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-624494 Share on other sites More sharing options...
Superhai Posted February 14, 2008 Share Posted February 14, 2008 Of course it can be done, but you need that the OS´s in question have this ability built-in. The problem as I see it is that this can be a security threat if not done properly as this hook or gate or whatever you choose to do this will have to be running (on the x86) at lower than ring 3. And that would make it vulnerable for viruses etc. A better option is one hybrid. You could i.e. hibernate the computer (write the state to disc) use bios or efi (i guess legacy bios are too limited) to change running state of computer, then restart the cpus only and run an efi switch application which loads the hibernation of the other os, or if not existing - starts it up. Link to comment https://www.insanelymac.com/forum/topic/77478-why-do-we-need-to-restart-to-change-oses/#findComment-624662 Share on other sites More sharing options...
Recommended Posts