Is it possible to reinstall or upgrade linux without losing 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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
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.
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).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.