Busybox Initramfs Error whilst performing rsync backup !?

Something strange happened when I was performing an rsync backup of my Plex Media Server Library. After a few minutes into the backup, terminal crashed and so did Ubuntu desktop (24.04.1).

I had to perform a hard reset, but during bootup I got a Busybox Initramfs Error. I followed this link to repair the issue…

https://ostechnix.com/how-to-fix-busybox-initramfs-error-on-ubuntu/

The error was code 4 with a path like “/dev/mapper/ubuntu–vg-root”

fsck seemed to fix most of the errors but I think there were some errors it could not fix.

The root drive is a Samsung EVO SSD (1TB) and only a few years old so I would be suprised if the drive is failing.

I don’t know whether it was just a coincidence that it happened when running rsycn, or whether it was my script.

Ubuntu now boots up, but I am trying to find out whether it was my script that caused it before I try running it again.

Is there anything in this script that could have caused it ?

NOTE: I commented out the first rsync command (to backup the media) as I just wanted to test the second rsycn command (to backup the library using sudo). I have just realised that I mistakingly commented out the stop and start plex media server command, could this have caused the error ?

#!/bin/bash
# ~/.BackupScripts/./backup-plex1.sh

# backup selection
if [ -z $1 ] ; then
        echo "Parameter missing: define -onsite or -offsite"
        exit
elif [ "-onsite" = $1 ] ; then
	# check external USB HDD is connected
        if ! mount | grep -q /media/backPlex1ON; then
          echo "Onsite HDD not mounted"
          exit
        else
	  echo "+++++++++++++++++++++ Performing onsite backup +++++++++++++++++++++"
	fi
elif [ "-offsite" = $1 ] ; then
	# check external USB HDD is connected
        if ! mount | grep -q /media/backPlex1OFF; then
          echo "Offsite HDD not mounted locally"
          exit
        else
          echo "+++++++++++++++++++++ Performing offsite backup +++++++++++++++++++++"
        fi
else
        echo "$1 invalid: define -onsite or -offsite"
        exit
fi

# rsync command excludes
rsync_excludes="--exclude '*.ini' \
    --exclude '*.DS_Store' \
    --exclude '**/\$RECYCLE.BIN' \
    --exclude '**/\lost+found' \
    --exclude '*.AppleDouble' \
    --exclude '*.localized'"

# rsync command configuration
if [ "-onsite" = $1 ] ; then
        cmd_rsync="/usr/local/bin/rsync"
        rsync_options="-a --progress -l --delete $rsync_excludes"
elif [ "-offsite" = $1 ] ; then
        cmd_rsync="/usr/local/bin/rsync"
        rsync_options="-a --progress -l --delete $rsync_excludes"
fi

echo "********************* Performing rsync backup of Plex 1 *********************"
if [ "-onsite" = $1 ] ; then
        src_rsync=/media/plex1/                            	  # end with trailing slash
        dest_path=/media/backPlex1ON                    # do not end with trailing slash
        mkdir -p /media/backPlex1ON                     # do not end with trailing slash
elif [ "-offsite" = $1 ] ; then
        src_rsync=/media/plex1/                            	  # end with trailing slash
        dest_path=/media/backPlex1OFF                   # do not end with trailing slash
        mkdir -p /media/backPlex1OFF                    # do not end with trailing slash
fi
#        eval $cmd_rsync $rsync_options --dry-run $src_rsync $dest_path


	# rsync -a -b --progress -l --delete --exclude-from ~/.BackupScripts/exclude_plex.txt /media/plex1 /media/freeflyer/BackupPlex1


echo "********************* Performing rsync backup of Plex 1 Library *********************"
if [ "-onsite" = $1 ] ; then
        src_rsync="/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/"     # end with trailing slash
        dest_path="/media/backPlex1ON/Plex\ Media\ Server"                     		# do not end with trailing slash
echo $arx_rsync
        mkdir -p "/media/backPlex1ON/Plex Media Server"                      		# do not end with trailing slash
elif [ "-offsite" = $1 ] ; then
        src_rsync="/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/"     # end with trailing slash
        dest_path="/media/backPlex1OFF/Plex Media Server"                     	# do not end with trailing slash
        mkdir -p "/media/backPlex1OFF/Plex Media Server"                      		# do not end with trailing slash
fi

#	sudo service plexmediaserver stop

        eval $cmd_rsync $rsync_options $src_rsync $dest_path

#	sudo service plexmediaserver start

# To wrap comments...
#:<<COMMENT
#COMMENT

Also, I use webmin which says there are 19 package updates. But when I try to updare it fails with the following error…

Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-headers-generic : Depends: linux-headers-6.8.0-50-generic but it is not installable
 linux-image-generic : Depends: linux-image-6.8.0-50-generic but it is not going to be installed
                       Depends: linux-modules-extra-6.8.0-50-generic but it is not installable
E: Unable to correct problems, you have held broken packages.
1 Like

Were you able to isolate this?

I am running into a similar (you were rsyncing, I was copying) situation.

Copying a ton of files from an external harddrive on to my thinkpad’s main harddrive (fresh 24.10 installation with LVM and encryption) at some point crashes and I get a “waiting for…” message.

Attempting some power button magic gets me dropped into busybox.

Some more attempts at exiting

There is really no way out of it other than a hard reset or two, which lets me boot into Ubuntu eventually (advanced boot menu pops up first) and all seems fine. Well fine, I did notice some things weren’t stored to the harddrive (some last settings and the copying process was of course never completed).

I just don’t want to touch an eternal harddrive again. I am spooked now. What was going on there. Why was it waiting for the drive it was copying TO… (would be easier to understand waiting for the external drive if that got hung up some how).

I found a bunch of folks (like you) with a similar issue, but none quite like it. What sucks is that this drastically decreases the level of trust I have in my fresh out of the box laptop right now… will this happen every time I copy files? Did it have to do with file size, with the fact it was from an external hard drive, etc.?

An hour after I observed this incident (easy to replicate), firmware updater drops a stability update for the harddrive (Samsung NVMe SSD or something) firmware. I haven’t yet retried if that may fix it. It seems to be related to the LVM full disk encryption. Maybe I should revert and install the system without it (just home folder encryption or so)?

Machine: brand new Leonovo TP X13, fresh Ubuntu 24.10 installation with LVM/encryption.

I have only seen that busybox initramfs error once and it was quickly solved by running a filesystem check, fsck, on the root partition of the machine at fault.

Mine was a standard ext4 formatted system without LVM and I do not know if that would make any difference in your case as my knowledge of LVM is just about zero but it may be worth trying if fsck works on LVM encrypted systems.

in general terms: why would copying files from an external drive to one’s hard drive result in this sort of crash at all?