How can I create a new /home partition? (Disaster?)

Forum rules
Before you post please read this
Post Reply
User avatar
farkas
Level 4
Level 4
Posts: 295
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

How can I create a new /home partition? (Disaster?)

Post by farkas » Sun Jun 02, 2019 5:54 pm

On my laptop I recently replaced my HDD with an SSD. Not being familiar with gparted, made a clean Mint 19.1 install using the 'Erase disk and install Linux Mint' option.
The process was seamless, everything works.
Using pbear's tutorial, Full Install to USB Drive: Four Options.
viewtopic.php?f=42&t=287353, installed Mint 19.1 on an external SSD using the Hybrid option. Didn't make a /home partition. Had some problems with gparted but the external SSD is up and running. Almost as fast boot as my internal SSD.
After reading forum topics on partitioning, might have made an error not setting up a separate /home partition.

Now that I'm little more familiar with gparted, some questions:
Is it possible on the same drive to:
Resize the "/" partition?
Create a new partition "/home" and move my home folder/directory into it?
If it is possible, I could use some guidance.

Found viewtopic.php?f=50&t=291743. It tells how to move "/home" to a different drive. It doesn't really apply to my situation.

Laptop partitions are:

Code: Select all

Model: ATA WDC WDS100T2B0A (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  538MB   537MB   fat32        EFI System Partition  boot, esp
 2      538MB   1000GB  1000GB  ext4                               boot, esp

External SSD partitions are:

Code: Select all

Model: Samsung Portable SSD T5 
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name        Flags
 1      1049kB  3146kB  2097kB                           bios_grub
 2      3146kB  213MB   210MB   fat32                    msftdata
 3      213MB   500GB   500GB   ext4         Linux Mint

I'm using the external SSD as a test bed. If it borks, no harm, just reinstall using 'Something else' option.
Thank you!

Edited my original subject line.
Last edited by farkas on Wed Jun 05, 2019 2:51 am, edited 4 times in total.
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.

jglen490
Level 5
Level 5
Posts: 796
Joined: Sat Jul 15, 2017 9:57 pm

Re: New /home partition

Post by jglen490 » Sun Jun 02, 2019 7:12 pm

It's amazing how simple it is to install Linux. Since the *buntu/Mint installer uses gparted under the hood, there is normally no need to pre configure a drive with gparted. That's why all the install options exist in the installer.

Sure things like UEFI SOMETIMES cause some hiccups, but that's why the user needs to research first on the machine. And sure, some manufacturers make life difficult, such as with some Acer models and even some Lenovos. But all that can be overcome.

You done good :D :D
I feel more like I do than I did when I got here.
Toshiba A135-S2386, Intel T2080, ATI Radeon® Xpress 200M Chipset, 2GB RAM, 500GB

User avatar
farkas
Level 4
Level 4
Posts: 295
Joined: Mon Sep 21, 2015 6:10 pm
Location: Oregon

Re: How can I create a new /home partition?

Post by farkas » Wed Jun 05, 2019 2:37 am

Disaster! Sort of.
After receiving only one response by jglen490 (Thanks!) to my post, decided to strike out my own. Tried to experiment to see if I can solve it on my own. Mixed results.
This is a retrace of my steps.
Booted my laptop, plugged in my hybrid install external SSD into a USB port. I could see all files and etc on it. Opened gparted, laptop showed up as sda, external drive as sdb. Unmounted sdb.
On the external SSD, using gparted, shrank the, /, partition to about 75GiB, just a little over its current used size. Made a new partition, /home, using the remaining free space. Screen shot of what I ended up with.
Screenshot from 2019-06-04 18-54-00.png
Shut down. Booted external drive. So far so good! No problems. Feeling pretty cocky by my repartitioning success, decided to copy and paste home folder from /home to the new /home partition. Worked, all files were there.
This is where things started to go haywire!
Believing that the home folder in the / partition isn't necessary any more, deleted it. Rebooted the external drive. It booted to the grub rescue> screen.
The first big, OOPS!!!, what have I done?
Shut down, unplugged the external drive, rebooted laptop, no problems. Plugged in external drive, opened gparted. Laptop partitions on sda, good, same as before. The sdb3 the / partition used space a bit smaller, the sdb4 the /home partition was larger by the about same amount.
After mulling it over for a while, decided to use Mint install to fix things up. Thinking it will fix the grub problem. Booted up with Mint ISO USB, started install, chose Something Else. The external drive was now sdc. Kept the same partitions, with no format on sdc1 and sdc4. Trying to keep the grub2 core.img and home partitions intact. Clicked install. I might have ignored a warning and continued.
An error message appeared saying "install cannot be completed" or something similar, not sure of the exact wording.

DISASTER!!!!

Shut down. Unplugged USBs. Rebooted. A blue screen of Dell repair memory test opened. Shut down, not much else I could do. Hoping that I didn't totally bork my machine (a lot of $ down the drain) rebooted with a Mint ISO USB.
It booted up! Opened gparted. Lo and Behold an sda drive with 1TB of free space! Shut down.
Had a two fingers of scotch with some ice and a splash of bubbly water and called it a night.

The next step was to do a clean install using the Something Else option, partitioning for / and /home partitions.
Reloaded my applications, restored my data files and etc.
Now my laptop is set up that way. Not the way I first intended by using my external drive as a test bed and apply what I learned to my laptop. Meanwhile my external SSD is still borked. I'll reinstall Mint 19.1 on it using pbears viewtopic.php?f=42&t=287353Hybrid Method again using Something Else option.

Reflections:
Made some mistakes, one of which maybe to unflag my sda drive, as mentioned in pbears post.
A note to self! Timeshift isn't any good if its on the same drive that is borked! Save it to an external drive!
All in all I consider this a good learning experience. Didn't lose any data, I use my desktop for the important stuff.
I hope that someone else doesn't make the same mistakes that I did after reading this post.
My other thought is that the first option in Mint install (Erase Everything) should be to set up to create / and /home partitions automatically. A new user would never be aware of the difference between and the current set up. It may make it easier to solve problems later on.
If your query has been resolved, edit your first post and add [SOLVED] to the subject line.
If you found a solution on your own please post it.

User avatar
AndyMH
Level 9
Level 9
Posts: 2676
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How can I create a new /home partition? (Disaster?)

Post by AndyMH » Wed Jun 05, 2019 2:56 am

The mistake you made was that having copied all the file/folders from the old /home to your new /home living in a separate partition, you then needed to edit fstab (lives in /etc) to tell mint where to find /home. Because you then deleted the old /home when mint booted it couldn't find /home, hence your problem.

We all learn from our mistakes, of which I've made many :D
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

Post Reply

Return to “Mounting Partitions”