I’m not coming up with a lot of useful (clear) results when searching for a solution to this issue.

Is it OK to simply dd the 128GB disk to the 32GB disk using count to stop after the 16GB partition was cloned?

A bit more context: I had to clone a 16GB eMMC and only had a 128GB SD around. Now I purchased a 32GB eMMC and want to clone it again. The partition holds a root filesystem for an ARMv8 device. I don’t have the 16GB eMMC anymore, that would have been the easy way out.

@InFerNo@lemmy.ml you should do the partition not the whole disk. Then create a new partition in the 32gb disk or mount the dd file with a loopback device and transfer the files to the whole 32gb disk

permalink
report
reply
4 points

It’s a root fs for an ARM device. I can’t simply copy the files over.

permalink
report
parent
reply
2 points

Is the system Linux? If so, then yes you can. Rsync it on to the newly created device get the uiid and fix up the fstab and boot loader configs and you are back in business.

permalink
report
parent
reply
20 points
*

I’d use clonezilla

E: It’s not that it can’t be done other ways, it’s just clonezilla will work and has worked for nearly 2 decades. Also there’s no information provided above about the data. So clonezilla is nice if it’s a complicated scenario.

Plus, it’s a nice tool to throw in the toolbox once you know how to use it.

E. Why do you feel like you have to use something like dd for this particular task? Less than 16 GB of data? Ya probably could have copied it over manually by now.

permalink
report
reply
2 points

It’s not an active partition/disk I want to clone. Clonezilla seems like something I need to boot into?

permalink
report
parent
reply
2 points

Yes, Clonezilla runs off a live USB. If it is large enough it can also store the partition you want to clone, making the whole process a lot simpler.

permalink
report
parent
reply
3 points

Use a clonezilla boot usb. I did exactly what you’re trying with clonezilla: 16gb partition on a 128gb ssd to a 64gb ssd. The clone disk is in a production machine rn and has been for two months.

permalink
report
parent
reply
4 points

You can run clonezilla on your shell session, just apt install conezilla (or whatever variant you’re using) and it can do the trick. Dd will almost surely work too, but that leaves a ton of responsibility to you instead of making any sanity checks on the way. That makes dd very powerful tool and it has saved my ass a multiple times, but if you already have a working partitioning schema clonezilla has a ton of options to make your life a lot simpler and a likely a bit faster than dd.

permalink
report
parent
reply
3 points

Could be - just try it ig. And even if not, just create a new partition on the 32 GB disk and then dd it over.

permalink
report
reply
1 point
*
Deleted by creator
permalink
report
parent
reply
2 points

If it’s normal files, yeah. If the partition is complicated to replicate, or encrypted etc., then just dd’ing the partition would be easier

permalink
report
parent
reply
5 points
*

@InFerNo if it’s not a boot drive, you can use gparted to copy the partition over - it’s copy and paste, literally. Then set flags using gparted as well. If it’s a boot drive you’ll need an additional step after to use boot-repair to fix the boot sector and load grub onto it.

It’s really simpler than it sounds, I’ve used it a few times myself. You can also use an #Ubuntu iso to execute this process after booting from it to ensure the 16GB partition is not in use when trying to copy it.

#Linux

permalink
report
reply
1 point

INFO: What filesystem does your source drive/partition have?

permalink
report
reply
1 point

ext4

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 8.4K

    Monthly active users

  • 3.4K

    Posts

  • 40K

    Comments