Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
For some reason, probably hard drive issues, my partitions got messed up.
Code:
fdisk -l /dev/sda
outputs:
Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
65 heads, 26 sectors/track, 184959 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000324ae
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 156293119 78145536 7 HPFS/NTFS/exFAT
/dev/sda2 156293120 197967871 20837376 7 HPFS/NTFS/exFAT
/dev/sda3 197967872 239642623 20837376 83 Linux
/dev/sda4 239644670 312578047 36466689 f W95 Ext'd (LBA)
/dev/sda5 239644672 281319423 20837376 6 FAT16
/dev/sda6 281321472 286531583 2605056 82 Linux swap / Solaris
/dev/sda7 286533632 312578047 13022208 6 FAT16
/dev/sda4 used to be an extended partition holding partition 5, 6 and 7. Sda5 and sda7 should be Linux partitions, formatted with Reiserfs. Im not 100% sure of Reiserfs: I havent used the computer in a while. I know I havent made any changes to the partitions, nor did I write data to them.
As the way things look now, can my data be saved? If so, what can I do?
If more information is needed, please ask.
Help appreciated
Last edited by geofyt; 12-30-2014 at 06:51 AM.
Reason: output now LC_ALL
Just mount the partition with mount command it would automatically find which filesystem the partition has and mount it.
mount /dev/sda5 /mnt
if it doesn't works then changing partition type is easy; just start fdisk and change partition; I think 't' is command to change partition types. Anyway fdisk has inbuilt help.
Just mount the partition with mount command it would automatically find which filesystem the partition has and mount it.
mount /dev/sda5 /mnt
if it doesn't works then changing partition type is easy; just start fdisk and change partition; I think 't' is command to change partition types. Anyway fdisk has inbuilt help.
I already tried this, but mount says it cannot determine the filesystem. Changing the type with fdisk also crossed my mind, but I don't want to do anything destructive.
Please read the manual pages for each command if unsure before executing it, do not add additional switches and cancel each operation and do not proceed if you encounter errors and attach or post output between BB code tags.
*If you have a spare medium around with enough free space you can create per partition copies to file. That could come in handy later on. Attach and mount writable internal or external USB, firewire or other type of disk, then:
This does nothing. It outputs the same as "reiserfsck -h".
However, when I omit --scan-whole-partition, it outputs:
Code:
reiserfsck 3.6.24
Will read-only check consistency of the filesystem on /dev/sda5
Will put log info to '/tmp/fsck.txt'
Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes
reiserfs_open: the reiserfs superblock cannot be found on /dev/sda5.
Failed to open the filesystem.
If the partition table has not been changed, and the partition is
valid and it really contains a reiserfs partition, then the
superblock is corrupted and you need to run this utility with
--rebuild-sb.
Nothing had been written to the output file.
debugreiserfs
Code:
# debugreiserfs -dDom /dev/sda5
debugreiserfs 3.6.24
reiserfs_open: the reiserfs superblock cannot be found on /dev/sda5.
debugreiserfs: can not open reiserfs on "/dev/sda5": no filesystem found
The same goes for /dev/sda7. It makes me doubt whether they truly were reiserfs. As said, it was a long time since I used them and I have no fstab where I can look it up. If not reiserfs, then it would be ext3. I am sure it's either one of those.
Hexdump and DD
Hexdump is still running for /dev/sda5 and has been for some time now.
I do have a spare disk laying around which I'll attach later on so I can DD those partitions. I can create identical partitions on the spare disk. Or is this not necessary?
It makes me doubt whether they truly were reiserfs. As said, it was a long time since I used them and I have no fstab where I can look it up. If not reiserfs, then it would be ext3. I am sure it's either one of those.
How long ago?
Why don't you have /etc/fstab?
Do you have backups?
Did you try running:
but don't save anything just run analysis then quit and check / post the log file.
Quote:
Originally Posted by geofyt
Hexdump is still running for /dev/sda5 and has been for some time now.
Well then you can quit it. Unless it's a 1980-era disk it's way past the superblock.
Quote:
Originally Posted by geofyt
I do have a spare disk laying around which I'll attach later on so I can DD those partitions. I can create identical partitions on the spare disk. Or is this not necessary?
The idea is to make an exact copy of the partitions to files. That way you have backups and you can then safely experiment on the disk or vice versa, whatever you like.
Hexdump is still running for /dev/sda5 and has been for some time now.
No results here indeed, unSpawn.
Quote:
How long ago?
PFff, I think about a year, or so.
Quote:
Why don't you have /etc/fstab?
It's not that I don't have /etc/fstab at all though For this Linux install there is one. But I last used /dev/sda5 and /dev/sda7 in my former Linux setup, which contained the mount info for these drives. I installed a new Linux and never got around mounting them.
Quote:
Do you have backups?
I had backups. My backup device broke yesterday.
dumpe2fs
Code:
#dumpe2fs /dev/sda5
dumpe2fs 1.42.9 (4-Feb-2014)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sda5
Couldn't find valid filesystem superblock.
Testdisk
Quote:
but don't save anything just run analysis then quit and check / post the log file.
This is seen after running the analyzer within the program:
Code:
Disk /dev/sda - 160 GB / 149 GiB - CHS 19457 255 63
Current partition structure:
Partition Start End Size in sectors
Warning: number of heads/cylinder mismatches 65 (NTFS) != 255 (HD)
Warning: number of sectors per track mismatches 26 (NTFS) != 63 (HD)
1 * HPFS - NTFS 0 32 33 9728 203 11 156291072
Bad relative sector.
Warning: number of heads/cylinder mismatches 65 (NTFS) != 255 (HD)
Warning: number of sectors per track mismatches 26 (NTFS) != 63 (HD)
2 P HPFS - NTFS 9728 203 12 12322 237 11 41674752 [Documenten]
3 P Linux 12322 237 12 14917 16 11 41674752
4 E extended LBA 14917 48 42 19457 21 20 72933378
Invalid FAT boot sector
5 L FAT16 >32M 14917 48 44 17511 82 43 41674752
5 L FAT16 >32M 14917 48 44 17511 82 43 41674752
X extended 17511 104 14 17835 195 24 5210804
6 L Linux Swap 17511 115 13 17835 195 24 5210112
6 L Linux Swap 17511 115 13 17835 195 24 5210112
X extended 17835 213 47 19457 21 20 26045308
Invalid FAT boot sector
7 L FAT16 >32M 17835 227 57 19457 21 20 26044416
7 L FAT16 >32M 17835 227 57 19457 21 20 26044416
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.