You are not logged in.

#1 2008-01-25 14:29:41

WernerL
Member
Registered: 2007-07-03
Posts: 161

Moved /home to another partition, but now /home stil contains data :-)

Hello folks,

Lets first tell you how my situation WAS.
I had 1 harddrive with 3 partitions:
/dev/sda1        Windows partition
/dev/sda2        linux swap
/dev/sda3        Linux ext3

My archlinux installation is on sda3. Now I bought a new extra SATA 2 harddrive and made 2 partitons on it.

After I did that I copied my whole /home directory to 1 partition and edited my fstab. And guess what? It works great ! Now I have my /home partition seperated from my archlinux installation. But one problem, there is still some data on the /home dir of sda3. When I go to /home I (ofcourse) only can see the data that is on /dev/sdb2 sow how can I delete the data that is in the sda3 /home ?

Is there an quick and easy solution for this? :-)

Last edited by WernerL (2008-01-25 14:31:01)

Offline

#2 2008-01-25 14:46:09

pressh
Developer/TU
From: Netherlands
Registered: 2005-08-14
Posts: 1,719

Re: Moved /home to another partition, but now /home stil contains data :-)

login as root (non gui)
unmount /dev/sdb2 partition (your new HOME)

you now only have the old stuff in /home
go the /home and remove everything that you don't want there to be which is also on the other partition

mount /dev/sdb2 to /home again
logout as root

Offline

#3 2008-01-25 16:35:51

WernerL
Member
Registered: 2007-07-03
Posts: 161

Re: Moved /home to another partition, but now /home stil contains data :-)

How do I log in as root with no GUI?
Need to  choose fallback in lilo? (didn't try that one before). Also tried in loginmanager the failsafe terminal but that didn't work.

Offline

#4 2008-01-25 16:45:45

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Moved /home to another partition, but now /home stil contains data :-)

use the command

su -

this will put u in root mode , then follow pressh's solution

Offline

#5 2008-01-25 16:57:32

WernerL
Member
Registered: 2007-07-03
Posts: 161

Re: Moved /home to another partition, but now /home stil contains data :-)

yes I know that big_smile
But how do I come into non-GUI mode after I installed X? I could delete the GDM deamon in my rc.conf and restart my computer but that's a little bit to much work... hope there is an easier solution.. :-)

[root@WernerPC ~]# umount /dev/sdb2
umount: /home: device is busy
umount: /home: device is busy

This is what I get when logged in into X.

Last edited by WernerL (2008-01-25 16:59:01)

Offline

#6 2008-01-25 17:02:54

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: Moved /home to another partition, but now /home stil contains data :-)

When you are still not logged in (ie. in gdm), press ctrl+alt+f1 (or f2,..f6). This should take you to a console login. Login as root. (If you want to shutdown X, run /etc/rc.d/gdm stop, but it shouldn't be necessary). Now you should be able to unmount /home partition, do whatever maintenance you need to do. Then logout, and by pressing alt+f7 you should get back to gdm.

EDIT: I forgot to say, before you logout as root, you should mount /home back of course.

Last edited by bender02 (2008-01-25 17:03:49)

Offline

#7 2008-01-25 17:11:31

WernerL
Member
Registered: 2007-07-03
Posts: 161

Re: Moved /home to another partition, but now /home stil contains data :-)

Thanks bender02 !
Got the job done. :-)

Offline

Board footer

Powered by FluxBB