[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What's the easiest way for a shell script to tell if grub version 1 is installed?



Stephen Powell <zlinuxman@wowway.com> wrote:
>>> What's the easiest way for a shell script to tell if grub version 1
>>> is installed?  It is important to distinguish grub version 1 from
>>> grub version 2.  For example, can I just do this?

Anand Sivaram <aspnair@gmail.com> wrote:
> grub2.0
> grub-setup --version
> grub-setup (GRUB) 1.98-1
> grub-install --version
> grub-install (GNU GRUB 1.98-1)
> grub1.0
> grub --version should print the version.

>From bootinfoscript
http://sourceforge.net/projects/bootinfoscript/
hexdump -v -n  2 -e '/1 "%x"' $drive
eb48 == grub1
eb4c == grub2 (1.96)
eb63 == grub2 (1.97,1.98)


Reply to: