Recover DD-d partition info
Comments
-
After executing "w"; I have received the following;
I still do not know if the id 83 / linux partition is OK or not... Is there a way to check it?
What will happen if I do partprobe kpartx as mentioned below?The partition table has been altered!Calling ioctl() to re-read partition table.WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used atthe next reboot or after you run partprobe(8) or kpartx(8)Syncing disks.root@NAS:~# fdisk -lDisk /dev/sda: 2000.4 GB, 2000398934016 bytes255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x6d403b49Device Boot Start End Blocks Id System/dev/sda1 63 1028159 514048+ 83 Linux/dev/sda2 1028160 3907029167 1953000504 83 LinuxDisk /dev/md0: 1999.9 GB, 1999868854784 bytes2 heads, 4 sectors/track, 488249232 cylinders, total 3905993857 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x00000000Disk /dev/md0 doesn't contain a valid partition table0 -
Dear Mijzelf,
Just reading through fdisk; shall I set sda1 to bootable?
I am a beginner, so sorry for asking so many times...0 -
Many questions, but you're doing fine. The generated partition table looks OK to me. for comparison, this is the partition table of my old, trusty 325:Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders, total 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x604f18f3
Device Boot Start End Blocks Id System
/dev/sda1 63 1028159 514048+ 8 AIX
/dev/sda2 1028160 156296384 77634112+ 20 Unknown
As you can see the first partition is identical, and the second starts on the same sector. Further the last sector of the 2nd partition is the last sector of the disk on your system, while mine has 3 sectors left. Probably because it wanted a multiple of 4096 bytes, or something like that. I suppose you did the math, about the endsector.The partition type is ignored, so you don't need to bother about that. The bootable flag is only used by BIOS driven PC's, and so is also ignored here.How many blocks did you overwrite by dd? Has sector 63 been spared?0 -
Ok, thank you for the help.
Actually I do not know; as far as I remember on the screen was "512 bytes written" or something.
Opinion about executing "partprobe" or "kpartx"?
Or keep system live till I will be able to backup to an ext. drive, and only after do a trial?0 -
When you only have written 512 bytes the disk should be recovered now.Opinion about executing "partprobe" or "kpartx"?I don't think either of them are available on the box. Nor does it help. They inform the kernel about partition on the disk, while you now want to 'inform' the disk about partitions in memory, by writing a partition table.A tool which could do so is TestDisk, which can scan a disk for apparent partitions, and write a partition table. In your case that can help to save the data, but the generated partition table will not be compatible with the firmware, because TestDisk will find the inner part of the raid array.Or keep system live till I will be able to backup to an ext. drive, and only after do a trial?That's your decision. I think your partition table is fine now. If it isn't, the data is still not lost (as long as you don't re-initialize the disk) but it will be a bit harder to copy it than it is now, of course.
1 -
Thank you! Right now I am doing the copy of the important backup data. It will take some time. but afterwards I will do the reboot. "I will be back" ; at least with the results!0
-
I was not succeded. Volume is down. :-(0
-
That's a pity. Do you still have shell access? You should be able to login using the telnet backdoor.What is the output ofcat /proc/partitionscat /proc/mountscat /proc/mdstatfdisk -l /dev/sda0
Categories
- All Categories
- 415 Beta Program
- 2.3K Nebula
- 142 Nebula Ideas
- 94 Nebula Status and Incidents
- 5.6K Security
- 230 USG FLEX H Series
- 267 Security Ideas
- 1.4K Switch
- 71 Switch Ideas
- 1K Wireless
- 39 Wireless Ideas
- 6.3K Consumer Product
- 246 Service & License
- 385 News and Release
- 82 Security Advisories
- 28 Education Center
- 9 [Campaign] Zyxel Network Detective
- 3.2K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 83 About Community
- 71 Security Highlight