LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices

Reply
 
Search this Thread
Old 03-05-2014, 04:07 PM   #1
ReaperX7
Senior Member
 
Registered: Jul 2011
Location: California
Distribution: LFS-7.6, Slackware 14.1, FreeBSD 10.1
Posts: 3,661
Blog Entries: 15

Rep: Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128
Post [how-to] Switching back to MBR from GPT.


If you ever need to switch back to an MBR partition scheme from GPT, for whatever reason, cfdisk will spit out an error saying that the disk still has a GPT partition on it.

This is from a GPT partition scheme written at the end of the disk.

To erase this and restore functionality back to MBR style partitions use these commands. This works with any distribution of Linux with an install Disk, not just Slackware, provided the disk does in fact have gnu parted installed on it.

Code:
parted /dev/sdX
mklabel msdos
quit
You'll be asked some questions shortly afterwards just type yes and ignore and afterwards reboot the media.
 
Old 03-05-2014, 04:57 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 1,691

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
It's worth noting that this procedure loses any information on the disk.

There is a utility which can (in some cases) convert to or from GPT without losing data called gpt fdisk, although I haven't personally tried it:

http://www.rodsbooks.com/gdisk/mbr2gpt.html
 
Old 03-05-2014, 07:57 PM   #3
ReaperX7
Senior Member
 
Registered: Jul 2011
Location: California
Distribution: LFS-7.6, Slackware 14.1, FreeBSD 10.1
Posts: 3,661
Blog Entries: 15

Original Poster
Rep: Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128
Yes, it will destroy the partition labels and force you to rebuild your partitions, but it does work in a pinch if you're reinstalling or doing a fresh install and need to revert back for whatever reason.

This was only posted due to the fact it's tools included with the actual install media, rather than post-installation.

Last edited by ReaperX7; 03-05-2014 at 09:25 PM.
 
Old 03-06-2014, 12:09 AM   #4
TracyTiger
Member
 
Registered: Apr 2011
Location: California, USA
Distribution: Slackware
Posts: 290

Rep: Reputation: 72
Quote:
Originally Posted by ReaperX7 View Post
If you ever need to switch back to an MBR partition scheme from GPT, ...
Code:
parted /dev/sdX
mklabel msdos
quit
Quote:
... it's tools included with the actual install media ...
Thanks ReaperX7! I'm always looking for tools and methods to use that are available from just booting the Slackware installation disk.

This looks much easier than using "dd if=/dev/zero" and figuring out how many blocks to skip to erase the last part of the disk.
 
Old 03-06-2014, 12:25 AM   #5
ReaperX7
Senior Member
 
Registered: Jul 2011
Location: California
Distribution: LFS-7.6, Slackware 14.1, FreeBSD 10.1
Posts: 3,661
Blog Entries: 15

Original Poster
Rep: Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128
Very much welcome.
 
Old 03-06-2014, 06:17 AM   #6
jtsn
Member
 
Registered: Sep 2011
Location: Europe
Distribution: Slackware
Posts: 890

Rep: Reputation: 416Reputation: 416Reputation: 416Reputation: 416Reputation: 416
Quote:
Originally Posted by smallpond View Post
There is a utility which can (in some cases) convert to or from GPT without losing data
This utility is included into Slackware and is called gdisk(8).

Just call it and use 'g' to convert GPT into MBR. It also works with an empty table. This is the better option, because it is included in the Slackware install/rescue media and it doesn't destroy data. To remove the GPT without creating a MBR - to get a clean disk - just use 'o'. And for special cases there is an option to create an MBR/GPT hybrid with 'h'.
 
  


Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPT vs MBR asipper Linux - General 9 12-23-2011 09:29 PM
GPT MBR Mismatch NickL Linux - Newbie 0 08-20-2011 07:31 AM
[SOLVED] Slackware 13.37 - gdisk choices, MBR, GPT or Blank GPT CFet Slackware - Installation 3 04-01-2011 05:46 PM
GPT to MBR mrwall-e Linux - Software 3 08-26-2010 10:00 PM
GPT, MBR, GRUB and rescue software Kamoflauge Linux - General 6 01-31-2008 04:59 PM


All times are GMT -5. The time now is 11:32 AM.

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