Announcement

Collapse
No announcement yet.

Cloning boot disk to new Samsung 860 EVO 1TB SSD

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [DESKTOP] Cloning boot disk to new Samsung 860 EVO 1TB SSD

    I just bought a new SSD via Amazon. How do I clone the boot drive and tell GRUB II to boot from it? I have very old Sata tech drives and am slowly replacing them. Boot time will probably go from about 8 minutes to 2 minutes or less!
    Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

    http://www.kubuntu.org/getkubuntu

    #2
    Trying Samsung Tech. support.
    Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

    http://www.kubuntu.org/getkubuntu

    Comment


      #3
      Originally posted by steve7233 View Post
      I just bought a new SSD via Amazon. How do I clone the boot drive and tell GRUB II to boot from it? I have very old Sata tech drives and am slowly replacing them. Boot time will probably go from about 8 minutes to 2 minutes or less!
      1TB SSD. How big is your boot drive? You may need to use KPartitionManager to partition the 1TB into 2 partitions, the first being the exact size of your boot disk. Then you can use dd to copy the boot drive to the first partition. Then replace the boot drive with the SSD and reboot.
      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
      – John F. Kennedy, February 26, 1962.

      Comment


        #4
        Samsung tech support failed. They don't know Linux. Amazon.com description said the drive works great with Linux. After Googling I now have Clonezilla. Clonezilla sees the 1 TB SSD but can't see my 250 GB system drive. I think it has to be unmounted. How as I need it mounted to run Kubuntu but I can't clone it unless it's unmounted? It seems I am stuck between a rock and a hard place.

        Code:
        [COLOR="#FF0000"]Error! No existing disk(s) or no unmounted disk(s) are found! To use Clonezilla to save or clone a disk, the source disk must exist or be unmounted! If you are sure the disk exists in this machine, maybe the kernel is too old?
        Press "Enter" to exit...[/COLOR]
        Last edited by steve7233; Jan 06, 2020, 09:56 PM.
        Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

        http://www.kubuntu.org/getkubuntu

        Comment


          #5
          You might need to use clonezilla booting from some other media. I've used systemrescuecd for that purpose several times over the years. Be aware that cloning a partition clones the UUID; having two partitions with the same UUID at boot time can totally confuse Linux. gparted can set a new UUID on a partition, or use tune2fs, btrfstune, or mlabel for ext4, btrfs or vfat respectively.

          However, that's (slightly) Windows thinking; Linux doesn't mind much if you copy a running system. I'd expect no trouble if you
          • partition the new volume with an ESP for UEFI, and a partition or partitions for Linux, modelled on your existing set up, giving nice, meaningful labels to the partitions, say "alice" for the new root partition
          • use rsync to copy everything from your existing partitions by mounting them with dolphin, for root say
            Code:
            $ sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found",".snapshots","/home"} /media/steve/alice
          • run grub-install specifying the device of the new SSD
          • edit the /etc/fstab on the new SSD to use LABEL=whatever instead of UUID=incomprehensible (okay, my preference, you could use sudo blkid to find the UUIDs on your new SSD, and use those)

          If you've got running databases with data in /var, or active web server systems ticking over, they might have glitches, and cloning a shut down system be best. But for a typical Kubuntu it'll be just like you had a power outage.
          Regards, John Little

          Comment


            #6
            After cloning I plan to disconnect the old drive so this is a replacement to get rid of very old tech.
            Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

            http://www.kubuntu.org/getkubuntu

            Comment


              #7
              I have to go to work this morning but I will try booting with the previous kernel this afternoon. Maybe the new kernel is giving Clonezilla fits.
              Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

              http://www.kubuntu.org/getkubuntu

              Comment


                #8
                I've done the following in the past.

                make partitions on the new drive, DD root over.. rsync home fix the UUID's used in etc/fstab , change the boot device to the new one, profit.
                Mark Your Solved Issues [SOLVED]
                (top of thread: thread tools)

                Comment


                  #9
                  New drive? Optimal time to do a new install. How about booting to a Kubuntu 20.04 USB, pre-format your new SSD to include a partition for your old install. Then boot to 20.04 and then dupe your old install onto the new drive and set it up to dual boot?

                  Please Read Me

                  Comment


                    #10
                    I have a couple of SSDs in my desk drawer waiting for 20.04 LTS. As soon as it comes out, I backup /home, remove the two old drives, install the new ones. A fresh install of 20.04 to the / on the smaller drive and /home on the larger, a few adjustments (maybe) and I'll be up and running on a new Kubuntu with fresh SSDs. Life should be good.

                    That's my plan anyway.
                    The next brick house on the left
                    Intel i7 11th Gen | 16GB | 1TB | KDE Plasma 5.27.11​| Kubuntu 24.04 | 6.8.0-31-generic



                    Comment


                      #11
                      I was planning to use my 1 TB SSD to help test 20.04 anyway. Is it stable enough to use to clone the 19.10 system?
                      Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                      http://www.kubuntu.org/getkubuntu

                      Comment


                        #12
                        Yes I believe it is. Once you have the old install booting, it won't matter much anyway.

                        Back to your OP about having grub boot a clone; first you need to get grub booting from the SSD so removing the hard drive doesn't kill your boot capability. If you clone a filesystem, it will retain its UUID which means unless you have done something non-standard with grub, it will probably just boot.

                        Now if you install 20.04 to the SSD with the hard drive still in the system, this will install grub to the SSD and scan the HDD and add your older install to the grub menu. Then you would only have to set your BIOS to boot to the SSD. Once it's up and booting to the SSD, then you can figure out how you want to go about moving the other install off of the HD. Steps:

                        1. Install SSD in PC
                        2. Install 20.04 to SSD
                        3. Change BIOS to boot to SSD
                        4. Boot to 20.04


                        That shouldn't take more than a half hour. A couple of things to consider:

                        EFI or no EFI? - You only need EFI if you're going to use Windows also. If not, you don't need it. Still an option if you want it, but I'm super comfortable with GRUB so why learn something new?
                        GPT or MBR? - MBR is annoying to partition and more likely to leave your disk unusable. GPT is the way to go. However, GPT and GRUB require some preparation, similar to what EFI requires - a small partition is needed for GRUB to reside on. I detailed the best way to do this here:

                        https://www.kubuntuforums.net/showth...light=grub+gpt

                        So in theory, the whole thing would be:
                        • Partition the SSD as needed from your current install, including a partition exactly the same size as your 19.10 partition.
                        • Follow the above steps until you're comfortably booting from the SSD to 20.04
                        • Use dd to copy the entire 19.10 install to the SSD partition
                        • Power down and remove the HD
                        • Boot back to 20.04 and run update-grub
                        • Done


                        Now you have 19.10 bootable as well as 20.04 and a backup of 19.10 on the hard drive. If you didn't want to remove the HD yet, you would want to change the UUID of the 19.10 install on the HD so grub could tell it from the SSD partition. Actually, if you changed the UUID of either 19.10 location AND edited fstab and changed the UUID there too, you could boot to both the SSD and the HD 19.10.

                        Please Read Me

                        Comment


                          #13
                          I finally got cloning to work but it seems the Grub installation fails. I tried installing 19.10 as a fresh install but the installer crashed when it got to the grub install! Perhaps grub can't be installed to an SSD. Now what do I do?
                          Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                          http://www.kubuntu.org/getkubuntu

                          Comment


                            #14
                            Of course grub can be installed to an SSD.

                            How did you do the cloning?
                            Can you use the same method to grub-install to the partition you want?
                            Is it an efi partition?

                            You might have seen the Sherlock quote about theorising before having data here somewhere... ;·)

                            Comment


                              #15
                              Ok, I finally got a working system. It seems if you have a BTRFS system then cloning to SSD doesn't seem to work. It looks like Grub II won't install to a BTRFS system if it is on an SSD. I did a fresh install of 19.10 using ext4 instead of BTRFS. The installer crashes when Installing Grub II to BTRFS on an SSD. It didn't crash using ext4. It still wouldn't boot but it seemed to be trying too. I thought maybe the CMOS is getting confused. I entered setup and pushed thee SSD to the top of the boot list and tried again... VICTORY.
                              Just to remind users and devs that Ubuntu and its flavors have a long way to go to be as usr friendly as they should be.

                              http://www.kubuntu.org/getkubuntu

                              Comment

                              Working...
                              X