#merge / and /home partitions

1275 messages · Page 2 of 2 (latest)

minor compass
#

From the arch usb, delete your root partition and resize it only as big as it needs to hold the files you need

#

Mount the root partition and the home partition, move files over

#

Then delete every partition other than that which you recreated to hold the files you need

cold sapphire
#

thats what i did already

#

my / and /home are all in one partition

minor compass
#

Well what's the problem

cold sapphire
#

the problem is i literally cant boot

minor compass
#

What happens when you boot

cold sapphire
#

when i try booting arch, i just get put into a blank CLI

minor compass
#

Did you regenerate your grub config after fucking with your partitions?

cold sapphire
#

yea

minor compass
#

So you had chroot'd into your install from the arch USB and ran grub-mkconfig -o /boot/grub/grub.cfg?

cold sapphire
#

i ran this:

grub-mkconfig -o /boot/grub/grub.cfg

cold sapphire
#

exactly

#

the guy that was helping me out, he was very persistent but we both just couldnt figure it out

#

it was 95% him im going to be real

#

he basically just said it'd be easier to just reinstall the OS, while keeping my actual files

#

so my /home and whatnot

minor compass
#

Then do that

#

Use the smallest partition possible to hold all the data you need to keep, then reinstall the OS and just ignore that partition

cold sapphire
#

could you help me out with that plz

minor compass
#

I can get your data secured in a partition but then at that point you'd just follow the arch install guide

cold sapphire
#

yeah sure

#

that would mean alot!

#

im in an archiso right now

minor compass
#

show me the output of lsblk

cold sapphire
minor compass
#

how much data do you need to keep

#

how many gigabytes

cold sapphire
#

uhhhh

#

i couldnt tell you how much exactly

minor compass
#

Are you trying to save like everything in /home/yourname or /home/yourname/.config or what?

cold sapphire
#

in /myname

#

my dotfiles are on github

minor compass
#

mount your p3 partition

#

cd into /mnt/home, then run ls -lh

#

Should tell you how big your user home directory is

cold sapphire
minor compass
#

what's inside of just /mnt?

cold sapphire
minor compass
#

Oh I see, well it's showing your home directory is 4 kilobytes, cd into /mnt/home/home and make sure your shit is actually in there

#

maybe it's kilobits idk one way or the other but nonetheless, that's barely any data

cold sapphire
minor compass
#

Okay, run this on your first (boot) partition and let me know if it complains

mkfs.ext4 /dev/yourbootpartition

cold sapphire
#

so just run

#

sudo mkfs.ext4 /dev/nvme0n1p1

#

?

minor compass
#

yep

cold sapphire
#

what will this do?

#

make filesystem right

#

will this wipe my data

minor compass
#

We're going to convert your existing boot partition into a filesystem we can move your home directory into

#

It'll wipe your boot partition but you'll recreate that during the reinstall so it shouldn't matter

cold sapphire
#

okay gotcha

#

i think thats what the previous guy that was helping me wanted me to do as well

#

its saying nvme0n1p1 contains a vfat file system, proceed anyway?

#

i hit yes?

minor compass
#

yep

cold sapphire
#

done

minor compass
#

then mount partition 1 to /mnt/backup or something

cold sapphire
#

so make a directory called backup

#

so would i do

minor compass
#

yeah, mkdir /mnt/backup then mount /dev/partition1whatever /mnt/backup

cold sapphire
#

mkdir /mnt/backup
mount /dev/nvme0n1p1 /mnt/backup

minor compass
#

yep

cold sapphire
#

okay done

minor compass
#

now copy and paste your /mnt/home/home/marcial directory to the /mnt/backup

cold sapphire
#

so

#

cp -r /mnt/home/home/marcial /mnt/backup

#

?

minor compass
#

yep

#

then cd into /mnt/backup and make sure all your shit is there

cold sapphire
#

woaah wait

#

got a bunch of errors

minor compass
#

What do they say

cold sapphire
#

basically that theres no space

minor compass
#

run ls on /mnt/backup

cold sapphire
#

lost + found
marcial

#

thats whats there

minor compass
#

Hm okay we'll just delete the partition and recreate it, presumably it previously being the fat32 boot partition is causing problems

cold sapphire
#

alright

minor compass
#

first unmount /mnt/backup

cold sapphire
#

done

minor compass
#

then sudo fdisk /dev/nvme0n1

#

once thats up type p just to make sure the first partition there is displayed as the 512mb boot partition

cold sapphire
#

done, but i got a warning that the disk is currently in use and that --repartitioning is probably a bad idea

minor compass
#

that's fine it's because your bigboy partition is still mounted

cold sapphire
#

oh okay

minor compass
#

alright, type d to delete partition

#

then input 1

cold sapphire
#

done

#

partition 1 has been deleted

minor compass
#

alright, now hit n

#

should default to partition number 1 but if it doesn't put in 1

cold sapphire
#

okay

minor compass
#

accept defaults for the first and last sectors

cold sapphire
#

alright

minor compass
#

then run p again and take a pic

cold sapphire
minor compass
#

yes

cold sapphire
#

oh okay

minor compass
#

alright now put w

cold sapphire
#

done

minor compass
#

then rerun sudo mkfs.ext4 /dev/nvme0n1p1

cold sapphire
#

done

minor compass
#

okay, now try to remount it to /mnt/backup and copy and paste again

cold sapphire
#

same damn thing

#

no space left on device blah blah blah

minor compass
#

Okay then your shit is bigger than 4k and my understanding of ls needs revamped

#

go back into fdisk

cold sapphire
#

fdisk what

minor compass
#

same nvme device

cold sapphire
#

are you sure we should be doing this on p1

#

its p3 that has all my files

minor compass
#

You dont fdisk into a partition, you fdisk into a drive

#

'/dev/nvme0n1'

cold sapphire
#

okay doen

#

done

#

im fdisked

minor compass
#

Delete partition 1 and partition 2 then run w

cold sapphire
#

how

#

d

#

nevermind

#

i got it

#

forgot

#

okay done

minor compass
#

Once you done with that we'll recheck size of your home directory since I'm stupid

run du -sh /mnt/home/home/marcial or whatever your username was

cold sapphire
#

2.2g

minor compass
#

Okay, fdisk into /dev/nvme0n1 again

cold sapphire
#

okay

minor compass
#

partition number 1, first sector default, last sector 3G

cold sapphire
#

am i

minor compass
#

Creating a new partition

cold sapphire
#

yes

#

making sure

#

when i hit 3g i get "value out of range"

minor compass
#

did you do uppercase

cold sapphire
#

yeah

#

maybe i do +3G?

minor compass
#

add a + before

#

yeah

cold sapphire
#

okay

#

done

minor compass
#

okay, now run w to commit those changes

cold sapphire
#

okay

minor compass
#

then once more run mkfs.ext4 /dev/nvme0n1p1

cold sapphire
#

i unmount first right

minor compass
#

yeah

#

I had forgotten about the whole mounting situation there; assumed it was unmounted

cold sapphire
#

got this warning

minor compass
#

yep just do yes

cold sapphire
#

finished with no errors

#

do u copy files again

minor compass
#

Okay, for sanity sake run lsblk again and make sure you now have partition 1 showing as 3G

cold sapphire
#

why is it still

#

512M

minor compass
#

dunno, may just still be referencing old data we'll try to mount and move files over anyways

#

worst taht'll happen is no space errors

#

remoute partition 1 to /mnt/backup and rty to copy over the /mnt/home/home/marcial folder again

cold sapphire
#

same thing

#

dude im losing my mind

minor compass
#

huh weird

#

try to reboot into arch iso

#

then check lsblk again

cold sapphire
#

alright

minor compass
#

oh

#

I see why

#

fdisk didn't actually make change because the partition was mounted

cold sapphire
#

oh well i alr rebooted my archiso

minor compass
#

well I think it actually did make change but the warnign said you'd need to reboot

cold sapphire
#

oh okay

minor compass
#

lsblk should hopefully see 3G now

cold sapphire
#

as soon as its done loading ill do lsblk

#

yeah

#

YES

#

its 3g

#

okay what is it that i run

minor compass
#

run lsblk -o PATH,FSTYPE and let me know whether that first partition shows as ext4

cold sapphire
#

p1 is ext4

minor compass
#

okay, try to move over your user home directory again

#

you'll need to remount

#

maybe recreate the /mnt directories

cold sapphire
#

so

#

mount nvme0n1p1 /mnt/backup

minor compass
#

yep

cold sapphire
#

it says mount point does not exist

#

😕

minor compass
#

you'll need to recreate the backup directory

#

archiso isn't persistent so any directories you make are wiped on reboot

cold sapphire
#

so what do i do then

minor compass
#

mkdir /mnt/backup

cold sapphire
#

mkdir /mnt/boot

#

okay

minor compass
#

mkdir /mnt/home

cold sapphire
#

done

#

ill try mounting again

#

same error

minor compass
#

are you doing mount nvme0n1p1 or mount /dev/nvme0n1p1

cold sapphire
#

im doing mount nvme0n1p1 /mnt/backup

minor compass
#

you need the latter, /dev/nvme0n1p1 is the path to that partition

cold sapphire
#

okay gotcha

#

done

#

i ran

#

mount /dev/nvme0n1p1 /mnt/backup

#

sorry man this mounting shit gets so confusing to me, i rarely have had to do it

minor compass
#

okay, run the same thing for p3 to /mnt/home

cold sapphire
#

done

minor compass
#

now try again copying the marcial home folder from /mnt/home to /mnt/backup

cold sapphire
#

no space left on device

#

dude should i just wipe my entire drive and reinstall arch at this point

#

that isnt solving the problem but holy shit

#

im genuinely losing my mind

minor compass
#

Yeah idk how / why your home directory is reporting 2.3G but can't be moved onto a partition 3GB in size

cold sapphire
#

what to do then

#

do we have to move everything over

minor compass
#

for shits and giggles unmount /mnt/backup

cold sapphire
#

alr

minor compass
#

then run mount /dev/sda1 /mnt/backup

cold sapphire
#

already mounted or mount point busy

#

is what i got

minor compass
#

okay I was hoping you could maybe use a piece of that thumbdrive

#

Yeah dunno, could try to use fdisk and make that partition bigger to see if that helps

#

You have 20GB to work with but whatever the size of the partition ends up being, is how much unusable space you'll have on it after you reinstall arch

#

So that's why I was shooting for as small as necessary, since you won't be able to utilize that partition's worth of space after all is said and done

cold sapphire
#

but like

#

i just dont understand why it doesnt think theres enough space

#

maybe we make it 3.1

#

then 3.2

#

until it works

#

lol

#

idk

minor compass
#

I'd go up by a gig at a time

cold sapphire
#

alright so what do i do

#

fdisk nvme0n1

#

right

#

and then

#

just w

#

default start

#

and just keep going up and up until it works

#

and like lets say i were to make it an absurdly high number

#

like 30gb idk

#

that space i wont be able to take back?

minor compass
#

Yeah plus you don't have 30g available

#

The available space is 512MB from the original boot partition + 20GB from the original root partition

cold sapphire
#

okay gotcha

#

so am i deleting the partition and remaking it, im confused sorry

minor compass
#

Yep

#

Delete then remake with a larger size

#

Then rerun mkfs ext4 command so it creates a new filesystem that takes up the new partition size

cold sapphire
#

its asking if i want to remove the signature

#

that it has a ext4 signature

minor compass
#

Yeah always say yes

#

Just FYI you'll need to unmount prior to and remount after mucking with the partition

#

If you didn't do it this time around then rebooting the machine again will update everything

cold sapphire
#

still no space

#

what do you mean unmount and remount though

#

so before i mess with it

#

i would just do

minor compass
#

Umount /mnt/backup

cold sapphire
#

in this order:

umount /mnt/backup
fdisk the changes
mount /dev/nvme0n1p3 /mnt/home
reboot

repeat

minor compass
#

Idk what's goin on there though maybe toss something in #quick-questions

#

Say you're trying to make a partition to backup data into but you're getting no space even though the partition is bigger than the directory

cold sapphire
#

will do