Find the answer to your Linux question:
Results 1 to 10 of 10
Hello I am a Linux Noob So Bear With Me Please. I just installed slackware 10 about 10 minutes ago and I set up partitions for /usr and /home. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! ouellettesr's Avatar
    Join Date
    Feb 2007
    Posts
    47

    Post How To Move /USR & /Home To Seperate Partition


    Hello I am a Linux Noob So Bear With Me Please.

    I just installed slackware 10 about 10 minutes ago and I set up partitions for /usr and /home.

    I need to know how to move them over to their partition.

    Here are my partitions.

    Device

    /dev/hda1 Swap ID 82
    /dev/hda2 LinuxBoot ID 83
    /dev/hda3 Linux ID 83
    /dev/hda4 Linux ID 83

    I can provide more details if needed thanx.

  2. #2
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Can you post the contents of /etc/fstab ?

    Moving these folders to their own partitions is an interesting problem, but I think I can guide you through it.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  3. #3
    Just Joined! ouellettesr's Avatar
    Join Date
    Feb 2007
    Posts
    47
    /dev/hda1 swap swap defaults 0 0
    /dev/hda2 / reiserfs defaults 1 1
    /dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
    /dev/fd0 /mnt/floppy auto noauto,owner 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    proc /proc proc defaults 0 0

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! ouellettesr's Avatar
    Join Date
    Feb 2007
    Posts
    47
    Does Anyone Have An Answere?

  6. #5
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Sorry for the delay.

    So it looks like you're trying to move /home and /usr onto hda3 and hda4, right?

    First, make sure you've got a livecd handy, so that you can back out of any changes if this goes horribly wrong. It should be safe enough, but I'm doing this from memory, so it might not go according to plan! Make sure you have a backup of anything important, and that you have a livecd handy so that you can reverse any changes. OK?

    Firstly, you need to do this in a single user environment, especially as you are planning to move /home. (This, of course, means you won't be able to read this post, so print it out, or make notes!)
    Code:
    init 1
    Now mount /dev/hda3 somewhere smart and copy /home to it.
    Code:
    mkdir /home_new
    mount /dev/hda3 /home_new
    cp -pr /home/* /home_new/
    Now everything in /home will have been copied, with the same permissions and timestamps, to /dev/hda3, which is currently mounted as /home_new.

    Since you are in single-user mode, you can safely rename /home to /home_old
    Code:
    mv /home /home_old
    Now you need to edit /etc/fstab to include a line like the following,
    Code:
    /dev/hda3 /home reiserfs defaults 1 2
    At this point I think you're ready to reboot.

    Hopefully that all makes sense. If this works well, you should do the same thing to move /usr.

    Good luck!
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  7. #6
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    If all else fails, just reinstall. When you do, just make sure that /usr
    and /home are put on your intended partitions. It's easier than moving
    them after the fact.

  8. #7
    Just Joined! ouellettesr's Avatar
    Join Date
    Feb 2007
    Posts
    47
    Actually I am going to be installing slackware 11 instead of 10. I wanted to set them during install, but I couldnt figure out how to assign them, Is there a specific ID number that defines them as /usr and /home? I will try, but if not it looks like I will be doing it after installation.

  9. #8
    Just Joined! ouellettesr's Avatar
    Join Date
    Feb 2007
    Posts
    47
    I successfully installed slackware 11.0 with the /usr/local and/home on there proper partitions, It was there all along I just didn't read it carefully enough. Thank you smolloy for your response, Im sure someone will run into the same problem.

    However I did try the init 1 command and it froze up the pc, any ideas what caused that?

  10. #9
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,414
    Quote Originally Posted by ouellettesr
    Thank you smolloy for your response, Im sure someone will run into the same problem.
    No problem. It was good to have to think my way through that procedure again. I had to do it a couple of times when I first installed linux, cos I never liked the way I set up the partitions in the first place, and I liked to tweak! It's good to be forced to think every once in a while.
    Quote Originally Posted by ouellettesr
    However I did try the init 1 command and it froze up the pc, any ideas what caused that?
    Are you sure it froze up? This command should dump you to a command line request for the root password, but I've found that sometimes I need to hit "enter" a couple of times to get the password request. I suppose it should be possible to do this from any runlevel, but you'd have to make sure that there are no processes running that belong to any user listed in the /home directory.

    You could try booting directly into runlevel 1 from the grub prompt, or by setting it as your default runlevel and then rebooting, but I can't quite remember which files you'd have to edit to do that.

    Not important now that you've got it solved though!!
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  11. #10
    Just Joined!
    Join Date
    Jun 2005
    Location
    Rancho Cucamonga, CA
    Posts
    3

    Installing on different partition layouts

    Here's my normal procedure for installing Slack:

    - boot from cd

    - cfdisk /dev/hda
    hda1 - reiserfs
    hda2 - swap
    hda3 - reiserfs

    - cfdisk /dev/hdb
    hdb1 - swap
    hdb2 - reiserfs

    - Run install:

    Mount point for /dev/hda1: /
    Mount point for /dev/hda3: /usr
    Mount point for /dev/hdb2: /home

    From that point, just continue installing. No problems to date.

Posting Permissions

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