View previous topic :: View next topic |
Author |
Message |
oDy n00b
Joined: 05 Dec 2004 Posts: 72 Location: Thessaloniki - Greece
|
Posted: Fri Apr 08, 2005 12:31 am Post subject: Using ex-windows partition as /home |
|
|
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 |
|
|
/dev/random l33t
Joined: 26 Nov 2004 Posts: 704 Location: Austin, Texas, USA
|
Posted: Fri Apr 08, 2005 12:37 am Post subject: |
|
|
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 |
|
|
oDy n00b
Joined: 05 Dec 2004 Posts: 72 Location: Thessaloniki - Greece
|
Posted: Fri Apr 08, 2005 12:39 am Post subject: |
|
|
Thanx alot |
|
Back to top |
|
|
/dev/random l33t
Joined: 26 Nov 2004 Posts: 704 Location: Austin, Texas, USA
|
Posted: Fri Apr 08, 2005 12:42 am Post subject: |
|
|
Shit I made a typo in my post use the edited version. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Fri Apr 08, 2005 12:43 am Post subject: Re: Using ex-windows partition as /home |
|
|
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 |
|
|
oDy n00b
Joined: 05 Dec 2004 Posts: 72 Location: Thessaloniki - Greece
|
Posted: Fri Apr 08, 2005 2:20 am Post subject: |
|
|
It worked Thanx again |
|
Back to top |
|
|
|