Automatic Setup and Parms
You can use a .bat script to perform Grub2Win setup. The Automatic Install feature uses parameters to run grub2win.exe.
I have provided a sample script in C:\grub2\winsource\xxgrubsetup.txt
You must modify the script rundir and runparms variables in the script using set commands.
rundir must point to the install directory created as follows:
Download the full GrubInst file from https://sourceforge.net/projects/subproject.grub2win.p/files/
Unzip the downloaded GrubInst file using the 7-Zip "Extract Here" function.
You should now have an unzipped "install" directory that contains all Grub2Win code.
Set the rundir variable to the location where you have placed the unzipped install directory.
You can also press the F2 key from the Grub2Win or Setup GUI. You will them be prompted to add runtime parms.
This is a sample of the parms that might be used:
AutoInstall Drive=C: Shortcut=Yes RunfromEFI=no
Note: If Grub2Win detects errors during the install, the program will set an exit code of 99.
The supported runparms parameters follow:
Advanced
Relaxes certain safeguards in the setup program.
This parm is recommended for experienced advanced users only. It may result in boot time issues.
AutoInstall
Directs the program to perform an install without the setup GUI or user interaction.
AutoResDir=<directory>
This optional parameter causes the setup program to install theme backgrounds for automatic screen resolution detection.
The directory specified should contain your background image jpg files.
This parm can only be used in conjunction with the Setup or AutoInstall parms.
Example:
AutoResDir=C:\temp\mybackgrounds
The directory should contain multiple image files for your possible screen resolutions in this format:
autores.<screen resolution>.jpg
Examples:
autores.1024x768.jpg
autores.1600x900.jpg
autores.default.jpg
If no image file is found that matches the screen resolution during setup, autores.default.jpg will be used.
CodeOnly
This optional parameter can only be used when Grub2Win already exists on the system.
It checks for presence of the C:\grub2 directory.
Only the GNU Grub code kernel, libraries and the C:\grub2\grub2win.exe file will be refreshed.
The exact current state of the boot time configuration files and settings will be preserved.
It can only be used in conjunction with the Setup or AutoInstall parms
Drive=<drive>
This optional parameter specifies the target drive for the install.
The default target is the Windows system drive, usually C:
This parm can only be used in conjunction with the Setup or AutoInstall parms.
Example Drive=C:
LowResMode
Forces the GUI to start with a resolution of 850x650. This is useful for testing purposes.
ParmHelp
Displays the list of valid parms and this page.
Quiet
Suppresses the display of setup messages. The return code should be checked to determine whether the setup was successful.
Reboot=<menu number>
RefreshEFI
This parameter is optional and for EFI systems only. It forces a refresh of the GNU Grub files on your EFI partition. The default is to refresh the files only if needed when a new level is released or the install status changes.
This parm can only be used in conjunction with the Setup or AutoInstall parms.
RunFromEFI=yes or no
Also optional. For EFI systems only.
Normally, setup only installs a few GNU Grub modules totaling about 1.2 MB to your EFI partition.
Advanced users who have encrypted Windows partitions can use the RunFromEFI=yes option to install all GNU Grub files to the EFI. This is because Grub cannot read encrypted NTFS partitions at boot time, so it cannot load the needed files.
RunFromEFI=yes requires about 20 MB on your EFI partition. Grub2Win will also re-synchronize some dynamic EFI files every time you run it. This adds about 15-20 seconds to Grub2Win runtime.
Specifying RunFromEFI=no will remove the extra files from your EFI partition.
If not specified, the RunFromEFI status will remain as is.
This parm can only be used in conjunction with the Setup or AutoInstall parms.
Setup
Brings up the setup GUI and lets the user decide on options. This is the opposite of AutoInstall.
Shortcut=yes or no
Another optional parameter that specifies whether a Grub2Win shortcut will be placed on the desktop. If not specified, the default is to retain the current shortcut status.
This parm can only be used in conjunction with the Setup or AutoInstall parms.
Uninstall
Forces the Grub2Win uninstall process to begin.
Created with the Personal Edition of HelpNDoc: Easily create HTML Help documents