sidux.com
Installation - Moving /home
wh7qq - Feb 19, 2007 - 07:48 PM
Post subject: Moving /home
Been trying to get files from my current /home/user directories into a separate /home directory on my preview test hd...without much success. In particular, my .mozilla-thunderbird and .firefox directories with all the user prefs, mailbox, address book, bookmarks, etc. The kanotix info on this subject seems to require some kanotix specific stuff (the installer, scripts, etc.) I can move the stuff but it doesn't help, even if I never ran Iceweasel or Icedove as the new user.
My working sidux hd is a du-fixes upgrade from K-Easter and has /home in the default partition with everything else. My test hd is set up with a separate /home partition but it won't be good for long term because the hd is only 5GB and its old and noisy.
Is there a clean way to do this with sidux? I would appreciate someone pointing me at existing posts that cover this (my searches have not been productive) or better yet, putting together a detailed sidux specific post on the subject. This would be an excellent addition to the Manual when somebody gets the time.
Paul
DeepDayze - Feb 19, 2007 - 08:10 PM
Post subject: Moving /home
i'd copy the .mozilla folder over to the new user's home dir. After doing so, you'll need to create a new profile. To create a new iceweasel profile do this in a terminal (as user):
Code:
iceweasel -profilemanager
Press 'create profile' button and provide a profile name when prompted. When asked where to store the profile press 'choose folder' and enter the folder name of the old profile you copied over. When done, press Start Iceweasel button. Iceweasel then should open with your old profile. You might need to reinstall some extensions though. Hope this helps
oduffo - Feb 19, 2007 - 09:36 PM
Post subject: Moving /home
There is an entry in the German wiki dealing with moving and saving /home. --> http://sidux.com/index.php?module=pnWik ... omeSichern
Gruß
oduffo
wh7qq - Feb 19, 2007 - 11:39 PM
Post subject: RE: Moving /home
Oduffo, I'm language challenged. I did a google translation and translated the first command as best I could but it won't work for me.
oduffo - Feb 20, 2007 - 01:28 PM
Post subject: RE: Moving /home
wh7qq, sorry.
I'll try and give some directions regarding that wiki-paragraph. This is not a translation.
1) The first command just copies your entire /home to any directory you like ("irgendwo" --> any dir, your choice)
2) Creates a list of packages installed and writes it to apps_installed.txt
3) You should save the copied home and the packet-list to external media. Same for files from /etc, maybe.
4) If need be, boot sidux from LiveCD, make partitions and install.
5) Boot the new sidux and install new packages according to your list (<apps_installed.txt)
6) Write back the saved /home.
Finally a caveat: Normally this works without any problems, but if you didn't upgrade your KDE for a long time, it might be worth to be very cautious with your ~/.kde. It might be a good idea to test this first with a test user.
I've moved my /home several times on PC and laptop without any problems.
Gruß
oduffo
PS
Being curious - wh7qq? Your callsign? If so, 73.
wh7qq - Feb 20, 2007 - 08:41 PM
Post subject: RE: Moving /home
oduffo,
Thanks so much for the detailed instructions...I'll get to following that up this morning. Sometimes my early education frustrates me (Latin was the only option)...the lack of multiple languages...although growing up and living in So Cal, I probably would have chosen Spanish as a second language for practical reasons. Now, as an OF, my grey matter is too atrophied.
73
Paul
PS: see QRZ.com/wh7qq
dzz - Feb 27, 2007 - 06:26 PM
Post subject: RE: Moving /home
Google-translate screws up command syntax, must use the original
geoback - Mar 27, 2007 - 01:14 PM
Post subject: RE: Moving /home
One question to the german wiki
you say, i can tar my home like this:
tar -cf - /home | gzip -c9 > /irgendwo/home.tar.gz
After installing sidux to hd und booting from the fresh installed sidux, do i have to remove everything under /home/* and after that i can restore my tar archive back? Is that the way you mean it?
thx geoback
h2 - Mar 27, 2007 - 05:29 PM
Post subject: RE: Moving /home
Moving /home is easy, you can do it two ways, one with livecd, the other with command line:
Easiest is command line:
Boot into runlevel 1, at grub, type 1 and hit enter
login.
mount your new /home partition, as say: /media/new-home
cp -pr /home /media/new-home
now edit /etc/fstab to reflect this change. Since the new system needs the uuid information, you'll need to get the uuid of the new partition, unless you already have it noted. Easiest is to add this information to /etc/fstab before booting into runlevel 1, then just comment the line with the new /home mounting information out.
So if you'd done that, just uncomment the new /home line, comment out the old /home line.
Reboot
It's pretty simple if you do it this way. You could also do this from livecd, but it's easy enough from init 1.
Init 1, runlevel one, is single user mode, /home isn't used, so it's safe to work with it.
this is how I've done it, works fine.
omong_kosong - Mar 28, 2007 - 10:03 AM
Post subject: Re: RE: Moving /home
wh7qq wrote:
Oduffo, I'm language challenged. I did a google translation and translated the first command as best I could but it won't work for me.
Hi wh7qq,
the German Wiki entry has already been translated:
http://sidux.com/index.php?module=pnWik ... cureHomeEN
Hope it serves your needs.
omong_kosong
glpnet - Jul 16, 2007 - 04:01 AM
Post subject: Re: RE: Moving /home
h2 wrote:
Moving /home is easy, you can do it two ways, one with livecd, the other with command line:
Easiest is command line:
Boot into runlevel 1, at grub, type 1 and hit enter
login.
mount your new /home partition, as say: /media/new-home
cp -pr /home /media/new-home
now edit /etc/fstab to reflect this change. Since the new system needs the uuid information, you'll need to get the uuid of the new partition, unless you already have it noted. Easiest is to add this information to /etc/fstab before booting into runlevel 1, then just comment the line with the new /home mounting information out.
So if you'd done that, just uncomment the new /home line, comment out the old /home line.
Reboot
It's pretty simple if you do it this way. You could also do this from livecd, but it's easy enough from init 1.
Init 1, runlevel one, is single user mode, /home isn't used, so it's safe to work with it.
this is how I've done it, works fine.
This is my fstab,
# /etc/fstab: static file system information
#
# <file system> <mount point> <type> <options> <dump> <pass>
# added by rebuildfstab: /dev/hda1 (no label)
UUID=8437f540-7d87-4df3-b27c-ce8554f79bbb / ext3 defaults 0 1
# added by rebuildfstab: /dev/hda2 (no label)
UUID=5fa4750e-6605-4968-8659-e00974c3c71d /tmp ext3 defaults 0 1
# added by rebuildfstab: /dev/hda3 (no label)
UUID=943d004a-1b58-447c-bd6f-54bd8f414b30 none swap sw 0 1
# added by rebuildfstab: /dev/hda4 (no label)
UUID=b999ddf7-fd78-4317-8962-ac7ddf8b149b /media/hda4 reiserfs auto,users,exec 0 1
# added by rebuildfstab: /dev/sda1 (no label)
/dev/disk/by-uuid/862075C22075B9AF /media/sda1 ntfs auto,users,exec,ro,dmask=0022,fmask=0133,nls=utf8 0 0
# added by rebuildfstab
/dev/cdrom /media/cdrom udf,iso9660 user,noauto 0 0
Im wanting to move /home from /dev/hda1 to /dev/hda4
What part do I edit?
glpnet - Oct 20, 2007 - 03:48 PM
Post subject: Re: RE: Moving /home
h2 wrote:
Moving /home is easy, you can do it two ways, one with livecd, the other with command line:
Easiest is command line:
Boot into runlevel 1, at grub, type 1 and hit enter
login.
mount your new /home partition, as say: /media/new-home
cp -pr /home /media/new-home
now edit /etc/fstab to reflect this change. Since the new system needs the uuid information, you'll need to get the uuid of the new partition, unless you already have it noted. Easiest is to add this information to /etc/fstab before booting into runlevel 1, then just comment the line with the new /home mounting information out.
So if you'd done that, just uncomment the new /home line, comment out the old /home line.
Reboot
It's pretty simple if you do it this way. You could also do this from livecd, but it's easy enough from init 1.
Init 1, runlevel one, is single user mode, /home isn't used, so it's safe to work with it.
this is how I've done it, works fine.
Thanks, that was great.
hoodwink - Oct 28, 2007 - 05:21 PM
Post subject: RE: Re: RE: Moving /home
On a related topic, how to avoid needing to move /home. I keep several bootable linux and windows versions on my disks, and I just keep a common extension with all of my permanent files. Here's how it goes:
1. Create a partition for the common files.
2. Insure that the uid/gid in each distro are the same for your user. Alter the uid/gid as needed and chown the /home/<userid> in any distro if needed.
3. Create a mount point /home/common in each distro's root
4. Alter fstab to mount the common partition at /home/common
5. Create a directory /home/common/<userid>
6. Create a symlink in the /home/<userid> -> /home/common/<userid>
7. Create desired directeories in /home/common/<userid> (.../Downloads .../Music .../Open_office .../public_html etc.) and symlink these in /home/<userid>. I keep a file in the common named symlinks to recreate the directory symlinks on each new distro
8. Store files to be shared in the common area.
In doing this, alll the hidden files and /home/<userid>/Desktop files that are distro/release dependent will stay in the /home/<userid> on the root area, but files that you want to share will always be in common and accessible by any of the distros you choose to boot.
Enjoy,
effo - Aug 05, 2008 - 10:08 AM
Post subject: Re: RE: Moving /home
h2 wrote:
Moving /home is easy, you can do it two ways, one with livecd, the other with command line:
Easiest is command line:
Boot into runlevel 1, at grub, type 1 and hit enter
login.
mount your new /home partition, as say: /media/new-home
cp -pr /home /media/new-home
now edit /etc/fstab to reflect this change. Since the new system needs the uuid information, you'll need to get the uuid of the new partition, unless you already have it noted. Easiest is to add this information to /etc/fstab before booting into runlevel 1, then just comment the line with the new /home mounting information out.
So if you'd done that, just uncomment the new /home line, comment out the old /home line.
Reboot
It's pretty simple if you do it this way. You could also do this from livecd, but it's easy enough from init 1.
Init 1, runlevel one, is single user mode, /home isn't used, so it's safe to work with it.
this is how I've done it, works fine.
Is this still the recommended way of moving /home to its own partition?
rumbarg - Aug 05, 2008 - 10:54 PM
Post subject: RE: Re: RE: Moving /home
There's a wiki entry on /home that might be helpful.
http://sidux.com/index.php?module=pnWik ... meDirHowTo
regards,
rumbarg
effo - Aug 06, 2008 - 08:41 PM
Post subject: RE: Re: RE: Moving /home
Thanks for the link rumbarg, it contained some valuable information.
I just did this and it seem to work as expected. I am not sure, but to me it seems like the instructions given by h2 are for moving /home from one separate partition to another separate partition. What I wanted to do was to move /home from the root partition and put it on another partition. I found some instructions in the Gentoo documentation that described exactly what I wanted to achieve.