You are not logged in.

#1 2006-02-13 01:45:47

mtrivs
Member
From: Syracuse, NY
Registered: 2005-12-26
Posts: 183

Creating a "Boot into Windows" button/shortcut

Does anyone know if there is a way i can create a "boot into windows" button for linux.  I would like to put it on my linux desktop, so when i need to boot into windows, i can shutdown arch and boot right into windows, without having to go through grub and all that stuff.  I have read something about qemu, but dont really know if that will work.  Any help would be appreciated.



Thanks!


~HP ZV6000 Series CTO~
-AMD Athlon 64 3200+ 2.0GHz
-1.5GB RAM
-128MB ATI Mobility Radeon X200m
-80GB 5400RPM HD
[img]http://imagegen.last.fm/scarface/recenttracks/mtrivs.gif[/img]

Offline

#2 2006-02-13 02:01:12

Cerebral
Forum Fellow
From: Waterloo, ON, CA
Registered: 2005-04-08
Posts: 3,108
Website

Re: Creating a "Boot into Windows" button/shortcut

Well, you could write a script to change the default OS in your grub menu.lst and the wait time to 0, then reboot.
Getting back IN to Linux would then require some effort, as you'd have to sit by the keyboard waiting for grub to come up and quickly press "down" or something. tongue

Offline

#3 2006-02-13 02:21:32

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: Creating a "Boot into Windows" button/shortcut

If you used NTLDR rather than Grub then you could have shortcuts in both Windows and linux. They'd just need to edit the C:boot.ini file which is easily done via either OS smile

Offline

#4 2006-02-13 03:12:08

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Creating a "Boot into Windows" button/shortcut

if you use lilo, it should be as simple as a shell script that does:

lilo -R Windows (where Windows is your Windows label in the lilo.conf)
shutdown -r now

and putting the shortcut on your desktop with a kdesu command or some such.

Dusty

Offline

#5 2006-02-13 05:27:24

mtrivs
Member
From: Syracuse, NY
Registered: 2005-12-26
Posts: 183

Re: Creating a "Boot into Windows" button/shortcut

I use grub, and would like to keep it that way.  Does anyone know if there is a way i can do it with that?  If i have to i may switch to NTLDR, but i would rather keep grub.  Thanks for the quick replies!!


~HP ZV6000 Series CTO~
-AMD Athlon 64 3200+ 2.0GHz
-1.5GB RAM
-128MB ATI Mobility Radeon X200m
-80GB 5400RPM HD
[img]http://imagegen.last.fm/scarface/recenttracks/mtrivs.gif[/img]

Offline

#6 2006-02-13 05:31:28

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Creating a "Boot into Windows" button/shortcut

I've seen distros that reboot into win on grub, check the grub man page. (I don't have it installed)

Dusty

Offline

#7 2006-02-13 05:42:16

mtrivs
Member
From: Syracuse, NY
Registered: 2005-12-26
Posts: 183

Re: Creating a "Boot into Windows" button/shortcut

I looked around on the man page and tried a few things, but couldnt find anything that would do what i want it to do.....Any more suggestions?

Thanks again!


~HP ZV6000 Series CTO~
-AMD Athlon 64 3200+ 2.0GHz
-1.5GB RAM
-128MB ATI Mobility Radeon X200m
-80GB 5400RPM HD
[img]http://imagegen.last.fm/scarface/recenttracks/mtrivs.gif[/img]

Offline

#8 2006-02-13 09:41:09

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Creating a "Boot into Windows" button/shortcut

mtrivs wrote:

I looked around on the man page

The man page is fairly basic - what you need is grub's info manual - http://info2html.sourceforge.net/cgi-bi … nfo.gz)Top .

(The URL won't post properly, for some reason - you need everything from 'http' to 'Top').

mtrivs wrote:

I have read something about qemu, but dont really know if that will work.

Qemu won't reboot your system into Windows - it's an emulator, which you can use to launch Windows within Linux. It might suit your purpose, depending on what you use Windows for - the performance is not as good as in native Windows.

Offline

#9 2006-02-13 17:30:39

mtrivs
Member
From: Syracuse, NY
Registered: 2005-12-26
Posts: 183

Re: Creating a "Boot into Windows" button/shortcut

I looked on that manual and found this:

If you want to install GRUB non-interactively, specify `--batch'
 option in the command-line. This is a simple example:
 
      #!/bin/sh
      
      # Use /usr/sbin/grub if you are on an older system.
      /sbin/grub --batch <<EOT 1>/dev/null 2>/dev/null
      root (hd0,0)
      setup (hd0)
      quit
      EOT
 

Could i somehow invoke something like that command with the --bash switch, so that it boots into windows? I tried using the grub shell before, but i am not very good at it.  I have read the man page as well as that manual, but still dont understand it. 

Thanks for all your help!


~HP ZV6000 Series CTO~
-AMD Athlon 64 3200+ 2.0GHz
-1.5GB RAM
-128MB ATI Mobility Radeon X200m
-80GB 5400RPM HD
[img]http://imagegen.last.fm/scarface/recenttracks/mtrivs.gif[/img]

Offline

#10 2006-02-14 05:52:36

iBertus
Member
From: Greenville, NC
Registered: 2004-11-04
Posts: 2,228

Re: Creating a "Boot into Windows" button/shortcut

A quick question. Does it really take that long to select Windows from the GRUB menu? You could make it the default with like a 3 second delay and then it would only add 3 seconds to the time a button would take.

Offline

#11 2006-02-14 08:26:10

mtrivs
Member
From: Syracuse, NY
Registered: 2005-12-26
Posts: 183

Re: Creating a "Boot into Windows" button/shortcut

Thats what i have my delay on anyway, i was more interrested in getting it to work just to get it to work, and also because i think it would be cool to have.


~HP ZV6000 Series CTO~
-AMD Athlon 64 3200+ 2.0GHz
-1.5GB RAM
-128MB ATI Mobility Radeon X200m
-80GB 5400RPM HD
[img]http://imagegen.last.fm/scarface/recenttracks/mtrivs.gif[/img]

Offline

#12 2006-02-14 09:47:24

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: Creating a "Boot into Windows" button/shortcut

#!/bin/sh

#
# where Windows is the second OS in your list
#
mount | grep boot
if [ $? -eq 1 ]; then
  mount /boot
fi

sed -e "s/default.*[0-9]/default 1/g" -i /boot/grub/menu.lst
shutdown -r now

exit 0

That should do the trick, the if at the top might not work, I suck at shell and it was a guess. It would need to be run as root obviously and I'd check that the sed line works on your particular menu.lst before running it.

Offline

#13 2006-02-14 13:19:16

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: Creating a "Boot into Windows" button/shortcut

I hope you are using ext3 ...

IMHO if you are using ext3 your problem is solved, create 2 menu.list one called menu.list.linux and the other menu.list.windows, put the default entry to the desired one and take the delay down to 0 along with hidemenu command ( boot into selected distribution instantly.. )

On linux create the following script

#!/bin/sh
cp /boot/grub/menu.list.windows /boot/grub/menu.list
[[ -f /boot/grub/menu.list ]] || exit 1
shutdown -r now

Now go to windows, install Ext2 FS ( http://www.fs-driver.org/ ) mount the boot partition and create a bat script

copy E:bootgrubmenu.list.linux E:bootgrubmenu.list

i dont remember if u can reboot from a bat script but that will do the trick...

P.S: yea i know, it would be better to use one script and use sed/awk to patch it, but how will he patch it on windows ? personaly i don't know how :oops: so I took the idea of 2 menu.list(s)

Offline

#14 2006-02-14 17:07:57

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: Creating a "Boot into Windows" button/shortcut

iBertus wrote:

A quick question. Does it really take that long to select Windows from the GRUB menu? You could make it the default with like a 3 second delay and then it would only add 3 seconds to the time a button would take.

Thats what I would do, 2. But this seems to be a question of sports. Gotta be fixed the crude way. smile


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#15 2006-02-14 19:00:51

mtrivs
Member
From: Syracuse, NY
Registered: 2005-12-26
Posts: 183

Re: Creating a "Boot into Windows" button/shortcut

_Gandalf_ wrote:

I hope you are using ext3 ...

IMHO if you are using ext3 your problem is solved, create 2 menu.list one called menu.list.linux and the other menu.list.windows, put the default entry to the desired one and take the delay down to 0 along with hidemenu command ( boot into selected distribution instantly.. )

On linux create the following script

#!/bin/sh
cp /boot/grub/menu.list.windows /boot/grub/menu.list
[[ -f /boot/grub/menu.list ]] || exit 1
shutdown -r now

Now go to windows, install Ext2 FS ( http://www.fs-driver.org/ ) mount the boot partition and create a bat script

copy E:bootgrubmenu.list.linux E:bootgrubmenu.list

i dont remember if u can reboot from a bat script but that will do the trick...

P.S: yea i know, it would be better to use one script and use sed/awk to patch it, but how will he patch it on windows ? personaly i don't know how :oops: so I took the idea of 2 menu.list(s)

I am using EXT3 and i already have the Ext2fs installed, so i think those 2 scripts should do the trick!


~HP ZV6000 Series CTO~
-AMD Athlon 64 3200+ 2.0GHz
-1.5GB RAM
-128MB ATI Mobility Radeon X200m
-80GB 5400RPM HD
[img]http://imagegen.last.fm/scarface/recenttracks/mtrivs.gif[/img]

Offline

Board footer

Powered by FluxBB