You are not logged in.

#1 2013-10-05 13:30:21

Broly Ultimatrix
Member
Registered: 2013-10-05
Posts: 25

[SOLVED] SWAP and /home partitions switched

So I finally installed arch in such a way as I'm getting somewhere (I had previously installed it some 10 times to get used to the install method and had a grasp of the what and why of every step of the install process) but it seems this time I screwed up big and it's not opportune since I'm only noticing the problem after installing and configuring almost all my programs and settings. Long story short, I was clearly too tired when I installed my OS this past time because my partitions are all sorts of jacked. I partitioned my system (160 GB hdd) with 20 gb for /root, 138 gb /home, and 2 gb swap. install went smoothly, configuration and additional installs are moving smoothly, but while looking through my file system I right clicked the filesystem folder to see how much space my OS was using and saw the 20 I needed to. However, when I right clicked my home partition to see how much space it was taking I was shocked to see it only had 2 gb total space. Immediately, I opened guake terminal and typed

sudo cfdisk

which confirmed my suspicions. I now have a 2 gb home drive and a 138 gb swap partition. I suppose my question is, how can I switch these two back without reinstalling my whole system. I was going to

mkfs.ext4 /dev/sda2

(/dev/sda2 is my 138 gb partition and /dev/sda3 is my swap) manually copy and past my /home contents into the larger partition and remap the /home in the root directory to match. then I could

mkswap /dev/sda3 && swapon /dev/sda3

to reactivate my swap partition and redo

genfstab -U -p / >> /etc/fstab 

but then it hit me that I have no idea what I'm doing so I decided to make a account and ask for help like I should before I unnecessarily break things. I did try and look around for a solution to this problem but it's rather unique in itself and most clearly don't experience this problem because I only found one thread somewhere that even closely got to this problem. Thanks in advanced for any help and good day to you all.

Last edited by Broly Ultimatrix (2013-10-10 12:40:24)

Offline

#2 2013-10-05 14:10:02

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,394

Re: [SOLVED] SWAP and /home partitions switched

that method should work fine , provided you run swapoff before you format sda2 .

Note that switching /home and swap in fstab should be easy with your favorite CLI texteditor, running genfstab is not necessary since this is just a simple change.
After editing fstab, reboot immediately.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building to complicated ?
Try clean chroot manager by graysky

Offline

#3 2013-10-05 14:26:29

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] SWAP and /home partitions switched

Broly Ultimatrix wrote:
genfstab -U -p / >> /etc/fstab 

Do not run genfstab like this. The >> will cause genfstab to append the new contents to your existing fstab. As Lone_Wolf says, you should just manually edit fstab after you make the changes to your partitions, and then reboot.

Last edited by 2ManyDogs (2013-10-05 14:26:59)

Offline

#4 2013-10-06 02:35:28

Broly Ultimatrix
Member
Registered: 2013-10-05
Posts: 25

Re: [SOLVED] SWAP and /home partitions switched

OK, I've managed to swap the partitions around and my current setup has my 139 GB drive as /home and my 2 GB drive is still ext4 but I have it commented out in fstab, figured I would be ok for a little bit without a swap partition. Right now my issue is that I've lost my old user account somewhere. I still have access to my root account, and I used it to make a second user account to post this post but I would like my old account if I can get it back(it has all my programs with correct configurations after all). I have the entire /archterin folder from the old /home directory backed up to a flashdrive and I've copied it into the /home on the 139 drive. Should I just remake the account and log in like normal and hope that it pulled the settings from the old account by the same name? I'm not even sure why my account disappeared.

Offline

#5 2013-10-06 03:00:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] SWAP and /home partitions switched

Broly Ultimatrix wrote:

Right now my issue is that I've lost my old user account somewhere.

How do you know it did disappear? What's the output of 'ls /home'?

Offline

#6 2013-10-06 03:03:43

Broly Ultimatrix
Member
Registered: 2013-10-05
Posts: 25

Re: [SOLVED] SWAP and /home partitions switched

Update: I fixed it. I just had to

# chown -R archterin:users <every file and folder in archterin home directory as visible with the [code]ls -la [/code] command > 

I was able to log in fine after that and all my settings are intact. now only need to delete that extra account and make that 2 GB partition swap as it should have been all along. Thanks for the help.

Offline

Board footer

Powered by FluxBB