source: trunk/packages/sipb-xen-guest-installer/partial/ @ 494

Last change on this file since 494 was 245, checked in by price, 17 years ago

Prototype fast installer using a special guest.

Rather than poke directly in the boot sector, partition table,
etc, which caused so much pain last week (r231), we just dd
the entire disk. Then we poke at the bits that need to change
(like secrets, the hostname, the root password, the filesystem uuids).
Since this poking is distribution-dependent, we want it to be
supplied by the image, so to make that safe we run it in a VM.

The plan is

  1. source image is dd'd (in the host) to the target image
  2. special copying-installer image is booted, with access to target and to a small image containing its arguments
  3. copying-installer guest reads arguments, mounts target, runs a script with a well-known name in target, passing arguments.

Bits I haven't done yet include

  • frob grub config in the copying-installer image so it boots with init = the copying-installer script (doing this manually for testing)
  • install script into copying-installer, or into my example image, in a sane automated way (they're checked into partial/ here)
  • all the tasks the image's script ought to actually carry out
  • make this all available from remctl and the web pages.
File size: 316 bytes
2# hda is the copying-installer image itself
3# hdb is unused (was the source image)
4# hdc is the target image
5# hdd is the arguments image
7exec 3</dev/hdd
8read -r -u 3 HOSTNAME
9read -r -u 3 ROOTPW
10exec 3<&-
12mount /dev/hdc1 /mnt/new
13/mnt/new/post-copy /mnt/new "$HOSTNAME" "$ROOTPW"
14umount /mnt/new
Note: See TracBrowser for help on using the repository browser.