Manoj Joseph wrote: > Moinak Ghosh wrote: > >> Grub in the MBR. installgrub in Solaris overwrites the whole sector >> which would destroy the disk signature. >> > > Do you know if this is different from how grub in Linux does it? >
Well since you have asked this question, I spent a few minutes groveling through installgrugb and grub 0.95 setup/install code on the ON gate. It appears that both read the original MBR from the first sector of the disk, but there is a difference in how Grub and installgrub update the MBR. installgrub will copy the partition table starting from 0x1be till the end of the original sector to the new MBR. But Grub appears to know about the WINDOWS Disk Signature and copies from 0x1b8 as the signature is from 0x1b8 to 0x1bb. This is the relevant code in Grub: grub_memmove (stage1_buffer + STAGE1_WINDOWS_NT_MAGIC, old_sect + STAGE1_WINDOWS_NT_MAGIC, STAGE1_PARTEND - STAGE1_WINDOWS_NT_MAGIC); Where STAGE1_WINDOWS_NT_MAGIC = 0x1b8 This is the relevant code in installgrub: /* copy MBR to stage1 in case of overwriting MBR sector */ bcopy(boot_sect + BOOTSZ, stage1_buffer + BOOTSZ, 512 - BOOTSZ); Where BOOTSZ = 446 or 0x1be So this is a Grub vs installgrub issue. This can be an RFE for installgrub. Regards, Moinak. > Regards, > Manoj > _______________________________________________ opensolaris-discuss mailing list [email protected]
