55
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 28 Sep 2024
55 points (96.6% liked)
Linux
48182 readers
1675 users here now
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
founded 5 years ago
MODERATORS
I think it would work, but it seems a little overcomplicated, you can just use the partition paths as
if
andof
ofdd
directly, as long as the output partition is not smaller than the input partition. For exampledd if=/dev/sdc1 of=/dev/sdd1 bs=4M status=progress
Your method would also copy the partition table I suppose, which might be something you want under specific circumstances, but then it would be a little harder to get the count right, just taking the size of partition 1 would be wrong, because there is some space before it (where the partition table lives) and dd would start at 0. You'd need to add up the start position and the size of partition 1 instead.
Personally I would prefer making a new partition table on the new eMCC, and create a target partition on it. Then you clone the content of the partition (i.e. the file system). This way the file system UUID will still be the same, and the fstab should still work because these days it usually refers to mounts by filesystem UUID in my experience.
If you make the target partition larger than the source partition, and you intend to use the full partition going forward you will additionally need to resize the filesystem to fit the new larger partition, for example with
resize2fs
.This is the way!
Way simpler than using any GUI tool or somehow recreating the partition and manually copying the files.