1

I had Windows originally, but tried Linux. I liked it enough, so I attempted to shrink the ntfs drive (not the system/boot) that Windows was using. I accidentally messed up the Windows OS. I reinstalled Windows which then caused my Linux install to fail. I recovered it using a boot recovery tool.

Now, everything seems to be working as it should; however, my partitions are a mess. I would like to clean them up. Specifically, I would like about half my hard drive devoted to Windows and half to Ubuntu. For the Ubuntu, I would like a swap, root, and home partition. Unfortunately, when I installed Ubuntu, I apparently did not do a good job.

enter image description here The partition with the label "data," along with a portion of sda5, is what I would like to be my home partition. In other words, I would to have separate partitions for my data/personal use and the OS itself. Right now, sda5 is being used as both. How do I separate the two without destroying grub, or otherwise messing up either Windows or Linux?

I realize similar questions have been asked before, but I could not a find an exact answer for my circumstances. I already have files on sda5; how do I go about moving them safely while reworking my partitions so as to separate the OS from my personal data?

Thanks so much.

I realize similar questions have been asked, but I hope my situation will be answered more clearly to meet my errors.

KellyM
  • 133

1 Answers1

1

The procedure you need is spelled out in the Ubuntu wiki entry "Partioning/Home Moving".

You need to run through these steps using the UUID associated with your sda7 partition. You can skip the step "Setup Partition" because you already have a partition there.

The procedure covers safely moving your home directory with all its data to the new partition.

I have run this procedure several times and it works great. It does get a little confusing when you get to the two sections headed "Encrypted File Systems". Since I do not believe your file system is encrypted, just skip these whole sections. Pick up again at the heading "Check Copying Worked", run the procedure until you hit "Encrypted File Systems" again, and then jump to "Preparing fstab for the switch".

Link-only answers are discouraged but it seems ridiculous to copy this lengthy procedure from an official Ubuntu wiki site.

If you have questions about the procedure, please come back and edit your question to include them.

After you move your home directory to the new partition, and have used it for a while to be sure that everything is OK, you can delete the old copy. This is covered in the procedure. After that, if you want to shrink sda5 and enlarge sda7, that will not be difficult to do.

Before you do anything related to this, I strongly suggest you have recent, tested backups of all data you care about or might care about in the future. Setting up a virtual machine simulation of your PC and performing the steps there first would also be a fine idea.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • Thanks much. I will try it. I am sorry to have to ask a question that was essentially already answered. I figured there was documentation on the issue, but I was not able to locate it. – KellyM Apr 28 '17 at 11:48
  • I do have a quick question. To my understanding, separating \home and \ is essentially a bit of a safety measure. This might be a stupid question, but it does it matter if the partitions are separate logical partitions on the same extended partitions, or should they be separate primary partitions? Basically, would it be acceptable to mount /home, the swap partition, and / as a logical partitions underneath the same ( /sda3) extended partition? Thanks again. – KellyM Apr 29 '17 at 13:12
  • 1
    I do not think it matters, but I am not expert in that. I have done it both ways. You would be exposed to a physical drive failure in either case. If there are other considerations, I don't know. To me, the main reason to have separate /home is that it's so much easier to do a clean install of the OS instead of the sometimes problematic upgrade process. – Organic Marble Apr 29 '17 at 13:17