Jump to content











Photo
* * * - - 1 votes

Bootloader to linux to windows without reset?


  • Please log in to reply
5 replies to this topic

#1 Serpreme

Serpreme
  • Members
  • 3 posts
  •  
    United States

Posted 07 April 2008 - 05:42 PM

I'm currently looking into using kexec to hand off control of a linux kernel to windows or grub. That way i can load a script that checks an image server, returns a value, then moves onto the windows OS.

Or possible have that linux session modify the GRUB loader i am using, then have kexec load up GRUB again and have the settings take effect.

Basically i'm trying to remove a step, which is rebooting after it loads the kernel.

If i'm not being very clear, sorry, i'll try to explain more so.

So far havnt found any good sources of windows actually loading from linux or GRUB itself, but many people say its "possible".
Thanks!

#2 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 07 April 2008 - 06:46 PM

Hi Serpreme, welcome to our community.

Please bear with answers as my personal linux experience is somewhat reduced but I've been googling to find some possible solutions.

You can try GRUB4DOS instead of regular GRUB to boot up windows.

Look here:

(1) Run GRUB.EXE at the DOS prompt or in AUTOEXEC.BAT
(2) In CONFIG.SYS of DOS/Windows9x, use DEVICE=GRUB.EXE or INSTALL=GRUB.EXE or SHELL=GRUB.EXE
(3) In BOOT.INI of Windows NT/2K/XP, use C:\GRLDR="GRUB" (there should be a backslash between C: and GRLDR)
(4) Under Linux, use "kexec -l grub.exe" and then "kexec -e"
(5) In syslinux.cfg, use "kernel grub.exe"
(6) Under GNU GRUB, use "kernel (DEVICE)/PATH/grub.exe"
(7) In lilo.conf, use "image=/boot/grub.exe"

http://grub4dos.jot.com/WikiHome

:thumbsup:

#3 Serpreme

Serpreme
  • Members
  • 3 posts
  •  
    United States

Posted 07 April 2008 - 07:51 PM

Hi Serpreme, welcome to our community.

Please bear with answers as my personal linux experience is somewhat reduced but I've been googling to find some possible solutions.

You can try GRUB4DOS instead of regular GRUB to boot up windows.

Look here:

http://grub4dos.jot.com/WikiHome

:thumbsup:

I think you might have something there. I'll need to fully digest this bit of information i overlooked many times.
Thank ya buddy, much appreciated.

#4 mihi

mihi

    Newbie

  • Members
  • 29 posts
  •  
    Germany

Posted 13 April 2008 - 11:46 AM

You can try GRUB4DOS instead of regular GRUB to boot up windows.


Hello Nuno, Hello Serpreme,

please keep us updated how well this works.
About two years ago I hacked up some code to chainload a boot sector from kexec. In principle it works (especially if the chainloaded OS is Linux), but in practice (both with DOS and Windows) there were some problems:
  • Some Linux drivers seem to map hardware address space over BIOS interrupts, so as soon as the loaded OS tries to call BIOS directly, it crashes
  • Some Windows drivers seem to expect a device which is in "reset" state and not all linux driver leave drives in this state when running kexec

At that time, there were no plans to fix this, but since it is two years ago, it can surely be that it magically works now :thumbsup: Or maybe Grub4Dos includes some quirks to remember the address space mapping when it is loaded first and restores it on kexec load?

So, please keep up updated if you manage to load Windows from a regular (not extremely stripped down) Linux kernel, thank you :tabletalk:

mihi

#5 ilko

ilko

    Silver Member

  • Advanced user
  • 500 posts
  •  
    Bulgaria

Posted 13 April 2008 - 06:35 PM

Have a look at this thread too:
http://www.boot-land...?showtopic=4251

It seems grub4dos grub.exe does have some issues when executed by kexec, or kernel/kexec version matter. I am eagerly awaiting tinybit's/windrv's response on this matter.

ilko

#6 Serpreme

Serpreme
  • Members
  • 3 posts
  •  
    United States

Posted 14 April 2008 - 05:38 PM

Have a look at this thread too:
http://www.boot-land...?showtopic=4251

It seems grub4dos grub.exe does have some issues when executed by kexec, or kernel/kexec version matter. I am eagerly awaiting tinybit's/windrv's response on this matter.

ilko

I am so inept with linux that i am having trouble installing grub4dos =P
But i will keep you all up to date.
So far i've run into the issue of vesafb locking video.
I can get the floppy img of grub to execute. But since the video locks up on me, i have to manually power down. When it loads up on next bootup, grub loads. Thats atleast good news. Since i dont have grub installed.
So i'm going to make a shell script that automatically launchs kexec, kexec -e and reboot -f
Hopefully this will be more useful then what i currently have going.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users