Find the answer to your Linux question:
Results 1 to 3 of 3
Any advice on the best way to do the following: I have a hard-disk with an extended partition in which I have Linux Swap, Linux Root (/) and Home (/home) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User zba78's Avatar
    Join Date
    Feb 2004
    Location
    Birmingham, England
    Posts
    335

    Add a new Hard-Disk


    Any advice on the best way to do the following:

    I have a hard-disk with an extended partition in which I have Linux Swap, Linux Root (/) and Home (/home) (I also have some NTFS Windows partitions but we can ignore them )

    I want to buy a new Hard-disk on which I want to create an extended partition in which I want to create one partition and mount it as /home

    The I want to remove /home from my current hard-disk and extend the root partition (/) to take up the free space created by removing /home

    any suggestions please.

    Please note that I have QT Parted on the bootable 'System Rescue CD'
    Ubuntu Jaunty :: Arch Linux (current) :: Acer Aspire 1692WMLi

  2. #2
    Linux Engineer
    Join Date
    Dec 2002
    Location
    New Zealand
    Posts
    766
    if theres only going to be 1 partition on the new drive is there any reason u want an extended partition?

    just put the new drive in, then using soem paritioning tool (while booted from hdd, u shouldnt need a boot cd unless something goes wrong). format/partition the new drive to have 1 partition of ext3/reiserfs/whatever. now mount it somewhere its not important where. now copy everything from /home to the new drive (cp -rf /home/* /newdrive)

    now chaneg /etc/fstab so that instead of
    /dev/hda2 /home ....whatever

    it reads
    /dev/hdb1 /home ...copy from above

    this will make it so when u next boot (or run as root "umount /home; mount /home") the new drive will be mounted as /home

    ok u might need a bootcd here, u might not. but reboot anyway and chack that everythign loosk the same but /home will have a lot more free space. now bring up some partition tool and delete the partition that WAS /home on hda, now resize the root partition to fill up this free space. (will be slightly harder and prob need bootcd if they are not next to each other.)

    then reboot and it shoudl all be fine.

  3. #3
    Linux User zba78's Avatar
    Join Date
    Feb 2004
    Location
    Birmingham, England
    Posts
    335

    Thanks

    Ah thatís great. Thanks for the advice. I actually forgot that the root userís home directory is not a subdirectory of /home therefore I can log in as root and make changes to /home.

    Thanks again
    Ubuntu Jaunty :: Arch Linux (current) :: Acer Aspire 1692WMLi

  4. $spacer_open
    $spacer_close

Posting Permissions

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