]> git.siccegge.de Git - forks/vmdebootstrap.git/blobdiff - vmdebootstrap.8.in
Create useable fstab for kfreebsd systems
[forks/vmdebootstrap.git] / vmdebootstrap.8.in
index 80df9bc0340973345118fa65e958cb20df961f2e..56afc3c2fe0ca27f7489704f5dd4e8d2e0ac4558 100644 (file)
@@ -23,13 +23,14 @@ vmdebootstrap \- install basic Debian system into virtual disk image
 .B vmdebootstrap
 [\-\-output=FILE] [\-\-verbose |\-\-no-verbose] \-\-image=FILE \-\-size=SIZE
 [\-\-tarball=FILE] [\-\-mirror=URL] [\-\-arch=ARCH] [\-\-distribution=NAME]
-[\-\-package=PACKAGE] [\-\-custom-package=DEB] [\-\-no-kernel]
+[\-\-package=PACKAGE] [\-\-custom-package=DEB] [\-\-no-kernel] [\-\-kernel-package]
 [\-\-enable-dhcp | \-\-no-enable-dhcp] [\-\-root-password=PASSWORD]
 [\-\-customize=SCRIPT] [\-\-hostname=HOSTNAME] [\-\-user=USER/PASSWORD]
 [\-\-serial-console | \-\-no-serial-console] [\-\-sudo |\-\-no-sudo] [\-\-owner=OWNER]
 [\-\-bootsize=BOOTSIZE] [\-\-boottype=FSTYPE] [\-\-roottype=FSTYPE] [\-\-foreign=PATH]
 [\-\-variant=VARIANT] [\-\-no-extlinux] [\-\-squash] [\-\-configure-apt]
-[\-\-grub] [\-\-apt-mirror] [\-\-pkglist]
+[\-\-grub] [\-\-apt-mirror] [\-\-pkglist] [\-\-use\-efi] [\-\-efi\-size]
+[\-\-debootstrapopts]
 .SH DESCRIPTION
 .B vmdebootstrap
 installs a basic Debian system into a virtual disk image,
@@ -65,6 +66,31 @@ and log into it via its console to configure it.
 The image has an empty root password and will not have networking
 configured by default. Set the root password before you configure
 networking.
+.SH NETWORKING
+The \-\-enable\-networking option uses the /etc/network/interfaces.d/
+source directory, with the default settings for
+.B lo
+and
+.B eth0
+being added to /etc/network/interfaces.d/setup. Other networking
+configuration can be specified using a customisation script.
+Localhost settings would be:
+
+ auto lo
+ iface lo inet loopback
+
+If \-\-enable\-dhcp is specified, these settings are also included
+into /etc/network/interfaces.d/setup:
+
+ auto eth0
+ iface eth0 inet dhcp
+
+For systems running newer versions of systemd, the interface name needs
+to be set in advance of the first boot instead of being dependent on the
+boot itself. See the http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
+.B vmdebootstrap
+disables this behaviour by symlinking /dev/null to /etc/udev/rules.d/80-net-setup-link.rules
+
 .SH BOOTLOADERS
 Unless the \-\-no\-extlinux or \-\-grub options are specified, the
 image will use
@@ -82,6 +108,20 @@ devices during the grub-install operation. Details of the error will appear in t
 vmdebootstrap log file, if enabled with the \-\-log option. Note that
 .B grub-legacy
 is not supported.
+.B vmdebootstrap
+also supports
+.B EFI.
+Use \-\-use\-uefi to use grub\-efi instead of grub\-pc. If the default 5Mb
+is not enough space, use the \-\-esp\-size option to specify a different
+size for the EFI partition. Registered firmware is not supported as it
+would need to be done after boot. If the system you are creating is for
+more than just a VM or live image, you will likely need a larger ESP,
+up to 500Mb.
+.B UBoot
+needs manual configuration via the customisation hook scripts,
+typically support requires adding u\-boot using \-\-package and then
+copying or manipulating the relevant u\-boot files in the customisation
+script. Examples are included for beaglebone-black.
 .SH INSTALLATION IMAGES AND VIRTUAL MACHINES
 .B vmdebootstrap
 is aimed principally at creating virtual machines, not installers or prebuilt
@@ -155,13 +195,23 @@ architecture to use (amd64) - if using an architecture which the
 host system cannot execute, ensure the \-\-foreign option is also
 used.
 .IP \-\-distribution=NAME
-release to use (stable)
+release to use (defaults to stable). The release needs to be a valid
+Debian or Ubuntu release name or codename.
 .IP \-\-package=PACKAGE
 install PACKAGE onto system
 .IP \-\-custom-package=DEB
 install package in DEB file onto system (not from mirror)
 .IP \-\-no-kernel
 do not install a linux package
+.IP \-\-kernel-package
+If \-\-no-kernel is not used and the auto-selection of the
+.B linux-image-586
+or
+.B linux-image-armmp
+or
+.B linux-image-$ARCH
+package is not suitable, the kernel package can be specified
+explicitly.
 .IP \-\-enable-dhcp
 enable DHCP on eth0
 .IP \-\-root-password=PASSWORD
@@ -214,7 +264,17 @@ Run mksquashfs against the final image using xz compression \- requires
 squashfs-tools to be installed. The final file will have the .squashfs suffix.
 By default, mksquashfs is allowed to use all processors which may result
 in high load. Run mksquashfs separately if you need to control the number
-of processors used per run.
+of processors used per run. squashfs can also have issues with large image
+files (where large is a factor of the amount of data inside the image rather
+than the size of the image itself). These errors can result in invalid
+images (e.g. image does not boot) or corrupted images (truncated file).
+This is a known bug in squashfs. Avoid using the \-\-squash option and
+consider squashing the loopback mounted directory tree of the image.
+.B
+vmdebootstrap
+will check if the squashed filesystem is less than 1MB and leave the
+unsquashed image in place with a warning about a possible squashfs
+failure.
 .IP \-\-configure\-apt
 Use the specified mirror and distribution to create a suitable apt source inside
 the VM. Can be useful if debootstrap fails to create it automatically.
@@ -227,6 +287,14 @@ available.
 Disable extlinux installation and configure grub2 instead. grub2 will be added to
 the list of packages to install. update-grub will be called once the debootstrap is
 complete and grub-install will be called in the image.
+.IP \-\-debootstrapopts
+Pass additional options to debootstrap as a quoted list of options
+and values, separated by spaces.
+e.g. --debootstrapopts="variant=buildd no-check-gpg components=main,contrib".
+See debootstrap \-\-help and debootstrap (1) for valid options.
+.IP \-\-no\-acpid
+Disable installation of acpid if not required, otherwise acpid will be
+installed if \-\-foreign is not used.
 .IP \-\-pkglist
 Output a list of package names installed inside the image. Useful if you
 need to track the relevant source packages used inside the image for
@@ -258,22 +326,34 @@ none, simple, meliae, or heapy (default: simple)
 make memory profiling dumps at least SECONDS apart
 .SH EXAMPLE
 To create an image for the stable release of Debian:
-.nf
 .IP
 sudo vmdebootstrap \-\-image test.img \-\-size 1g \\
     \-\-log test.log \-\-log-level debug \-\-verbose \\
     \-\-mirror http://mirror.lan/debian/
 .PP
-To run the test image, make sure it is writeable. Use the \-\-owner
-option to set mode 0644 for the specified user or use chmod manually:
+To run the test image, make sure it is writeable. Use the \-\-owner option to set
+mode 0644 for the specified user or use chmod manually:
 .IP
 sudo chmod a+w ./test.img
 .PP
 Execute using qemu, e.g. on amd64 using qemu-system-x86_64:
 .IP
-qemu-system-x86_64 ./test.img
+qemu-system-x86_64 -drive format=raw,file=./test.img
+.PP
+(This loads the image in a new window.) Note the use of -drive
+file=<img>,format=raw which is needed for newer versions of QEMU.
 .PP
-(This loads the image in a new window.)
+There is EFI firmware available to use with QEMU when testing images built
+using the UEFI support, but this software is in Debian non-free due to patent
+concerns. If you choose to install
+.B
+ovmf
+to test UEFI builds, a secondary change is also needed to symlink the provided
+OVMF.fd to the file required by QEMU: bios-256k.bin and then tell QEMU about
+the location of this file with the -L option:
+.IP
+$ qemu-system-x86_64 \-L /usr/share/ovmf/ -machine accel=kvm \\
+  \-m 4096 \-smp 2 \-drive format=raw,file=test.img
 .PP
 For further examples, including u-boot support for beaglebone-black,
 see /usr/share/vmdebootstrap/examples