This post has already been read 1911 times!

search
search [-f | -l | -s] NAME   
 - Search devices 
-f 	by  filename
-l 	by filesystem label
-s

Examples,

search -l INTREPID 
hd0,2
search -f /boot/grub/menu.lst
hd0,2 hd0,3 hd0,5
search -f /boot/grub/grub.conf
hd0,2
configfile
configfile FILE ......  
 - load a grub.cfg file - make convenient use of the commands and information already typed into the file
 - You would likely need to use the search command to find a /boot/grub/grub.cfg first.

If successful, GRUB will present the boot menu from the grub.cfg and you can utilize the commands already there to boot any operating system listed.
This will only work if the other operating system's configuration file is compatible with GRUB2.
If not, you should try the chainloader command, or a direct boot approach instead.

grub> configfile (hd0,2)/boot/grub/grub.cfg
chainloader
chainloader FILE
 - chainload a device
 - syntax: chainloader (hd0)

Prepare to boot another boot loader.
[chain] -f, --force : force chainloading, ignoring invalid partition signature (!= 0xaa55).
example:

grub> chainloader (hd0)+1

grub> boot

This boots another boot loader by the code in whatever device or file you specified.
Remember, FILE can be an absolute filename or a blocklist.

This command may not won't work if you specify an empty sector or file, or if the code in that file is corrupted or somehow incompatible. There needs to be some boot loader code in the file or device (sector) you specify.

If it doesn't work, try a different file or sector or try loading the kernel and initrd.img directly.

Here's an example of a chainloader command in action,

grub> chainloader (hd0, 
Possible partitions are:
        Partition hd0,1: Filesystem type ext2, Label KARMIC, Last mofication time 2009-12-23 04:02:13 Wednesday, UUID 6d6af125-7087-4frb6-afbc-14ddeeb465b8
        Partition hd0,2: Filesystem type ext2, Label JAUNTY, Last mofication time 2009-12-25 04:39:45 Friday, UUID 6d6af125-7087-4frb6-afbc-14ddeeb465b8
        Partition hd0,3: Filesystem type ext2, Label INTREPID, Last mofication time 2009-12-25 04:39:45 Friday, UUID 6d6af125-7087-4frb6-afbc-14ddeeb465b8
        Partition hd0,5: Filesystem type ext2, Label HARDY, Last mofication time 2009-12-28 10:577:17 Monday, UUID 6d6af125-7087-4frb6-afbc-14ddeeb465b8
        Partition hd0,6: Unknown filesystem 

grub> chainloader (hd0,2)+1
grub> boot

Comments are closed.

Post Navigation