 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

26th July 2005, 05:44 PM
|
 |
Registered User
|
|
Join Date: Jul 2005
Location: UK
Posts: 122

|
|
|
How to move Home directory to new partition?
Hello all. Ok, I installed FC4 on a partition shared with XP (yuck) and now wish to minimise the XP partition and expand the FC4 one. The best thing I can think of is to expand the home directory I have, or failing that simply add a new mount. I would however, wish to put my Home directory on a seperate partition for ease of upgrade etc and wondered if anyone knew how this could be done. I currently have about 40GB to allocate to the home directory! I will use Partition Magic in XP to do this as I am familiar with this program. Many thanks
Dan.
|

26th July 2005, 06:23 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Location: Japan/UK
Posts: 153

|
|
|
can u clarify?
you already have a seperate /home partioin and you want to know how to resize it? or You want to move your /home directory onto a dedicated partition?
I think you saying the latter, in which case you should be able to create a new partition in the free space you liberate from XP and mount it in your home directory.
|

26th July 2005, 07:16 PM
|
 |
Registered User
|
|
Join Date: Jul 2005
Location: UK
Posts: 122

|
|
Quote:
|
Originally Posted by saibaggins
can u clarify?
you already have a seperate /home partioin and you want to know how to resize it? or You want to move your /home directory onto a dedicated partition?
I think you saying the latter, in which case you should be able to create a new partition in the free space you liberate from XP and mount it in your home directory.
|
I really just want to make the home directory BIGGER, as I stupidly only allocated 10GIG to Linux (as an experimental OS) but now wish to use it as the main one. I am very close to getting rid of XP all together but not THAT close. I just want to experiment some more but need some extra space. Is there a program in linux that can allocate the space in non-destructive way to my XP partition, in that it simply grabs some from XP and adds it to linux? Sorry if I am not being very clear, I an a noob at linux.
Dan
|

27th July 2005, 05:35 AM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 1,317

|
|
First off backup your home partition [Make sure you do it in such a way that file permissions are saved otherwise you absolutely will have problems. Sadly I'm not exactly sure how to do this myself.] then depending on the filesystem you used for Fedora you can use a Windows tool like partition magic to steal some free space from XP [I rarely have problems doing this but backup your XP files as well because very bad things can and do happen.] you can then tell Fedora to mount your home directory by editing your /etc/fstab in a fashion simillar to the following
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
# /etc/fstab: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.
# <fs> <mountpoint> <type> <opts> <dump/pass>
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hda5 /boot ext3
/dev/hda7 / ext3 user_xattr
/dev/hda8 /home reiserfs noatime,user_xattr 0 0
/dev/hda9 /usr reiserfs noatime,user_xattr 0 0
/dev/hda10 /var reiserfs noatime,user_xattr 0 0
/dev/hda6 swap swap sw 0 0
#/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
/dev/hda2 /media/primary ntfs umask=0222 0 0
/dev/hda3 /media/winhome ntfs umask=0222 0 0
/dev/hdb1 /media/dump ntfs umask=0222 0 0
/dev/sda1 /media/dump2 ext3 user_xattr 0 0
# NOTE: The next line is critical for boot!
none /proc proc defaults 0 0
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
none /dev/shm tmpfs defaults 0 0
/dev/dvd /media/cdrecorder auto users,ro,noauto
/dev/dvd1 /media/cdrecorder1 auto users,ro,noauto
/dev/Iriver /media/H300 vfat users,exec,auto,managed 0 0
#/dev/Iriver /media/H300 vfat users,rw
You can ignore all the other stuff in here just focus on my home entry /dev/hd[whater is appropriate for your system] /home [filesystem partition is formatted in for example ext3] should be sufficient.
I forgot to add you may have to perform the fstab edits from the rescue console accessible from the installation media you used for FC I am not sure if Fedora will like having directories moved to seperate partitions while the folder is being used. [assuming something is making use of your home directory at the time.]
__________________
Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.
Please vote for this bug and help me make GAYT [Go As You Type ]a standard option in Firefox.
Last edited by Shadow Skill; 27th July 2005 at 05:39 AM.
|

27th July 2005, 03:59 PM
|
 |
Registered User
|
|
Join Date: Jul 2005
Location: UK
Posts: 122

|
|
Thanks, I'll try this soon and report back
|

30th July 2005, 02:36 AM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 1,317

|
|
Did my suggestions work? Any hiccups [like your home directory files having the wrong permission etc?] I'd like to know if you were able to bend things to your will.
__________________
Ware wa mutekinari.
Wa ga kage waza ni kanau mono nashi.
Wa ga ichigeki wa mutekinari.
Please vote for this bug and help me make GAYT [Go As You Type ]a standard option in Firefox.
|

9th August 2005, 07:01 PM
|
 |
Registered User
|
|
Join Date: Jul 2005
Location: UK
Posts: 122

|
|
Quote:
|
Originally Posted by Shadow Skill
Did my suggestions work? Any hiccups [like your home directory files having the wrong permission etc?] I'd like to know if you were able to bend things to your will. 
|
OK, I am about to try this out and expand my home folder. I am still wary about it however, because I don't want to lose the data or mess up the rest of the filesystem. Looking at your fstab Shadow, I can see that there is a major difference in the way it is set-up to mine which looks like this:
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/1 / ext3 defaults 1 1
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
LABEL=SWAP-hda8 swap swap defaults 0 0
/dev/hda1 /mnt/windows_c_xtrospekt ntfs ro,defaults,umask=0222 $/dev/hda5 /mnt/windows_d_musik ntfs ro,defaults,umask=0222 0 0
/dev/hdg6 /mnt/windows_f_data ntfs ro,defaults,umask=0222 0 0
/dev/hdg5 /mnt/windows_e_audio vfat defaults 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,$/dev/hdd /media/cdrom auto pamconsole,exec,noauto,$/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,$
I don't mind creating seperate partitions for /var etc but mine seems to have a LABEL on it relating to the whole FS, which I don't want to kill. Any suggestions?
__________________
this WEEK in TECH
Combining a mind-numbing commitment to tech news with surprisingly valuable information.
|

10th August 2005, 12:45 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Location: Japan/UK
Posts: 153

|
|
|
you should be able to back up you /home folder by cp'ing it with the --preserve switch, that should preserve the file attributes.
the LABEL=/1 , just means that fstab is using the ext3 partition label to refer to the partition, instead of the /dev/hdxy format. You could replace it with /dev/hdb2 (assuming that is your root partition) if you wanted and nothing would be any different. Technically it's not correct to say that his label refers to the entire fs, it refers to the 'root' of the fs. It's a big pyramid tree that stems from the root '/'
when you create your new home partition (give it a label "/home" or something if you like) you can 'graft' it onto the tree. If you include an entry in fstab with the auto option, it will be automatically mounted (=grafted) onto the root at the mount point you specify in table at boot time.
you don't even have to delete the contents of the /home directory that you currently have on your root partition. When you mount the new partition on to this directory, the existing contents of the directory will simply be hidden an inaccessible untill you unmount the partition. Once you know everything is working you could unmount you home partition and delete the contents of the directory to save space on your root partition.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 06:40 (Saturday, 25-05-2013)
|
|
 |
 |
 |
 |
|
|