Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Sorry for the stupid title, I didn't know how else to phrase it.

I run a computer-science lab at a university with about 50 workstations that dual boot Debian and Windows XP. Obviously the grub default is Windows but there are times where it would be extra useful if we could boot the machines straight to Linux, like when there is a Linux related class or we want to access the Linux partition when we boot them remotely.

So what I'm basically asking is

  1. Does GRUB have basic script capabilities like "if var=true boot 1 else boot 2"?
  2. Is GRUB network-aware?
share|improve this question
Maybe this DeveloperWorks article can be helpful, describing how a "bootcontrol" setup that enables you to programmatically "Reboot to Linux" via GRUB's configfile directive and a config file on a shared partition... Another angle might be PXE-booting GRUB – sr_ Jun 3 '12 at 10:30
grub-choose-default looks promising, but I've never used it. Please try it, and report back if this works for you. – Gilles Jun 3 '12 at 22:29

You can setup a PXE server which serves PXELINUX with a configuration which chain loads a partition boot sector on the local disk. When you want to use Linux you would modify the PXELINUX configuration on the server and reboot the machines. The BIOS on the machines should be set to PXE boot first, and GRUB should be installed to the partition (not the MBR).

share|improve this answer
... or you can PXE boot grub directly. You don't need to use pxelinux. – derobert Sep 5 '12 at 13:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.