On 8/14/06, Angel Tsankov <[EMAIL PROTECTED]> wrote:
Can someone suggest how to convert (in a shell script) from Linux naming convention for drives and partitions (hdxy) to GRUB naming convention ((hdn,m)), taking into account that, in contrast to Linux, GRUB does not consider CD-ROM drives to be hard drives? For more information, refer to section 8.4 in the LFS book, version 6.1.1.
Look at the shell script /usr/sbin/grub-install. Or, you can download the stripped down version I use in my scripts. http://www.linuxfromscratch.org/~dnicholson/grub-devices.sh Source that file, then use the convert_grub_device function: $ convert_grub_device /dev/hda2 (hd0,1) Careful, though. I use it in scripts, so it will exit from your session. Maybe you'll want to change the "exit 1" to "return 1". -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
