You are not logged in.

#1 2017-06-17 12:08:35

Steve
Member
Registered: 2017-01-03
Posts: 642

Adding a home partition to a single partition installation

Be aware, this worked for me and my setup but it is a highly risky endeavor and i made sure i had a full backup using clonezilla.

Ok thought i should share this as i had been contemplating doing this for awhile and the way i did it has worked!

So i will be sticking with Bunsenlabs for the long term and it was time to go from 1 root partition to 1 root + 1 home and swap.

  • Boot into a live disc that has gparted

  • My first step was shrinking the /dev/sda1 from 100G to 14G as that is what my system is worth now. Make sure to shrink the partition to a decent level, leave enough space for future installations of programs and take into account how much space your home on root was using, in my case it was about 8G for home and 6G for Root


I used rescutux that has gparted, it is recommended to use gparted live iso i have read. rescatux or http://gparted.sourceforge.net/features.php

--- Now this bit may not be the done thing but so far it has worked---

  • I created a 200G ext4 partition in gparted with the label "Home"

I now have partition /dev/sda1 as root and a newly created partition /dev/sda2 for the home.

Im done in rescatux. close everything and reboot.

  • Boot to bunsenlabs /dev/sda1

Booting to bunsenlabs is fine.

[AS ROOT] Using Grsync i copy over /dev/sda1 ~/ to the mounted /dev/sda2 home partition using settings as shown in the below screen shots.

Screenshot-170617-214006.th.png Screenshot-170617-214033.th.png

Modify /etc/fstab with the new /home partition uuid (if you use uuid).

UUID=New-partition-UUID    /home     ext4     nodev,nosuid     0     2

Remove old /home on root "/dev/sda1"

sudo rm -rf /home/user

^^^--- this would be your current user home when using 1 partition so it should be safe to delete, you can reboot and check to see if the new home partition you created for home is working first though.

Hopefully this little tutorial is correct and may help someone looking to do similar.

Please let me know of any errors in my post / method.

Last edited by Steve (2017-06-17 12:15:39)

Offline

#2 2017-06-17 14:39:07

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Adding a home partition to a single partition installation

Nice guide, thanks Steve!

Steve wrote:

Using Grsync i copy over /dev/sda1 ~/ to the mounted /dev/sda2 home partition using settings as shown in the below screen shots

For those who prefer the command-line, this command can be used instead of the GUI:

rsync -aAXv /home/sc /media/sc/Home

Those flags will preserve symbolic links, devices, permissions, ownerships, modification times, ACLs, and extended attributes.

As always with rsync, be careful with any trailing slashes in the path for the source directory (this applies to the GUI as well, I think).

Full explanation here:

http://qdosmsq.dunbar-it.co.uk/blog/201 … -to-slash/

Offline

#3 2017-06-17 15:10:54

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: Adding a home partition to a single partition installation

Thanks for chiming in Hoas.

Im beginner knowledge in this, is it worth adding these attributes to the rsync command as well?

-o, --owner                 preserve owner (super-user only)
 -g, --group                 preserve group
     --devices               preserve device files (super-user only)

Offline

#4 2017-06-18 10:46:32

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Adding a home partition to a single partition installation

^ I'm pretty sure those options are already covered by "-aAXv", anyway I just copied that bit from the ArchWiki:

https://wiki.archlinux.org/index.php/Fu … with_rsync

Offline

#5 2017-06-19 00:51:08

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,654
Website

Re: Adding a home partition to a single partition installation

Head_on_a_Stick wrote:

anyway I just copied that bit from the ArchWiki

Candidate for the BL quotes database? With your permission of course. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#6 2017-06-19 06:36:31

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Adding a home partition to a single partition installation

^ all of my posts are licensed under the GPL (v3) so yes, as long as the source is always provided upon request.

8o

Offline

#7 2017-06-19 07:45:31

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,654
Website

Re: Adding a home partition to a single partition installation

^OK sponsorship request uploaded. cool


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

Board footer

Powered by FluxBB