Results 1 to 5 of 5
In openSUSE I have developed a practice to install the system with /home on the root partition and then later make the link to my real /home, which is on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-22-2010 #1
[SOLVED] Need help with moving /home in Fedora 12
In openSUSE I have developed a practice to install the system with /home on the root partition and then later make the link to my real /home, which is on the separate partition.
Of course, I edit /etc/fstab to include new home locationCode:init 1 mv /home /home.old mkdir /home mount -t ext4 /dev/sda4 /home init 5
Code:/dev/disk/by-id/scsi-SATA_ST96812A_5PJ14Q1M-part4 /home ext4 acl,user_xattr 1 2
Recently I migrated to Fedora 12. There I perform the same operations to link my /home partition. It works fine, but I'm not entirely satisfied with the result.
The problem is that gnome_terminal does not start in /home/<user>, but it brings me to / instead. I must always type "cd" to get to my working directory (as shown below).
I checked environment variable $HOME, it points to the working directory:Code:[boris@nc6000 /]$ pwd / [boris@nc6000 /]$ cd [boris@nc6000 ~]$ pwd /home/boris [boris@nc6000 ~]$
What else can be wrong?Code:[boris@nc6000 /]$ echo $HOME /home/boris
Please help me, I have to fix this, it is simply too annoying to be ignored.Fedora17.GNOME@Dell_Latitude_E6410
Fedora14.GNOME@HP_Compaq_DC7100
- 03-22-2010 #2
anything in any of your logs? messages, secure, anything like that? maybe its selinux?
is it enforcing? now check the file permissions of your home directoryCode:sestatus
are they different? try turning off selinux.Code:ls -Z /home ls -Z /old.home
or you could see if selinux is even the problem by logging alerts, check under /var/log/audit.Code:setenforce permissive
I, in general, turn SELinux off. Too many things to configure, but this might be of some use to you if you do want to keep it on. HowTos/SELinux - CentOS Wiki
Then again, selinux may not be your problem. Just have to wait and see.linux user # 503963
- 03-22-2010 #3
SELinux status is indeed enforcing
I see nothing strange with the file permissions of my home directory.Code:[boris@nc6000 ~]$ sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: enforcing Mode from config file: enforcing Policy version: 24 Policy from config file: targeted [boris@nc6000 ~]$
But I do see a difference at / levelCode:[boris@nc6000 ~]$ ls -Z /home drwx------. boris users unconfined_u:object_r:user_home_dir_t:s0 boris drwx------. root root system_u:object_r:file_t:s0 lost+found [boris@nc6000 ~]$ ls -Z /home.old drwx------. boris users unconfined_u:object_r:user_home_dir_t:s0 boris [boris@nc6000 ~]$
So I changed the /home attributes as follows:Code:[boris@nc6000 ~]$ ls -Z / dr-xr-xr-x. root root system_u:object_r:bin_t:s0 bin dr-xr-xr-x. root root system_u:object_r:boot_t:s0 boot drwxr-xr-x. root root system_u:object_r:device_t:s0 dev drwxr-xr-x. root root system_u:object_r:etc_t:s0 etc drwxr-xr-x. root root system_u:object_r:file_t:s0 home drwxr-xr-x. root root system_u:object_r:home_root_t:s0 home.old dr-xr-xr-x. root root system_u:object_r:lib_t:s0 lib drwx------. root root system_u:object_r:lost_found_t:s0 lost+found drwxr-xr-x. root root system_u:object_r:mnt_t:s0 media drwxr-xr-x. root root system_u:object_r:mnt_t:s0 mnt drwxr-xr-x. root root system_u:object_r:usr_t:s0 opt dr-xr-xr-x. root root system_u:object_r:proc_t:s0 proc dr-xr-x---. root root system_u:object_r:admin_home_t:s0 root dr-xr-xr-x. root root system_u:object_r:bin_t:s0 sbin drwxr-xr-x. root root system_u:object_r:security_t:s0 selinux drwxr-xr-x. root root system_u:object_r:var_t:s0 srv drwxr-xr-x. root root system_u:object_r:sysfs_t:s0 sys drwxrwxrwt. root root system_u:object_r:tmp_t:s0 tmp drwxr-xr-x. root root system_u:object_r:usr_t:s0 usr drwxr-xr-x. root root system_u:object_r:var_t:s0 var [boris@nc6000 ~]$
Initially nothing happened, gnome-terminal still started in /.Code:[root@nc6000 /]# chcon -v --type=home_root_t home changing security context of `home' [boris@nc6000 ~]$
But after rebooting my computer, gnome-terminal starts in /home/boris
.
scathefire: thanks a lot for helping me!Fedora17.GNOME@Dell_Latitude_E6410
Fedora14.GNOME@HP_Compaq_DC7100
- 03-22-2010 #4Linux User
- Join Date
- Sep 2008
- Location
- UK
- Posts
- 355
When you moved /home to /home.old and then made a new folder called home on the root partition were you logged in as a user or as root?
If you were logged in as boris, boris and then run the commands as su, boris still needs his home directory.
Log in as root and then mount the new partition as /home in the fstab. Don't worry about creating /home first since you are creating it in the fstab.
Make sure that boris is still the owner of the new /home/boris.
This works for me in suse and it should work in any other distro.
- 03-23-2010 #5
whych: thanks for the explanation.
I was indeed logged in as boris, and than used su to get the root privileges. However, as these operations were performed in 1st run level (init 1), I assumed that /home/boris is not used any more.Fedora17.GNOME@Dell_Latitude_E6410
Fedora14.GNOME@HP_Compaq_DC7100



