Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Create /home in new partition

  1. #1
    Join Date
    Dec 2013
    Location
    Near México City
    Posts
    175

    Cool Create /home in new partition

    Hi,
    This is my first message in this forum . I just installed opensuse 13.1 in my laptop along w8. I'm rather new in linux and fell in love with this distro. I do not have much experience configuring the system and ask for your assistance.

    I installed the distro in a single partition and afterwards i made a new partition that contains the swap partition and a new logical partition. My fdisk -l shows:

    Device Boot Start End Blocks Id System
    /dev/sda1 * 2048 718847 358400 7 HPFS/NTFS/exFAT
    /dev/sda2 718848 189466531 94373842 7 HPFS/NTFS/exFAT
    /dev/sda3 189466624 375271423 92902400 83 Linux
    /dev/sda4 375271424 976773119 300750848 5 Extended
    /dev/sda5 375273472 395724799 10225664 82 Linux swap / Solaris
    /dev/sda6 395726848 976773119 290523136 83 Linux

    In /dev/sda2 i have the w8 system (that came with the machine) and in /dev/sda3 i installed opensuse 13.1. I would like the /dev/sda6 partition become my /home partition. How do I do that? Can you help me?
    Could you tell me how to copy the files to this new partition?
    Is the swap partition correctly allocated?

    thank you

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: Create /home in new partition

    The install defaults would have sett things up right

    Any way, If you want make sda6 your home ok I assume you want to keep what is in your current home? Are you ready for a bit of command line magic?

    first log into a terminal as root. (at boot screen press 'e' and find the line starting with linux. put cursor on it press end key then space and 3. Press F10 to continue the boot. This will bring you to a text terminal login enter root then the root password)

    Then rename the current home partition ( at the command prompt type mv /home /home.bak)

    Now start Yast (at the command prompt type yast)

    In the terminal version of Yast you will need to use tab keys, arrow keys and spaces and enter to move and select things
    Navigate to the partitioner section section Select disks then sda6
    Select edit
    and then set mount point to /home
    If the partition is formatted thats it if not formatted the select format to ext4
    Accept it exit partitioner module quit yast
    reboot (type reboot)
    boot normally to GUI

    Now your sda6 is your new home directory. Note that since it was empty all things are set to the defaults If you want your old settings or data you can copy from /home.bak. If not you can just delete it. If something did not work just follow the first few steps above and rename /home.bak to just /home again and go into yast and set sda6 not to mount.

  3. #3
    Join Date
    Dec 2013
    Location
    Near México City
    Posts
    175

    Default Re: Create /home in new partition

    Thanks for replying so fast!.
    I followed the steps you indicated me. Worked just fine!
    But now i have a new issue. I can login only as root. If i try to login as a user i obtain two screens:
    "Cannot enter home directory using /." and "Call to lnusertemp failed (temporary directories full?) check your installation"
    How do i fix this?
    Can i recover my settings? how?

    Thank you

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Create /home in new partition

    On 2013-12-08 22:16, jazmiel wrote:
    >
    > Thanks for replying so fast!.
    > I followed the steps you indicated me. Worked just fine!
    > But now i have a new issue. I can login only as root. If i try to login
    > as a user i obtain two screens:


    Is "/home" mounted and populated?

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  5. #5
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: Create /home in new partition

    Quote Originally Posted by jazmiel View Post
    Thanks for replying so fast!.
    I followed the steps you indicated me. Worked just fine!
    But now i have a new issue. I can login only as root. If i try to login as a user i obtain two screens:
    "Cannot enter home directory using /." and "Call to lnusertemp failed (temporary directories full?) check your installation"
    How do i fix this?
    Can i recover my settings? how?

    Thank you
    Make sure /home is mounted and not just as a drive but so that the system knows that it is actually /home and not some random drive.

  6. #6
    Join Date
    Dec 2013
    Location
    Near México City
    Posts
    175

    Default Re: Create /home in new partition

    Hola!
    Looking at the file manager i obtain the same contents under "Root" (located at "Places") and under "277.1 GB Hard Drive" (located at "Devices").
    In "Places" i have a "Home" file but not related to "Root" or the "277...Drive".
    Yes, it contains some data.
    How can i fix this?
    Gracias


    Quote Originally Posted by robin_listas View Post
    On 2013-12-08 22:16, jazmiel wrote::
    >
    > Thanks for replying so fast!.
    > I followed the steps you indicated me. Worked just fine!
    > But now i have a new issue. I can login only as root. If i try to login
    > as a user i obtain two screens:


    Is "/home" mounted and populated?

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  7. #7
    Join Date
    Dec 2013
    Location
    Near México City
    Posts
    175

    Default Re: Create /home in new partition

    Looking at the file manager (dolphin) it gives me the impression that i obtained just another drive. The "Home" file (Capital H) that appears under "Places" does not coincide with this new drive. Also, in "Places" I have a "Root" file which contains a "home" file (note that it is not Capital H) and this file does coincide with the new partition.
    What can I do?

    Saludos


    Quote Originally Posted by alanbortu View Post
    Make sure /home is mounted and not just as a drive but so that the system knows that it is actually /home and not some random drive.

  8. #8
    Join Date
    Nov 2013
    Location
    Canadiana
    Posts
    461

    Default Re: Create /home in new partition

    Quote Originally Posted by jazmiel View Post
    Looking at the file manager (dolphin) it gives me the impression that i obtained just another drive. The "Home" file (Capital H) that appears under "Places" does not coincide with this new drive. Also, in "Places" I have a "Root" file which contains a "home" file (note that it is not Capital H) and this file does coincide with the new partition.
    What can I do?

    Saludos
    You can use /etc/fstab. Back it up (copy it somewhere) then open it up (as root to edit) and you should get a rough idea of how it is formatted. Basically its something like this (your names and stuff will vary):

    Code:
    /dev/disk/by-id/ata-KINGSTON_SH103S3120G_50026B722A0480DC-part2 swap                 swap       defaults              0 0
    UUID=bc9a8b77-7e43-44b1-9d57-95b15dfff6b3 /                    btrfs      defaults              0 0
    /dev/disk/by-id/ata-KINGSTON_SH103S3120G_50026B722A0480DC-part4 /home                xfs        defaults              1 2
    As you can see the third line sets a partition on my drive to be treated as /home so if I try to go to /home it will take me to that partition. You will have to figure out the names of your partitions using fdisk -l or gparted but it should be an easy process.

  9. #9
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,288

    Default Re: Create /home in new partition

    Be sue of capitalization in Linux caps count. so Home is not the same as home

    When you look into /home you should see your user(s) names.

    Note the root does not use /home as it's home directory it has a special place /root

    You can copy the stuff from /home.bak and that should fix things

    Note the ownership for you /home/username has to be for that user both name and UID (user ID) normally if you have only one user the UID is 1000

    As a general rule you should not log into a GUI as root since you can inadvertently change file ownership. In this case to correct a /Home (must be /home) miss spelling it should be ok just don't make it a habit.

  10. #10
    Join Date
    Dec 2013
    Location
    Near México City
    Posts
    175

    Default Re: Create /home in new partition

    This is my /etc/fstab:

    /dev/disk/by-id/ata-ST500LT012-9WS142_W0VCDXWA-part5 swap swap defaults 0 0
    /dev/disk/by-id/ata-ST500LT012-9WS142_W0VCDXWA-part3 / ext4 acl,user_xattr 1 1
    /dev/disk/by-id/ata-ST500LT012-9WS142_W0VCDXWA-part1 /boot/efi ntfs-3g fmask=133,dmask=022,locale=en_US.UTF-8 0 0
    /dev/disk/by-id/ata-ST500LT012-9WS142_W0VCDXWA-part6 /home ext4 defaults 1 2

    So I think everything is in place now.
    Thank you very much for your support

    jazmiel


    Quote Originally Posted by alanbortu View Post
    You can use /etc/fstab. Backup (copy it somewhere) then open it up (as root to edit) and you should get a rough idea of how it is formatted. Basically its something like this (your names and stuff will vary):

    Code:
    /dev/disk/by-id/ata-KINGSTON_SH103S3120G_50026B722A0480DC-part2 swap                 swap       defaults              0 0
    UUID=bc9a8b77-7e43-44b1-9d57-95b15dfff6b3 /                    btrfs      defaults              0 0
    /dev/disk/by-id/ata-KINGSTON_SH103S3120G_50026B722A0480DC-part4 /home                xfs        defaults              1 2
    As you can see the third line sets a partition on my drive to be treated as /home so if I try to go to /home it will take me to that partition. You will have to figure out the names of your partitions using fdisk -l or gparted but it should be an easy process.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •