Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub boot parameter?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
pmgas
Tux's lil' helper
Tux's lil' helper


Joined: 23 Apr 2003
Posts: 97
Location: Austria

PostPosted: Mon Oct 06, 2003 12:26 am    Post subject: grub boot parameter? Reply with quote

Hi guys

I have a question! I have two operating systems (winxp and gentoo) and i am using
grub as a bootmanager.
Is there a way to select the "next" operating system? it means following:
When I am under linux and want to boot into windows, is there a possibility, maybe some
parameter for the shutdown-command or anything else, to decide under linux which operating
system will be booted at the next startup?
It would be very fine if I could decide before the reboot, which OS i would prefer at next
startup! Does anybody know a solution?

thanxs
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Mon Oct 06, 2003 12:39 am    Post subject: Reply with quote

I've wanted this too, for quite a while, especially with my wake-on-LAN setup. About the best you can do with GRUB is have two grub.conf files, and a script that swaps between them physically on the filesystem. Of course, once you're in Windows, you can't change the script, so you're stuck there :(

If anyone knows of a better idea... :?:
Back to top
View user's profile Send private message
funkmankey
Guru
Guru


Joined: 06 Mar 2003
Posts: 304
Location: CH

PostPosted: Mon Oct 06, 2003 12:56 am    Post subject: Reply with quote

hrm, couldn't you simply format /boot as fat so that windows could read it and have a similar batch file to your shell script...?

EDIT: (well, aside from the obvious badness of having something as important as a boot partition formatted using something as lame as fat...heh, aren't there any decent journalled fs that ms can r/w reliably?) /EDIT
_________________
I've got the brain, I'm insane, you can't stop the power
Back to top
View user's profile Send private message
sa
Guru
Guru


Joined: 10 Jun 2002
Posts: 450

PostPosted: Mon Oct 06, 2003 1:11 am    Post subject: Reply with quote

you could make a shell script that did something like this:

Code:

# reboot-to-linux
mount /boot
cp /boot/grub/grub.conf-linux /boot/grub/grub.conf
reboot


Code:

# reboot-to-windows
mount /boot
cp /boot/grub/grub.conf-windows /boot/grub/grub.conf
reboot


and then setup /boot/grub/grub.conf-linux and /boot/grub/grub.conf-windows to boot to the appropriate OS. Im sure you could do something fancier with sed.
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Mon Oct 06, 2003 7:23 pm    Post subject: Reply with quote

Sa: I think the problem is accessing grub.conf when you're booted in windows. The fat filesystem idea is interesting however - that would probably work?

Using symlinks is probably safer than copying files around, but I guess with FAT you can't have symlinks.


Last edited by meowsqueak on Mon Oct 06, 2003 8:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
funkmankey
Guru
Guru


Joined: 06 Mar 2003
Posts: 304
Location: CH

PostPosted: Mon Oct 06, 2003 7:30 pm    Post subject: Reply with quote

Code:
# What filesystems are supported, and how do I tell it which one to use?

GRUB comes with support for DOS FAT, BSD FFS, and Linux ext2fs filesystems, plus a blocklisting notation for accessing blocks directly. When using the normal file syntax, GRUB will autodetect the filesystem type.


also, I seem to recall that I had a fat boot partition back when dual-booting NT and linux on Alpha hardware...
_________________
I've got the brain, I'm insane, you can't stop the power
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum