LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-07-2008, 03:00 AM   #1
vedang
Member
 
Registered: May 2006
Posts: 89

Rep: Reputation: 15
Need to save partition table


Hi,

I want to save partition tabale to a file and i do not want to use sfdisk command. Can i do it with fdisk or parted command?
Or is there any other way of storing partition table to a file?
 
Old 03-07-2008, 03:51 AM   #2
DiWi
Member
 
Registered: Jun 2004
Location: Frankfurt/M Germany
Distribution: SuSE 9.3/10.2/10.3
Posts: 64

Rep: Reputation: 16
Do you need it for documentation purpose or just for the case

Use dd for backup

Dirk
 
Old 03-07-2008, 06:11 AM   #3
vedang
Member
 
Registered: May 2006
Posts: 89

Original Poster
Rep: Reputation: 15
Need to save partition table

I do not need it for documentation purpose and not just for a cause.

I have made a script regarding restore and backup. My script backs up partition images and restores to a new hdd. After writing to a cd it will become a bootable cd, for which I do not want to use sfdisk and only want to use fdisk and parted commands.


Please help me.
 
Old 03-07-2008, 06:25 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,570

Rep: Reputation: 3110Reputation: 3110Reputation: 3110Reputation: 3110Reputation: 3110Reputation: 3110Reputation: 3110Reputation: 3110Reputation: 3110Reputation: 3110Reputation: 3110
Sounds like homework.
Bad strategy regardless.
 
Old 03-07-2008, 06:29 AM   #5
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 70
dd if=/dev/hda of=<filename> bs=512 count=1

The partition table is in the last 66 bytes of the MBR.
 
Old 03-07-2008, 06:44 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
The galloping nitpicker strikes......

You might need /dev/sda instead of /dev/hda

The partition table is 64 bytes--the last 2 bytes is a "signature"

Do you have more than 4 partitions? If so, you need the partition boot sectors as well. You can have you script detect if there is an extended partition (by using fdisk or by parsing the primary partition table directly)
 
Old 03-10-2008, 05:07 AM   #7
vedang
Member
 
Registered: May 2006
Posts: 89

Original Poster
Rep: Reputation: 15
Thumbs down Reply to syg00

Reply for syg00 from vedang,

I am working as a Senior Linux Administrator. I am handling Software based RAID, Sendmail server, Squid Proxy and Iptables based firewall and many more things. So I can say I have knowledge in my related fields in Linux.
This forum is to help queries of freshers as well as experienced professionals. Because though you have knowledge, your knowledge will be limited to some technologies only. And when you have to work on such technology about which you are not aware of, you have to take help from some experienced professionals related to that field from such forums, that is what I did.

You should not bother if the query is for personal use or for official use or it make be a query for homework also. The cause of the query may be for personal use, for completion of a project, for exploring more knowledge , to confirm self knowledge or anything else.

If you have solution and want to share your knowledge, provide the solution for queries in the forum and if not just keep quiet.
But do not try to make comments, like what you have done on my query. Because there is no meaning for such comments.

Be careful not to make such comments onwards.
 
  


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
How to save routing table entries? drgowans Linux - Networking 7 02-26-2019 06:16 PM
"No partition table or unknown signature on partition table" 10.1 install madcow007 Slackware 4 02-09-2009 11:04 AM
how to save modified routing table combilli Linux - Networking 6 07-02-2007 10:52 PM
How do i save my routing table? Titanas25 Linux - Newbie 2 04-19-2006 03:08 AM
Slack 10: S-ATA = "No partition table or unknown signature on partition table"? dissolved soul Slackware - Installation 11 08-05-2004 02:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration