LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-16-2022, 06:09 PM   #1
vw98008
Member
 
Registered: Jul 2019
Posts: 173

Rep: Reputation: Disabled
Linux partition blocks cloning HDD to SSD


To improve the performance of my near ten years old Dell desktop, I want to add an SSD as the boot disk. The desktop is dual boot with Linux. After connecting a new SSD with a SATA power cable and a SATA data cable, I start to clone the HDD to SSD with Macrium Refect on Windows. The used hard drive space is 170 GB and the SSD has 240 GB space. But I am blocked by the Linux partition. The message says "this partition has a fixed size and can't be shrunk to ....". What is a good solution for the issue? One solution is not to clone the Linux partition and do a dual boot setup again on the SSD and copy any want-to-keep files manually through a third media. But, I don't know whether the boot script would work or not because that is for the dual boot. Another solution is to shrink the Linux partition to fit in the rest of the space in the SSD. (edited to clarify possible solutions)

Last edited by vw98008; 11-16-2022 at 07:49 PM.
 
Old 11-16-2022, 06:43 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861
It appears that Macrium Refect is a windoze only program. It will not be able to read any linux file system.

Have a look at this link for ways to clone a linux system. -->https://www.makeuseof.com/tag/2-meth...ux-hard-drive/

Hope this helps.
 
Old 11-16-2022, 06:59 PM   #3
vw98008
Member
 
Registered: Jul 2019
Posts: 173

Original Poster
Rep: Reputation: Disabled
I have edited the post to clarify where I run the app.
 
Old 11-16-2022, 07:27 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,149

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
The implication from the message is that the allocated (rather than actually used) space is larger than the target. From a linux terminal run this and post all the output.
Code:
lsblk -f -o +size
 
Old 11-16-2022, 08:07 PM   #5
vw98008
Member
 
Registered: Jul 2019
Posts: 173

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
The implication from the message is that the allocated (rather than actually used) space is larger than the target. From a linux terminal run this and post all the output.
Code:
lsblk -f -o +size
Code:
NAME   FSTYPE LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINT                  SIZE
sda                                                                                                  223.6G
sdb                                                                                                  931.5G
├─sdb1 vfat            5450-4444                                39M     0% /media/abc/5450-4444  39.2M
├─sdb2 ntfs   RECOVERY 0E22934B22933725                                                               18.6G
├─sdb3 ntfs   OS       B65E95ED5E95A721                        548G    24% /media/abc/OS        717.6G
├─sdb4                                                                                                   1K
├─sdb5 ext4            88c46e6e-5970-4f91-82e2-bd947a24f33c  145.2G    17% /                         191.5G
└─sdb6 swap            e6de0bc8-555b-49b1-b3c6-486f54926212                [SWAP]                      3.9G
sr0
1024M
 
Old 11-16-2022, 10:33 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,149

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
How about you stop editting prior post(s) - post new data in new posts to save confusion.

I know nothing of Macrium, but if it handles the resizing of the Windows partition ok, you might still be in strife if it treats the ext4 partition as unmovable (as well as a fixed size). You might want to try resizing it with a gparted livecd, but with (presumably) a non-gpt disk structure, you'll probably have to re-install grub if it does get moved.
As per the link above, clonezilla is the usual suggested solution for linux users, but Windows might be an issue. Or not, I haven't moved it around for many years.
 
Old 11-16-2022, 10:58 PM   #7
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,344

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Quote:
Originally Posted by vw98008 View Post
What is a good solution for the issue?
1. Forget any attempts to use a cloning or direct copy program to copy the SSD.

2. Use a partitioning program such as gparted to create and format the partitions on the new drive.

3. Use the cp program to copy the files from one partition to another.

4. Run a grub install if needed.

Last edited by jailbait; 11-16-2022 at 11:05 PM.
 
Old 11-17-2022, 12:24 AM   #8
Debian6to11
Member
 
Registered: Jan 2022
Location: Limassol, Cyprus
Distribution: Debian
Posts: 382
Blog Entries: 1

Rep: Reputation: 71
Quote:
Originally Posted by syg00 View Post
As per the link above, clonezilla is the usual suggested solution for linux users, but Windows might be an issue. Or not, I haven't moved it around for many years.
I used Clonezilla to backup a dual boot disk of Windows 10 and Debian. The image was verified.
Since it can backup Windows, I do not see a reason not to able to copy them.
 
Old 11-17-2022, 12:42 PM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,018

Rep: Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342
I would try to install a fresh linux on that ssd and copy the required files from the old partition. But it depends on the amount of that data.
 
Old 11-17-2022, 01:24 PM   #10
vw98008
Member
 
Registered: Jul 2019
Posts: 173

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jailbait View Post
1. Forget any attempts to use a cloning or direct copy program to copy the SSD.

2. Use a partitioning program such as gparted to create and format the partitions on the new drive.

3. Use the cp program to copy the files from one partition to another.

4. Run a grub install if needed.
That will request a lot of work, right? And mistakes could easily happen with those commands.
 
Old 11-17-2022, 02:15 PM   #11
vw98008
Member
 
Registered: Jul 2019
Posts: 173

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
I would try to install a fresh linux on that ssd and copy the required files from the old partition. But it depends on the amount of that data.
I have thought about this approach, but worry about the dual bost script. I might need to delete the Linux in the HDD and set up a dual boot on SSD later.
 
Old 11-18-2022, 12:41 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,018

Rep: Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342
you don't need to delete the old one. Linux (almost any kind of distro) will detect all the available (bootable) systems and will automatically configure the boot menu.
So in that case you will have 3 entries: windows, old linux and new linux. And if you don't like it you can still do something else.
 
Old 11-18-2022, 04:10 AM   #13
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,484

Rep: Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556Reputation: 1556
One bit of wisdom that has always served me well is "Never try to clone to a smaller drive."

You say you've 170Gb used in what looks like a ~750Gb Win partition and a ~200Gb Lin partition and you want to shoehorn that in to 240Gb...

Yeah, you'll not have much space left in either partition after that.

Buy a 1Tb SSD.
 
Old 11-18-2022, 04:29 AM   #14
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,511

Rep: Reputation: Disabled
Windows used to write stuff to the end of the partitions, if I remember, which could cause problems trying to clone it to another drive.

Personally, if you want to keep Windows, just install Linux onto the SSD, & leave the other disk alone. You could maybe shrink the Windows partition, then use it to store data for both systems, also where the previous Linux used to reside.
 
Old 11-18-2022, 09:55 PM   #15
vw98008
Member
 
Registered: Jul 2019
Posts: 173

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
you don't need to delete the old one. Linux (almost any kind of distro) will detect all the available (bootable) systems and will automatically configure the boot menu.
So in that case you will have 3 entries: windows, old linux and new linux. And if you don't like it you can still do something else.
I have thought the same. That will be required to change the boot order in the loader. I learn two options for changing the loader: a command "bcdedit /enum firmware" and making changes with UEFI on Windows. But I get "the boot configuration data store could not be opened" for the command and only the "turn off your pc" option for UEFI. I run into a wall right now.

Last edited by vw98008; 11-18-2022 at 10:48 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Will cloning one hdd (not ssd) to another encrypted hdd work on a cloning device? hddfsck Linux - Newbie 16 09-05-2019 07:02 AM
[SOLVED] Tips/warnings for cloning OS disk from HDD to SSD? penyuan Linux - Hardware 11 08-13-2017 08:00 PM
Cloning SSD vs HDD with DD replica9000 Linux - Software 13 12-16-2016 08:08 PM
Cloning HDD install to SSD Condemn Slackware 1 02-14-2014 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration