Results 1 to 5 of 5

Thread: Porting an existing Ubuntu install to new disks..

  1. #1
    Join Date
    Feb 2006
    Location
    Ireland
    Beans
    856
    Distro
    Ubuntu 13.04 Raring Ringtail

    Question Porting an existing Ubuntu install to new disks..

    I have Ubuntu installed on a SATA drive and I plan on getting an SSD. I want to move the / directory to the SSD but leave swap and home on the SATA drive.

    How can I do this and still have a working system?

    I'm thinking the quickest / hackiest way of doing it would be to dd the entire existing SATA image to the SSD, update grub to boot the SSD and then modify fstab on the SSD to use /home and swap on the other drive for subsequent boots.

    How does that sound?

  2. #2
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Porting an existing Ubuntu install to new disks..

    I don't like using dd since it copies empty space too. Plus you can really mess things up if you confuse if and of.

    Do you have a separate /home partition right now or it's a folder on /?
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  3. #3
    Join Date
    Aug 2007
    Location
    Sweden
    Beans
    197
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: Porting an existing Ubuntu install to new disks..

    Quote Originally Posted by jarlath View Post
    I'm thinking the quickest / hackiest way of doing it would be to dd the entire existing SATA image to the SSD, update grub to boot the SSD and then modify fstab on the SSD to use /home and swap on the other drive for subsequent boots.

    How does that sound?
    For dd the partitions should have exactly the same size. Is /home on a separate partition on the SATA drive now? If not, dd will copy home too.

    I would use cp or rsync and make sure they excluded the /home directory from copying. There are different ways to exclude /home, depending on if it is a separate partition or not.

  4. #4
    Join Date
    Feb 2006
    Location
    Ireland
    Beans
    856
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Porting an existing Ubuntu install to new disks..

    Thanks for your replies darkod & David Andersson.

    Quote Originally Posted by darkod View Post
    I don't like using dd since it copies empty space too. Plus you can really mess things up if you confuse if and of.

    Do you have a separate /home partition right now or it's a folder on /?
    It's all on the same partition as / at the moment so maybe cp -R would be the best way to go in that case.

    Quote Originally Posted by David Andersson View Post
    For dd the partitions should have exactly the same size. Is /home on a separate partition on the SATA drive now? If not, dd will copy home too.

    I would use cp or rsync and make sure they excluded the /home directory from copying. There are different ways to exclude /home, depending on if it is a separate partition or not.
    As above DA, it's on the same partition. So maybe I should use cp or rsync to copy the whole lot across and then delete the /home foler and update stab to point to the old drive?

    I don't really have time for a 'project' at the moment so I'd rather avoid any linux adventures this time

  5. #5
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Porting an existing Ubuntu install to new disks..

    We often find those who try to use dd or some major copy as the adventure. With DD you get duplicate UUIDs and then have to edit fstab & reinstall grub2.

    But even just copying you have to edit fstab & reinstall grub2 as the new drive has different UUIDs.

    And install to SSD also should have some different fstab settings anyway for trim. I find a new install easy and then you can copy /home over or keep using the /home if separate partition from the rotating drive.

    Some settings:
    With SSD or Flash drives, Use ext2 or ext4 without journal:
    sudo tune2fs -O ^has_journal /dev/sda1
    sudo tune2fs -o discard /dev/sda1
    No swap or set swapiness or install 'Dynamic Swap Space Manager' from the Ubuntu Software Center
    After installing, change the fstab so that everything gets mounted with noatime.
    change to noop i/o scheduler

    https://wiki.archlinux.org/index.php/Solid_State_Drives - SSD
    https://wiki.archlinux.org/index.php/GPT
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







Tags for this Thread

Bookmarks

Posting Permissions

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