Kenneth Kellum <kkellum@pacbell.net> wrote:
Loadlin makes it relatively easy to boot Linux when in Windows. Is there anything out there for going the other way?
If you do have lilo installed and just use loadlin to avoid having to manually select Linux at lilo's prompt, you can use the following little script in Linux to reboot to Windows without having to select anything at the lilo prompt. Of course, you must change the word 'win' to the label you use for booting Windows. It should be run as root, but you could SETUID it, then you need to have the path of lilo and shutdown in as well. (I think it is /sbin, but I can't check that now) #!/bin/sh lilo -R win shutdown -r now Regards Ole -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Ole Kofoed Hansen wrote:
[...]
It should be run as root, but you could SETUID it, then you need to have the path of lilo and shutdown in as well. (I think it is /sbin, but I can't check that now)
#!/bin/sh lilo -R win shutdown -r now
Regards
You cannot setuid with shell script. Even if you have the s-bit set to root a shell script run with user privileges. Maurizio -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Maurizio Firmani wrote:
Ole Kofoed Hansen wrote:
[...]
It should be run as root, but you could SETUID it, then you need to have the path of lilo and shutdown in as well. (I think it is /sbin, but I can't check that now)
#!/bin/sh lilo -R win shutdown -r now
You cannot setuid with shell script. Even if you have the s-bit set to root a shell script run with user privileges.
I would make an addition to the script for the reasons above: #!/bin/sh su root lilo -R win shutdown -r now So now you'll have to type in the root password when it asks, but otherwise it should run as before and reboot you into Windows. Hope that helps, Chris -- __ _ -o)/ / (_)__ __ ____ __ Chris Reeves /\\ /__/ / _ \/ // /\ \/ / ICQ# 22219005 _\_v __/_/_//_/\_,_/ /_/\_\ -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (3)
-
chris.reeves@iname.com
-
k01164@ko.sdu.dk
-
maurizio@adriatico.prisma.rm.cnr.it