You are not logged in.
Pages: 1
Hey, I have plans to install a couple other distros alongside my current Arch install. My current partition setup is as follows:
sda1 -- boot - 1mb
sda2 -- swap - 4gb
sda3 -- root - 927gb
My problem is that I can't resize my home partition because my root folder is on it. I understand that I could resize it if I booted from a liveCD, but I would like to move it to its own partition just in case something goes wrong in the future. Can someone please explain how to do this?
Last edited by 3p1k5auc3 (2015-09-10 06:35:01)
Real programmers use a magnet and a steady hand.
Offline
1MB for boot? Is that a typo? You won't even fit a kernel on that..
Personally, I think your thinking is backward here. Instead of thinking of it as though you have root on your home partition, you should be looking at it as though your home is on your root partition. Don't try to relocate root, move home. It's less hassle.
You are right in thinking that you will need to use a liveCD to resize the existing partition. Depending on your proficiency using CLI partition manipulation tools, you may be better off using a liveCD with a graphical user interface+gparted, rather than an Arch liveCD.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Maybe I'm wrong but keep in mind that if you resize or create new partiotions, the /dev/disk/by-uuid/... will change so you have to fix the /etc/fstab or grub.
Offline
By boot I mean that is where Grub is installed. In GParted it says Name = boot and Label = boot; Flags are grub_bios. To move home, do I boot into a liveCD, resize the partition, and just cp /home over? Are there any other folders I should move? Thanks for your quck response.
Real programmers use a magnet and a steady hand.
Offline
By boot I mean that is where Grub is installed. In GParted it says Name = boot and Label = boot; Flags are grub_bios.
That's a BIOS boot partition and only contains the GRUB binary (ie, it is not part of your filesystem)
To move home, do I boot into a liveCD, resize the partition, and just cp /home over?
I would recommend using `rsync -aAXv $SOURCE $TARGET` to preserve symbolic links, permissions and ownerships, modification times, ACLs and extended attributes.
You will also have to modify your fstab to reflect this change.
Last edited by Head_on_a_Stick (2015-09-06 11:23:16)
Offline
+1 for rync from live media. You can add a -P to that if you want to see progress. Update fstab when finished and regenerate your grub.cfg with from a chroot with all relevant partitions mounted (ie /boot).
Last edited by graysky (2015-09-06 11:48:27)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
So I have repartitioned my disk using the Gparted liveCD. My new partitions are as follows:
/dev/sda1 -- BIOS boot -- 1mb
/dev/sda2 -- Swap -- 4GB
/dev/sda3 -- Everything else - 534 GB
/dev/sda4 -- Partition I'm moving home to -- 50GB
343 GB of empty space left
So if I'm going to be moving /home from /dev/sda3 to /sda4, would I just do `rsync -aAXv /home /dev/sda4`?
EDIT: Fixed typo
Last edited by 3p1k5auc3 (2015-09-07 06:49:16)
Real programmers use a magnet and a steady hand.
Offline
No, you need to mount /dev/sda4 somewhere, e.g. /mnt. If you're still in the LiveCD environment, you will also need to mount your root partition too -- you don't want to copy the liveCD's /home.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Alright, so assuming I'm in my Arch install and not in the liveCD I would, as an example, mount /dev/sda4 to /mnt, then do `rsync -aAXv /home /mnt`?
Also, a few more questions. Because I plan to install a few more distros on some other partitions, is there any reason to have a separate root partition for each, or would it be fine to have everything on one partition for the others because I have my Arch root on its own partition, and I understand that I need to regen my fstab and I have heard I need to regen GRUB too. I'm not sure how to regen GRUB, but for fstab would I just run genfstab?
Real programmers use a magnet and a steady hand.
Offline
for fstab would I just run genfstab?
No, write the entry yourself -- read fstab(5) & mount(8)
For GRUB, use the same command you used when you installed Arch.
Offline
My new fstab is as follows:
/dev/sda3 / ext4 rw,relatime,data=ordered 0 1
/dev/sda4 /home ext4 rw,relatime,data=ordered 0 0
and I ran mkinitcpio -p linux
Is there anything else I need to do, and after I'm done do I just delete my current /home?
Real programmers use a magnet and a steady hand.
Offline
Test that it all works before deleting your old /home
Offline
Also before deleting consider this:
A usual (everyday usable) installation requires at least 8gb and at max about 50gb as root (/) partition.
Every space spare should be spent on/for /home.
Consider this, you will not copy your 4k birthday video (80gb) on your root partition (eg: /tmp) but more likley within your homedir. ($HOME/Videos | $XDG_VIDEOS_DIR).
Thus you want more space in your home directory.
Even if you play games in WINE, it will store them in your $HOME dir, unless you tweak it (and other things) to make it work using a directory on the root partition.
Not sure about Steam.
Your setup:
/dev/sda1 -- BIOS boot -- 1mb
/dev/sda2 -- Swap -- 4GB
/dev/sda3 -- Everything else - 534 GB
/dev/sda4 -- Partition I'm moving home to -- 50GB
343 GB of empty space left
My suggestion:
/dev/sda1 -- BIOS boot -- 1mb
/dev/sda2 -- Swap -- 4GB
/dev/sda3 -- / -- 50GB
/dev/sda4 -- /home -- 524GB
343 GB of empty space left
So you're using:
su
mkdir /home.new
mount /dev/sda4 /home.new
rsync -aAXv /home /home.new
Then shrink /dev/sda3 to 50GB and increase the size of /dev/sda4. (havent done that wiht linux partitions yet)
Or you take the longer walk (copy) and use:
su
mkdir /root.new
mount /dev/sda4 /root.new
rsync -aAXv --exclude=/home / /root.new
Which would then turn out to be:
/dev/sda1 -- BIOS boot -- 1mb
/dev/sda2 -- Swap -- 4GB
/dev/sda3 -- /home -- 534GB
/dev/sda4 -- / -- 50GB
343 GB of empty space left
However, you will then need to apply already mentioned changes to /dev/sda3 - your 'current' root to become a valid /home partition: '/' must then only the user name directories.
hth
Last edited by esa (2015-09-07 22:05:35)
Offline
Pages: 1