LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 07-19-2012, 05:48 AM   #1
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 128

Rep: Reputation: Disabled
Question EFI main GPT overwritten everytime (when windows 7 runs) - structure of EFI


Hi,

I have came across some weird behavior.

I have Ubuntu 12.04 64 bit cloned from another disk to my main SSD disk.
---partitions:
efi - ext2
swap
ext4 - RAID0 - created from four partitions.
Ubuntu OS is not booting from this RAID but from different disk.

Every time when I start windows 7 64 bit and switch back to Ubuntu I have got into problem that my first partition of the RAID0 array is damaged.

I have to always run gdisk - expert option -> and copy backup GPT to main GPT.
After that it works properly again - but It annoyed me to do it every time I start linux after have been in windows 7. (maybe time to delete windows forever :-)

I have binary compared before and after those changes and have found differences in it:

---before (when windows 7 made damage):
Quote:
*
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 e4 4d c2 88 00 00 00 00 01 00 00 00 00 00 00 00 |.M..............|
00000220 fb 3b f3 1b 00 00 00 00 22 00 00 00 00 00 00 00 |.;......".......|
00000230 da 3b f3 1b 00 00 00 00 fb 29 98 2c 0f cd b1 47 |.;.......).,...G|
00000240 b4 50 4f df aa f8 e9 fc 02 00 00 00 00 00 00 00 |.PO.............|
00000250 80 00 00 00 80 00 00 00 71 80 6e 53 00 00 00 00 |........q.nS....|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
---after (gdisk repaired it and RAID0 works properly again):
Quote:
*
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 4a 4b d0 1d 00 00 00 00 01 00 00 00 00 00 00 00 |JK..............|
00000220 2f cf fc 06 00 00 00 00 22 00 00 00 00 00 00 00 |/.......".......|
00000230 0e cf fc 06 00 00 00 00 fb 29 98 2c 0f cd b1 47 |.........).,...G|
00000240 b4 50 4f df aa f8 e9 fc 02 00 00 00 00 00 00 00 |.PO.............|
00000250 80 00 00 00 80 00 00 00 71 80 6e 53 00 00 00 00 |........q.nS....|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
(Difference in 6 bytes.)

I would like to more investigate but I did not find much documentation about gpt , efi structure of partition. (MBR documentation I have)
Is somewhere detailed [documentation/s|URLs|books] about the GPT/EFI structure and functionality (very detailed for developers would be nice) ?

thank you,
kind regards,
M.

Last edited by masuch; 07-19-2012 at 05:52 AM.
 
Old 07-20-2012, 10:14 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 1,152

Rep: Reputation: 258Reputation: 258Reputation: 258
Windows first checks block 0 for MBR. If it finds that it assumes it is dos partition table and boots with that. If it does not, it will use GPT or fail depending on Windows version and level. GPT starts at block 1 to avoid clobbering or being clobbered by MBR-using programs like Windows. In your case you probably have both MBR and GPT. If your Windows is ok with GPT, then just clear block 0.
 
Old 07-20-2012, 02:49 PM   #3
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 128

Original Poster
Rep: Reputation: Disabled
Question

Quote:
Originally Posted by smallpond View Post
Windows first checks block 0 for MBR. If it finds that it assumes it is dos partition table and boots with that. If it does not, it will use GPT or fail depending on Windows version and level. GPT starts at block 1 to avoid clobbering or being clobbered by MBR-using programs like Windows. In your case you probably have both MBR and GPT. If your Windows is ok with GPT, then just clear block 0.
Well,
than why windows 7 even touching/changing that disk/partitions if boots up from different disk than Linux is ?
Linux disk/RAID0 is on different disk - efi/ext2/ext4 partitions ( and is not possible to even boot from it - as Windows as Linux )
(I do not even have to have efi on Linux disk/partition - I have it there for future experiment/s - at this moment it is completely not in use) ?
Windows 7 is on MBR.
Linux is on GPT (but boots up from different disk ~ MBR).
I can convert disk where is Windows from MBR to GPT (I did it for many other disks) but it is not necessary.
 
  


Reply

Tags
documentation, efi, gpt, partition, structure


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Distro that can install with GPT/EFI BeaverusIV Linux - Distributions 4 08-22-2011 07:04 AM
The same problem; GPT partition id and EFI issue in server during installation neonate Linux - Server 1 04-18-2011 02:19 AM
Disk Partitions for dual boot with Windows 7 GPT/EFI motiv8d1 Linux - General 2 01-10-2011 06:22 PM
Radeon HD 2600 drivers periodically overwritten in OS X EFI block jason argonaut Linux - Desktop 1 12-15-2010 06:03 AM
how to format an EFI partition on a GPT partitioned HD nfolken Linux - Laptop and Netbook 2 01-28-2010 08:59 AM


All times are GMT -5. The time now is 05:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration