#!/usr/bin/gawk -f # (c)2011 David Haller , License: GPLv2 BEGIN { while( getline < "/proc/partitions" ) { if( /[hs]d[a-z][0-9]*/ ) { dev="/dev/"$4; cmd="hexdump -v -s 0x80 -n 2 -e '2/1 \"%x\" \"\\n\"' " dev; cmd | getline; if( /48b4/ ) { print dev " : GRUB 2 v1.96"; } if( /aa75|5272/ ) { print dev " : GRUB Legacy"; } if( /7c3c/ ) { print dev " : GRUB 2 >= v1.97"; } if( /00/ ) { print dev " : kein GRUB"; } } } }