bug-grub
[Top][All Lists]
Advanced

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

detecting presence of grub in MBR


From: Brett Russ
Subject: detecting presence of grub in MBR
Date: Thu, 09 Jan 2003 16:56:17 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130

Searching the archives I found a (old) message thread discussing how best to determine that GRUB (and not LILO) is installed on the system:

http://mail.gnu.org/archive/html/bug-grub/2001-08/msg00062.html

However, I see only 1 of the strings mentioned in that mail in the MBR and it is not at the offset given.

Wondering if I can rely on the string "GRUB \0" at offset 0x176 (correct me if I am wrong there) as an indicator that grub is installed? I am attaching my MBR as displayed by hexdump (with custom format file, also attached) for reference. As you will notice, LILO was previously installed on it and as expected GRUB does not overwrite the LILO signature (offset 0x006).

If the GRUB string is not a reliable indicator, what is the best thing to do?

I found this site helpful for LILO, perhaps GRUB is as predictable:

http://www.geocities.com/thestarman3/asm/mbr/LILOmbr.htm

Thank you,
Brett
address@hidden root]# hexdump -f hxdmp.fmt -n 512 /dev/hda
00000000 48EB 6C90 6162 494C 4F4C 0001 0415 005A        .H.lbaLILO....Z.
00000010 0000 0000 B957 01E5 0DC2 00C0 C301 C00D        ....W...........
00000020 0100 0DC1 00C0 0101 0000 0000 0000 C500        ................
00000030 C00D 0100 021C 00C0 1D01 C002 0100 0203        ................
00000040 0080 8000 4024 0002 0800 EAFA 7C50 0000        address@hidden|..
00000050 C031 D88E D08E 00BC FB20 40A0 3C7C 74FF        1....... ..@|<.t
00000060 8802 52C2 76BE E87D 0134 C2F6 7480 B454        ...R.v}.4....tT.
00000070 BB41 55AA 13CD 525A 4972 FB81 AA55 4375        A..U..ZRrI..U.uC
00000080 41A0 847C 75C0 8305 01E1 3774 8B66 104C        .A|..u....t7f.L.
00000090 05BE C67C FF44 6601 1E8B 7C44 04C7 0010        ..|.D..f..D|....
000000a0 44C7 0102 6600 5C89 C708 0644 7000 3166        .D...f.\..D..pf1
000000b0 89C0 0444 8966 0C44 42B4 13CD 0572 00BB        ..D.f.D..B..r...
000000c0 EB70 B47D CD08 7313 F60A 80C2 840F 00F3        p.}....s........
000000d0 8DE9 BE00 7C05 44C6 00FF 3166 88C0 40F0        .....|.D..f1...@
000000e0 8966 0444 D231 CA88 E2C1 8802 88E8 40F4        f.D.1..........@
000000f0 4489 3108 88C0 C0D0 02E8 8966 6604 44A1        .D.1......f..f.D
00000100 667C D231 F766 8834 0A54 3166 66D2 74F7        |f1.f.4.T.f1.f.t
00000110 8804 0B54 4489 3B0C 0844 3C7D 548A C00D        ..T..D.;D.}<.T..
00000120 06E2 4C8A FE0A 08C1 8AD1 0C6C 8A5A 0B74        ...L......l.Z.t.
00000130 00BB 8E70 31C3 B8DB 0201 13CD 2A72 C38C        ..p..1......r*..
00000140 068E 7C48 1E60 00B9 8E01 31DB 31F6 FCFF        ..H|`......1.1..
00000150 A5F3 611F 26FF 7C42 7CBE E87D 0040 0EEB        ...a.&B|.|address@hidden
00000160 81BE E87D 0038 06EB 8BBE E87D 0030 90BE        ..}.8.....}.0...
00000170 E87D 002A FEEB 5247 4255 0020 6547 6D6F        }.*...GRUB .Geom
00000180 4800 7261 2064 6944 6B73 5200 6165 0064        .Hard Disk.Read.
00000190 4520 7272 726F BB00 0001 0EB4 10CD 3CAC         Error.........<
000001a0 7500 C3F4 0000 0000 0000 0000 0000 0000        .u..............
000001b0 0000 0000 0000 0000 CE03 CE03 0000 0000        ................
000001c0 0002 FE83 013F 0001 0000 7D81 0000 0000        ....?......}....
000001d0 0201 FE83 033F 7D82 0000 7D82 0000 0000        ....?..}...}....
000001e0 0401 FEFD 103F FB04 0000 2FCD 0003 0000        ....?....../....
000001f0 1101 FE05 FFFF 2AD1 0004 B9F0 094C AA55        .......*....L.U.
"%08_ax " 8/2 "%04X "
"\t" "%_p"
"\n"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]