[SOLVED] can I do mkfs after transferring data to HD
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I was having some trouble with a Hard drive that I store my photo's and other personal data on. Fisrtly, it was messing my OS up, so that it would not boot to the desktop, but only to the command line where it would report that this drive was somehow corrupted and needed to be repaired. Secondly, the OS was reporting that certain files were 380,000.2 TB in size. this drive is only 200 GB.
I didn't want to do the repair until I found a way to back up my data. I found another hard drive to do backup to but I had to take some data off of it. Which I did.
In the spirit of trying learn command line I decided to partition and format the hard drive using fdisk. I found some easy to use directions and proceeded to partition the drive. Unfortunately, I failed to realize the directions were only for the partitioning part [my fault for not reading further]. What I missed was that after using fdisk to partition, you must use mkfs to set filesystem type.[I thought I had done that in fdisk using the "l" , "t" commands within fdisk].
My questions are:
1] Can I do this mkfs command after I have put my data on the new hard drive or should I start fresh and redo partioning? [I have not deleted the other drive so my data is still there.]
2] What would be the cause of the incorrectly reported file sizes?
Presuming you have your data safely tucked away somewhere else:
- the partition type in the partition table says what type (Linux) not what filesystem.
- after partitioning like that you have to mkfs to format a filesystem type (ext3, jfs, whatever - even NTFS). This will delete all data in this partition.
- logic errors in the metadata causes all sorts of weird errors - fsck is used to "fix" these; "man fsck" for info.