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

Thread: moving OS to new drive

  1. #1
    Join Date
    Nov 2011
    Beans
    446
    Distro
    Ubuntu 14.04 Trusty Tahr

    moving OS to new drive

    i'm installing a new hard drive soon, as the current SSD is starting to get full, and I'm wondering if there's any performance benefit to be gained from keeping the old one around? Storage space is not an issue, I now have a HDD as a second drive where I keep my data. A long time ago I remember configuring, I think it was win nt machines, to use multiple drives - one had the OS on it, second one was where the applications went, a third one was for storage, sometimes one just for swap; is there any sense in a scheme like this with today's Ubuntu installed on a SSD? I'd think that a drive for swap could be useful in some instances but I don't think running out of RAM is ever an issue in my case. Not worth the effort? Or is it?

    And a second question about the procedure itself. I understand that booting to a live session (so hard drives can remain unmounted) I only need gparted to copy the current partitions to the new drive, gparted will even copy the files system labels and uuid. Then I can increase the partition size to utilize the larger drive and I'll need to do anything else only if I want to keep the old drive around as well (because there are now two drives with same uuid's). Is that about right?
    Last edited by kurja; August 12th, 2015 at 06:04 AM.

  2. #2
    Join Date
    Aug 2013
    Beans
    4,941

    Re: moving OS to new drive

    For the second question, check out fasrachiver http://ubuntuforums.org/showthread.php?t=2221842&page=4

  3. #3
    Join Date
    Nov 2011
    Beans
    446
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: moving OS to new drive

    I don't see how using fs archiver would be the better choice over gparted?

  4. #4
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: moving OS to new drive

    I prefer new installs.
    If you have lots of settings in /home then you can copy that over.
    Or export a list of installed apps if you have added a lot, to make it easy to reinstall.
    You should have those /home & apps as part of your regular backup anyway.

    If you do copy, and want to keep old drive, you must change UUIDs and then old drive would not be bootable.

    Depending on size of SSD and now much data you have, you may want some or all data on hard drive and just use SSD as boot drive. I now keep /home inside my / (root) on SSD, but have all data on rotating drive. But my new SSD is large enough for several /, so I have space to test another version.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #5
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: moving OS to new drive

    I use a data partition for most data files (documents, pictures, videos, music etc), and I back it up separately from the operating system. Some people prefer to have a separate home partition, but I don't. It is quite small, when it is not used for the data files.

    -o-

    There are several tools for copying a system from one drive to another drive. If you want a pure clone to a drive of at least the same size, it is often a good idea to use Clonezilla. fsarchiver works in a different way, but both of them do not copy the unused space (only blocks which contain files). I don't know which copying method is used by gparted, so I can't tell how efficient it is, but it is probably not more efficient than the other two tools, but maybe easier to use. I use gparted a lot, but not for cloning.

    It the block structure is different on the target drive, it may be better to use gparted and create a new structure with partitions and file systems and copy the files with rsync and install the bootloader with grub-install. (If you have Windows, you probably need some cloning tool.)

  6. #6
    Join Date
    Jun 2014
    Beans
    1,207

    Re: moving OS to new drive

    I prefer to keep the OS and "applications" (/usr) + swap on a fast drive (SSD) and put data on a hard drive if necessary. I don't now the sizes involved, but for a typical Ubuntu installation, not much spare is really need for OS + applications. 30GB is usually more than enough for me these days, sometimes less will work. Keeping that stuff on an SSD will give you the best performance, better boot times, etc.

    Yes, Gparted works well to copy partitions - if you wish to clone manually, that's how I do it usually, but you also must install/update Grub again afterward. I prefer the "chroot" method for this - do a web search for "ubuntu grub chroot" and follow the instructions.

    Clonezilla also works great to clone drives, unless you are doing something more complicated like moving partitions around or splitting them up. Sometimes you can start by doing a Clonezilla clone then doing "surgery" on it with Gparted later - maybe less manual work overall even though it could take more wall clock time.

  7. #7
    Join Date
    Nov 2011
    Beans
    446
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: moving OS to new drive

    Quote Originally Posted by oldfred View Post
    I prefer new installs.
    If you have lots of settings in /home then you can copy that over.
    Or export a list of installed apps if you have added a lot, to make it easy to reinstall.
    You should have those /home & apps as part of your regular backup anyway.

    If you do copy, and want to keep old drive, you must change UUIDs and then old drive would not be bootable.

    Depending on size of SSD and now much data you have, you may want some or all data on hard drive and just use SSD as boot drive. I now keep /home inside my / (root) on SSD, but have all data on rotating drive. But my new SSD is large enough for several /, so I have space to test another version.
    The new SSD is going to be 240GB, my old one is 64 and my / is almost 50GB now. How do I export a list of installed applications? I do have many applications installed from various repositories, this sounds like a handy feature.

    A HDD for data is a must for me, I handle large numbers of photographs which take a lot of disk space. I'm not removing or replacing the data HDD that I have now.

    Quote Originally Posted by sudodus View Post
    I use a data partition for most data files (documents, pictures, videos, music etc), and I back it up separately from the operating system. Some people prefer to have a separate home partition, but I don't. It is quite small, when it is not used for the data files.
    -o-

    I'm not planning to make any extra partitions, what I'm wondering is if I could get any noticeable performance increase from including the old SSD in my setup. Doesn't seem likely really, but I thought I'd ask. Is it even possible to have Ubuntu install applications to a different drive? In (windows) times past I often had a d:\program files which seemed to work well.

    Quote Originally Posted by sudodus View Post
    There are several tools for copying a system from one drive to another drive. If you want a pure clone to a drive of at least the same size, it is often a good idea to use Clonezilla. fsarchiver works in a different way, but both of them do not copy the unused space (only blocks which contain files). I don't know which copying method is used by gparted, so I can't tell how efficient it is, but it is probably not more efficient than the other two tools, but maybe easier to use. I use gparted a lot, but not for cloning.

    It the block structure is different on the target drive, it may be better to use gparted and create a new structure with partitions and file systems and copy the files with rsync and install the bootloader with grub-install. (If you have Windows, you probably need some cloning tool.)
    Hmm I don't know either if gparted does a low level copy like dd, or not... a quick search didn't yield anything useful on the subject.

  8. #8
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: moving OS to new drive

    Clonezilla and fsarchiver are more efficient than dd. (dd copies every byte).

  9. #9
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: moving OS to new drive

    My / is partitioned as 25GB and I am using about 15GB including /home of about 2GB. Included in /home is .wine where I have Picasa and that is the vast majority of my /home.

    I manually copy any file I edit in /etc like grub into /home so my /home backup includes any /etc edited files.
    Oldfred's list of stuff to backup May 2011 (still mostly current, see added links below):
    http://ubuntuforums.org/showthread.php?t=1748541
    Adding extra commands to rsync
    http://ubuntuforums.org/showthread.php?t=2260658
    More detail on /etc files and others to backup - post #3:
    http://ubuntuforums.org/showthread.php?t=1500559
    Some files(temp, cache etc) to exclude from /home backup - post #8 by Paddy Landau
    http://ubuntuforums.org/showthread.php?t=1883834

    I include a new list of installed apps with every backup.

    From old install
    dpkg --get-selections > ~/my-packages
    From New install
    sudo dpkg --set-selections < my-packages
    sudo apt-get -y update
    sudo apt-get dselect-upgrade

    If reinstalling same version, ppas should be ok. But new version of Ubuntu may not work if ppa does not have new version. And then all sorts of issues as updates get blocked by bad ppa.

    But do not just import all sources as that can lead to issues of versions:
    http://askubuntu.com/questions/2038/...ftware-sources
    Last edited by oldfred; August 8th, 2015 at 01:20 AM.
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  10. #10
    Join Date
    Feb 2008
    Beans
    5,078
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: moving OS to new drive

    Your root is huge! Have you tried running: sudo apt-get clean

    Then fire up Synaptic and "completely remove" all but two old kernels. I search for the numerics, such as "3.19.0" to make sure I get all the installed files.

Page 1 of 2 12 LastLast

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
  •