Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Have a newly partitioned HD with following config;
root@ttyp0[knoppix]# fdisk -l
Code:
Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 77 514080 82 Linux swap
/dev/hda3 78 1415 10747485 83 Linux
/dev/hda4 1416 4865 27712125 5 Extended
/dev/hda5 1416 2510 8795556 83 Linux
/dev/hda6 2511 3485 7831656 83 Linux
/dev/hda7 3486 4216 5871726 83 Linux
/dev/hda8 4217 4865 5213061 83 Linux
without OS installed.
/dev/hda5, /hda6/, hda7 and /hda8 all have data files. All partitions can be mouted previously on running Knoppix 4.0 LiveCD.
An hour before ran Knoppix 4.0 to browse Internets and have some files saved on /dev/hda8. Those files were not download on Internet. Just copied some text/information from Internet on existing files on /dev/hda8. The PC/Knoppix LiveCD worked without problem and was turned off later.
Now after turning on the PC and starting Knoppix LiveCD it was found /dev/hda8 could not be mounted.
root@ttyp0[knoppix]# mount /dev/hda8 /mnt/hda8
Code:
mount: wrong fs type, bad option, bad superblock on /dev/hda8,
or too many mounted file systems
Other partitions can be mouted without problem. The data/files on them can be read.
e2fsck 1.38 (30-Jun-2005)
e2fsck: Filesystem revision too high while trying to open /dev/hda8
The filesystem revision is apparently too high for this version of e2fsck.
(Or the filesystem superblock is corrupt)
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Whether to run "e2fsck -b 8193" to clean it.
I think the problem was caused by adding some information to a file on /dev/hda8. I opened the file as USER. After adding some information to it I tried saving it back to /dev/hda8 but not allowed. Then I saved it to /home/knoppix/tmp/new_file_name. Started a console, "su" Root and moved to file to /dev/hda8. I tried this trick before without problem.
Then I saved it to /home/knoppix/tmp/new_file_name. Started a console, "su" Root and moved to file to /dev/hda8. I tried this trick before without problem.
The device would be /dev/hda and it would have been mounted as /mnt/hda8 by Knoppix. If indeed, as root, you used the mv command to move something to /dev/hda8 rather than /mnt/hda8 ... I don't know exactly what would have happened ... but I doubt it would be pretty! I would expect an error message, but running as root maybe it just blindly went ahead and did whatever. I'm not about to try it on my system as a test!
Quote:
Is it possible to backup the files on /dev/hda8?
You could use the dd command if you have 5Gb of space somewhere else to save the resulting file to. This would be a good idea, so if your repair attempts fail and actually make things worse you can restore your backup copy and try again. After backing up, I would try running e2fsck with an alternate superblock, as the command suggests. You may have to go farther than 8193 to find a good superblock, depending on how big this file is you tried to move and what the resulting destruction (?) actually was.
The device would be /dev/hda and it would have been mounted as /mnt/hda8 by Knoppix.....
Oh, sorry. That was my typing mistake. I used /mnt/hda8 NOT /dev/hda8
Quote:
You could use the dd command if you have 5Gb of space somewhere else to save the resulting file to.
There is space on /dev/hda7
root@1[knoppix]# mount /mnt/hda7
root@1[knoppix]# df -hT /mnt/hda7
Code:
Filesystem Type Size Used Avail Use% Mounted on
/UNIONFS/dev/hda7
ext3 5.6G 33M 5.3G 1% /mnt/hda7
The total data on /dev/hda8 is about 800~900MB including directories, subdirectories and files. I think the space on /dev/hda7 will be sufficient.
Whether to run;
# dd if=/dev/hda8 of=/dev/hda7
without mounting the partitions? No need adding /* to /dev/hda8 as "if=/dev/hda8/* ???
I suppose all files on /dev/hda7 will be deleted. I have some working files there but non-important
I have been googling around and found a folk suggesting "e2fsck -b 32769 /dev/hdax". Some folks also suffered the same problem as mine but the causes were different.
I made following mounting test;
# mount /mnt/hda8
Code:
mount: wrong fs type, bad option, bad superblock on /dev/hda8,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
knoppix@0[knoppix]$ dmesg | tail
Code:
via82cxxx: timeout while reading AC97 codec (0x9A0000)
via82cxxx: timeout while reading AC97 codec (0x9A0000)
via82cxxx: timeout while reading AC97 codec (0x9A0000)
via82cxxx: timeout while reading AC97 codec (0x9A0000)
via82cxxx: timeout while reading AC97 codec (0x9A0000)
via82cxxx: timeout while reading AC97 codec (0x9A0000)
via82cxxx: timeout while reading AC97 codec (0x9A0000)
EXT3-fs: hda8: couldn't mount because of unsupported optional features (2000200).
EXT3-fs: hda8: couldn't mount because of unsupported optional features (2000200).
via82cxxx: timeout while reading AC97 codec (0x9A0000
NO, NO, NO!!! Negative! Nyet! Nein! Danger Will Robinson, danger, danger! Abort!!!!!!!!!!
The above command would overwrite your hda7 partition with the data from hda8. So you'd end up with two identical, and corrupted, partitions. You want to create a FILE over on hda7, not overwrite the whole damn thing!
Before starting to use the dd command, read the manpage. Then re-read it. Make sure you know what you're doing. dd is a very powerful command, but if misused due to error or ignorance then the result will be akin to fixing your toaster with a handgrenade.
Rather than tell you the dd command you need to run, I'll suggest you study the manpage. I don't say this to be flip or smug. I just feel that if you don't know what you're doing based on your own knowledge, then following somebody's command recipe may get you into trouble. One little typo in my specification of the recipe, or your implementation of it, could spell total disaster.
I'm not this wary of suggesting command strings for the great majority of Linux commands, but dd is an exception. Don't think I'm refusing to help ... what I'm trying to do IS help ... but by minimizing the chances for additional destruction along the way!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.