Closed Philtass closed 1 year ago
PS: last successfull save was 19th january 2023
I did'nt check logs before today, shame on me !
Thank's for fixing or tell me what to do for
Hi @Philtass, can you confirm that the devices exists with the command: sudo fdisk -l
Hi viniciuspaes !
sudo fdisk -l gives (at the end):
...
Disk /dev/sda: 29,8 GiB, 32010928128 bytes, 62521344 sectors
Disk model: Storage Device
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Looking the log you have the OS installed in the SD card (/dev/mmcblk0) Then /dev/mmcblk0p1 is the boot partition and /dev/mmcblk0p2 is the OS.
You want to clone everything to the SDA (assuming external drive). The RPI clone is not recognizing the label for SDA.
The command you used to clone was: sudo rpi-clone sda
Correct?
Yes
previously I used "sudo rpi-clone sda -U" with same result
It is weird that even parted is not recognizing SDA.
Double check if the command output the partitions: cat /proc/partitions
$ cat /proc/partitions major minor #blocks name
1 0 4096 ram0 1 1 4096 ram1 1 2 4096 ram2 1 3 4096 ram3 1 4 4096 ram4 1 5 4096 ram5 1 6 4096 ram6 1 7 4096 ram7 1 8 4096 ram8 1 9 4096 ram9 1 10 4096 ram10 1 11 4096 ram11 1 12 4096 ram12 1 13 4096 ram13 1 14 4096 ram14 1 15 4096 ram15 179 0 7815168 mmcblk0 179 1 262144 mmcblk0p1 179 2 7544832 mmcblk0p2 8 0 31260672 sda
Just googled and saw some issues with parted. It is possible to create the label manually in case of corrupted or unrecognized disk label.
Have you tried to format the external disk manually already, to see the results?
Not for the moment. I'm not sure of parameters.
I see sda1 should be a fat32 and sda2 an ext3 but I never used command line to format a disk. I don't want to make a mess.
Coul'd you give the right commands ?
Plug the external drive in your desktop computer. If using windows, try to format the drive and do some tests.
Then plug it again in the RPi and try the clone process. I did this way with my RPi 4 and worked in the first try.
Don't worry about creating the partitions, just check if the drive is working properly first.
I use linux. Have you a command line to format..
Sure, hang on.
Ok try that
To erase the external drive (double check if the external drive is mounted as /dev/sda) sudo dd if=/dev/zero of=/dev/sda bs=16M
Using fdisk to create the partitions: sudo fdisk /dev/sda
Don't worry with the filesystem yet, just try to run rpi-clone.
ok done that: Device Boot Start End Sectors Size Id Type /dev/sda1 2048 526335 524288 256M c W95 FAT32 (LBA) /dev/sda2 526336 62924799 62398464 29,8G 83 Linux
Nice, test the rpi-clone now.
I run rpi-clone, it seems to work (it's long)
bad news: sudo rpi-clone sda
Run setup script : no. Verbose mode : no. -----------------------:
Ok to proceed with the clone? (yes/no): y
Syncing file systems (can take a long time) Syncing mounted partitions: Mounting /dev/sda2 on /mnt/clone => rsync // /mnt/clone with-root-excludes ...rsync: recv_generator: mkdir "/mnt/clone/var" failed: Bad message (74) Skipping any contents from this failed directory rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]
mkdir: impossible de créer le répertoire « /mnt/clone/boot »: Message invalide Mounting /dev/sda1 on /mnt/clone/boot mount: /mnt/clone/boot: cannot mount; probably corrupted filesystem on /dev/sda1. Mount failure of /dev/sda1 on /mnt/clone/boot. unmounting /mnt/clone Aborting!
sorry for weird formated text
The SD card you are trying to clone, what OS do you have installed?
It is possible to manually create the boot partition, and then you just rsync the second partition (sda2).
It's a standard raspbian, for a domoticz server.
on a RPI 3B
I did'nt check logs before today, shame on me !
Why don't you create a small wrapper script which calls rpi-clone and sends a failure eMail to you if rpi-clone fails :wink:
Hi framps. Good idea !
But first I'd like to fix rpi-clone. Any Idea ?
Do you have another external drive available? So we can isolate the problem.
I try with another SD card with only one partition. rpi-clone creates the 2 partitions and continues... for the moment
done successfully ! The problem came from the SD card I guess
Thanks for help and advices !
I look at my save logs and I see that rpi-clone aborts with a message about sda1 and sda2 partitions not existing. The proble seems to occur after partition resize. See file attached, please. rpi-clone verbose output.txt