LinuxQuestions.org
Review your favorite Linux distribution.
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 04-22-2009, 05:30 PM   #1
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 43

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 05:33 PM.
 
Old 04-22-2009, 05:50 PM   #2
billymayday
LQ 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, 05:57 PM   #3
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 43

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

but is there a general/ non distro specific answer?
 
Old 04-22-2009, 06:16 PM   #4
billymayday
LQ 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, 06:23 PM   #5
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 43

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, 06:24 PM   #6
billymayday
LQ 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, 06:36 PM   #7
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 43

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

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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, 06:40 PM   #9
billymayday
LQ 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 06:48 PM.
 
Old 04-22-2009, 06:47 PM   #10
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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, 06:58 PM   #11
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 43

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 07:00 PM.
 
Old 04-22-2009, 07:04 PM   #12
billymayday
LQ 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, 07:31 PM   #13
cyber.scientist
Member
 
Registered: Jan 2008
Posts: 43

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, 08:35 PM   #14
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,369

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

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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



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 03:25 PM
Reinstall RHEL4 without losing data rrbalajikmu Linux - Server 3 05-13-2008 05:54 PM
Resizing of Linux Partitions without losing data sandhyarevuri Linux - General 2 02-11-2006 10:22 AM
reinstall windows without losing linux ereeno Linux - Software 30 09-04-2003 03:55 AM
Upgrade to RH 9.0 without losing data? habadash Linux - Newbie 3 07-31-2003 05:41 PM

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

All times are GMT -5. The time now is 09:37 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