I had created the partition 5 as a space for the new /efi partition. but I will delete it since I will shrink partition 2 to make room for expanding partition 1.
Cheers,
David Rapp
I had created the partition 5 as a space for the new /efi partition. but I will delete it since I will shrink partition 2 to make room for expanding partition 1.
Cheers,
David Rapp
My last attempt at resizing a vfat partition failed. I could expand the partition but I couldn’t expand the vfat file system to fill the allotted space.
For the new esp partition you should add the “boot and esp” flag. I don’t think it has a functional effect but makes things clearer.
50M for the esp, you’re stingier than MS.
I experienced the same thing you did. I expanded the partition but could not expand the vfat file to fill the space. I have copied /boot/efi/EFI to /esp/ (1GiB) but I am not sure how to set boot and esp flags. Is that LABEL?
BTW, here is the new disk (nvme) info:
sudo parted -l
Model: SAMSUNG MZVL4512HBLU-00BH1 (nvme)
Disk /dev/nvme0n1: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 1050MB 1049MB fat16 EFI System Partition boot, esp
2 1102MB 365GB 364GB ext4 linux-home
3 365GB 472GB 107GB ext4
4 472GB 507GB 34.4GB linux-swap(v1) swap
5 507GB 508GB 1049MB EFI System Partition msftdata
Note the new partition is #5.
I would like you to mount nvme0n1p5 to /mnt/p5 or whatever temporary mountpoint you create so that I can see the output of
ls -l /mnt/p5/EFI/rocky
You need to make a backup of fstab and a copy to edit the mountpoint for /boot/efi. I use suffixes like fstab.p1 and fstab.p5 for this purpose. Then edit fstab.p5 for the new UUID for boot/efi on p5.
excerpt from my fedora system:
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=7fe29e9e-700f-4134-a905-701faf99b38e / ext4 defaults,discard,noatime 1 1
UUID=72F9-4C39 /boot/efi vfat umask=0077,shortname=winnt 0 0
Please put any command output in a code block when you post here as it makes it so much easier to read.
I’ve got to head to work so will have to pickup tonight.
Picking up from earlier.
Once you have confirmed that the EFI/rocky folder on p5 matches the contents on p1 you can then overwrite the folder /etc/fstab with /etc/fstab.p5 . Doing so won’t effect your ablility to boot, it will just effect future updates to the system files when you update with dnf. Both esp’s point to the same place in “/” to boot your system and all read on boot by the efifirmware.
The next step is to register the new p5 partition with efibootmgr. It has a man page that is helpful for you to read. I’ve cobbled an example command below.
efibootmgr -d /dev/nvme0n1 -p 5 -c -L rocky10 -l '\EFI\rocky\shimx64.efi'
Once you do this it will become the first entry in the firmware boot menu, but unless you use that menu you won’t notice a change. Check the path portions of that command the parts after " -d " and " -l " before applying.
Hi,
I do not know how to put the command output into a code block. If you can, please coach me.
The left hand icon on the editor menu allows you to switch to the “mark down editor” the other is “rich text”. You want the mark down mode. Then selecting the icon that looks like this " </> " will present you with a blue highlighted field in which to paste the output you copied from your terminal. I assume you are using the gnome-terminal.
Once you paste the output you need to arrow past the bottom 3 dots to continue with non output text.
Negative. I have KDE and I am using Konsole.
I am unable to mount /esp/EFI to /mnt/p5. I used:
mount -t vfat /esp/EFI /mnt/p5.
I also tried:
mount /dev/nvme0n1p5 /mnt/p5
correction:
mount -t vfat /nvme0n1p5 /mnt/p5
You have to be the super user to do these commands including making the directory p5 under /mnt.
sudo mount -t vfat /dev/nvme0n1p5 /mnt/p5
What are the error messages?
That command does not result in an error message. However, ls -l of /mnt/p5 results in:
# ls -l /mnt/p5/
total 0
Als, thos is confusing me:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 66.8M 1 loop /var/lib/snapd/snap/core24/1643
loop1 7:1 0 144.1M 1 loop /var/lib/snapd/snap/duplicity/811
loop2 7:2 0 49.3M 1 loop /var/lib/snapd/snap/snapd/26865
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 1000M 0 part /boot/efi
├─nvme0n1p2 259:2 0 339G 0 part /home
├─nvme0n1p3 259:3 0 100G 0 part /
├─nvme0n1p4 259:4 0 32G 0 part [SWAP]
└─nvme0n1p5 259:5 0 1000M 0 part /mnt/p5
/mnt/p5
What is that /mnt/p5 at the end?
I added LABEL=EFI to partition nvme0n5 and lsblk now looks like this:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 66.8M 1 loop /var/lib/snapd/snap/core24/1643
loop1 7:1 0 144.1M 1 loop /var/lib/snapd/snap/duplicity/811
loop2 7:2 0 49.3M 1 loop /var/lib/snapd/snap/snapd/26865
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 1000M 0 part /boot/efi
├─nvme0n1p2 259:2 0 339G 0 part /home
├─nvme0n1p3 259:3 0 100G 0 part /
├─nvme0n1p4 259:4 0 32G 0 part [SWAP]
└─nvme0n1p5 259:5 0 1000M 0 part /mnt/p5
/mnt/p5
i.e. no change
I changed the flags for nvme0n1p5per your advice and recopied the contents of /boot/efi/EFI tp /esp. Here’s what I get:
# ls -l /esp/EFI/
total 8
drwx------. 2 root root 4096 Jun 9 21:36 BOOT
drwx------. 2 root root 4096 Jun 9 21:36 rocky
root@zbook:~# ls -l /esp/EFI/BOOT/
total 1132
-rwx------. 1 root root 1036024 Jun 10 19:08 BOOTX64.EFI
-rwx------. 1 root root 119736 Jun 10 19:08 fbx64.efi
root@zbook:~# ls -l /esp/EFI/rocky/
total 7988
-rwx------. 1 root root 104 Jun 10 19:08 BOOTX64.CSV
-rwx------. 1 root root 164 Jun 10 19:08 grub.cfg
-rwx------. 1 root root 4200776 Jun 10 19:08 grubx64.efi
-rwx------. 1 root root 874808 Jun 10 19:08 mmx64.efi
-rwx------. 1 root root 1036024 Jun 10 19:08 shim.efi
-rwx------. 1 root root 1036024 Jun 10 19:08 shimx64.efi
-rwx------. 1 root root 1019168 Jun 10 19:08 shimx64-rocky.efi
root@zbook:~# ls -l /boot/efi/EFI/BOOT/
total 1130
-rwx------. 1 root root 1036024 May 22 17:00 BOOTX64.EFI
-rwx------. 1 root root 119736 May 22 17:00 fbx64.efi
root@zbook:~# ls -l /boot/efi/EFI/rocky/
total 7984
-rwx------. 1 root root 104 May 22 17:00 BOOTX64.CSV
-rwx------. 1 root root 164 Apr 1 22:28 grub.cfg
-rwx------. 1 root root 4200776 May 22 17:00 grubx64.efi
-rwx------. 1 root root 874808 May 22 17:00 mmx64.efi
-rwx------. 1 root root 1036024 May 22 17:00 shim.efi
-rwx------. 1 root root 1036024 May 22 17:00 shimx64.efi
-rwx------. 1 root root 1019168 May 22 17:00 shimx64-rocky.efi
ESP ( efi system partition ) is just a term that describes the function of the partition. It has no place in a path statement.
Unfortunately I’m unable to decipher what you have done at this late hour for me. It is evident to me that I am unable to convey what needs to be done. Thus the better path is to just reinstall.
Thanks for all your help. I truly appreciate it.
Cheers,
David Rapp