Technical Discussion
  >> Linux Issues


Register (or login) on our website and you will not see this ad.


Pages in this thread: 1 | 2 | (show all)   Print Thread
Standard User Taras
(eat-sleep-adslguide) Fri 18-Sep-09 10:27:24
Print Post

/home


[link to this post]
If i do the /home as a seperate partition. if i want to change distro(or distro mess up tongue) or more likely shove bigger hdd in...

Can I assume:

a) /home would be fully independent.
b) to change distro would be a case of pointing /home to the correct partition.
c) if i want to put /home onto a bigger hdd, it would be case of say creating /home2 and then moving /home into there and then unmounting both partitions and mount /home2 as /home...

_____________________________________________
<randomness>
streaming music - your music - spotify
Everything websites.... soon
My Blog .......... here (still in dev mode)
Me twittering go add
Standard User commandergc
(member) Fri 18-Sep-09 11:59:16
Print Post

Re: /home


[re: Taras] [link to this post]
A: yes

B: yes, make sure you use the 'custom partitioning' option though as some distro's may wipe it clean frown

C: Simple create a partition on the new drive then copy the content of the current home directory to it, for example:
Text
1
23
>mount /dev/sdb1 /mnt/newHome
>cp /home/* /mnt/newHome>umount /mnt/newHome

then all you need to do is modify the fstab file to point the /home mount to the new HD/partition in this case /dev/sdb1. now all you have to do is unmount /home then run 'mount -a' to remount it at its new location.

--------
Intel Q6600 SLACR @ 3.0GHz, 4GB DDR 800, 250GBx2 Raid5, ATI3870 512MB, Windows 7 x64
NHB Radio | Kevin Reeves | Wild Bunch Radio
Karoo: Pro (ADSL2)
Sync (up/Down): 1,023 / 8,191kbps
If there is a Hell, Karoo supplies their internet connection.
Standard User Taras
(eat-sleep-adslguide) Fri 18-Sep-09 12:46:29
Print Post

Re: /home


[re: commandergc] [link to this post]
In reply to a post by commandergc:
A: yes

B: yes, make sure you use the 'custom partitioning' option though as some distro's may wipe it clean frown

C: Simple create a partition on the new drive then copy the content of the current home directory to it, for example:
Text
1
23
>mount /dev/sdb1 /mnt/newHome
>cp /home/* /mnt/newHome>umount /mnt/newHome

then all you need to do is modify the fstab file to point the /home mount to the new HD/partition in this case /dev/sdb1. now all you have to do is unmount /home then run 'mount -a' to remount it at its new location.


Thanks thought as much. Will be using centos 5.3 and probably will be moving the server over to x64 at some stage and bigger storage tongue

_____________________________________________
<randomness>
streaming music - your music - spotify
Everything websites.... soon
My Blog .......... here (still in dev mode)
Me twittering go add


Register (or login) on our website and you will not see this ad.

Standard User john2007
(eat-sleep-adslguide) Fri 18-Sep-09 13:11:58
Print Post

Re: /home


[re: Taras] [link to this post]
I do that. I generally have a Windows partition, root partition, swap partition, home partition. Generally Windows 30GB, root 40GB, swap 4GB, rest as /home.

If I want to install a new distro I just overwrite the root partition and preserve the home partition.

I tar up a few files from root which I generally want to keep

/etc/hosts
/etc/sudoers
/etc/wpa_supplicant.conf
/etc/network/interfaces
/etc/X11/xorg.conf
/lib/firmware
/usr/local/bin

which I untar once the new distribution is installed.

I then have other scripts which recreate users, grabs all the optional packages I like, etc.

The whole process of a virgin net reinstall takes about an hour and a half from start to back operating normally.
Standard User Taras
(eat-sleep-adslguide) Fri 18-Sep-09 18:24:34
Print Post

Re: /home


[re: john2007] [link to this post]
Worth doing a /boot partition.

As its a server role.

i/ve done

swap 2048
/ as 20gb
/home the rest (250gb).

just upped swap due to wanting to put 2gb of ram it in (potentially )

_____________________________________________
<randomness>
streaming music - your music - spotify
Everything websites.... soon
My Blog .......... here (still in dev mode)
Me twittering go add
Standard User john2007
(eat-sleep-adslguide) Fri 18-Sep-09 18:59:57
Print Post

Re: /home


[re: Taras] [link to this post]
I use to have a /boot several years ago when some bioses had problems booting from sectors far from the start of the hard disk. Not seen that problem recently. My configuration is purely for personal use so I don't have the problems associated with servers (high availability, upgrades on the fly, etc.).
Standard User mechro
(newbie) Fri 18-Sep-09 23:02:11
Print Post

Re: /home


[re: Taras] [link to this post]
In reply to a post by Taras:
b) to change distro would be a case of pointing /home to the correct partition.


I have found that some distro changes throw up UID and file ownership issues so you may have to change UID's and/or run some chown commands.

Also, different distros don't always have the same set of dot hidden files in /home so some of your application settings may not match.

These issues are solvable, but I find it easier to back up home to a separate Data partition/drive and then copy any Documents and settings back to the new distro's home.

Edited by mechro (Fri 18-Sep-09 23:03:23)

Standard User Taras
(eat-sleep-adslguide) Fri 18-Sep-09 23:38:42
Print Post

Re: /home


[re: mechro] [link to this post]
In reply to a post by mechro:
In reply to a post by Taras:
b) to change distro would be a case of pointing /home to the correct partition.


I have found that some distro changes throw up UID and file ownership issues so you may have to change UID's and/or run some chown commands.

Also, different distros don't always have the same set of dot hidden files in /home so some of your application settings may not match.

These issues are solvable, but I find it easier to back up home to a separate Data partition/drive and then copy any Documents and settings back to the new distro's home.


It will be the same distro .. just from x86 to x64 tongue

_____________________________________________
<randomness>
streaming music - your music - spotify
Everything websites.... soon
My Blog .......... here (still in dev mode)
Me twittering go add
Standard User solitaire
(regular) Sat 19-Sep-09 02:58:57
Print Post

Re: /home


[re: Taras] [link to this post]
Even the same distro will throw up errors

each user has a unique ID (or key) which is created when the user is created.
So even if you have the same username in one install, if you reinstall and recreate the user with the exact same name it will have a different ID and will not let you access the original /home data.

In Ubnutu you can do a "sudo chown -R user:user /home/user" after install to sort out permissions.

or you can do what I do:
make a copy of /home on to a fat32 partition (fat does not hold security info) then once the new OS is installed I copy back the data into /home and I get the correct permissions.

Laters

Sol laugh

Edited by solitaire (Sat 19-Sep-09 02:59:54)

Standard User Backpack
(fountain of knowledge) Sat 19-Sep-09 08:35:37
Print Post

Re: /home


[re: commandergc] [link to this post]
In reply to a post by commandergc:
Text
1
23
45
67
89
10
>cp /home/* /mnt/newHome
[/quote] 
That's not going to work. 
Firstly you need the -R option to recurse the directories and the -p to retain permissions.  You will also need to run it as root.  So... 
[code]>cp -r -p /home/* /mnt/newHome
[/quote]
Pages in this thread: 1 | 2 | (show all)   Print Thread

Jump to