Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: Replacing ubuntu files

  1. #11
    Join Date
    Oct 2009
    Location
    Los Angeles, CA
    Beans
    380
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Replacing ubuntu files (I ****ed up)

    ^^ That's a good idea, but remember to hit Ctrl+H to see all the hidden files inside your /home folder. You need to copy everything inside the /home folder.
    Main: Intel Core i7 920 D0 @ 4.0GHz | Asus P6X58D Premium | 6 x 2GB Mushkin Redline 1600 7-8-7-24 | EVGA GeForce GTX 560 Ti | 6 x 1TB WD Caviar Black | Mint 15 Cinnamon / OS X 10.7.3
    Portable: Dell Mini 9 | OS X 10.6.7

  2. #12
    Join Date
    Jul 2007
    Location
    Nashville TN
    Beans
    138
    Distro
    Ubuntu Development Release

    Re: Replacing ubuntu files (I ****ed up)

    Ginsu543 and sgosnell,

    Thanks for your suggestions, but I was looking to shrink my current 40GB single partition, then to create a second logical partition with the resulting unallocated space, then to move the /home folder to the second drive. There are instructions for doing that, except it doesn't say how to shrink the existing partition and to add a second partition. That's where the "scary" /home-migration shell commands come in that I mentioned.

    I tried booting from a live Ubuntu CD, but it doesn't offer a "shrink partition" option, repartitioning looks like it's going to be a destructive operation. I burned a GParted boot disk and tried booting that, but with the same result. And I don't have a lot of experience with live repartitioning either.

    I need a total hardware upgrade anyway. When I get a new system, I'll choose manual repartiton and select /home as the mount point for the second drive. (I hope I see the way to do that then.)

    FWIW, my system is an ancient 933Mhz CPU, 512 MB RAM, 40GB HD, RIVA TNT2 (only partially supported by the nouveau driver now.) Ubuntu Lucid runs faster on it than Windows XP on 486s at work. My very first system was a 20MHz 80386 with 1MB RAM, 40MB HD. Anyway, it's time to get back in step with the rest of the world.

  3. #13
    Join Date
    Oct 2004
    Location
    Hockeytown, MI
    Beans
    561
    Distro
    Ubuntu

    Re: Replacing ubuntu files (I ****ed up)

    Quote Originally Posted by Ginsu543 View Post
    When you installed Ubuntu the first time, did you set up a separate /home partition, or did you install Ubuntu into one partition? If you have a separate /home partition, all you have to do is reinstall the OS into the / partition without formatting the /home partition. This will keep all your config and data files (you will have to reinstall all the programs for which you have config files, of course).

    If you didn't set up separate / and /home partitions, my recommendation is to use this opportunity to just start from scratch and reinstall Ubuntu with separate / and /home partitions.
    Why? He can just reinstall over his broken install and the installer will preserve his information in /home. (Unless by ****ed up he means he deleted everying in ~ too)

  4. #14
    Join Date
    Jul 2007
    Location
    Nashville TN
    Beans
    138
    Distro
    Ubuntu Development Release

    Re: Replacing ubuntu files (I ****ed up)

    Whiprush,

    If you perform a live version update (e.g. online) your user settings and installations are preserved. But in my experience, re-installing Ubuntu from an installation CD over an existing Linux installation overwrites everything, including the /home folder if it's on the same partition. I tried a reinstall once and ended up having to re-install all my user-selected applications, and I'm glad I archived my Documents folder to CDs.

  5. #15
    Join Date
    Oct 2004
    Location
    Hockeytown, MI
    Beans
    561
    Distro
    Ubuntu

    Re: Replacing ubuntu files (I ****ed up)

    The installer doesn't do this by default (and hasn't done this in a long time) unless you check the format box on the partition to format explicitly when you reinstall.

    (I do have seperate / and /home, but that's because I have 2 drives, there's no real advantage to having them separated if you have only one drive, which is why it's the default behavior.)

  6. #16
    Join Date
    Jul 2007
    Location
    Nashville TN
    Beans
    138
    Distro
    Ubuntu Development Release

    Re: Replacing ubuntu files (I ****ed up)

    whiprush,

    The Ubuntu guide page below kind of implies that reinstalling Linux will preserve the /home settings if they're on a separate physical -- as well as logical -- partition.

    https://help.ubuntu.com/community/Pa...ng/Home/Moving

    However, really, it's not clear to me why that should be true. Even if the system were on a separate physical drive, I don't see how a system re-installation would detect and integrate a pre-existing /home folder on a separate drive. I probably should reconsider all this. By all means, please free to drop here any links to reports of actual experiences with having separate system and /home partitions. (I haven't found any so far.) Or direct me to an appropriate discussion. This discussion is off-topic here. (Apologies to OppressedCalamity and Ginsu543.)

  7. #17
    Join Date
    Feb 2009
    Location
    Baja Oklahoma
    Beans
    1,652

    Re: Replacing ubuntu files (I ****ed up)

    The installer won't automatically detect a /home partition, you have to tell it which one to use. If /home is on the same partition, it's just another folder, and I think it will be overwritten when the OS is reinstalled. You can tell the installer not to format a partition, but AFAIK not a folder. That's why having /home on a separate partition is a good idea, IMO.

    To shrink a partition, you can do it in gparted by just dragging the partition boundary to where you want it, than clicking on Apply. You can then add a new partition in the unallocated space. Gparted is pretty straightforward, and nothing happens until you click on the Apply button. Just make sure you have things as you really want them before you make that click.
    Asus EEE 900 with Linux Mint Debian Edition
    Linux user 497460

  8. #18
    Join Date
    Oct 2009
    Location
    Los Angeles, CA
    Beans
    380
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Replacing ubuntu files (I ****ed up)

    My understanding has always been that, if you have / and /home on the same partition and you reinstall the OS, the installation process will format the partition to set up the file structure for the new OS which will erase the file structure of the previous OS. Since in a single partition install /home is a sub-folder under /, /home will get erased when / is erased. However, when you designate a separate partition as /home, it is no longer physically under / although it remains logically under /. So this gives you the option of setting up a new file structure under / without having to erase /home.
    Main: Intel Core i7 920 D0 @ 4.0GHz | Asus P6X58D Premium | 6 x 2GB Mushkin Redline 1600 7-8-7-24 | EVGA GeForce GTX 560 Ti | 6 x 1TB WD Caviar Black | Mint 15 Cinnamon / OS X 10.7.3
    Portable: Dell Mini 9 | OS X 10.6.7

  9. #19
    Join Date
    Oct 2004
    Location
    Hockeytown, MI
    Beans
    561
    Distro
    Ubuntu

    Re: Replacing ubuntu files (I ****ed up)

    Nope, all you have to do is make sure that the format box is not checked. Also, it'll keep around /usr/src, /usr/local, and /var/local too, so if you have installed/built your own stuff it doesn't get removed.

    It's a nice time saver!

    See this answer from one of the installer developers: http://ubuntu.stackexchange.com/ques...cratch/179#179
    Last edited by castrojo; August 25th, 2010 at 06:06 PM. Reason: Adding link

  10. #20
    Join Date
    Feb 2008
    Location
    Texas City, Texas
    Beans
    830
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Replacing ubuntu files (I ****ed up)

    Whiprush is absolutely correct. I accidently forgot to mark format before a new install once and it preserved all my /home settings.
    I later tried installing a later version over an existing one without formatting and it worked the same way. Using this method, there is no reason to maintain a separate /home partition.
    Try it yourself and see.
    Break it, fix it, learn something.
    People who never make mistakes seldom make anything!

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •