1. 20 Feb, 2015 1 commit
  2. 17 Jun, 2013 3 commits
    • Michael Shigorin's avatar
      tar2vm: rewrote as tar2fs · d7689f30
      Michael Shigorin authored
      Overview of the changes:
      - ARM support: separate ext2 /boot, no LILO
      - avoid race condition with devmapper
      - trap ERR so that -e in shebang doesn't result in extra cleanup hassle
      - configurable root filesystem type (ext4 by default)
      - jumps through parted hoops
      
      Details:
      
      1. LILO is x86-specific while the rest of the script can be used
         to prepare e.g. Marvell ArmadaXP or CuBox images; we can generally
         count on uboot supporting ext2 for relatively sane platforms but
         not ext4 that would be a better root filesystem performance-wise.
      
      2. Apparently /dev/mapper/loopXpY can be still missing at the time
         when kpartx returns and pop up a bit later... sit there, wait
         and check for it.
      
      3. If something went wrong with any command of the script it would bail out
         due to -e in shebang; it is now better to clean up the loopback device
         and its mappings in this situation either.
      
      4. One size doesn't fit all, really.
      
      5. The parted sizing was sloppy as in broken, now it's just half insane.
         Someone's decision to stick units and auto-alignment knobs into
         a single one was apparently hilarious...
      
         http://www.gnu.org/software/parted/manual/parted.html#unit
      
      Manual loop/dm cleanup is described in documentation just in case.
      
      /boot size meter is suboptimal in terms of additional I/O incurred,
      will be most likely rewritten to make use of advance "du -s".
      d7689f30
    • Michael Shigorin's avatar
      initial deflogin feature (security sensitive!) · d22c793e
      Michael Shigorin authored
      The feature officially introduces the "engineering passwords"
      including empty ones which have been around since forever but
      weren't properly managed (and still are not, at least until
      there are no stray passwd/chpasswd/usermod calls in both the
      profile, installer-features and all the other related parts).
      
      It is based on an m-p-d init3-users script by stanv@ but was
      cleaned up and restructured in a pretty severe manner; thanks
      glebfm@ for additional discussion.
      
      This also cleans up the kludge previously stuck into build-vm.
      
      Note that vm/icewm sports graphical autologin now as well as
      the default root password (which can be overridden by passing
      ROOTPW=... to make but it is a change from the previous state
      of affairs indeed).
      d22c793e
    • Michael Shigorin's avatar
      build-{ve,vm}: handle THE_* and DOT_BASE too · ee5dd31a
      Michael Shigorin authored
      Classic VEs don't carry any kernel since these are running
      under a single OpenVZ (or potentially LXC) kernel image;
      ARM Multiboot (TWRP in this particular case) allows to boot
      off a chroot via kexec, and we need a kernel in it for that,
      obviously.
      
      No bootloader required inside such VE though.
      ee5dd31a
  3. 16 Jul, 2012 1 commit
  4. 02 Jul, 2012 1 commit
    • Michael Shigorin's avatar
      proxy CLEANUP_PACKAGES down · fcf41f22
      Michael Shigorin authored
      mkimage implementation requires that the variables
      to be passed to the scripts are to be prefixed with
      GLOBAL_ or INFO_ tags as appropriate; in this case
      the upstream makefile didn't care to.
      fcf41f22
  5. 30 Jun, 2012 1 commit
    • Michael Shigorin's avatar
      build-vm: avoid dummy raw2raw conversion · 0e9a8736
      Michael Shigorin authored
      It's better to rather just move the raw image instead
      of specifically converting it into the same, and there's
      no need for qemu-img altogether then.
      
      Let's drop the intermediate raw image after successful
      conversion as well.
      0e9a8736
  6. 25 Jun, 2012 2 commits
    • Michael Shigorin's avatar
      initial vm-{net,ssh} features · 09be84be
      Michael Shigorin authored
      A virtual machine isn't very useful if there are no means
      to access it; let's bring up the basic networking and provide
      root SSH access via pre-existing public key.
      
      As the remote access with known default credentials is roughly
      equivalent to just lending one's VMs to anyone with network
      access to it, the fallback root password is now exterminated;
      you have to provide one (or a long enough random string
      if you plan to use keys only, see e.g. apg utility).
      09be84be
    • Michael Shigorin's avatar
      initial specific VM formats support · 8a04d9b6
      Michael Shigorin authored
      Raw disk images are convenient and universal
      but there are custom formats like Qemu's qcow2
      providing additional features, e.g. copy-on-write
      or space savings.  All of this ultimately belongs
      to mkimage but in the mean time has been implemented
      here as well.
      8a04d9b6
  7. 18 Jun, 2012 1 commit
    • Michael Shigorin's avatar
      initial build-vm feature · 75f7c62b
      Michael Shigorin authored
      Yes, mkimage-profiles is now able to build VM disk images.
      So far the support is pretty basic:
      
      - a single hard drive image with a single partition/FS
      - only stock root password is configurable
      - LILO is hardwired as a bootloader
      
      The resulting images tend to boot under qemu/kvm though.
      
      Please see doc/vm.txt for the warning regarding additional
      privileges and setup required.  This was started back in
      February but I still hoped to avoid sudo/privileged helper
      (and libguestfs is almost as undistributable as can be)...
      
      Thanks:
      
      - http://blog.quinthar.com/2008/07/building-1gb-bootable-qemu-image-using.html
      - Alexey Morarash who reworked that as https://github.com/tuxofil/linsygen
      - led@, legion@, vitty@, aen@ for providing advice and inspiration
      75f7c62b