0

The context

I have a dual-boot Ubuntu (Jammy Jellfish)/Windows laptop (Dell XPS 9550). My /boot partition was too small to support an update, so I used GParted to attempt to resize it. However, I ran into a GParted bug around resizing FAT partitions, so instead used the workaround approach of deleting the partition, formatting it as Ext4, resizing it, and then reformatting it as FAT and restoring my /boot files from a backup.

The problem

Here's where the problem occurs: every time I try to restore my files from the backup, there are four files:

  • vmlinuz
  • initrd.img.old
  • vmlinuz.old
  • initrd.img

...that return the error cp: cannot create symbolic link '/mnt/new_boot/./<FILE_NAME>': Operation not permitted.

I'm wondering what the best approach is to move forward. I assume I cannot expect my system to boot without these files. Is there a way to successfully copy them over? If not, is it safe to create new symlinks with the same names, pointing to the relevant versions of vmlinuz-VERSION-generic and initrd.img-VERSION-generic? If I take that approach, what permissions do those files require? Or is it better to somehow restore from a Ubuntu Live USB? I'm a bit out of my depth here; any help is appreciated.

  • Two things ... One is strange: /boot partition on FAT ... And the other is a fact: FAT doesn't support symbolic links ... Am I missing something here? – Raffa May 25 '23 at 15:42
  • @Raffa - yes, I was starting to notice the same thing as I was trying to create my own symlinks based on Jos's advice below. However, I just verified from previous screenshots I took before formatting that the boot partition was previously formatted FAT32, and contained symlinks, and was happily booting into GRUB as expected before I started down this path. So, I'm not sure what's going on with that... – Alexander Nied May 25 '23 at 15:52
  • How big was that partition's size before you resize it? – Raffa May 25 '23 at 16:05
  • 99MB, which I subsequently sized up to 499MB. – Alexander Nied May 25 '23 at 16:06
  • There is a slim possibility that you were looking at not /boot but rather /boot/efi which is actually akin to the FAT family but totally different in function from /boot which should be an EXT* family filesystem ... Might this be the case? – Raffa May 25 '23 at 16:10
  • @Raffa-- on review, this is 100% the case (-‸ლ) I've always mounted it at /boot when swapping Linux installs so I got confused. As you can see I'm out of my area of knowledge by quite a bit. Would you be able to point me to the appropriate resources for troubleshooting now that we know I've mismatched partition types? – Alexander Nied May 25 '23 at 16:19
  • Is your boot partition/directory intact? if yes, then recreate the EFI partition https://askubuntu.com/questions/1394708/accidentally-deleted-efi-partition-system-is-still-running and you should be good to go ... You can do that from a live USB as well. – Raffa May 25 '23 at 16:29
  • How exactly did you create the backup, how exactly do you try to restore it? Please add this information to the question. – Bodo May 25 '23 at 16:40
  • I was under the impression that we were talking about a system that was restored from backup. Obviously a Linux /boot partition can't be formatted as FAT32. Should I remove my answer? – Jos May 25 '23 at 17:21
  • @Jos — might still be useful for visitors to the post. Although given that I was on the wrong path all along I might delete the question. I'll probably wait until I actually resolve the issue to determine whether or not there is anything useful I can contribute to the site, or if it is just cruft that should be removed. Thanks for weighing in, either way! – Alexander Nied May 25 '23 at 17:54

1 Answers1

0

You will need to create the links yourself as root.

Being links, they will automatically have the correct permission lrwxrwxrwx. There is no reason this approach shouldn't work.

Jos
  • 29,224