If you want to dump the "fdisk data" (by which I guess you mean the hard disk partition table) to a file, you can either:
* Do what others have suggested (fdisk -l /dev/hda > hda.fdisk) - this will give you a readable text version of your partition table, but you can't use this to directly reconstruct the partition table with fdisk. * Use the command: dd if=/dev/hda of=hda.mbr bs=512 count=1 to create a binary file hda.mbr containing the Master Boot Record of the disk /dev/hda. This won't be human readable, but you will be able to use it to restore the partition table with the same command, interchanging the "/dev/hda" and "hda.mbr". CAVEATS: 1) Be extraordinarily careful with this. If you miskey, you can quite easily corrupt the information stored on your hard disk. 2) If you ever restore the partition table with the backup of the Master Boot Record, it will also restore a (almost certainly now broken) lilo MBR. You'll quite probably have to reinstall lilo, and possibly do much more reconstruction work besides to get back to a booting, working system. 3) There's not actually very many situations when this would be all that useful. It's quite rare for the partition table to get hosed without other data on the disk suffering a similar fate. I hope this helps, at any rate. Cheers, - Kevin. From: "Russell Coker" <[EMAIL PROTECTED]> To: <debian-user@lists.debian.org> Sent: Thursday, April 12, 2001 11:23 PM Subject: dump fdisk data to TXT file > Is there a program in Debian to dump the fdisk data to a file? > > I would like to do `fdisk-dump /dev/hda > /etc/hda.fdisk` so that if the > partition table gets corrupted I can do > `fdisk-restore /dev/hda < /etc/hda.fdisk` . Is there any software in Debian > that allows such operations? > > -- > http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark > http://www.coker.com.au/postal/ Postal SMTP/POP benchmark > http://www.coker.com.au/projects.html Projects I am working on > http://www.coker.com.au/~russell/ My home page > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] > >