[virt-tools-list] virt-install: Getting initrd 'injection' to work...

Richard W.M. Jones rjones at redhat.com
Fri Oct 22 18:38:14 UTC 2010


On Thu, Oct 21, 2010 at 11:02:41PM +0100, Martin Ellis wrote:
[...]

Kickstart is the anaconda-equivalent of preseeding.

> I've been trying to use preseeding [1] to automate installations of
> Debian-based VMs.
> [1] http://d-i.alioth.debian.org/manual/en.i386/apb.html

Another way to do this is with guestfish or virt-make-fs.  You can
make a virtual disk which contains any file(s) you like, so you'd do
something like:

  mkdir /tmp/data
  vi /tmp/data/preseed
  virt-make-fs --partition --type=ext3 --size=10G -- /tmp/data disk.img

Then if you boot with disk.img attached, the file will appear as
'<mountpoint>/preseed'.

Recent versions of guestfish let you do clever stuff like:

  guestfish -N bootroot:ext2:ext4:10G:256M -m /dev/sda2 <<EOF
  upload /tmp/data/preseed /preseed
  EOF

which will create a partitioned boot/root disk image (test1.img) with
the /preseed file on virtual /dev/sda2.

Note you don't need root permissions to do any of this.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora




More information about the virt-tools-list mailing list