Announcement

Collapse
No announcement yet.

help with moving /home back to root

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

    help with moving /home back to root

    I have Kubuntu 11.10 installed on my laptop. It is my only OS.

    I have two 320 GB hard drives. First, sda, has boot set to the MBR, ext4 file system for /, and my swap. The second i had set up as an ext4 system with just /home, and I had made it encrypted at the time.

    I now want to dual boot both Kubuntu 11.10 and Windows 7, putting windows on the second hard drive. I know how to change the directory from originally having it in root, but I'm not sure I can do it using fstab without screwing everything up. I just want to move all my data from the second drive back to root. it does not really matter to me if the data is encrypted or not anymore, no sensitive data is on this system anymore.

    I want to just create a new home directory in root, but it already exists. It just directs to the sdb.

    Help please?

    #2
    You should be able to do this from either a livecd or recovery mode:

    in recovery mode:
    1) unmount /home,
    2) mount /home to /mnt (or anywhere you like other then /home )
    3) rsync the data back yo /home
    Code:
    rsync -ahP /mnt/ /home/
    4) edit fstab and remove the entry for /home
    5) reboot

    in a live cd:
    1) make two directoies: /mnt/root and /mnt/home (or where ever you like)
    2) mount root to /mnt/root and home to /mnt/home
    3) rsync the data
    Code:
    rsync -ahP /mnt/home/ /mnt/root/home/
    4) edit fstab and remove the entry for /home
    5) reboot

    both of these methods will probably remove encryption depending on how it was done. I would recommend backing up your data as well just incase. Though the rsync command will only copy the files, so you can revert simply by deleting /home contents and adding an entry to fstab again (until you format the other drive for windows that is)

    Rsync notes:
    Trailing /'s are important
    -a is archive mode and preserves most permissions/links/ownership/timestamps
    -P same as --partial --progress (shows the progress and doesn't delete partially copied files if its interrupted, makes resuming quicker)
    -h just makes numbers from P easier to read (optional)

    if you have lots of small falls omit the -P as printing for each file can slow things down if there are lots of small files but its nice to see how far along the copy has gotten.
    The rsync command can be interrupted at any time and resumed again, it will continue where it last stopped.

    Comment


      #3
      Some other notes on installing windows:

      In the past I have found windows to be temperamental about linux installs being in front of it on a disk, or in the disk order... If you have two disks then I would recommend temporally unplugging the linux one (once you have moved the data off it and are happy its booting fine again) while you install windows. Then plugin it back in after the install setting your bios to boot from it and running a grub-update (so it will detect your new windows install).

      Comment


        #4
        Nice job James. You should post that over in "How-To's"

        Please Read Me

        Comment


          #5
          Thanks for the quick replys everyone. I just actually ended up putting in 2 new 500 gb drives tonight for my space needs. I have a new Kubuntu and windows install done. But now I am getting a new issue with Dolphin after copying my files (documents, music, pictures, and videos) that I had on an external drive. Its strange. Any time I try to open Dolphin i get the following error message "Configuration file "/home/christopher/.kde/share/config/dolphinrc" not writable.
          Please contact your system administrator." if i click okay, then dolphin opens without issue. LOL. always something!

          Comment


            #6
            Originally posted by khaosdvorak View Post
            Please contact your system administrator.
            And did you contact yourself?

            Originally posted by khaosdvorak View Post
            Configuration file "/home/christopher/.kde/share/config/dolphinrc" not writable.
            On my system that file has permissions
            Code:
            $ ls -l .kde/share/config/dolphinrc
            -rw------- 1 joe joe 1611 2012-02-07 11:19 .kde/share/config/dolphinrc
            - are yours different?
            I'd rather be locked out than locked in.

            Comment

            Working...
            X