[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: remote control dual booting OSX / Debian



> I've found these two scripts useful for remotely switching between
> os's on a dual-boot new-world mac.   The scripts require a sudo
> environment.  They run from the command line, and do not require
> access to the system (yaboot) console.
>
> After the scripts are two aliases I use to have a fool-proof, not-
> parameterized command.
>
> Would anyone care to comment?
>
> Debian version:  usage "sudo reboot-from <partition>"
> reboot-from:
>      $! /bin/sh
>      nvsetenv reboot-device hd:$1,\\\\:tbxi
>      shutdown -r now
>
> OSX version:  usage "sudo reboot-from <partition>"
> reboot-from:
>      $!/bin/sh
>      nvram boot-device=hd:$1,\\\\:tbxi
>      shutdown -r now
>
> I use the scripts with the following shell aliases (my partitions are
> OSX on 10 and Debian on 13:
> Debian/bash:
>    function boot-osx () {
>        sudo reboot-from 10
>        }
>
> OSX/tcsh:
>    alias boot-linux sudo reboot-from 13

While this will work, it requires knowledge of the partition layout, and
does not permit changing the default boot device on short notice. I'd
rather change the defaultos setting in yaboot.conf and rerun ybin. If the
yaboot bootstrap partition is first on your disk, you'll boot the right
system even after zapping the parameter RAM (can happen on kernel
crashes).

	Michael



Reply to: