I have seen some threads about this in the forums and I know that generally the answer is “Clonezilla FTW”, however I am trying to do something more lightweight. I am very close to success but I think I am missing some steps, if anyone sees my mistake I’d love the help and also I know others have wanted to do this as well. So this is what I know so far:
I have a part clone windows image in a folder for ubuntu1804. In it there is a partitions table for sfdisk, a dd copy of the MBR, some EBR files (which appear to be empty?), a swap file uuid, and in my case 2 img files that are partclone images of the 2 partitions. I can see that there are the 2 real images and partitions and then there are the EBR’s and the Swap from the partitions file.
Something like this:
click here for Imgur of my partitions
Ok so I dug into the download, func, and partfunc, shell scripts in FOS. It looks like the following steps need to be done:
- I dd the d1.mbr file to /dev/sda
- I sfdisk the d1.partitions file to /dev/sda
- I loop through the partitions and use partclone.restore on d1p1.img to /dev/sda1
- I dd the d1p1.ebr file to /dev/sda1
- I don’t have an image for d1p2 so I just dd the d1p2.ebr to /dev/sda2
- same with d1p5, no image just the d1p5.ebr that I dd to /dev/sda5
- I hav a d1p6.img so I partclone.restore that to /dev/sda6
- I dd the d1p6.ebr to /dev/sda6
- I get the uuid out of the d1.original.swapuuids
- I use the uuid with mkswap for the -U argument and mkswap to /dev/sda5
If that is correct I should be booting up, but it just sits at a blinking cursor. I know that I could grow partitions or swap uuids, but I’ll work on that after I have a booting setup. I have flipped the order of some of the above and got the MBR to boot to a grub or a initrd, but never to the OS disk.
I am sure I am missing a simple step here. I’ll keep digging into it and post back more results and document which order produces which results. This is very useful though because if I can capture with fog and then just simply script a quick Ramdisk (I have made one with debirf already waiting to script this once I do it manually) that can auto load an OS with no interaction. Obviously this only works well if you have a bunch of the exact same machine, but it is still VERY useful.
Let me know if anyone spots a mistake in my list or the order and check back if you are interested in following my adventures lol.