LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-22-2009, 06:30 PM   #1
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Rep: Reputation: 15
Question Is it possible to reinstall or upgrade linux without losing data??


hi all
there are similar questions to this in here but non is quite clear about this.
so the question is is it possible to upgrade or reinstall linux with out losing data?
if yes how would you go about doing so?(please use baby steps I'm new)

would this work with lvm or lvm2 partitioning?

Thank you all in advance.

Last edited by cyber.scientist; 04-22-2009 at 06:33 PM.
 
Old 04-22-2009, 06:50 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What distro are you using?
 
Old 04-22-2009, 06:57 PM   #3
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
im using fedora core 9.

but is there a general/ non distro specific answer?
 
Old 04-22-2009, 07:16 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Not really.

I hear mixed stories about upgrading Fedora. As a matter of course, I would always take a backup first in case something goes wrong. One way to avoid this in the future can be to have a separate /home partition that you don't touch during the upgrade and that you simply remount post installation (or as part of the installation process).

I generally find LVMs more trouble than they are worth, and wouldn't use one unless I needed to add extra capacity to an existing volume.

What do you have available for backups? A USB HDD is a good solution.

Sorry if that isn't quite what you wanted to hear, but that's my take.
 
Old 04-22-2009, 07:23 PM   #5
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
yeah LVM an be very annoying for simple or newbies users like me.
but its the default installation.
now the problem is that i cant mount the LVM (the problematic one) using Konnpix for some reason. ( I can mount other LVM partitions strangely enough. so i can not back up my data.
 
Old 04-22-2009, 07:24 PM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Try a live CD of Fedora if you can't boot the existing copy
 
Old 04-22-2009, 07:36 PM   #7
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
sorry i cant see how would that help?
sorry newbie here
 
Old 04-22-2009, 07:38 PM   #8
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
If you only have one HD in your computer using LVM doesn't gain you much, if anything. It would be easier for you to use regular partitions. It can be a bit of work to get the partitions in the logical volume recognised by the kernel when running from a rescue disk or live distro.

For your general question, it is common to have a /home partition (rather than just a directory). This would allow you to even install a different distro (fresh install) but not reformat the /home partition. I would rename your home directory and then copy the data you want from your old home directory to the new one. For example, if your username is cybers, then rename /home/cybers to /home/cybers-old before reinstalling. This will leave two directories in /home/, /home/cyber & /home/cyber-old. If you are changing distro's you may find that your users UID is different. Some start at 500 and others start at 1000. Using chown as root, you can fix that easily.

The /home partition could be a partition on an LVM volume. It doesn't have to be a separate partition on the disk. A new distro would need to use an installer that can LVM volumes.
 
Old 04-22-2009, 07:40 PM   #9
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
A Fedora alive CD should be able to read its own LVM. It may be a more modern version that the other LVMs you can mount from Knoppix

Last edited by billymayday; 04-22-2009 at 07:48 PM.
 
Old 04-22-2009, 07:47 PM   #10
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Quote:
Originally Posted by cyber.scientist View Post
sorry i cant see how would that help?
sorry newbie here
Missed your last message. If the version of the filesystem is different, maybe the kernel that knoppix uses can't work with the version that Fedora used.

There are commands like lvscan & vgscan that might help.

The command "/sbin/vgmknodes" may create the device nodes for the logical volumes. This step may be needed if you boot up from a live distro.

You get the picture why lvm2 adds complication. If you are a newbie and don't have a multidisk logical volume, I'd recommend reinstalling instead of upgrading, and use regular partition. Create a separate /home partition. Later if you want to try a different distro, you can preserve the /home partition easily. In other words, backup and restore your data this one time. Next time you can keep your old /home partition.
 
Old 04-22-2009, 07:58 PM   #11
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
thanks a lot guys. you guys have been very helpful.

now i need to find out how to back up 200 gb of data.
but i will need to change the partitions to ext3 and make a home partition for my data.

how do you make the home partition during installation wizard?

Last edited by cyber.scientist; 04-22-2009 at 08:00 PM.
 
Old 04-22-2009, 08:04 PM   #12
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Totally from memory here, so interpret as such:

When you get to the partitioning step, you will be give nthe option to accept the default partitioning scheme or manually partition. Choose the manual option, and the instructions should be reasonably clear.

If you aren't using LVM, you should get away with an ext3 / partition and an ext3 /home partition, but you may as well set aside a swap (say 1-2 times your physical memory in size).

Good luck.
 
Old 04-22-2009, 08:31 PM   #13
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 41

Original Poster
Rep: Reputation: 15
Just one last question is it possible to resize LVM partitions from the Live?
so that i can create ext3partition. And then move my data to new partition and label it /home. and then format the rest of hard drive as ext3 and install fc10 on it.

hope that was clear.
 
Old 04-23-2009, 09:35 PM   #14
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
Try this http://www.linuxquestions.org/questi...9/#post3511905
 
Old 04-24-2009, 08:04 PM   #15
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
If you can shrink the lvm partition, label the new partition something else like /home-new. Then you can have /home mounted and /home-new mounted. After copying the data, check that it looks OK in /home-new before deleting the files in /home. Use "cp -a". This selects recursion, preserves links and copies the permissions & timestamps. Make sure that the hidden files are copied as well. If you copy your home directory from /home, they should be.

For the swap partition. Just a little over 1 X memory should be fine if you have over 1GB. You need a swap partition as large as memory for suspending to disk to work. ( This is the resume=<device> you see on the grub line )

If you stick with LVM, then you want a separate /boot partition.
 
  


Reply

Tags
lvm, resizing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
upgrade system with lvm on software raid-1 data volume w/o losing data BinWondrin Linux - General 1 01-13-2009 04:25 PM
Reinstall RHEL4 without losing data rrbalajikmu Linux - Server 3 05-13-2008 06:54 PM
Resizing of Linux Partitions without losing data sandhyarevuri Linux - General 2 02-11-2006 11:22 AM
reinstall windows without losing linux ereeno Linux - Software 30 09-04-2003 04:55 AM
Upgrade to RH 9.0 without losing data? habadash Linux - Newbie 3 07-31-2003 06:41 PM


All times are GMT -5. The time now is 07:43 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration