Grub4dos Menu Lst Manuals
In a dual-boot system, opensuse usually installs grub to the MBR, as a result, we can choose either winxp or opensuse to boot into. In case you don't want to mess with the MBR, there's another alternative - grub4dos.
This is just a guide to help you install grub4dos so that you can boot into opensuse using the windows boot loader 'ntldr' without rewriting the MBR. Please note, this is for a new opensuse 11 install, and not an upgrade. So, we assume there is enough unallocated space after your windows partitions.
An ideal partitioning scheme for dual-boot would be:
______________________________________
sda1-C-winxp system-ntfs
sda2-D-ntfs-for all your personal files
sda4-linux swap
sda5-linux boot
sda6-linux home
______________________________________
It is not advisable to create any FAT32 or NTFS partitions after sda6, to be on the safe side (when booting into windows).
Your linux partitions will not show up when you boot into windows, so you can't read them natively.
For this purpose, there's a utility called explore2fs.
You can get it from here:
chrysocome.net
Update: Just added a link for explore2fs
http://www.chrysocome.net/downloads/explore2fs-1.07.zip
Grub4dos is available from:
https://sourceforge.net/projects/grub4dos
Get grub4dos 0.4.3
SourceForge.net: Downloading .
1. When you're in windows, download grub4dos and you'll find a file call 'grldr' in the package. Copy that file to the root of C. Then insert your opensuse 11 live cd and shutdown the system.
2. On switching it on, it should boot from the live cd and load the opensuse 11 desktop. If it doesn't, try using the appropriate parameters or use the failsafe mode. (You may look that up on the opensuse website).
3. Launch the installer on your desktop to install opensuse 11.
4. Under the partitioning section, you will have to edit your partitions.
Grub4dos requires that the i-node size of the linux partitions be 128, whereas the default for opensuse 11 is 256.
So we'll have to reformat the linux partitions. Click 'Edit' to edit the partitions. Select each linux partition (not swap) and change the i-node size to 128 in the 'Options'.
5. Once you've made the changes, go on to the grub boot loader section. Here you'll have to make sure that grub is installed in the linux boot partition and not the MBR. So, select 'Boot Partition' and apply the changes.
6. Go over all the settings and continue installing opensuse 11.
7. When the installer asks you to reboot the system, just boot into winxp.
8. Next, use explore2fs to copy the 'menu.lst' file from sda5 to the root of C. You'll find it in the 'boot' folder. (You can also use a SLAX live cd to copy the menu.lst file, since SLAX boots faster!). Please note, grub4dos usually searches for the menu.lst file in C first, since that is where 'grldr' is placed. If it does not find one in C, it will search for it in other partitions. So, take care that you do not have any other menu.lst file on other windows partitions.
9. Rightclick your 'My Computer' icon, select 'Properties', under the 'Advanced' tab, select 'Settings' under the 'Startup and Recovery' section. Click the 'Edit' button under 'System Startup' to edit the boot.ini file. Add a new line at the end of the file and type the following:
Cgrldr='Linux'
Save it and OK everything.
10. Shutdown your system and then switch it on.
11. You should see a new line 'Linux' below the usual Windows XP selection. Select Linux and press ENTER.
12. Grub4dos should load and give you options for opensuse 11 and Windows too ! So, select opensuse 11 and press ENTER.
13. Opensuse 11 should boot for the first time and complete the hardware auto configuration.
14. Once you get into the desktop, navigate to your boot folder and see if the menu.lst file is identical to the one on your C drive. Thankfully, you'll be able to read/write to windows partitions from Linux natively.
15. There's one more important thing for the future ! Whenever there's a kernel update, the menu.lst file is also updated.
So, you'll have to copy the new menu.lst file every time to C. You can also do this from windows using explore2fs.
Grub4dos also has a command line. So, you can also boot into a linux system by loading the generic kernel/initrd in the command line. For further information on how to use grub4dos effectively, look up the grub4dos website and manual.
As you can see, the MBR is untouched, and uninstalling linux is easier. (Just delete grldr and the menu.lst from C and delete your linux partitions from windows).
Hope this tutorial has been useful. If you have any problems, please post it as a separate thread with 'grub4dos' as the prefix.
/boot/grub/grub.cfg - This is the main configuration file that replaces menu.lst. Unlike menu.lst, this file cannot be edited by hand! I strongly advise against trying to tamper with this file, using chattr command or anything of the sort. /etc/grub.d/ - This new directory contains GRUB scripts. These scripts are building blocks from. C: grldr='Start GRUB4DOS' Then copy grldr to C:, and create the GRUB4DOS configuration file at C: menu.lst. Next time you start windows, there is a new option 'Start GRUB4DOS' which can be used to start GRUB for DOS.
- In the command window, navigate to the directory where the files are located and use the following command to convert each file to a Grub4Dos and GRUB compatible splash image: convert -resize 640x480 -colors 14 filename.bmp filename.xpm.gz. To install a Grub4Dos or GRUB splash image in menu.lst.
- Is only installed the Grub4DOS MBR and booting code to your disk, so you still need to manually copy grldr and menu.lst from GRUB4DOS package to your flash disk or hard disk and configure to the menu.lst. Grub4Dos GUI Installer is a small program to help you install GRUB to the master boot record of your Flash Disk or any Hard Disk drive.
- For example, Windows Safe Mode is a special flag. Here is an example of a GRUB menu booting only Ubuntu. Here's an example of a GRUB menu from a computer with triple boot (SUSE 10.2, Ubuntu 6.10 and Windows XP). This is the actual menu.lst on one of my real machines. Let's try to understand what the entries mean. Only uncommented lines count.
It is worth noting that some of the Grub4dos commands (e.g. password, fallback, etc) are only used in configuration files – they are not relevant when using the command line. The configuration file is used to script boot options – the default menu is text based, alternatively a splash image can be used.
All commands in the configuration file must be in lower case. All boot options must begin with the command title, which should be followed with the text to be displayed in the boot menu (e.g. title Boot Windows XP will display the text “Boot Windows XP”.
Once the boot menu is displayed the selected menu option can be edited before booting (by pressing the [e] key), however the edits take place in memory and are not written to the configuration file.
Sample menu.lst file (included with Grub4dos download) -
NOTE - all lines starting with # are comments - they are not processed.
Display Options
Menu colours can be set using the following command syntax (See also APPENDIX - Commands section here). Default is white text on a black background, with current option being black text within a white highlight -
It is also possible to use a background image with a menu, using either the splashimage command or the gfxmenu package. Both of these options must be used in a configuration file and cannot be used from a command line. gfxmenu requires external files/packages and is much more complex than using the splashimage command, however it does support .jpg images. For gfxmenu usage, see here.
If using the splashimage command, the image will need to be in the .xpm format (which can be compressed with gzip) and must be 640x480 pixels with a maximum of 14 colours. For instructions on creating a splash image see next section (here). To display splash image splash.xpm.gz (in current root directory) the following entry should be used in menu.lst -
To display splash image splash.xpm.gz (saved in 1st partition on 1st hard disk drive) the following entry should be used -
Grub4dos Menu Lst Manuals Download
Wiz khalifa cabin fever download mp3. By default the foreground colour (all of the menu text and the highlight for the currently selected option) will be white and the background colour (the highlighted text within the currently selected option) will be black. To change these colours use the following menu.lst entry -
foreground=RRGGBB
background=RRGGBB
Where RR is red, GG is green, and BB blue. Numbers must be in hexadecimal. In the following example the menu text and highlight for the selected option will be displayed in Blue (hex decimal value 0033FF) and the selected option will have Red (hex decimal value FF3300) text – refer to figure 2. below.
foreground=0033FF
background=FF3300
Adding (Help) Messages to Menu Entries
Grub4dos will display the following message beneath any available menu options -
Press 'e' to edit the commands before booting, or 'c' for a command line.
Grub4dos Menu Lst Manuals Downloads
Pes 2017 iso download. It is possible to replace the above text with a user defined entry specific to individual menu items. Any message must be appended to the title line of the menu entry. Text to add should be preceeded by n. As an example, the following menu.lst entry -
find --set-root /dos.img
map --mem /dos.img (fd0)
root (fd0)
chainloader +1
Will display the menu in figure 3. -
To add the message 'Load DOS.img floppy disk image into RAM' to the menu.lst entry for title MS DOS - edit the entry, changing title MS DOS to title MS DOSnLoad DOS.img floppy disk image into RAM. The new menu.lst entry -
find --set-root /dos.img
map --mem /dos.img (fd0)
root (fd0)
chainloader +1
Will display the menu in figure 4. -
Multiple lines can be added to the message by adding additional n (new line) entries/commands. E.g. title MS DOSnLoad DOS.img floppy disk image into RAMnMount as (fd0) and boot from the image Will display the following text/message at the bottom of the menu screen -
Mount as (fd0) and boot from the image
Grub Menu.lst
Other commands can be used for the displayed message/text. The following is from README_GRUB4DOS.txt -
Press 'e' to edit the commands before booting, or 'c' for a command line.
to -
Press 'p' to gain privileged control.
The user enters the [p] key to gain privileged control, followed by the specified password – which in the preceding example is administrator.
It is possible to use an encrypted password by using the command password --md5 followed by the encrypted password – in the following case “$1$ZjU0$k107noL9DOaClJEu6n6f91” is an encryption of administrator.
timeout 10
default /default
password --md5 $1$ZjU0$k107noL9DOaClJEu6n6f91
title..
WARNING - do not generate your 'md5 hash” password using another program as it is unlikely to be compatible with Grub4dos (see here). To ensure compatibility use the md5crypt command from within Grub4dos - see below.
To create an encrypted password, boot Grub4dos and press [c] to access a command line interface, then type the command md5crypt - this will prompt you to enter a password and will output the chosen password as an md5 hash (see figure 5. below).
It is also possible to restrict access to individual menu items when a password has been set by using the lock command, until the user enters the correct password (using [p] key to gain privileged control, followed by the password) any menu items designated with 'lock' will not be accessible -
timeout 10
default /default
title..
lock
Alternatively the password command can be used to protect individual menu entries by specifying the password command within the entry – e.g.
timeout 10
default /default
title..
password password2
md5 hash’s can also be used within menu entries. Different menu entries within the same configuration file can be protected with different passwords - whilst still using a password entry at the start of the configuration file forcing the user to enter a password to Press 'p' to gain privileged control - e.g.
Grub4dos Menu.lst
timeout 10
default /default
password --md5 $1$ZjU0$k107noL9DOaClJEu6n6f91
title..
password mypassword
Using Submenus
It is possible to create sub menus by using the configfile command, followed by the filename of the configuration file you want to load. E.g. menu.lst contents –
timeout 10
password --md5 $1$ZjU0$k107noL9DOaClJEu6n6f91
title Boot Options
lock
find --set-root /submenu.lst
configfile /submenu.lst
Will load submenu.lst. The submenu.lst configuration file follows the same format as menu.lst – a new menu colour scheme can be specified, default boot entry can be set, etc. Adding an option to return to the previous menu is recommended, to avoid being 'stuck' in the submenu.
The command find --set-root combined with a filename can be used to locate a marker file on a device and set that device as the root for all further commands within the menu entry (or all further commands executed from the command line). E.g. –
find --set-root /hdd.tag
chainloader +1
The example above will search all supported partitions/devices for the file hdd.tag and will set the first device it finds, containing hdd.tag, as the root device. The partition boot sector of the device (chainloader +1 = first sector of current root device) will then be chainloaded.
It is possible to locate and load operating systems in this way. If for example Windows XP is installed, the following entry could be used -
find --set-root /ntldr
chainloader /ntldr
If using the above example it is assumed that the NT loader ntldr is only present on one device. If multiple devices contain ntldr, the first one found will be set as the root device. As this could lead to the wrong installation booting, searching for unique tag/marker files are preferred. Devices are searched in the order –
Menu.lst Grub2
- (hd#)
- (cd#)
- (fd#)
Please note that ntldr (and other Windows loader/system files bootmgr and io.sys) must be on a partition on device (hd0), or Windows will not boot - see here for a full explanation and workaround.
It is possible to exclude floppy devices (or cd devices) from the search by using the command --ignore-floppies (or --ignore-cd) - e.g. find --set-root --ignore-floppies /ntldr.
REMEMBER - find --set-root sometimes leads to unexpected behavior - e.g. if you have used the map command and the drive you are expecting to find the file on is no longer visible in Grub4dos. Always remember that the search stops with the first instance of the file you are scanning for. Even using marker files can result in unwanted behaviour if you had forgotten (or didn't know) that the file was on more than one device.
Using '&&' and '' Commands
The operator && can be used to execute a second command if the first command is executed without error. The operator can be used to execute a second command if executing the first command results in an error. From README_GRUB4DOS.txt -
Grub4dos Menu Lst Manuals Craftsman
Some pratical examples are included in grldr's embedded menu and in the sample menu.lst file included in the Grub4dos download.
Grub Menu.lst Example
The entry find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst (from the embedded menu) will execute find --set-root --ignore-floppies --ignore-cd /menu.lst (the root of all (hd) type devices will be searched for menu.lst and the first device found containing menu.lst will be set as the root device). If this part of the command completes successfully then the command configfile /menu.lst will be executed.
Grub4dos Install
The entry map /pmagic.iso (0xff) map --mem /pmagic.iso (0xff) (from the sample menu.lst) will execute map /pmagic.iso (0xff) (mapping the cd image file pmagic.iso as the virtual device (0xff)). If this command fails (if for example the image is non-contiguous) then the second part of the command map --mem /pmagic.iso (0xff) will be executed.