Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Using ex-windows partition as /home
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
oDy
n00b
n00b


Joined: 05 Dec 2004
Posts: 72
Location: Thessaloniki - Greece

PostPosted: Fri Apr 08, 2005 12:31 am    Post subject: Using ex-windows partition as /home Reply with quote

I just formated my windows partition and I want to use it as my /home but I dont want to lose the files from my current /home. What should I do?
Back to top
View user's profile Send private message
/dev/random
l33t
l33t


Joined: 26 Nov 2004
Posts: 704
Location: Austin, Texas, USA

PostPosted: Fri Apr 08, 2005 12:37 am    Post subject: Reply with quote

mount the ex-windows partition at a temporary mount point (we'll say /mnt/windows) then
Code:

cp -a /home/* /mnt/windows
umount /mnt/windows
umount /home (or rm -rf /home/*)
mount /dev/windows_partition /home

Then of course update /etc/fstab.


Last edited by /dev/random on Fri Apr 08, 2005 12:42 am; edited 1 time in total
Back to top
View user's profile Send private message
oDy
n00b
n00b


Joined: 05 Dec 2004
Posts: 72
Location: Thessaloniki - Greece

PostPosted: Fri Apr 08, 2005 12:39 am    Post subject: Reply with quote

Thanx alot :D
Back to top
View user's profile Send private message
/dev/random
l33t
l33t


Joined: 26 Nov 2004
Posts: 704
Location: Austin, Texas, USA

PostPosted: Fri Apr 08, 2005 12:42 am    Post subject: Reply with quote

Shit I made a typo in my post use the edited version.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10315
Location: Córdoba (Spain)

PostPosted: Fri Apr 08, 2005 12:43 am    Post subject: Re: Using ex-windows partition as /home Reply with quote

oDy wrote:
I just formated my windows partition and I want to use it as my /home but I dont want to lose the files from my current /home. What should I do?


Well, imagine that your windows partition is /dev/hdaX.

Code:

1.- Log initially as root, so you will not be using any file in your /home dir.
2.- mkdir /mnt/tmp
3.- mount /dev/hdaX /mnt/tmp
4.- mv /home/* /mnt/tmp
5.- umount /mnt/tmp
6.- rmdir /mnt/tmp
7.- umount /home   [only needed if /home is a separated partition, anyway it don't hurts if it isn't]
8.- mount /dev/hdaX /home


After this all should work as before but now your /home is your old windoze partition. Make sure after this that you change consequently the /etc/fstab file to reflect this change. Ah! Another thing, if you havent formatted the windoze partition you should mkfs.ext3 (or reiserfs, or whatever you preffer) before doing all of this.
Back to top
View user's profile Send private message
oDy
n00b
n00b


Joined: 05 Dec 2004
Posts: 72
Location: Thessaloniki - Greece

PostPosted: Fri Apr 08, 2005 2:20 am    Post subject: Reply with quote

It worked :D Thanx again
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum