Open mrumel opened 3 years ago
Strangely, for the first time ever (I use rpi-clone on a daily basis with up to date Raspbian on RPi4) I have just had that exact same error cloning to a second SSD from the main SSD. I do this cloning regularly as I'm constantly experimenting with and writing about various RPi4-based projects. "Can't have a partition outside the disk".
So you know what I'm talking about - here are my standard functions in /ryc/bash.bashrc below (user PI can use them without any prefix or parameters)- been using for a LONG time on a daily basis before experimenting. The functions starting with CCLONE are clean clones - including partitioning - the others assume pre-used SSDs or SDs.
SO I am at a loss as to why even a CCLONE is failing now from the main SSD to the backup SSD when it has always worked. Any pointers appreciated. If I find out why this happened I will of course report back.
#optional hostnames in 4 functions below
clone () {
printf "${LIGHTBLUE}Creating a quick clone on SDA${NC}\n"
touch /home/pi/clone-date
bashCmd=(sudo rpi-clone -U sda)
if [ -n "$1" ]; then
bashCmd+=(-s "$1")
fi
"${bashCmd[@]}"
}
cclone () {
printf "${LIGHTRED}Creating a full clone on SDA${NC}\n"
touch /home/pi/clone-date
bashCmd=(sudo rpi-clone -f -U sda)
if [ -n "$1" ]; then
bashCmd+=(-s "$1")
fi
"${bashCmd[@]}"
}
cloneb () {
printf "${LIGHTBLUE}Creating a quick clone on SDB${NC}\n"
touch /home/pi/clone-date
bashCmd=(sudo rpi-clone -U sdb)
if [ -n "$1" ]; then
bashCmd+=(-s "$1")
fi
"${bashCmd[@]}"
}
clonem () {
printf "${LIGHTBLUE}Creating a quick clone on MMCBLK0${NC}\n"
touch /home/pi/clone-date
bashCmd=(sudo rpi-clone -U mmcblk0)
if [ -n "$1" ]; then
bashCmd+=(-s "$1")
fi
"${bashCmd[@]}"
}
ccloneb () {
printf "${LIGHTRED}Creating a full clone on SDB${NC}\n"
touch /home/pi/clone-date
bashCmd=(sudo rpi-clone -f -U sdb)
if [ -n "$1" ]; then
bashCmd+=(-s "$1")
fi
"${bashCmd[@]}"
}
cclonem () {
printf "${LIGHTRED}Creating a full clone on MMCBLK0${NC}\n"
touch /home/pi/clone-date
bashCmd=(sudo rpi-clone -f -U mmcblk0)
if [ -n "$1" ]; then
bashCmd+=(-s "$1")
fi
"${bashCmd[@]}"
}
cclonec () {
printf "${LIGHTRED}Creating a full clone on SDC${NC}\n"
touch /home/pi/clone-date
bashCmd=(sudo rpi-clone -f -U sdc)
if [ -n "$1" ]; then
bashCmd+=(-s "$1")
fi
"${bashCmd[@]}"
}
clonec () {
printf "${LIGHTBLUE}Creating a quick clone on SDC${NC}\n"
touch /home/pi/clone-date
bashCmd=(sudo rpi-clone -U sdc)
if [ -n "$1" ]; then
bashCmd+=(-s "$1")
fi
"${bashCmd[@]}"
}
I am getting this error with the script when I try and run it on Ubuntu 20.04 LTS for ARM64. I know the script name is "wrong" when I copied it, I accidently used the wrong name.
For additional debugging help, here's the output from lsblk: