Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
Using cfdisk. I created two partitions out of my the second primary partition on my hard disk.
Automatically both became primary partitions, but the partition after them (orginally the third (and last) primary partition was demoted automatically to a logical partition.
Though it never lost it type setting (ext2), I cannot access nor see the files I had on it.
I ran fsck, but it says "bad superblock, try another one", which is pretty worrying, as it could mean I've lost those files (no backup). But then I think, "but I didn't touch it" and now it's corrupt? Noggins!
Any suggestions on how to find an alternative superblock for fsck or any other methods?
I don't understand why your last partition would be converted automatically to a logical partition as you can have four primary partitions on a hard drive.
The fourth and last primary partition isn'y like the other three. It's usually blank and (roughly speaking) branches off into a series of logical drives.
So if hda is your harddrive, hda1, hda2, hda3 will be your three primary partitions.
hda4, won't be mentioned and hda5 will be the next drive to be mentioned,a nd it will be a logical one.
What I did, I split my hda2 into two, so it became hda2 and hda3. The original hda3 got "demoted" to hda5 automatically, and now I can't read or access it.
Can anyone help me? I've tried e2fsck and tune2fs -l, no luck.
Thanks for reply. Sorry for not being clear. Here follows what you ask for, output of my fdisk-l hda.
Code:
Disco /dev/hda: 30.0 GB, 30005821440 bytes
255 cabezas, 63 sectores/pista, 3648 cilindros
Unidades = cilindros de 16065 * 512 = 8225280 bytes
Disposit. Boot Start End Blocks Id System
/dev/hda1 * 1 2093 16811991 7 HPFS/NTFS
/dev/hda2 2094 2421 2634660 83 Linux
/dev/hda3 2422 2555 1076355 83 Linux
/dev/hda4 2556 3648 8779522+ 5 Extendida
/dev/hda5 2556 2701 1172713+ 83 Linux
/dev/hda6 2702 2944 1951866 83 Linux
/dev/hda7 2945 3187 1951866 83 Linux
/dev/hda8 3188 3479 2345458+ 83 Linux
/dev/hda9 3480 3552 586341 83 Linux
/dev/hda10 3553 3584 257008+ b W95 FAT32
/dev/hda11 3585 3648 514048+ 82 Linux swap
Sorry for the Spanish, that's the locale I use. To summarise, my corrupted filesys is the hda6. It *used* to be hda3, but as I mentioned, I took hda2 and split into two, so hda3 became hda5.
I actually repeated the process (for experimentation purposes) and split hda2 AGAIN, so that hda5 went to hda6. All the time using CFDISK.
Note that the later filesys like hda8 for example (previously hda6) were not affected by any of this and are in perfect shape.
The root of the problem seem to be the way CFDISK converts a primary partition into a logical one.
I have now solved this problem by way of experimentation.
With the small amount of interest I registered with this question - which actually was about a very serious problem, losing files - I don't think it's necessary to post how I actually solved it in the end, for the benefit of others, is it?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.