3 ms·
Not needed anymore since DO supports custom OS images now but I found this script quite interesting, setting up a "blockplan" and applying it from a minimal roo
by lloeki 8y ago
Not needed anymore since DO supports custom OS images now but I found this script quite interesting, setting up a "blockplan" and applying it from a minimal root FS in RAM to entirely replace a Debian OS with an ArchLinux install unattended and without rebooting (except as a very last step to actually boot into the Arch kernel using the replaced GRUB2)
https://github.com/gh2o/digitalocean-debian-to-arch#how-it-works https://github.com/gh2o/digitalocean-debian-to-arch#how-it-w...
I forked it to try and convert Debian installs from ext4 to btrfs. Unfortunately while it does work, that's a very bad idea since btrfs-convert produces a fs that fails to operate properly on the long run (IIRC there is - was? - some increasing random space usage that cannot be reclaimed, ever).
https://github.com/lloeki/digitalocean-ext4-to-btrfs/blob/master/ext2btrfs https://github.com/lloeki/digitalocean-ext4-to-btrfs/blob/ma...
BTW, the process to convert to btrfs is excellent, only creating btrfs metadata in unallocated ext3 space, writing the btrfs header at the last minute, and using subvolumes allowing you to keep the ext3 metadata around as long as you want to roll back (obviously losing any subsequent modifications) because barring the header the whole ext filesystem and data is untouched.
https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3 https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3
I suppose Apple did something similar to convert from HFS+ to APFS so swiftly and so reliably.