I have a Asus K55VM-Sx027V laptop and I formated it with Ubuntu because whenever I tried to install Windows 7 64bit, it wouldn't let me because my HDD had GPT protection.
Now that I have Ubuntu 12.10, how do I remove GPT protection from my laptop?
Use gdisk
instead of fdisk.
It isn't installed by default, so get it with:
sudo apt-get install gdisk
Then umount
the drive and call gdisk
for the device:
sudo gdisk /dev/sdX
It will prompt you to select the partition:
Found valid MBR and GPT. Which do you want to use?
1 - MBR
2 - GPT
3 - Create blank GPT
Select the GPT one. In my case, 2
. Use the ?
command to print the command list. Enter x
for expert options, then z
to zap the GPT table and all the data on the disc:
Command (? for help): x
Expert command (? for help): z
About to wipe out GPT on /dev/sdx. Proceed? (Y/N): y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): y
You can use wipefs
to remove all common id blocks from a device before changing the partition format.
sudo wipefs -a /dev/sdx
-a
switch.
Dec 27, 2020 at 21:18
With a simple Python function!
def clear_gpt(target):
'''
According to http://en.wikipedia.org/wiki/GUID_Partition_Table - GPT
stores partition data in the first and last 34 LBA blocks. A LBA sector
is normally 512 bytes.
'''
fd = open(target, "w+")
fd.seek(0)
fd.write('\0' * 34 * 512)
print "done nuking data at the beginning of disk", target
fd.seek(0, 2) # SEEK_END is 2
disk_size = fd.tell()
fd.seek(disk_size - 34*512)
fd.write('\0' * 34 * 512)
print "done nuking data at the end of disk", target
Get a full example from:
GPT is the GUID Partition Table, which is a method of defining partitions (not protection) on your computer. If Windows is complaining about your use of GPT, that means that the Windows installer has booted in BIOS mode rather than in (U)EFI mode. There are two ways to work around this problem:
EFI-mode booting with GPT is still very new and can be trouble-prone, but converting your partition table from GPT to MBR is also a rather risky endeavor. Thus, it's hard for me to say which approach is best. Of course, you might not even be able to boot your computer in EFI mode, so you might have to do it by converting your partition table.
An alternative to either approach is to run Windows from within VirtualBox or some other virtualization environment under Linux. This is simpler and safer, and it may be adequate for many purposes. It's most likely to be a problem if you want to run video-intensive games, if you need low-level access to the hardware, or if you have inadequate RAM to support a virtualized environment sufficient for your needs.
Whichever approach you take (aside from a virtualized Windows), I strongly recommend you back up any important data first; mucking with partition tables is always risky.
Edit: Zolar1's comments suggest the possibility that Ubuntu is installed in BIOS mode but using GPT. Installing Windows in EFI mode in this case will require one of two things:
Either is possible. You can convert Ubuntu to boot in EFI mode by adding an EFI boot loader. There are several options, as described here. Ubuntu uses GRUB 2 as its EFI-mode boot loader by default, but IMHO this is a poor choice.
Switching between EFI-mode and BIOS-mode boots of the computer is usually awkward, but sometimes a boot options switch (accessible by pressing F8, F12, or some other key at boot time) can make this tolerable. Another options may be to install rEFInd, which is an EFI-mode boot manager that can (as of version 0.4.6) hand off the boot process to a BIOS-mode boot loader (or to an EFI boot loader).
I am not sure the computer will let you. I have an ASUS K55a myself. Every time I want to install ANY version of Linux then try to go back into windows7, windows forces a R/R and then linux won't work.
I found that you can run Linux from a CD/DVD or if you use Puppy on a flash drive.
Maybe you could use a nice virus to delete all partitions ? LOL
But this link might be of help:
http://www.virtualvcp.com/linux-technical-guides/125-clearing-a-guid-partition-table-gpt-in-linux
Have you turned off the UEFI setting in BIOS? I think as long as that is turned on you might not be able to get rid of the partition and still have the computer work.
Please note: All new computers that come with Win8 are mandated to have the UEFI turned on all the time with no way to disable it. Gotta love microshaft's greed.
If everyone complained to the FTC.gov about the THEFT of your ability to use YOUR hardware and legally licensed software then perhaps they could step in and force the junk to allow dual booting with linux.
I wonder how come someone in Linux just don't write their own UEFI that gives the option to allow dual booting and replace the one that microshaft forces upon everyone.
Remember, you OWN the hardware. Microsoft has no right to tell you what you can do with it.
More on Linux - if I remove my hard drive with win7 on it and install an ssd drive, then turn off the UEI in bios, I can install linux with no problem. It is when I try to add a windows 7 drive with uefi back in is when there is a problem. Win7 forces a R/R then linux won't boot.
Perhaps Linux could make their own uefi that controls every thing like the grub bootloader did instead of having windows dictate what software and hardware you can install. Use the linux uefi first then if you choose windows, kick it to the windows C:partition.
Another idea would be to do something sililar to what puppy does. Puppy uses a fat 2 but inside that it makes an ext2 file system. Not pracicl for big files though.
How about linux using the UDF file system and write whatever file system the user wants into that system.
I dunno. I guess I am rambling due to frustration here.
I wonder if a direct disk access program would allow you to alter the gpt partition table?
Here is another possible solution to your problem: http://www.linuxquestions.org/questions/linux-general-1/delete-gpt-partition-789112/
Boot with a Ubuntu OS @partition wizard window delete all partitions and click on total free space and click create new partition table.