LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-24-2017, 05:17 PM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
clone a disc


My girlfriend, the poor deluded creature, uses Windows 7 instead of Linux.

I recently bought an ssd drive for my laptop. It is much faster now. So I thought I would buy her an ssd drive.

I have a little box that accepts 2 1/2" sata drives and connects via usb 3.

Can I just run all her drive onto my laptop, then write it to the new ssd?

I think dd could do that, but what about the mbr? Will that also be copied?

Maybe there is a Linux program that could do this?
 
Old 09-24-2017, 07:05 PM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
dd will clone it just fine. Just make sure to clone from device to device, rather than partition to partition. For example:

Code:
dd if=/dev/sdb of=/dev/sdc bs=32256
Use fdisk -l to make absolutely sure that you're cloning from the correct source to the correct destination.

The other thing to keep in mind is to use Disk Management within Windows 7 to resize its own NTFS partition, if necessary/desired.

For example, if the SSD is smaller than the HDD, you want to boot up Windows 7 and shrink the Windows 7 partition before removing the HDD.

If the SSD is larger than the HDD, boot up to Windows 7 after installing the SSD to use Disk Management to expand the Windows 7 partition.

The bottom line is that Windows 7 has the ability to shrink/expand its own NTFS partition, and this is generally more robust than using linux to shrink/expand it.
 
Old 09-24-2017, 07:55 PM   #3
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Thanks a lot!

She has a 500GB hd. I wanted to buy a 250 GB ssd. She hardly uses her present hd, only about 100 GB.

She has 3 partitions I believe, C:\ D:\ and E:\ So I won't touch C:\ because that is the system partition.

Is the exact size critical? When I get the new drive, I'll look at it with gparted first to see exactly how big it is.

I bought a 240 GB Toshiba ssd but gparted says it is only 223GB
 
Old 09-24-2017, 09:11 PM   #4
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by Pedroski View Post
Thanks a lot!

She has a 500GB hd. I wanted to buy a 250 GB ssd. She hardly uses her present hd, only about 100 GB.

She has 3 partitions I believe, C:\ D:\ and E:\ So I won't touch C:\ because that is the system partition.

Is the exact size critical? When I get the new drive, I'll look at it with gparted first to see exactly how big it is.

I bought a 240 GB Toshiba ssd but gparted says it is only 223GB
You can also use Clonezilla, which will guide you though the cloning process. If you choose "expert mode", you can choose your own options, like for example, which partition(s) to clone, etc. This would be easier than the dd command, if you are not experienced in doing this kind of thing.

I can't speak for the dd command but, size only matters, as long as you have enough space to put your clone image onto/drive to clone to/onto.
 
Old 09-24-2017, 09:26 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Windoze is a bit particular about partitions - even has registry keys that might (will) trip you up. I gave up fighting it - use the Win7 system image utility. It's as slow as molasses, but works, and you (usually) don't have to worry about M$oft registration and such like.

What a PITA M$oft is.
 
Old 09-26-2017, 06:42 AM   #6
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
It is not worth to try Windows Backup (to network share), then boot from installation CD to recovery mode and restore from network share. It will warn about reducing partition size, but if data fits in smaller partition, restore will be successful.
 
Old 09-26-2017, 10:42 AM   #7
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
Yes perhaps it is time she got better taste and changed!!
 
Old 09-26-2017, 11:07 AM   #8
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,780

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by Pedroski View Post
I bought a 240 GB Toshiba ssd but gparted says it is only 223GB
It's probably around 223GiB: 223 * 2³⁰ ≅ 239.44 * 10⁹
 
Old 09-26-2017, 01:42 PM   #9
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Can you determine the manufacturer of her hard drive in her laptop? If it's either Western Digital or Seagate, each of those manufacturers has free cloning software specifically designed to work with windows:

https://support.wdc.com/downloads.aspx?p=119&lang=en

http://www.seagate.com/support/downloads/discwizard/

They're both stripped down versions of Acronis True Image, one of the most popular cloning applications for windows available. If you have to clone a hard drive with a windows OS on it, Acronis or the stripped down free versions from hard drive manufacturers is the most reliable tool I've found. You'll find other linux based cloning tools have disclaimers about cloning Windows 7 and above; sometimes it works, sometimes it doesn't.
 
Old 09-26-2017, 11:58 PM   #10
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Original Poster
Rep: Reputation: 73
Thanks!

@dave@burn-it.co.uk : she has me as her boyfriend. That doesn't say much for her taste!!

What I meant about the exact size was, as the old hd is bigger than the new, must I shrink Windows to the EXACT size of the new ssd?

@kilgoretrout Thanks for the links, I will have a look at what hd she has. If it is one of those mentioned, I'll try that way.
 
Old 09-27-2017, 12:55 AM   #11
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by Pedroski View Post
What I meant about the exact size was, as the old hd is bigger than the new, must I shrink Windows to the EXACT size of the new ssd?
No, it must be shrunk to a size smaller or equal to the new SSD. I would make it about 10% smaller so you are prepared for rounding errors in size calculation. Once Windows is running on the new SSD you can expand again to the last byte.
Resizing partitions in W7 works quite well. BUT! somtimes Windows puts immutable space in the middle of partitions and you cannot shrink. The immutable files are temp files and recovery images. No need to be immutable, but hey it is Windows. I wrote something about that here: https://www.linuxquestions.org/quest...3/#post5747580

jlinkels
 
Old 09-27-2017, 09:40 AM   #12
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
My experience is good with using Windows itself to resize/move partitions, but as jlinkels noted - it can't shrink the main C: partition smaller than about half its original size. This has to do with how NTFS was designed for spinning hard drives and it starts in the middle sectors and works it way outward. The idea was to minimize seek times. In contrast, older file systems tended to start at the lowest sectors and work their way upward.

Since the new drive is half the size of the old drive, you may be out of luck. Maybe gparted (within linux) will be able to resize the C: partition as desired, but the last time I tried that with a Windows 7 OS partition, gparted refused to even try. This was years ago, though.
 
Old 09-27-2017, 10:42 AM   #13
dave@burn-it.co.uk
Member
 
Registered: Sep 2011
Distribution: Puppy
Posts: 601

Rep: Reputation: 172Reputation: 172
I've never had any problems using Windows partition tools to handle partitions. Any tool that refuses to handle partitions correctly will not survive very long.

There is usually a very good reason why they will not perform a particular action that is requested. Often that can be corrected by re-arranging the data in a manner different to the default.
The most common cause is fragmentation.

Last edited by dave@burn-it.co.uk; 09-27-2017 at 10:51 AM.
 
Old 09-27-2017, 12:55 PM   #14
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by IsaacKuo View Post
My experience is good with using Windows itself to resize/move partitions, but as jlinkels noted - it can't shrink the main C: partition smaller than about half its original size.
Maybe I did not explain it well enough. The Windows partition can be shrunk (and quite a lot actually) but it is not simple because immutable sectors are written halfway the partition. So you have to jump through a few hoops. Including deleting temporary files, restore points, swap space and then some. Not only that, but you also have to disable and kill the services which create that space.

It is quite difficult to find a good guide on how to do this. 90% of all articles on the internet are incorrect and mostly copy each other's contents. I hate it, but I lost the one article which was really useful.

That way I managed to shrink a 700 GB W10 partition to 40 GB. Without removing the immutable space I was stuck at 380 GB.

jlinkels
 
Old 09-27-2017, 03:35 PM   #15
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Kind of two parts to files in windows. One is that some programs still may require files to be in some exact location. The program sets this as a way to secure the program. The other is the ability to move and have space to move.

It is possible to run windows on a usb and use the standard iso to perform some tasks.

Many of the ssd/hard drive makers offer programs to move the data to and from. They tend to use Acronis a lot and it works usually quite well.

I think this should read "It is worth to try Windows Backup" instead of "It is not worth to try Windows Backup " maybe. It is a proper windows solution.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: No boot disc ha been detected or the disc has failed? herakles_14 Linux - Hardware 5 05-27-2016 10:01 PM
Can create virtual machines with my ISO disc, but cannot boot as host from the disc Magson13 Linux - Laptop and Netbook 1 05-26-2014 08:08 PM
I need to Clone a Red Hat drive and install clone in HP server drummer54 Linux - Newbie 14 03-07-2009 04:15 PM
Will dd command make an exact copy (clone) of a disc pafos Linux - Newbie 15 03-29-2008 03:59 AM
Disc clone/copy szak Linux - Newbie 1 01-21-2002 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:33 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