Linux requires a Windows installation to start properly.
Linux requires a Windows installation to start properly.
We plan to copy /dev/nvme1n1p1 onto /dev/sda1. Keep your terminal open until you’ve saved the new disk identifier in memory. Ensure the partition at /dev/sda1 is properly prepared for an EFI setup that the UEFI firmware recognizes. Use fdisk to view and adjust the partition: it may warn about the drive being in use, but you can overlook it. Run the command to change the label if needed, then proceed.
Command (m for help): p Disk /dev/sda: [SIZE] GiB, [SIZE] bytes, [NUMBER] sectors
Disk model: [make and model]
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE
Device Start End Sectors Size Type
/dev/sda1 xxxx yyyyyy zzzzzz 512M
EFI System
### If it doesn’t say “EFI System”, change it to “EFI System” by pressing 'q' and typing the new name.
Command (m for help): t Partition number (1-4, default 4): 1
Partition type or alias: 1
Changed type of partition ‘[something not EFI System]’ to ‘EFI System’.
### Next steps: format /dev/sda1 as vfat for UEFI compatibility:
sudo mkfs.fat -F 32 /dev/sda1
Now retrieve the UUID for the new partition:
user@host ~ $ UUID=$(blkid | sed -n '/dev/sda1/ /dev\/sda1: UUID="\(.*")')
Copy the contents to the mount point:
sudo cp -aux /boot/efi/* /mnt/newEFI
Compare files using diff.
Update fstab:
sudo cp /etc/fstab /etc/fstab.bak-$(date +%y%m%d-%H:%M:%S)
sudo sed -i "s/UUID=FE72-8DEE/${UUID}/" /etc/fstab
When you restart, powering on should succeed. You may remove /mnt/newEFI if desired. If issues persist, consider using the provided link for further guidance.