2
I was given a hard disk to repair/extract data from. This hard drive was once the hard drive of a computer that had windows and linux installed (using grub to change between two). Booting from the hard drive is not possible anymore. When connected to linux, 4 partitions are found (/dev/sdb[1256]
), but only /dev/sdb1
can be read. /dev/sdb1
is the grub-partition, while /dev/sdb5
was identified as swap-partition by blkid
(it might have been another program, i'll check that). Mounting the partitions 2 and 6 gives errors, var/log/syslog
says something about a bad superblock.
Still, the most irritating result gives fdisk -l
, which prints the partition table AFAIK.
Device Start End Type
/dev/sdb1 2048 19531775 83 linux
/dev/sdb2 19533822 625141759 5 extended
/dev/sdb5 19533824 36304895 82 linux swap
/dev/sdb6 36306944 625141759 83 linux
(1 sector equals 512 byte, some of the output was removed by me. I will add it if needed)
If I understand correctly, something is wrong with the partition table. Somehow partition 2 is at the same location as partitions 5 and 6, which might explain the mounting-errors. (I will ask which OS really was used on this hard drive).
Now, there are important files on this hard drive. How do I get these files from the hard drive or (better) alter the hard drive so linux can mount all partitions. My first thought was to make a backup with dd
and then let a fsck
run on /dev/sdb
(You might see I am no expert at this), although I have my doubts.
UPDATE: As grawity pointed out, the partition table is intact and there are 3 partitions, from which one is a swap-partition. /dev/sdb1
can be mounted and is the grub-partition (judging from the files on the partition). /dev/sdb5
is most likely the swap-patition (since it's labeled as such and its size is in the right magnitude). I will try doing a fsck
on /dev/sdb6
and try some recovery tools.
Also, the person who gave me the hard drive is now thinking if he gave me the right one. I will look for the files anyway.
The only partitions here which could potentially hold data are sdb1 and sdb6 (partition info is given expertly by grawity's answer), and there are no Windows partitions here to recover data from. Although I can't say for certain, sdb1 was probably root (/) and sdb6 was probably home (/home) mounts, so the later is probably the most important. If possible, since you are getting errors, I would
dd
those 2 partitions to files, then mount the files and attempt recovery there. – acejavelin – 2016-05-24T12:53:43.297"
/dev/sdb1
is the grub-partition" - No, I don't think it is. It's about 9.5GiB, which suggests it's the root filesystem (containing the OS + programs, but not the documents and media). Ok, the root filesystem would in this case also contain grub, but to me "grub-partition" implies that it only contains grub. – marcelm – 2016-05-24T15:57:54.513@marcelm If
/dev/sdb1
would be the root partition, there would be directories such asbin
,var
,etc
and others. I just gave it a quick look but I didn't see those. I quickly decided that/dev/sdb1
was no root-filesystem because there were many files containing "grub" in the uppermost directory. But of course this does not say I'm right, so far I have only seen a limited number of linux-distributions. I will have a proper look at it later. Thank you. – AidenPearce – 2016-05-24T16:11:02.197To check the drive for (possibly brutalized) NTFS partitions, see my answer here: http://askubuntu.com/a/776317/271
– Andrea Lazzarotto – 2016-05-25T15:29:40.163