Announcement

Collapse
No announcement yet.

Solved - Change / to /Home and Reinstall Without Losing Anything?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Solved - Change / to /Home and Reinstall Without Losing Anything?

    Hi,

    I am currently set-up with everything on one partition. I've created both a swap and root partition, but I haven't taken the plunge and changed anything yet.

    I want to reinstall lucid while saving the contents of my home dir. (Before you ask, no, I don't have an external drive for back-up)

    It seems a simple matter to specify my root partition as / in gparted during the install - there's nothing on it yet. But I'm not sure how to handle the change of my large partition from / to /home without losing anything.

    Do I need to rename my current home and associate my new home with the partition before I reinstall?

    And what about the new root partition: If I don't change the association for it before running the installation disk, will the installation program insist on reformatting everything? (By 'everything' I mean /Home, too?) And then there's the issue of what happens if I change / to /Home. Nothing will work after that, will it?

    There's a lot about moving /Home, and I've found what appears to be a good guide: http://embraceubuntu.com/2006/01/29/...own-partition/
    But it's not exactly the same, since I'm not moving /home to a different partition.

    As you can see, I'm not really comfortable with this, and I have a lot of uncertainty about how to proceed. Help?
    MB:ASUS M3A78-EM AM2+/AM2 780G HDMI, Proc: Athlon 64 X2 5000+ Brisbane 2.6 GHz 2x512KB L2 Cache, Graph: Int. ATI Radeon HD 3200, Aud: Int. Realtek ALC1200 8 channels, Ram: 2GB Corsair XMS2 DDR2 800 SDRAM, Monitor: Dell SE198WFP 19" Wide FPM

    #2
    Re: Change / to /Home and Reinstall Without Losing Anything?

    What I always do when installing a new ISO, is use manual method, use root "/" then make sure the format partition is unchecked, and my /home is left intact.

    I've been running with one partition for years and have never had an issue. Then again I have several backups, either using partclone or Clonzilla.
    Boot Info Script

    Comment


      #3
      Re: Change / to /Home and Reinstall Without Losing Anything?

      IMHO I would consider setting up a separate /home partition. If only for security reasons.
      - Any future upgrade, or new install will not break your /home.

      - You can test other Linux's without problems.

      - Your data is safer.

      This will take some time (10-30min. depending on your rig) but it is worth it.

      Get yourself parted magic live CD USB) (always good to have around):
      http://partedmagic.com/download.html

      http://partedmagic.com/documentation...e-liveusb.html

      Resize your HD so it has enough space for you current /home folder.

      From within the same live CD / USB move the contents (including hidden folders / files!!!) over to your new /home.

      Now resize your future / partition to accommodate your OS (14 Gig should be amply sufficient, min 10 Gig)

      Now resize your /home partition to the fully available size.

      Install your Kubuntu using the manual partition method and assign /home to your newly created partition.

      Hope this helps
      HP Pavilion dv6 core i7 (Main)
      4 GB Ram
      Kubuntu 18.10

      Comment


        #4
        Re: Change / to /Home and Reinstall Without Losing Anything?

        Hi. Thanks for the replies!

        @verndog,

        I've got the alt. cd, but I don't understand what you mean by using root /. Are you saying that even though you've only got one partition you're able to reinstall without deleting your /Home?


        @Fintan,

        I re-partitioned some time ago. I just haven't gotten around to moving anything. My current / root (single partition install - includes /Home) will be my new /Home. I have another partition already set aside for / root.

        I'm just concerned about how to make the change from / to /Home without losing everything in my Home directory when I reinstall.
        MB:ASUS M3A78-EM AM2+/AM2 780G HDMI, Proc: Athlon 64 X2 5000+ Brisbane 2.6 GHz 2x512KB L2 Cache, Graph: Int. ATI Radeon HD 3200, Aud: Int. Realtek ALC1200 8 channels, Ram: 2GB Corsair XMS2 DDR2 800 SDRAM, Monitor: Dell SE198WFP 19" Wide FPM

        Comment


          #5
          Re: Change / to /Home and Reinstall Without Losing Anything?

          Well you coul either detele everything from your now / (to become /home) except for your /home files / folders.
          The use that partition as /home and install Kubuntu to your future /.

          Or do as I suggested above. Move your stuff to a new /home and format / resize you old /.

          I would prefer the second option as this will give a clean /home and a clean /.

          BTHW it is /home and NOT /Home. You new Kubuntu will not "see" /Home as home.
          HP Pavilion dv6 core i7 (Main)
          4 GB Ram
          Kubuntu 18.10

          Comment


            #6
            Re: Change / to /Home and Reinstall Without Losing Anything?

            Originally posted by Laysan_A
            Hi. Thanks for the replies!

            @verndog,

            I've got the alt. cd, but I don't understand what you mean by using root /. Are you saying that even though you've only got one partition you're able to reinstall without deleting your /Home?

            ...
            I use daily-live and not alternate. I haven't used alternate in quite a while. When I install the OS, I use "/" of the partition that I'm installing to. I don't format, so /home is left intact. It comes back with a dialog telling me that "/, /usr, /etc, ..." will be overwritten, but my /home folder is untouched.
            Boot Info Script

            Comment


              #7
              Re: Change / to /Home and Reinstall Without Losing Anything?

              @verndog,

              Wow! I have tried to do that in the past, but couldn't figure out how. I just thought it couldn't be done.

              So, in order to be able to do that, I would have to change the associations before I can select the proper root directory to install to. I guess that would best be done in a root terminal from the cd?

              Anyone?


              If I change the name of my /home to /oldhome and make a new /home associated with the current partition, will linux copy all content from oldhome to /home by simply changing the file table, if I use the copy command, or simply move all the files graphically with a rooted dolphin?
              (I understand there are issues with certain types of files using the copy command when the files are actually copied from one place to another.)

              Do I even have to bother with that? If I associate /home with its current partition, will not the entire partition essentially become /home? Then it would be simply a matter of deleting all other content from the partition after the installation? Will that work - essentially deleting root by overwriting it (changing it's designation) with /home - from a root terminal on the installation cd?

              It has occurred to me that I don't know what linux will do with the directory structure if I reassign root to /home (or if it will even accept the change).

              Help?

              MB:ASUS M3A78-EM AM2+/AM2 780G HDMI, Proc: Athlon 64 X2 5000+ Brisbane 2.6 GHz 2x512KB L2 Cache, Graph: Int. ATI Radeon HD 3200, Aud: Int. Realtek ALC1200 8 channels, Ram: 2GB Corsair XMS2 DDR2 800 SDRAM, Monitor: Dell SE198WFP 19" Wide FPM

              Comment


                #8
                Re: Change / to /Home and Reinstall Without Losing Anything?

                If I'm reading your first post correctly - you already have a new clean partition for your new install and for your new home?

                If so - when you do your new install, select "Manual" partitioning rather than "Guided" and select your new partitions for / and /home. Simply don't select your old / partition and it will be left intact.

                For the rest of yrou questions - here's some basic linux info:

                Hard Drive Partitions are referred to with device names. In order to access a partition for use, it must contain a file system and be mounted to a location. Accessing swap is an exception and is a little different

                The "/" and "/home" you refer to are mount points and thus are not "stored" anywhere except in the file that stores mount info in your install - /etc/fstab. Point being: when you boot to a liveCD, it will not refer to your hard drive partitions as "/" and "home" because they won't be mounted. It may detect a swap partition and use it.


                Please Read Me

                Comment


                  #9
                  Re: Change / to /Home and Reinstall Without Losing Anything?

                  Hi oshunluvr,

                  Thanks for responding!

                  you already have a new clean partition for your new install and for your new home?
                  No. I have a clean partition for a new root. I want to keep my current large partition (which currently has both root and /home in it) as my new /home partition.

                  Simply don't select your old / partition and it will be left intact.
                  Yeah, thats what verndog was saying. That's great, but in that case I'm left with a shiny new root directory on its own partition, but no /home. I assume the new install will load without a /home directory?

                  All of my questions revolve around how best to configure my current large partition as /home without losing any of my stuff.

                  During the manual installation, can I designate a partition as /home without reformatting it? If I can, will my current directory structure then end up in a new /home folder (all the old root structure)?

                  Given that, can I then move all my stuff from the old /home folder to the new /home folder without actually moving it (will linux simply change the file table, since they reside on the same partition)?

                  If all the aforementioned is true, then the following procedure should work:

                  Select manual installation.
                  Select to install to /
                  Designate UUID:64dd790a-876b-4a81-a0c4-d02b1a9442a8 as /home
                  Install
                  Reboot
                  Open dolphin or Konqueror as root
                  Rename /home/home as /home/oldhome
                  Delete everything that is not in /home/oldhome
                  Open oldhome and select all; drag to /home and select move in the dialogue popup
                  Delete empty oldhome

                  Will that work?
                  MB:ASUS M3A78-EM AM2+/AM2 780G HDMI, Proc: Athlon 64 X2 5000+ Brisbane 2.6 GHz 2x512KB L2 Cache, Graph: Int. ATI Radeon HD 3200, Aud: Int. Realtek ALC1200 8 channels, Ram: 2GB Corsair XMS2 DDR2 800 SDRAM, Monitor: Dell SE198WFP 19" Wide FPM

                  Comment


                    #10
                    Re: Change / to /Home and Reinstall Without Losing Anything?

                    I'm a little confused at this point. From your previous posts , it appears you have two partitions and not one. I was under the assumption you had just one.

                    If you had one partition, as I do, then selection that partitions mount as "/" then if "home is inside that , and you do a manual install, I'm not sure what will happen. I have always installed from a previous Ubuntu install., then "/home will remain intact.

                    so are you saying the "/" has only home and nothing else.

                    How about doing a "sudo fdisk -l" on the hard drive then we will know for sure what's what.
                    Boot Info Script

                    Comment


                      #11
                      Re: Change / to /Home and Reinstall Without Losing Anything?

                      Originally posted by Laysan_A

                      That's great, but in that case I'm left with a shiny new root directory on its own partition, but no /home. I assume the new install will load without a /home directory?

                      All of my questions revolve around how best to configure my current large partition as /home without losing any of my stuff.

                      During the manual installation, can I designate a partition as /home without reformatting it? If I can, will my current directory structure then end up in a new /home folder (all the old root structure)?

                      Given that, can I then move all my stuff from the old /home folder to the new /home folder without actually moving it (will linux simply change the file table, since they reside on the same partition)?

                      If all the aforementioned is true, then the following procedure should work:

                      Select manual installation.
                      Select to install to /
                      Designate UUID:64dd790a-876b-4a81-a0c4-d02b1a9442a8 as /home
                      Install
                      Reboot
                      Open dolphin or Konqueror as root
                      Rename /home/home as /home/oldhome
                      Delete everything that is not in /home/oldhome
                      Open oldhome and select all; drag to /home and select move in the dialogue popup
                      Delete empty oldhome

                      Will that work?
                      You're making it way too hard.

                      For sure on the Alternate Install version, and probably on the Live CD version, the installer offers you the option of "manual partitioning". That's what you want to do.

                      Using the "manual partitioning" option, all you have to do is choose the partition to mount as "/", and then choose the partition to mount as "/home" (making sure NOT to format it), and proceed with installation. The filesystem and /etc/fstab will be set up automatically -- you don't have to do anything else. Of course, on the new system, /home will have an entire Linux filesystem in it, which you don't really need any more, except for the old /home/Laysan_A directory.

                      That's all there is to it.

                      Comment


                        #12
                        Re: Change / to /Home and Reinstall Without Losing Anything?

                        dibl's right, it's not as hard as you/re making it out to be. Here's my suggestion (combined with dibl's)

                        1. Do your new install to your new clean partition
                        2. Select manual partitioning and select your current / partition as your new /home AND DON'T FORMAT IT.
                        3. Boot to your new install.

                        Then your /home directory will contain your new user directory with only the new stuff in it AND all the old stuff from the old install and all your old files.

                        Specifically, assuming your user name is laysan:

                        /home/laysan = new user directory with only new stuff in it.
                        /home/home/laysan = old user directory with only old stuff in it.
                        /home/EVERYTHINGELSE = your old install, software, etc...

                        Simply open dolphin, navigate to /home/home/laysan and move everything you want to keep to /home/laysan. Once you're sure you've moved everything you need and want, delete everything else under /home except /home/laysan and you're done.

                        A suggestion:
                        Once you've cleaned things up, consider creating a new empty partition for another install. Once you've got your kubuntu setup the way you like, you can copy it to this new partition as a backup and add it to your grub menu so you can boot to it if need be. You can also use this second install to test new software that might be risky or to play with settings and such, all without risking your main install.

                        Please Read Me

                        Comment


                          #13
                          Re: Change / to /Home and Reinstall Without Losing Anything?

                          @dibl & @oshunluvr

                          Great! Just what I needed to know.

                          But I could still use some reassurance on this one question...

                          I have read that some files require special handling in order to move them without altering them. I would prefer to "move" the files to the new /home folder graphically, with a rooted dolphin, but I don't think I can do that safely unless linux will "move" them by simply changing the file table, and not actually rewriting them. Can you reassure me that that is the case? If not, there is what appears to be a comprehensive debian command in the tutorial I linked to in my first post to move the files, and I can follow that. I'd just rather not take the chance of physically copying them if I don't have to..

                          Thanks so much for the help!

                          Oh, about the extra partition...I do have a windows partition that I rarely use. I'll probably eventually wipe windows and use that - for something...
                          MB:ASUS M3A78-EM AM2+/AM2 780G HDMI, Proc: Athlon 64 X2 5000+ Brisbane 2.6 GHz 2x512KB L2 Cache, Graph: Int. ATI Radeon HD 3200, Aud: Int. Realtek ALC1200 8 channels, Ram: 2GB Corsair XMS2 DDR2 800 SDRAM, Monitor: Dell SE198WFP 19" Wide FPM

                          Comment


                            #14
                            Re: Change / to /Home and Reinstall Without Losing Anything?

                            I'm not sure what data files would need any type of "special handling" just to copy them. I would use "cp", not "mv", so the original file stays intact, until you have confirmed that you have it. You'll have to tell more about what you read, or what this concern is.

                            I'm worried about what you might mean by "rooted Dolphin". I would NOT advise using Dolphin in root (aka "sudo") mode, just to copy data files. In fact, you can mess things up pretty badly doing that -- the copied files will have root privileges and the user will not be able to change them.



                            Comment


                              #15
                              Re: Change / to /Home and Reinstall Without Losing Anything?

                              "Special" files as far as I know are only a windows thing and referred to files that had to be left in their original location once installed. All linux cares about is that some file be where it should be in the directory structure - not where it is on the drive. (plus all linux files are special )

                              All the files in your /home/user directory(s) should be owned by you. If they're not - then something is way wrong. Therefore, you don't need dolphin to be "rooted" and in fact - that would be a huge mistake in this case because it would change the ownership of your files to root leaving you unable to log in.

                              Use dolphin at will - but NOT as root. Turn on hidden file access to see your hidden file and directories in your home and then turn it back off when you've copied all you want to.

                              Suggestion #2:
                              As a new linux user: Don't start by thinking you ever have to do anything as root unless you're directed to by a prompt or if some helpful forum user here specifically says you have to. If you attempt something and it fails - an error message will usually tell you that "root access is required" ("superuser" is inter-changable with "root user").

                              Please Read Me

                              Comment

                              Working...
                              X