[lug] Conversion of BIOS Disks to UEFI (non-destructive)
D. Stimits
stimits at comcast.net
Thu Apr 25 16:02:48 MDT 2019
This is more or less curiosity (and fun), although I do have a use for this, but I am speculating on what might be a means of migrating an old style BIOS disk partition scheme into a UEFI scheme without destroying the content. I'm thinking it wouldn't be easy, but I'm curious if anyone here might have experience with that or just any interesting insight into this brain teaser (I'm also thinking of regular mechanical hard drive technology and not anything solid state).
Basically, I know the UEFI partition has a protective MBR as a means of preventing some non-UEFI software from destroying a disk it thinks is empty. This is good, as it means the front matter of a BIOS disk has the same structure (though there might be edits needed to that front matter). There is also extra space at the start (beyond the protective MBR) used to hold firmware (I'm not sure of the size, but I think it might be roughly 2MB...I currently have only old style BIOS and can't look).
So task one would be to take all of the existing partitions, perhaps via an interactive BIOS style disk tool, and reduce the free space in various partitions. That space would eventually end up between the boot area and the first partition in order to hold any firmware. Once partitions have been reduced in size the difficult part would be to move them towards the end of the disk, and away from the front of the disk.
To move away from the front of the disk I'm thinking that if the first partition is small enough after resizing, then perhaps there is a way to create a new partition with that space. Then dd the content of that first partition into the free space. Finally, delete the original partition which was next to the boot area.
Now if one has a UEFI partitioned disk of the exact layout of the existing BIOS disk in terms of partition size and order, maybe it would be possible to dd the very start of the disk from boot records through the firmware to the beginning of the disk and have it "just work". This would depend on the partition boundaries in the original disk matching where the boundaries are from the dd source UEFI disk. I don't know if there is a difference in something like a partition boot record which would make this fail.
If anyone has any thoughts on whether this would work or not (and again this is just for fun) I'm curious if anyone here thinks one could do some trickery and non-destructively convert a BIOS partition style disk into a UEFI style partitioned disk.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20190425/f0d3977d/attachment.html>
More information about the LUG
mailing list