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

Re: GRUB version



Walter Hurry wrote:
On Wed, 30 Nov 2011 15:40:52 +0000, Camaleón wrote:

On Wed, 30 Nov 2011 08:37:33 -0600, Hugo Vanwoerkom wrote:

Is there a way to find out what version of grub is installed in the MBR
of a drive?
"grub-install -v" will tell the installed version.

Anyway... IIRC, the version is printed at the top of the boot menu.

The question aroused my curiosity, so I tried looking at the boot sector itself:

$ sudo dd if=/dev/sda of=mbr_backup.bin bs=512 count=1
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00038036 s, 1.3 MB/s
$ file mbr_backup.bin
mbr_backup.bin: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200, GRUB version 0.94; partition 1: ID=0x27, starthead 1, startsector 63, 25173792 sectors; partition 2: ID=0x7, starthead 254, startsector 25173855, 208845 sectors; partition 3: ID=0x7, active, starthead 254, startsector 25382700, 44194815 sectors; partition 4: ID=0x5, starthead 254, startsector 69577576, 243000472 sectors, code offset 0x48, Bytes/sector 190, sectors/ cluster 124, reserved sectors 191, FATs 6, root entries 185, sectors 64514 (volumes <=32 MB) , Media descriptor 0xf3, sectors/FAT 20644, heads 6, hidden sectors 309755, sectors 2147991229 (volumes > 32 MB) , physical drive 0x7e, dos < 4.0 BootSector (0x0) $ One (slightly) interesting thing is that this reports version 0.94 whereas the version of GRUB on the partition from where it was installed claims to be 0.97.


Precisely. I have 4 HDD's and 1 USBkey. I boot from the latter. But what is on the 4 disks?

hugo@HDBB:/$ file mbr_sda_backup.bin
mbr_sda_backup.bin: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 19534977 sectors; partition 2: ID=0x8e, starthead 254, startsector 19535040, 957233025 sectors, code offset 0x0
hugo@HDBB:/$ file mbr_sdb_backup.bin
mbr_sdb_backup.bin: x86 boot sector; partition 1: ID=0x83, starthead 1, startsector 63, 39070017 sectors; partition 2: ID=0x83, starthead 254, startsector 39070080, 39070080 sectors; partition 3: ID=0x83, starthead 254, startsector 78140160, 39070080 sectors; partition 4: ID=0x5, starthead 254, startsector 117210301, 351582464 sectors, code offset 0xb8
hugo@HDBB:/$ file mbr_sdc_backup.bin
mbr_sdc_backup.bin: x86 boot sector, LInux i386 boot LOader; GRand Unified Bootloader, stage1 version 0x3, boot drive 0x80, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0x83, active, starthead 1, startsector 63, 12109041 sectors; partition 2: ID=0xf, starthead 193, startsector 12109165, 147977363 sectors, code offset 0x48
hugo@HDBB:/$ file mbr_sdd_backup.bin
mbr_sdd_backup.bin: x86 boot sector, LInux i386 boot LOader; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0x83, starthead 1, startsector 63, 15631182 sectors; partition 2: ID=0x83, starthead 0, startsector 15631245, 15631245 sectors; partition 3: ID=0x83, starthead 254, startsector 31262490, 15631245 sectors; partition 4: ID=0x5, starthead 254, startsector 46893796, 109402589 sectors, code offset 0x63
hugo@HDBB:/$ file mbr_sde_backup.bin
mbr_sde_backup.bin: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0x6, starthead 1, startsector 32, 4014048 sectors, code offset 0x48

Walter got a version for GRUB in the mbr, I get nothing.

IMO the man page for grub-install is wrong:

grub-install [OPTION] install_device

should say:

grub-install [OPTION] [install_device]

because 'grub-install -v' gives:

grub-install (GNU GRUB 0.97)

So if sde has 0.97 then sdc and sdd must also because they look the same. :-(

Too bad I did not know about GPT when I got new disks /sdc and /sdd.

Hugo


Reply to: