pop-os / upgrade

Utility for upgrading Pop!_OS and its recovery partition to new releases.
GNU General Public License v3.0
95 stars 29 forks source link

"failed to copy "/recovery/casper-*" to "/boot/efi/EFI/Recovery..." #290

Open jackfranklin opened 2 years ago

jackfranklin commented 2 years ago

I started the upgrade to the latest OS last night and have hit a few road bumps along the way. I've tried to unblock myself at each step (and accept I may have made things worse!) but here's a log of what happened in case you can provide any help - or if it can help with any bugs in the upgrader :)

Running the upgrade via the GUI in settings first gave me:

So I then tried:

pop-upgrade recovery upgrade from-release

This failed with this error:

Recovery upgrade status: recovery upgrade aborted: failed to write version of ISO now stored on the recovery partition

I did df -h and it showed that /recovery is 73% full: 2.9GB of the 4GB partition is used. The upgrader seems to download ~3gb so I reasoned that maybe I should clear out /recovery before trying again (as per the docs here).

So I try:

sudo bash -c "rm -rf /recovery/casper-*" && pop-upgrade recovery upgrade from-release

However, /recovery is read-only. So I then remount it:

sudo mount -o remount,rw /dev/sdc2 /recovery

I can then delete the old files, and kick off the upgrader again. Unfortunately now I get this error:

Recovery upgrade status: recovery upgrade aborted: failed to copy kernel to recovery

Caused by:
    failed to copy "/recovery/casper-ACF7-DE6A/initrd.gz" to "/boot/efi/EFI/Recovery-ACF7-DE6A/initrd.gz": No such file or directory (os error 2)

I then ran:

journalctl -u pop-upgrade

And see logs that look like this:

Apr 28 20:25:36 pop-os pop-upgrade[5719]: rsync: [receiver] open "/recovery/dists/unstable/Release.gpg" failed: Read-only>

So it seems that /recovery is being remounted as read-only, which I wouldn't expect (given that I'd remounted it as rw).

The output of systemctl status pop-upgrade is:

jack@pop-os:~$ systemctl status pop-upgrade
● pop-upgrade.service - Pop Upgrade Daemon
     Loaded: loaded (/lib/systemd/system/pop-upgrade.service; disabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-04-29 15:42:58 BST; 36min ago
   Main PID: 3196 (pop-upgrade)
      Tasks: 18 (limit: 38362)
     Memory: 3.3G
        CPU: 2min 16.697s
     CGroup: /system.slice/pop-upgrade.service
             └─3196 /usr/bin/pop-upgrade daemon

Apr 29 16:02:24 pop-os pop-upgrade[3196]:                     kind: Other,
Apr 29 16:02:24 pop-os pop-upgrade[3196]:                     error: "failed to copy \"/recovery/casper-ACF7-DE6A/initrd.gz\" >
Apr 29 16:02:24 pop-os pop-upgrade[3196]:                 },
Apr 29 16:02:24 pop-os pop-upgrade[3196]:             },
Apr 29 16:02:24 pop-os pop-upgrade[3196]:         ),
Apr 29 16:02:24 pop-os pop-upgrade[3196]:     ),
Apr 29 16:02:24 pop-os pop-upgrade[3196]: )
Apr 29 16:02:24 pop-os pop-upgrade[3196]: [INFO ] daemon/mod.rs:829: recovery upgrade result: Err(Anyhow(failed to copy kernel>
Apr 29 16:02:24 pop-os pop-upgrade[3196]: Caused by:
Apr 29 16:02:24 pop-os pop-upgrade[3196]:     failed to copy "/recovery/casper-ACF7-DE6A/initrd.gz" to "/boot/efi/EFI/Recovery>

In case it's useful, the output of /etc/fstab is:

jack@pop-os:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system>  <mount point>  <type>  <options>  <dump>  <pass>
PARTUUID=a266f9d1-df97-4289-b942-490ef7cd1d5f  /boot/efi  vfat  umask=0077  0  0
PARTUUID=2631dbc6-70f3-4304-9803-e1bad47162f1  /recovery  vfat  umask=0077  0  0
UUID=0b4951f3-b505-442a-a68d-f3d0dca9b930  /  ext4  noatime,errors=remount-ro  0  0
/dev/mapper/cryptswap  none  swap  defaults  0  0

Please let me know if I can provide any further details, and thanks in advance for any assistance :)

jaychow commented 1 month ago

same issue:

checking if pop-upgrade requires an update
Recovery event: fetching recovery files
Fetched 2890/2935 MiB
Recovery event: verifying checksums of fetched files
Recovery event: syncing recovery files with recovery partition
Recovery upgrade status: recovery upgrade aborted: failed to copy kernel to recovery

Caused by:
    failed to copy "/recovery/casper-09E8-9D3D/initrd.gz" to "/boot/efi/EFI/Recovery-09E8-9D3D/initrd.gz": Not a directory (os error 20)