{"id":4070,"date":"2021-04-08T23:27:16","date_gmt":"2021-04-08T17:57:16","guid":{"rendered":"https:\/\/www.suramya.com\/blog\/?p=4070"},"modified":"2022-06-16T15:18:49","modified_gmt":"2022-06-16T09:48:49","slug":"moving-a-windows-install-to-another-drive-on-the-same-computer-shouldnt-be-this-hard","status":"publish","type":"post","link":"https:\/\/www.suramya.com\/blog\/2021\/04\/moving-a-windows-install-to-another-drive-on-the-same-computer-shouldnt-be-this-hard\/","title":{"rendered":"Moving a Windows install to another drive on the same computer shouldn&#8217;t be this hard"},"content":{"rendered":"<p>I recently bought a new SSD drive for my Laptop because even after upgrading everything else (except the CPU) the system was still slow and looking at the process use I could see that it was waiting for disk read\/write for the most part and that was causing the slowness. Once I got the new drive, I had to move the existing OS installs from the old disk to the new one. I have three operating systems (OS) on the disk: Windows, Debian and Kali. I need the windows OS for my classes (my proctored exams have to be taken on a windows machine) and others are for my tinkering and general use computing. The disk layout on the old drive was as follows:<\/p>\n<pre class='code'>\r\nroot@Wyrm:~# fdisk -l\r\nDisk \/dev\/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors\r\nDisk model: ST1000LM024 HN-M\r\nUnits: sectors of 1 * 512 = 512 bytes\r\nSector size (logical\/physical): 512 bytes \/ 4096 bytes\r\nI\/O size (minimum\/optimal): 4096 bytes \/ 4096 bytes\r\nDisklabel type: dos\r\nDisk identifier: 0x0f04ad34\r\n\r\nDevice     Boot     Start       End   Sectors   Size Id Type\r\n\/dev\/sda1  *         2048   1126399   1124352   549M  7 HPFS\/NTFS\/exFAT\r\n\/dev\/sda2         1126400 102402047 101275648  48.3G  7 HPFS\/NTFS\/exFAT\r\n\/dev\/sda3       102402048 135956479  33554432    16G 82 Linux swap \/ Solaris\r\n\/dev\/sda4       135956480 468862127 332905648 158.7G  5 Extended\r\n\/dev\/sda5       135958528 175017985  39059458  18.6G 83 Linux\r\n\/dev\/sda6       175022080 237936641  62914562    30G 83 Linux\r\n\/dev\/sda7       237940736 468862127 230921392   675G 83 Linux\r\n<\/pre>\n<p>I partitioned the new disk as a copy of the old drive, except for the data partition which was smaller as the disk was smaller. I used dd to clone each partition on to the corresponding new partition using the following command: (where sdb was the new drive).<\/p>\n<pre class='code'>dd if=\/dev\/sda1 of=\/dev\/sdb1 bs=2k<\/pre>\n<p>Once I copied the partitions over, all I had to do was refresh the GRUB boot loader config using the following command:<\/p>\n<pre class='code'>update-grub<\/pre>\n<p>After the config was updated, I was able to boot into Linux from both my Debian and Kali partitions on the new drive. However, that didn&#8217;t work for Windows. It gave be a screen-full of random characters like what you see when you try to open a binary file in a text editor and refused to boot. Thankfully I had not deleted the old windows partition so I was able to try a few more things, but *nothing* worked. Windows would just refuse to boot from the new drive. The only solution I found that could have potentially worked was a Paid software that supposedly allows you to clone your windows install on new disks\/computers. Since I didn&#8217;t want to spend money on something I should have been able to do for free, I didn&#8217;t try it. <\/p>\n<p>In the end after wasting a lot of time on this, I was tired of trying various things so just decided to reinstall windows on the new drive. It wasn&#8217;t a major loss because I didn&#8217;t have much data on Windows but I still dislike the fact that I had to do so just to put in a new drive. Imagine the hoops I would have had to jump if I wanted to move to a new computer. Actually I don&#8217;t have to imagine, I did jump thorough them when I moved my install from my old laptop to this one. <\/p>\n<p>My linux install on the laptop is an exact clone of my desktop install. I used dd to create an image of my Linux install on the desktop and then wrote the image on the laptop. It worked perfectly fine at the first try. All I had to change was the hostname so that my DHCP server didn&#8217;t have a nervous breakdown but other than that everything worked without a single problem. Even the graphics drivers auto adjusted on the new machine. Imagine if we could do the same thing for a Windows install.<\/p>\n<p>&#8211; Suramya<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently bought a new SSD drive for my Laptop because even after upgrading everything else (except the CPU) the system was still slow and looking at the process use I could see that it was waiting for disk read\/write for the most part and that was causing the slowness. Once I got the new [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":3,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[18,13,4,2],"tags":[],"class_list":["post-4070","post","type-post","status-publish","format-standard","hentry","category-computer-software","category-linuxunix-related","category-my-thoughts","category-techie-stuff"],"_links":{"self":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/4070","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/comments?post=4070"}],"version-history":[{"count":1,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/4070\/revisions"}],"predecessor-version":[{"id":4071,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/posts\/4070\/revisions\/4071"}],"wp:attachment":[{"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/media?parent=4070"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/categories?post=4070"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.suramya.com\/blog\/wp-json\/wp\/v2\/tags?post=4070"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}