LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-21-2011, 01:51 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Partition Table Backup?


I have a hard disk with a non standard partition order which is likely to have to have a windows restore done on it. I actually have it the way I want it atm. I am interested in finding out if there is a handy way to back up the partition table, like I can backup the mbr.

Where does the partition table hide? 160 Gig Sata hd, btw.
 
Old 02-21-2011, 01:58 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
You can use the following, using dd:

Code:
dd if=/dev/sdX of=/tmp/mbr_sdX.bin bs=512 count=1
To restore:

Code:
dd if=mbr_sdX.bin of=/dev/sdX bs=1 count=64 skip=446 seek=446
 
1 members found this post helpful.
Old 02-21-2011, 03:00 PM   #3
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Did you get it figured out? Just wondering man... You gave me rep but never replied back.
 
Old 02-21-2011, 10:05 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Better option is to use sfdisk to create a text file that can be fed back into sfdisk to build the partition table. Particularly if there are logical partitions involved. None of the above is any help for gpt.

One has to wonder about what the OP is planning. If the Windows restore rebuilds the entire disk, you *really* don't want to be just screwing with the partitions underneath it.
 
Old 02-21-2011, 11:08 PM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by syg00 View Post
Better option is to use sfdisk to create a text file that can be fed back into sfdisk to build the partition table. Particularly if there are logical partitions involved. None of the above is any help for gpt.

One has to wonder about what the OP is planning. If the Windows restore rebuilds the entire disk, you *really* don't want to be just screwing with the partitions underneath it.
I didn't know about sfdisk, thanks for that.
 
Old 02-22-2011, 03:11 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
@corp769: I have & had the dd of mbrs, Thank you. Everyone is wondering what I am up to, so I had better elaborate. It's my laptop.

Stage 1: I got a disk, which was split 143, 10, & 7 Gigs all NTFS partitions and loaded with something I never use, windows. The 10 & 7 were sda2 & sda3.

Stage 2: I resized sda1 down to 35 gigs, and put an extended partition in the available space. I installed linux there on several partitions (using a common /boot, & /home).

Stage 3: I had to resize swap, so the first 2 slices in that extended partition have the highest numbers.

Now _That_ is preserved in a windows backup. Given that I got trouble before, if there was a way of storing that partition table, I'd use it.

@svg00: The idea of a text file sounds good. Does sfdisk read it or do I enter it?
 
Old 02-22-2011, 03:23 AM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
No, just feed it back to sfdisk - see the manpage.

Personally I never get too attached to a particular setup - any Linux can be setup to manage any partition numbers. Even use UUID or labels if you feel the need - I don't BTW. But it's your system, so it's your call.
Good luck with it.
 
Old 02-23-2011, 03:14 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Original Poster
Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I'm not really attached to the setup, but I'm at college atm. There is a shortage of pcs, and an even bigger shortage of pcs with the correct software for engineering. Because of the recession and a Government scheme, the colleges are full. So the beauty of the current setup is that I can fire up windows, install a trial package, and work at home. As windows has no virus protection, uses a usb key for data, and generally lacks anything of worth, I can restore from a backup anytime in the next 5 years that I need to run a second trial of some package.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fsck - Recovering partition table from backup Superblock. MoonMan89 General 1 10-06-2010 12:55 PM
Backup partition table cccc Linux - General 4 12-22-2009 07:37 PM
backup partition table twantrd *BSD 1 08-20-2005 07:01 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
Why can't I restore a partition table backup containing a reiser partition? oldweasel Linux - Software 2 05-23-2004 12:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:55 PM.

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