Super Grub Disk Main Webpage. Página principal de Super Grub Disk.
Support Free Software. Donate to Super Grub Disk. Apoya al Software Libre. Dona a Super Grub Disk.
You are visiting Super Grub Disk wiki. Learn the basic features of Super Grub Disk and finally find out if Super Grub Disk has all the features you need. Most of these webpages suppose that you have a Super Grub Disk and that you know how to boot SGD. If you have a boot problem and you are lost do not hesitate to visit Boot problems page. After that you can visit the Support Rules page where you can find the best way of asking questions at the SGD forum and the SGD mailing list among other resources.
SGD findf
From Super Grub Disk Wiki
The findf command
Contents |
Purpose
This command can be used to determine which drive and partition a file is located on.
The result is stored in the variable out_device, which can be used by subsequent commands.
The find command stops after the first match is found.
Usage
findf filename1 [filename2...]
When specifying the file name include the path. See the example below.
Example
Assume a system with the following hard drives:
- hd0 partition 0: Windows
- hd0 partition 3: Linux
- hd1 partition 0: Linux
The command
findf /boot/grub/menu.lst /boot/menu.lst
will search the hard drives and when finding the /boot/grub/menu.lst on hd0,3 will set the out_device accordingly.
The result can be examined as follows:
echo $(out_device) (hd0,3)
Technical details
Not only out_device is being set. These other variables are also set:
Problems that can be solved with this option
The findf command can be used to determine the drive designation of a USB drive programatically at runtime. See Samples of custom Boot Scripts for a working example on how to create a boot CD, which will determine the location of the USB drive automatically and boot the linux located on the drive.

