Use the arrow keys to select the drive you want to boot from and then press "Enter" to use it. Just hold the "Option" key after you turn on or restart your Mac to display the Startup Manager. You can change the startup disk while the Mac is booting. Using "sudo" in a bash shells script is not necessary, especially if you run the script as a superuser. To run the shell at a specified time, create a Cron job.ĭon't forget the "sudo" part of the command to run it as a superuser from the Terminal. #!/bin/bash bless -mount /Volumes/Startup_Disk_Name -setBoot shutdown -r now To get more information on the Bless command, type "man bless" without the quotes into the Terminal and press "Enter."Ī simple bash shell script that changes the startup disk and then restarts the Mac looks like this:
0 Comments
Leave a Reply. |