[SOLVED] How to format linux os without loosing data
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!
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 am little bit confused with this problem,
how to format linux OS without loosing any data.
Means, in windows we have create partitions like C and D drives, there we can format OS from C Drive without loosing any data from D drive.
In Linux also is there any method to format only OS.
And In windows we can repair Operating System by booting from OS CD and then by pressing R to repair and by going to safemode and typing FIXBOOT and FIXMBR, this will repair the operating system. like this is there any option to repair Linux OS.
If we Install linux OS by default partion type then i get this partitions
Filesystem Size Used Avail Use% Mounted on
33G 20G 11G 65% /
/dev/hda1 99M 12M 82M 13% /boot
tmpfs 490M 0 490M 0% /dev/shm
In this where the OS is Installed, and how to reinstall OS in that OS partition, in this what is /dev/mapper/volgroup00, /dev/hda and tmps partitions.
please explain step by step iam little bit confuse with this problems.
if you had created a separate /home partition then your data would have gone there, that could have been seen to be your "D:", but as you haven't there aren't any options that I would suggest would work out for you. You may be able to resize your / LVM volume there, assign that to be /home and then create a new LVM volume for / (which would be somethign equivalent to "C:"), but this will still probably leave you in a bit of a mess trying to clear up the old data there.
So it is possible, but it doesn't look feasible for the level of experience you suggest. I would recommend backing up your data and reinstalling from scratch, but this time remember to create a /home volume if you wish to be in a better situation next time.
Last edited by acid_kewpie; 01-23-2012 at 07:34 AM.
Chris is correct in that your current situation equivalent in Windows is you have used the entire drive for C: and now wish to format which will blat everything.
You could look at gparted and, as Chris has said, try to resize the current volume and create another to store your data, but I would also agree at this point
it may be just as easy to copy saved data to an external unit and format and repartition drive with a fresh install.
So glad to see a fellow Indian getting into Linux.
First of all, to format, the command is "mkfs" - you'll have a "mkfs.ext4" or whatever for your particular system. (ext4 is a type of filesystem).
Secondly, all those partitions you see are because of LVM - I'm not knowledgable about it, but it's a way to add and subtract physical drives from a "partition", i.e. it can resize on the fly (sounds amazing, right?) - Is Fedora the distro you're installing? If you were installing Ubuntu, you would not get these, as Ubuntu does not include the LVM system within it.
..and finally, to repair the boot sector, you'll need to reinstall GRUB. This question has probably been asked lots of times here on LQ, so just search for it.
If I've helped you, I'd appreciate a postcard , but I don't like to give out my address online
Iam very sorry for the late replay,
And iam very thank full to u all for this solution
Net=xt time i will create the seperate partition like D in windows so that i cant loose my data if i format the OS.