View previous topic :: View next topic |
Author |
Message |
pmgas Tux's lil' helper
Joined: 23 Apr 2003 Posts: 97 Location: Austria
|
Posted: Mon Oct 06, 2003 12:26 am Post subject: grub boot parameter? |
|
|
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 |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Mon Oct 06, 2003 12:39 am Post subject: |
|
|
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 |
|
|
funkmankey Guru
Joined: 06 Mar 2003 Posts: 304 Location: CH
|
Posted: Mon Oct 06, 2003 12:56 am Post subject: |
|
|
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 |
|
|
sa Guru
Joined: 10 Jun 2002 Posts: 450
|
Posted: Mon Oct 06, 2003 1:11 am Post subject: |
|
|
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 |
|
|
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Mon Oct 06, 2003 7:23 pm Post subject: |
|
|
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 |
|
|
funkmankey Guru
Joined: 06 Mar 2003 Posts: 304 Location: CH
|
Posted: Mon Oct 06, 2003 7:30 pm Post subject: |
|
|
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 |
|
|
|