Incorrectly formatted M.2 which has a bad partition format, that does not support booting via UEFI
Full two systems already installed and in use(Fedora and win)
I need to have my system as a UEFI bootable, format the whole M.2 drive and restore the existing systems so they would still work as before.
Best solution would be creating a backup and copy/paste it with dd like dd if=/dev/sba1 of=/home/backup bs=16M
Which I’m nearly sure will have problems, what would a proper way of going about this be? Perhaps any software anyone could suggest?
P.S. lmgtfy has failed to answer this specific question
I am not sure at this moment, as I cannot check, but the problem came to me when I attempted to install fedora on the drive with UEFI, the installation stated that disk has invalid partition format(or table) and UEFI installation cannot proceed without formatting the whole drive. After I attempt the installation again, I will provide full details of this.
That reads like the m.2 has MBR partitioning. UEFI (needs/easier) GPT(GUID partition table) partitioning.
MBR has a small partition in the beginning that contain the boot loaders. GPT has a legitimate FAT32 partition(100mb-1GB depending on OS defaults when it’s a fresh drive) containing .EFI files for each OS.
Dude makes a bootloader called rEFInd that might be in Fedora repos if your lucky. Think of it like GRUB for UEFI.
But if your m.2 is MBR and you need GPT, dd is a good/safe option. Keep in mind that it copies empty space into the backup, so if you have 10GB of data in a 100GB partition, the resulting image will be 100GB for the command you have listed in OP
Drive is ~500GB, partition is ~120GB, I can do both, if necessary for a full byte to byte backup before doing anything “extreme”.
I don’t assume changing to GPT and recovering partitions would work
These are all relevant questions for safety purposes
Either way, make sure the partition being backed up/written to are NOT mounted, makes sure other things aren’t touching the data, potential read/write error prevention.
MAKE sure the partition being written to by the backup exists first or dd will put data where you don’t want it
Do you still have the bootx64.EFI in your ESP for windowzer?
May need to do a repair disk job for Windows. I don’t really remember anything about the OS and I haven’t played with 10 yet, so I probably won’t be much help here.
You can try rEFInd. I find it’s search capabilities much better then GRUB, being that you can rebuild from boot instead of having to rebuild when in OS.
Have you tried reconfiguring GRUB or whatever the hell the verb is for rebuilding the configuration of bootables is that has eluded me?
M.2 -> now efi boot, gpt partition table
HDD -> efi boot, gpt partition, has windows 10 ( that I WILL DELETE, no remorse)
Now I have a backup of the windows MBR boot partition and Windows partition (350MB and ~120GB)
I would like to restore the partition to M.2. I’ve dd’ed it back to m.2, it recognized it properly, BUT I cannot, for the love of spaghetti monster, get GRUB2 ( EFI boot ) to recognize it, I’ve also attempted to restore the boot partition of windows (350MB backup), but since the location of windows partition is invalid - it effectively would fail.