-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't clone if boooting from USB #19
Comments
Yes I think if you change this line 676: Change the /dev/mmcblk0 to the location of the USB drive, probably /dev/sda |
I've made that and others, but now I'm getting the following error:
|
That seems like something wrong with creating the partition on the .img file which is loaded in /dev/loop0 but I don't know why. Maybe take a look at what files are in /dev when you get the error or lsblk command to see which drives and partitions are found. I see you run the program from you home directory (~) and you write the backup to the same directory? But the home directory is this also located on your boot USB drive? This because you cannot write the backup image on the same drive as you are backing up because then it will start to copy the backup.img file into the backup.img file like an endless loop... |
I've mounted a nfs share inside the home folder. That should be a problem? |
not that should not be a problem |
I manage to make it work.
Loop devices followw mmcblk0 pattern. In some cases, string p is expected
when using sda.
Thanks a lot.
Em dom., 28 de abr. de 2024 14:07, Tom ***@***.***> escreveu:
… not that should not be a problem
—
Reply to this email directly, view it on GitHub
<#19 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADLMFTPCHWBKND426I7ROVTY7UUGFAVCNFSM6AAAAABGV2TNG6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBRGU2TONZUGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi, I am also having the same issue. How did you solve it? What does string p refers to. Thanks |
132,133c132,134
< if (!strncmp (device, "/dev/mmcblk", 11) || !strncmp(device, "/dev/loop", 9))
< sprintf (buffer, "%sp", device);
---
> if (!strncmp (device, "/dev/sda", 11) || !strncmp(device, "/dev/loop", 9))
> sprintf (buffer, "%s", device);
422c423
< if (uid) sprintf (buffer, "mkfs.fat -F 32 -i %s %s%d", uuid, partition_name (dst_dev, dev), parts[p].pnum);
---
> if (uid) sprintf (buffer, "mkfs.fat -F 32 -i %s %sp%d", uuid, partition_name (dst_dev, dev), parts[p].pnum);
444c445
< if (lbl) sys_printf ("fatlabel %s%d %s", partition_name (dst_dev, dev), parts[p].pnum, res);
---
> if (lbl) sys_printf ("fatlabel %sp%d %s", partition_name (dst_dev, dev), parts[p].pnum, res);
449c450
< if (uid) sprintf (buffer, "mkfs.ext4 -F -U %s %s%d", uuid, partition_name (dst_dev, dev), parts[p].pnum);
---
> if (uid) sprintf (buffer, "mkfs.ext4 -F -U %s %sp%d", uuid, partition_name (dst_dev, dev), parts[p].pnum);
497c498
< if (sys_printf ("mount %s%d %s", partition_name (dst_dev, dev), parts[p].pnum, dst_mnt))
---
> if (sys_printf ("mount %sp%d %s", partition_name (dst_dev, dev), parts[p].pnum, dst_mnt))
639c640
< sys_printf ("rm %s%d", partition_name (dst_dev, dev), parts[p].pnum);
---
> sys_printf ("rm %sp%d", partition_name (dst_dev, dev), parts[p].pnum);
676c677,678
< sprintf(src_dev, "/dev/mmcblk0");
---
> sprintf(src_dev, "/dev/sda"); |
Hi @tom-2015, the program can't find the sd card to clone. That is true, since I'm not using it.
Is it possible to make it generic somehow, or specify the root partition?
The text was updated successfully, but these errors were encountered: