LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   What is exact grub2 stuff size beyond mbr? (http://www.linuxquestions.org/questions/linux-software-2/what-is-exact-grub2-stuff-size-beyond-mbr-4175438914/)

froff 11-27-2012 09:23 AM

What is exact grub2 stuff size beyond mbr?
 
hello
I wonder how many bytes grub2 puts into my hdd starting from MBR.
I found information, that core.img file is put after MBR (at 512 offset).
I found another information that kernel.img file is one of components of core.img.
But how can both be true if my kernel.img file is significally larger than core.img?

I'm asking because I use (with help of grub2tc) dual boot with truecrypted windows7 and truecrypt uses sector 63 (counting from 1) for it's volume header data. Grub2 overwrote this sector and I would like to get known if this area is realy used by it and if it is safe to re-overvrite it again with truecrypt original sector as described here:

http://gitorious.org/grub2tc/grub2tc.../master/README

syg00 11-27-2012 03:37 PM

I would be most surprised if grub2 uses sectors that far away from the MBR. But it might zero them - I have 20 sectors of zeroes from sector 40.
Should be safe enough to put the tc header back.

core.img would likely just locate kernel.img, not include it, although I haven't checked the code.

froff 11-28-2012 07:03 PM

Quote:

Originally Posted by syg00 (Post 4838212)
I would be most surprised if grub2 uses sectors that far away from the MBR. But it might zero them - I have 20 sectors of zeroes from sector 40.
Should be safe enough to put the tc header back.

core.img would likely just locate kernel.img, not include it, although I haven't checked the code.

Thank You for answer.
I looked into my dumped grub_mbr file and there is a lot of non-zero data at last kilobytes.
I put my tc header to sector 63 and everything looks to work properly but I'm still not sure if I can be sure :)

BTW: my core.img has about 26kB


All times are GMT -5. The time now is 03:19 PM.