You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Tutorial: cloning your Linux Lite drive using the 'dd' command.

Author (Read 14882 times)

0 Members and 1 Guest are viewing this topic.

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #16 on: May 03, 2018, 05:19:19 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
UPDATE 1: status=progress added to 'dd' command line in tutorial in post #1.

You might also want to add the following to your command:
Code: [Select]
status=progress

Many thanks to torreydale for this suggestion 8)
It has now been added to the tutorial.  I just needed to test it before posting, and can confirm it works perfectly giving you have an ongoing idea of how cloning is going.
« Last Edit: May 03, 2018, 05:26:21 AM by m654321 »
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #15 on: April 04, 2018, 09:29:15 AM »
 

justme2

  • PayPal Supporter
  • Forum Regular
  • *****
  • 201
    Posts
  • Reputation: 25
  • Linux Lite Member
    • View Profile

  • CPU: Intel i5 vPro

  • MEMORY: 8Gb

  • VIDEO CARD: Intel
After some thought, I decided to limit the LL3.8 HDD partition to 32GB and keep a seperate partition for 'big' data like video and music files, the reason being that it only takes around 50 minutes (on my i5 PC) to clone the full system including all the extra apps I installed. My total system size is only 26GB. So 'dd' will now be my default system backup method henceforth.

A further problem raised its head - long boot time due to sitting on the yellow feather boot screen for 1m 30s. That was due to not finding the swap partition during booting. For some unknown reason the UUID for the swap partition was not being accepted, even though I double checked it was correct, so I edited fstab to replace the UUID with the correct device id, sda5 and boot time was much reduced.

I think I can now say I have a 'perfect' system for my needs.
Power to Linux Lite (Thanks Jerry and team).

Thanks Mike,  :)
1) Lenovo T520 i5 LL3.8 8GB ram, fast & stable
2) Medion P4 32bit LL3.8 1GB ram, quite fast & stable
3) eeePC 901 32bit LL3.8 1GB ram, fast & stable
4) eeePC 701 32bit LL3.8 1GB ram, slower & stable but small and light enough to travel with me to New Zealand when visiting family in Blenheim.
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #14 on: April 04, 2018, 08:51:35 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
maybe your Tutorial could have a reference to 'Boot-Repair' for 'dders' who are confronted with a no-boot situation.
Glad you got everything working  :)

I didn't have a no-boot situation, nor did I foresee one, which is the reason 'boot-repair' was not included. I just simply wanted to share what has routinely worked for me. On the repair note, I discovered recently that gparted GUI has a repair disk function which turned out to be really useful & easy to use.
« Last Edit: April 04, 2018, 08:53:45 AM by m654321 »
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #13 on: April 02, 2018, 04:39:53 PM »
 

justme2

  • PayPal Supporter
  • Forum Regular
  • *****
  • 201
    Posts
  • Reputation: 25
  • Linux Lite Member
    • View Profile

  • CPU: Intel i5 vPro

  • MEMORY: 8Gb

  • VIDEO CARD: Intel
OK now I 'dd' cloned my LL3.8 system from SDHC to a new partition on the HDD to give dual boot with win**ws, (which I have to retain for my wife). Although I could see LL folders and files on the 2nd partition, no way could I choose to boot LL3.8
After lots of googling I found 'Boot-Repair' and installed it to a SD card, booted from it and allowed it to have its own way! Eventually it reported its findings which looked ok. Rebooting from the HDD then gave me a grub menu and I was able to boot to either system (win or LL3.8).

So the moral of the tale is that maybe your Tutorial could have a reference to 'Boot-Repair' for 'dders' who are confronted with a no-boot situation.

Thanks Mike for your assistance.  :)
1) Lenovo T520 i5 LL3.8 8GB ram, fast & stable
2) Medion P4 32bit LL3.8 1GB ram, quite fast & stable
3) eeePC 901 32bit LL3.8 1GB ram, fast & stable
4) eeePC 701 32bit LL3.8 1GB ram, slower & stable but small and light enough to travel with me to New Zealand when visiting family in Blenheim.
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #12 on: April 02, 2018, 05:55:52 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
Thank You for the tutorial 8) , bookmarked.

A pleasure to share  :)
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #11 on: April 01, 2018, 09:15:05 AM »
 

justme2

  • PayPal Supporter
  • Forum Regular
  • *****
  • 201
    Posts
  • Reputation: 25
  • Linux Lite Member
    • View Profile

  • CPU: Intel i5 vPro

  • MEMORY: 8Gb

  • VIDEO CARD: Intel
Yes, that's sounds feasible. To be on the safe side you could make your partition on the HDD a bit smaller than your destination drive: maybe 30 or 31GB. It may well work with 32GB - perhaps I'm just being over-cautious ...

Have a good Easter Sunday  & don't eat too many chocolate eggs  8)

Thank you again, I feel confident to try it now.

Chocolate is generally banned in our household but I have 'sneaked in' some 70% coco choc which supposedly has some health benefits!  ;D
1) Lenovo T520 i5 LL3.8 8GB ram, fast & stable
2) Medion P4 32bit LL3.8 1GB ram, quite fast & stable
3) eeePC 901 32bit LL3.8 1GB ram, fast & stable
4) eeePC 701 32bit LL3.8 1GB ram, slower & stable but small and light enough to travel with me to New Zealand when visiting family in Blenheim.
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #10 on: April 01, 2018, 08:46:32 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
if I want to clone FROM a 500GB HD would I then need a destination device not less than 500GB
Yes, that's true if you're selecting the whole of the 500GB drive to be cloned

Quote
I think I need to make a much smaller partition on the HDD for linux lite (the total size on the SDHC is only about 26GB including data and lots of additional apps). So if I create a 32GB partition on the HDD, that will allow me to create clones from HDD back to SDHC. Does that sound feasible?
Yes, that's sounds feasible. To be on the safe side you could make your partition on the HDD a bit smaller than your destination drive: maybe 30 or 31GB. It may well work with 32GB - perhaps I'm just being over-cautious ...

Have a good Easter Sunday  & don't eat too many chocolate eggs  8)
« Last Edit: April 01, 2018, 08:51:45 AM by m654321 »
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #9 on: April 01, 2018, 04:57:32 AM »
 

justme2

  • PayPal Supporter
  • Forum Regular
  • *****
  • 201
    Posts
  • Reputation: 25
  • Linux Lite Member
    • View Profile

  • CPU: Intel i5 vPro

  • MEMORY: 8Gb

  • VIDEO CARD: Intel
Mike, thanks for clarifying, the partition I wish to clone to is much larger than the data size on the SDHC. A further thought has raised its head though, if I want to clone FROM a 500GB HD would I then need a destination device not less than 500GB. I think I need to make a much smaller partition on the HDD for linux lite (the total size on the SDHC is only about 26GB including data and lots of additional apps). So if I create a 32GB partition on the HDD, that will allow me to create clones from HDD back to SDHC. Does that sound feasible?

Some descriptions of the use of dd indicate that the whole drive is copied, including empty space, so I'm still not certain.

Thanks for your time,
another UK Mike!
1) Lenovo T520 i5 LL3.8 8GB ram, fast & stable
2) Medion P4 32bit LL3.8 1GB ram, quite fast & stable
3) eeePC 901 32bit LL3.8 1GB ram, fast & stable
4) eeePC 701 32bit LL3.8 1GB ram, slower & stable but small and light enough to travel with me to New Zealand when visiting family in Blenheim.
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #8 on: March 31, 2018, 04:06:30 PM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
If I copy from my working system card to a partition on a hard disk, does the partition size have to be the same size as the card?
E.g. 32GB sdhc  copied to 500GB HDD, do I have to create a 32GB partition on the HDD or can I just 'dd' without worrying about the HDD size? I'm confused by conflicting info from google.

Thanks for your question justme2.
No, the HDD partition size doesn't have to be the same size as the card (i.e. 32GB), unless the card has, or almost has, 32GB of written space on it.

The partition on the 500GB HDD that you're cloning to,  must either be the same size or larger (never smaller) than the written space you're cloning from on your 32GB SDHC.

Let's take a hypothetical example ...

The HDD could have say just a single partition spanning the whole drive.  If  the written space on your SDHC only takes up  say 20 out of the 32GB, then it will take up 20GB on the HDD following cloning, with 480 GB either left unused or, if your HDD is unformatted, then the remaining 480GB will be left as unallocated space.

Using the same example above, you could of course clone the 20GB of written space on your SDHC, to a partition smaller than 500GB on your HDD. The important thing here is  that the partition you're cloning to is  at least the same size or larger than 20GB. Just because the device you're cloning from has a 32GB capacity, doesn' t mean your partition on the HDD has to be 32GB. 

The key thing is that the size of the written space that you're copying from your SDHC will determine the minimum size  needed for the partition receiving the cloned copy on your HDD.

Hope this helps  :)

Mike
« Last Edit: April 01, 2018, 01:21:51 AM by m654321 »
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #7 on: March 31, 2018, 02:33:57 PM »
 

justme2

  • PayPal Supporter
  • Forum Regular
  • *****
  • 201
    Posts
  • Reputation: 25
  • Linux Lite Member
    • View Profile

  • CPU: Intel i5 vPro

  • MEMORY: 8Gb

  • VIDEO CARD: Intel
I have used this method to clone one SDHC to another kept as a standby sysytem, where both cards are the same size. If I copy from my working system card to a partition on a hard disk, does the partition size have to be the same size as the card? E.g. 32GB sdhc  copied to 500GB HDD, do I have to create a 32GB partition on the HDD or can I just 'dd' without worrying about the HDD size? I'm confused by conflicting info from google.
1) Lenovo T520 i5 LL3.8 8GB ram, fast & stable
2) Medion P4 32bit LL3.8 1GB ram, quite fast & stable
3) eeePC 901 32bit LL3.8 1GB ram, fast & stable
4) eeePC 701 32bit LL3.8 1GB ram, slower & stable but small and light enough to travel with me to New Zealand when visiting family in Blenheim.
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #6 on: March 31, 2018, 05:01:02 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
You might also want to add the following to your command:
Code: [Select]
status=progress

Many thanks Torreydale.
That looks very useful, but could you add some detail about how to use it, i.e. do you add it to the 'dd' line of code as:

sudo dd if=/dev/sda of=/dev/sdb && sudo status=progress ?
« Last Edit: March 31, 2018, 09:07:07 AM by m654321 »
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #5 on: March 30, 2018, 10:43:15 PM »
 

torreydale

  • PayPal Supporter
  • Platinum Level Poster
  • *****
  • 1588
    Posts
  • Reputation: 261
  • * Forum Moderator *
    • View Profile

  • CPU: Intel i5-3230M (4) @ 3.200GHz

  • MEMORY: 16Gb

  • VIDEO CARD: Intel 3rd Gen Core processor Graphics

  • Kernel: 5.x
You might also want to add the following to your command:


Code: [Select]
status=progress
Want to thank me?  Click my [Thank] link.
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #4 on: March 30, 2018, 11:24:07 AM »
 

m654321

  • Gold Level Poster
  • *******
  • 893
    Posts
  • Reputation: 86
  • Linux Lite Member, 'Advocate' & Donator
    • View Profile

  • CPU: Intel Pentium [email protected] (2cores) on an Asus X71Q

  • MEMORY: 4Gb

  • VIDEO CARD: Intel GM45 Express Chipset

  • Kernel: 4.x
So you copy the whole disk? I like to clone only what is relevant, so for example the OS or data. The way Clonezilla does it. Livecd/-usb is also nice.
Or maybe I don't read you right?  :)

Thanks rijnsma.
Yes I copy the whole disk. The objective of the tutorial was to simply clone the whole OS drive as, in my case, LL occupies the whole drive. Sorry for not making that a bit clearer at the outset, though the title does refer to cloning a drive - not a partition.

Apparently, you can use 'dd' to clone specific partitions but I haven't had the need to do this yet.
I assume (NB: this is an assumption as I haven't checked it yet !)  that if you wanted to clone a specific partition (let's call it /dev/sda7 on drive /dev/sda) to drive /dev/sdb, then it would probably be as follows:

Code: [Select]
sudo dd if=/dev/sda7 of=/dev/sdb
« Last Edit: March 31, 2018, 05:01:32 AM by m654321 »
64bit OS (32-bit on Samsung netbook) installed in Legacy mode on MBR-formatted SSDs (except pi which uses a micro SDHC card):
2017 - Raspberry pi 3B (4cores) ~ [email protected] - LibreElec, used for upgrading our Samsung TV (excellent for the task)  
2012 - Lenovo G580 2689 (2cores; 4threads] ~ [email protected] - LL3.8/Win8.1 dual-boot (LL working smoothly)
2011 - Samsung NP-N145 Plus (1core; 2threads) ~ Intel Atom [email protected] - LL 3.8 32-bit (64-bit too 'laggy')
2008 - Asus X71Q (2cores) ~ Intel [email protected] - LL4.6/Win8.1 dual-boot, LL works fine with kernel 4.15
2007 - Dell Latitude D630 (2cores) ~ Intel [email protected] - LL4.6, works well with kernel 4.4; 4.15 doesn't work
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #3 on: March 30, 2018, 05:46:21 AM »
 

rijnsma

  • Forum Regular
  • ***
  • 212
    Posts
  • Reputation: 16
  • Never give up..
    • View Profile
So you copy the whole disk? I like to clone only what is relevant, so for example the OS or data. The way Clonezilla does it. Livecd/-usb is also nice.
Or maybe I don't read you right?  :)
 

Re: Tutorial: cloning your Linux Lite drive using the 'dd' command.
« Reply #2 on: March 29, 2018, 07:08:45 PM »
 

bitsnpcs

  • Platinum Level Poster
  • **********
  • 3237
    Posts
  • Reputation: 305
    • View Profile
    • Try to Grow

  • Kernel: 4.x
Thank You for the tutorial 8) , bookmarked.
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section