On Thu, May 7, 2009 at 11:57 PM, Ashish SHUKLA <[email protected]> wrote:
> So GRUB is capable of booting from GPT disks, hmm...? In non GPT disks, > GRUB embeds itself into the first 63 sectors of the disk. That code has > the list of sectors, from where to load the 1.5stage and 2nd stage > filesystem loaders, encoded at the time of installation of GRUB on the > boot sector. GPT was a part of the EFI specification. But it's usable on non-EFI systems as well. On EFI systems, grub gets compiled as an EFI application. I haven't gotten this to work yet (EFI on macbook pro requires a 64 bit grub.efi). On non-EFI systems, there must be a mechanism similar to what you describe above. This mechanism works on a Asus netbook, but not on a HP laptop. The first two sectors look as follows: fdisk: Disk /dev/sdb: 320.0 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdb1 1 38914 312571223+ ee GPT (parted) p Model: WD 3200BEV External (scsi) Disk /dev/sdb: 320GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.9kB 1074MB 1074MB ext3 boot 2 1074MB 11.8GB 10.7GB ext3 3 11.8GB 12.9GB 1074MB linux-swap 4 12.9GB 32.9GB 20.0GB fat32 primary msftres 00000000 eb 48 90 00 00 00 00 00 00 00 00 00 00 00 00 00 |.H..............| 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 02 |................| 00000040 ff 00 00 80 1b 41 0c 00 00 08 fa 90 90 f6 c2 80 |.....A..........| 00000050 75 02 b2 80 ea 59 7c 00 00 31 c0 8e d8 8e d0 bc |u....Y|..1......| 00000060 00 20 fb a0 40 7c 3c ff 74 02 88 c2 52 f6 c2 80 |. ..@|<.t...R...| 00000070 74 54 b4 41 bb aa 55 cd 13 5a 52 72 49 81 fb 55 |tT.A..U..ZRrI..U| 00000080 aa 75 43 a0 41 7c 84 c0 75 05 83 e1 01 74 37 66 |.uC.A|..u....t7f| 00000090 8b 4c 10 be 05 7c c6 44 ff 01 66 8b 1e 44 7c c7 |.L...|.D..f..D|.| 000000a0 04 10 00 c7 44 02 01 00 66 89 5c 08 c7 44 06 00 |....D...f.\..D..| 000000b0 70 66 31 c0 89 44 04 66 89 44 0c b4 42 cd 13 72 |pf1..D.f.D..B..r| 000000c0 05 bb 00 70 eb 7d b4 08 cd 13 73 0a f6 c2 80 0f |...p.}....s.....| 000000d0 84 f0 00 e9 8d 00 be 05 7c c6 44 ff 00 66 31 c0 |........|.D..f1.| 000000e0 88 f0 40 66 89 44 04 31 d2 88 ca c1 e2 02 88 e8 |[email protected]........| 000000f0 88 f4 40 89 44 08 31 c0 88 d0 c0 e8 02 66 89 04 |[email protected]..| 00000100 66 a1 44 7c 66 31 d2 66 f7 34 88 54 0a 66 31 d2 |f.D|f1.f.4.T.f1.| 00000110 66 f7 74 04 88 54 0b 89 44 0c 3b 44 08 7d 3c 8a |f.t..T..D.;D.}<.| 00000120 54 0d c0 e2 06 8a 4c 0a fe c1 08 d1 8a 6c 0c 5a |T.....L......l.Z| 00000130 8a 74 0b bb 00 70 8e c3 31 db b8 01 02 cd 13 72 |.t...p..1......r| 00000140 2a 8c c3 8e 06 48 7c 60 1e b9 00 01 8e db 31 f6 |*....H|`......1.| 00000150 31 ff fc f3 a5 1f 61 ff 26 42 7c be 7f 7d e8 40 |1.....a.&B|..}.@| 00000160 00 eb 0e be 84 7d e8 38 00 eb 06 be 8e 7d e8 30 |.....}.8.....}.0| 00000170 00 be 93 7d e8 2a 00 eb fe 47 52 55 42 20 00 47 |...}.*...GRUB .G| 00000180 65 6f 6d 00 48 61 72 64 20 44 69 73 6b 00 52 65 |eom.Hard Disk.Re| 00000190 61 64 00 20 45 72 72 6f 72 00 bb 01 00 b4 0e cd |ad. Error.......| 000001a0 10 ac 3c 00 75 f4 c3 00 00 00 00 00 00 00 00 00 |..<.u...........| 000001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000001c0 01 00 ee fe ff ff 01 00 00 00 af ea 42 25 00 00 |............B%..| 000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| 00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| 00000210 48 65 3e f7 00 00 00 00 01 00 00 00 00 00 00 00 |He>.............| 00000220 af ea 42 25 00 00 00 00 22 00 00 00 00 00 00 00 |..B%....".......| 00000230 8e ea 42 25 00 00 00 00 d5 ac 62 b6 5c 05 ee 4b |..B%......b.\..K| 00000240 98 53 9f d6 16 4d 16 3a 02 00 00 00 00 00 00 00 |.S...M.:........| 00000250 80 00 00 00 80 00 00 00 aa 27 c6 ca 00 00 00 00 |.........'......| 00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * I'll have to test this disk on a few different machines to figure out if this is a broken HP BIOS or I just got lucky on Asus. -Arun
_______________________________________________ bsd-india mailing list [email protected] http://www.bsd-india.org/mailman/listinfo/bsd-india
