LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories
User Name
Password
LinuxQuestions.org Member Success Stories Just spent four hours configuring your favorite program? Just figured out a Linux problem that has been stumping you for months?
Post your Linux Success Stories here.

Notices


Reply
  Search this Thread
Old 12-19-2012, 05:04 PM   #1
snmcdonald
Member
 
Registered: Jul 2011
Location: Canada
Distribution: Debian, Arch
Posts: 55

Rep: Reputation: 0
Erased my Partition Table and Restored it


I was a little careless today and I erased my MBR and GPT off my hard-drive. I was trying to set up a new boot usb disk.

Code:
parted
mklabel msdos
Warning: ....
I ignored the warning and continued wiping out my hard drive GPT. I was certain I had typed parted /dev/sdb and not /dev/sda but I was in a rush and I assume I had typed it correct.

Luckily, I made my partition table system fairly simple with blocks of 50 GiBs. I was able to use parted to re-write my partition table. The table was from memory, although I had to re-write it twice as I had the last partitions backwards. parted was able to detect the FS and I used that as a rough guide to ensure I had my boundaries correct.

It was a bit of a pain to rewrite fstab and my syslinux.cfg file using new UUIDs.

I forgot to re-write the mbrgpt.bin to the MBR, so I used my Arch Linux install media as a rescue disk.

Interesting caveat. The Syslinux chainloader chain.c32 uses lsblk -o PARTLABEL,PARTUUID and fstab uses lsblk -o PARTLABEL,UUID

Two Lessons Learned:
1. Don't Ignore Warnings (Even if you're in a rush)
2. Doing things manually helps you when your up **** creek.

Last edited by snmcdonald; 12-19-2012 at 05:05 PM. Reason: details
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I erased my partition and now get this error: travix Linux - Newbie 14 08-03-2012 11:28 AM
Help! Accidentally erased the partition table on one of my Hard Disks xnomad Linux - Software 2 09-28-2010 12:53 AM
Oops! Erased mbr, no more partition table. Any way to reconstruct? kinematic Linux - General 14 08-16-2010 05:17 PM
Slack 10: S-ATA = "No partition table or unknown signature on partition table"? dissolved soul Slackware - Installation 11 08-05-2004 02:12 PM
Partition erased -> Grub f****d up :( marty25 Linux - Newbie 2 05-19-2004 05:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxQuestions.org Member Success Stories

All times are GMT -5. The time now is 10:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration