swaddle icon indicating copy to clipboard operation
swaddle copied to clipboard

Add support for creating raw disk images

Open raphaelcohn opened this issue 10 years ago • 0 comments

This is a big job

  • Are we creating partitions or entire disks? In the latter case, we need to support
    • BIOS boot sectors (MBRs)
    • Hybrid MBRs
    • Various UEFI friendly formats
    • And plain partitions
  • Which of the raw disk formats do we support?
    • Raw is easy
    • The others are hypervisor specific; we'd need good tooling to help us (the best is QEMU)
  • Which file systems?
    • ext3 / 4 is probably a must
    • as is FAT / exFAT / VFAT
    • how do we handle extended file permissions?
  • We need to manage loop back mounts, which are notorious for creating horrible re-entrancy problems
    • ie being able to run again and again, and effectively unmounting when we crash

Nearly all the tooling to do this effectively is Linux-based (eg kpartx).

Lastly, is the 'swaddling' approach the right way to do this? Arguably, yes, but many of the steps involved in building files suitable for such disk images are going to want to write directly to the mount - it's a lot easier - rather than writing to body / skeleton folders first.

raphaelcohn avatar Jan 13 '15 09:01 raphaelcohn