]> git.siccegge.de Git - forks/vmdebootstrap.git/blob - vmdebootstrap.8.in
2de1a955b5a322ee65cff0cf800eb184af02042b
[forks/vmdebootstrap.git] / vmdebootstrap.8.in
1 .\" Copyright 2011 Lars Wirzenius <liw@liw.fi>
2 .\"
3 .\" This program is free software: you can redistribute it and/or modify
4 .\" it under the terms of the GNU General Public License as published by
5 .\" the Free Software Foundation, either version 3 of the License, or
6 .\" (at your option) any later version.
7 .\"
8 .\" This program is distributed in the hope that it will be useful,
9 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
10 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 .\" GNU General Public License for more details.
12 .\"
13 .\" You should have received a copy of the GNU General Public License
14 .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
15 .\"
16 .TH VMDEBOOTSTRAP 8
17 .SH NAME
18 vmdebootstrap \- install basic Debian system into virtual disk image
19 .SH SYNOPSIS
20 .B vmdebootstrap
21 --image=FILE --size=SIZE [--mirror=URL] [--distribution=NAME]
22 .PP
23 .B vmdebootstrap
24 [--output=FILE] [--verbose | --no-verbose] --image=FILE --size=SIZE
25 [--tarball=FILE] [--mirror=URL] [--arch=ARCH] [--distribution=NAME]
26 [--package=PACKAGE] [--custom-package=DEB] [--no-kernel]
27 [--enable-dhcp | --no-enable-dhcp] [--root-password=PASSWORD]
28 [--customize=SCRIPT] [--hostname=HOSTNAME] [--user=USER/PASSWORD]
29 [--serial-console | --no-serial-console] [--sudo | --no-sudo] [--owner=OWNER]
30 [--bootsize=BOOTSIZE] [--boottype=FSTYPE] [--foreign=PATH] [--variant=VARIANT]
31 [--no-extlinux]
32 .SH DESCRIPTION
33 .B vmdebootstrap
34 installs a basic Debian system into a virtual disk image,
35 for use with virtual machines,
36 such as KVM, Qemu, or VirtualBox.
37 It is like
38 .BR debootstrap (8),
39 which does the same thing, but puts the system into a directory,
40 for use with
41 .BR chroot (8).
42 (In fact,
43 .B vmdebootstrap
44 is a wrapper around
45 .BR debootstrap ).
46 .PP
47 You need to run
48 .B vmdebootstrap
49 as root. If the \-\-verbose option is not used, no output will be
50 sent to the command line. If the \-\-log option is not used, no
51 output will be sent to any log files either.
52 .PP
53 To use the image,
54 you probably want to create a virtual machine using your preferred
55 virtualization technology, such as
56 .BR kvm (1),
57 or
58 .BR qemu (1).
59 Configure the virtual machine to use the image you've created.
60 Then start the virtual machine,
61 and log into it via its console to configure it.
62 .PP
63 Unless the \-\-no\-extlinux option is specified, the image will use
64 .BR extlinux (1)
65 as a boot loader.
66 The imagehas an empty root password and will not have networking configured.
67 Set the root password before you configure networking.
68 .SH OPTIONS
69 .IP \-\-output=FILE
70 write output to FILE, instead of standard output
71 .IP \-\-verbose
72 report what is going on
73 .IP \-\-image=FILE
74 put created disk image in FILE
75 .IP \-\-size=SIZE
76 create a disk image of size SIZE (1000000000)
77 .IP \-\-tarball=FILE
78 tar up the disk's contents in FILE
79 .IP \-\-mirror=URL
80 use MIRROR as package source (http://cdn.debian.net/debian/)
81 .IP \-\-arch=ARCH
82 architecture to use (amd64)
83 .IP \-\-distribution=NAME
84 release to use (stable)
85 .IP \-\-package=PACKAGE
86 install PACKAGE onto system
87 .IP \-\-custom-package=DEB
88 install package in DEB file onto system (not from mirror)
89 .IP \-\-no-kernel
90 do not install a linux package
91 .IP \-\-enable-dhcp
92 enable DHCP on eth0
93 .IP \-\-root-password=PASSWORD
94 set root password
95 .IP \-\-customize=SCRIPT
96 run SCRIPT after setting up system
97 .IP \-\-hostname=HOSTNAME
98 set name to HOSTNAME (debian)
99 .IP \-\-user=USER/PASSWORD
100 create USER with PASSWORD
101 .IP \-\-owner=OWNER
102 change the owner of the final image from root to the specified user.
103 .IP \-\-serial\-console
104 configure image to use a serial console
105 .IP \-\-serial-console-command
106 set the command to manage the serial console which will be appended to
107 /etc/inittab. Default is "/sbin/getty -L ttyS0 115200 vt100", resulting in a line
108 .BR "S0:23:respawn:/sbin/getty -L ttyS0 115200 vt100"
109 Requires the \-\-serial\-console option.
110 .IP \-\-sudo
111 install sudo, and if user is created, add them to sudo group
112 .IP \-\-bootsize=BOOTSIZE
113 If specified, create a /boot partition of the given size within the image. Debootstrapping will fail if this is too small for the selected kernel package.
114 .IP \-\-boottype=FSTYPE
115 Filesystem to use for the /boot partition. (default ext2)
116 .IP \-\-foreign=PATH
117 Path to the binfmt_handler to enable foreign support in debootstrap. e.g. /usr/bin/qemu-arm-static - note foreign debootstraps may take a signficant amount of time to complete and that debootstrap will retry five times if packages fail to install by default.
118 .IP \-\-no\-extlinux
119 Skip installation of extlinux. needs a customize script to make the image bootable. Useful for architectures where extlinux is not supportable.
120 .IP \-\-squash
121 Run mksquashfs against the final image using xz compression - requires
122 squashfs-tools to be installed. The final file will have the .squashfs suffix.
123 By default, mksquashfs is allowed to use all processors which may result
124 in high load. Run mksquashfs separately if you need to control the number
125 of processors used per run.
126 .SH Configuration files and settings:
127 .IP \-\-dump-config
128 write out the entire current configuration
129 .IP \-\-no-default-configs
130 clear list of configuration files to read
131 .IP \-\-config=FILE
132 add FILE to config files
133 .SH Logging:
134 .IP \-\-log=FILE
135 write log entries to FILE (default is to not write log files at all);
136 use "syslog" to log to system log, or "none" to disable logging
137 .IP \-\-log-level=LEVEL
138 log at LEVEL, one of debug, info, warning, error, critical, fatal (default: debug)
139 .IP \-\-log-max=SIZE
140 rotate logs larger than SIZE, zero for never (default: 0)
141 .IP \-\-log-keep=N
142 keep last N logs (10)
143 .IP \-\-log-mode=MODE
144 set permissions of new log files to MODE (octal; default 0600)
145 .SH Peformance:
146 .IP \-\-dump-memory-profile=METHOD
147 make memory profiling dumps using METHOD, which is one of:
148 none, simple, meliae, or heapy (default: simple)
149 .IP \-\-memory-dump-interval=SECONDS
150 make memory profiling dumps at least SECONDS apart
151 .SH EXAMPLE
152 To create an image for the stable release of Debian:
153 .nf
154 .IP
155 sudo vmdebootstrap --image test.img --size 1g \\
156 --log test.log --log-level debug --verbose \\
157 --mirror http://mirror.lan/debian/
158 .PP
159 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:
160 .IP
161 sudo chmod a+w ./test.img
162 .PP
163 Execute using qemu, e.g. on amd64 using qemu-system-x86_64:
164 .IP
165 qemu-system-x86_64 ./test.img
166 .PP
167 (This loads the image in a new window.)
168 .PP
169 .SH "SEE ALSO"
170 .BR debootstrap (8)
171 ,
172 .BR qemu (1)
173 .
174 .SH BUGS
175 Please provide the config section of the logfile when reporting bugs, as well as the complete command line.