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.
A while ago I used cfdisk to partition my hard drive. During the partitioning, I told cfdisk to maximize the partition with my data (ext3), because it had some unallocated space before and after it.
As a result result, I cannot use the partition now.
I tried turning that option later on, however I still couldn't use it.
mount -t ext3 /dev/sda5 /media/sda5 says that the partition type is unknown.
gparted says that the partition type is unknown.
ext2explore (on windows) doesn't see this partition at all.
acronis disk director (on windows also) says that the partition is not formatted.
Hmmm - did you happen to take note of the warning(s) re using that (maximize) command ?.
I guess not.
Anything referencing the filesystem (like mount and resize2fs) I would think would expect it to be at the "start" of the partition. If you've expanded the partition in "front" of the filesystem, obviously this would no longer be the case.
resize2fs works fine when the partition is larger at the "end".
The following from the manpage has always been my primary concern when screwing around with partitions/filesystems:
Quote:
When recreating the partition, make sure you create it with the same starting disk cylinder as before! Otherwise, the resize operation will certainly not work, and you may lose your entire filesystem.
I would think you could loop mount the filesystem using an offset just to prove it is o.k. Could get fiddly, but would allow you to back everything up. Might then be easier just to mkfs and copy it all back - or you could try playing around to get the partition to again match the filesystem.
Last edited by syg00; 10-29-2011 at 08:55 PM.
Reason: Forgot the loop mount suggestion.
I would delete the partition, try with testdisk, and carefully choose the smaller partition to restore if testdisk spots it. You may end up with numbers out of sequence, but a little hacking of fstab fixes thatTestdisk has a static binary download, which has all the libs compiled in.
Then stop messing, & ignore messages as long as it works.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.