LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-23-2012, 06:26 AM   #1
suresh.k
Member
 
Registered: Aug 2011
Location: Hyderabad, AP, India
Distribution: centos, Ubuntu
Posts: 163
Blog Entries: 1

Rep: Reputation: Disabled
How to format linux os without loosing data


Hi all,
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
/dev/mapper/VolGroup00-LogVol00
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.
 
Old 01-23-2012, 06:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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 06:34 AM.
 
Old 01-23-2012, 06:43 AM   #3
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,009

Rep: Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193
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.
 
Old 01-23-2012, 07:41 AM   #4
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
Hey Suresh,
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
 
Old 01-23-2012, 08:04 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by resetreset View Post
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).
The OP is clearly not wanting to directly format his partitions, please be careful what advice you give as it can be potentially misleading and confusing.
 
1 members found this post helpful.
Old 02-29-2012, 11:58 PM   #6
suresh.k
Member
 
Registered: Aug 2011
Location: Hyderabad, AP, India
Distribution: centos, Ubuntu
Posts: 163

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
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.

Suresh
 
Old 03-01-2012, 12:08 AM   #7
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,009

Rep: Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193
No probs ... hope it works out. Please remember to mark as SOLVED if you have your solution
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i merge two ext2 linux partition without loosing any data amitkjain_crld Linux - General 6 12-24-2022 01:04 AM
Partitioning and not loosing data linuxbeatswindows Linux - General 13 11-02-2009 04:18 PM
C sockets loosing data? greeklegend Programming 8 01-10-2008 04:40 PM
Loosing power and data flycast Linux - Hardware 2 04-15-2007 01:23 AM
How to rescue RedHat 9 Linux without loosing data suddavanda Linux - General 2 08-21-2006 11:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration