.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "BOOTCD2DISK" 1 "2020-08-07" "0.1" "bootcd utils" .SH NAME bootcd2disk \- copy a system running from bootcd to a disk .SH SYNOPSIS .INDENT 0.0 .TP .B \fBbootcd2disk\fP [\fB\-i|\-s|\-m\fP] [\fB\-d\fP \fIdebug_runtime_config\fP] \-\- [\fB\-h|\-\-help\fP] [\fB\-c|\-\-conf\fP \fICONF\fP] [\fB\-y|\-\-yes\fP] [\fB\-url\fP \fIurl\fP] [\fB\-\-only_mount\fP] [\fB\-\-only_unmount\fP] [\fB\-\-only_copydata\fP] [\fB\-\-only_sync\fP] [\fB\-p|\-\-only_print_options\fP]] [\fB\-o|\-\-use_originaldiskname\fP] [\fB\-z|\-\-zerodsk\fP] [\fI\-\-variable_from_bootcd2disk.conf(5)\fP \fIvalue\fP] [\fI\-\-function_from_bootcd2disk.conf(5)\fP \fIdefinition\fP] .UNINDENT .SH DESCRIPTION .sp \fBbootcd2disk\fP is used to write a running system to disk. It was originally used do write a running \fBbootcd\fP built with \fBbootcdwrite\fP to disk, but it is also possible to write a system directly to an attached disk. .sp The system can be copied to one or more disk partitions seen by the running system. When running from \fBbootcd\fP, it is possible to let \fBbootcd2disk\fP automatically find a disk, make partitions on it, copy the cd to the disk and make the disk bootable. .SH OPTIONS .sp \fB\-i|\-s|\-m|\-d\fP \fIdebug_runtime_config\fP .INDENT 0.0 .INDENT 3.5 Run bootcdwrite in interactive, silent, minimal control or debug mode. See shellia(1) for this standard \fBshellia\fP options. .UNINDENT .UNINDENT .sp \fB\-c|\-\-conf\fP \fICONF\fP .INDENT 0.0 .INDENT 3.5 use the bootcdwrite config options from file \fICONF\fP\&. Default: .INDENT 0.0 .INDENT 3.5 .sp .EX CONF=/etc/bootcd/bootcd2disk.conf .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fB\-h|\-\-help\fP .INDENT 0.0 .INDENT 3.5 print help and exit .UNINDENT .UNINDENT .sp \fB\-o|\-\-use_originaldiskname\fP .INDENT 0.0 .INDENT 3.5 if \fBbootcd2disk.conf\fP was created by \fBbootcdmk2diskconf\fP, not only the variable \fBDISK0\fP is defined as \fBauto\fP but also \fBORIG_DISK0\fP is defined with the original device. To use it this option exists. .UNINDENT .UNINDENT .sp \fB\-y|\-\-yes\fP .INDENT 0.0 .INDENT 3.5 answer always yes .UNINDENT .UNINDENT .sp \fB\-url\fP \fIurl\fP .INDENT 0.0 .INDENT 3.5 If bootcd2disk is slow on your system (because of a slow CD/DVD drive or the HP ILO virtual CD interface), you can use an image server to get the bootcd iso image from. The swap partition of the installed system will be used as temporary space for the iso image. .sp The image server url is configured with this option. Example: .INDENT 0.0 .INDENT 3.5 .sp .EX bootcd2disk \-url http://192.168.1.1/cdimage.iso .EE .UNINDENT .UNINDENT .sp Another way the increase the performance is the use of the mounted CD/DVD itself for the copy. Example: .INDENT 0.0 .INDENT 3.5 .sp .EX bootcd2disk \-url file:///dev/sdc0 .EE .UNINDENT .UNINDENT .sp The swap partition of the upcoming system must have enough space to get the whole image! .UNINDENT .UNINDENT .sp \fB\-\-only_mount\fP .INDENT 0.0 .INDENT 3.5 After \fIbootcd2disk\fP did partition, format and install the disk, the disks can be mounted again with this option. For example to run \fIupdate\-grub\fP in chroot on the mounted disk: .INDENT 0.0 .INDENT 3.5 # remount disks to /mnt/bootcd.disc/ bootcd2disk \-\-only_mount .sp # prepare chroot mount \-\-bind /dev /mnt/bootcd.disc/dev mount \-t proc none /mnt/bootcd.disc/proc mount \-t sysfs none /mnt/bootcd.disc/sys mount \-t devpts none /mnt/bootcd.disc/dev/pts .sp # run \fIupdate\-grub\fP in chroot chroot /mnt/bootcd.disc update\-grub .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fB\-\-only_unmount\fP .INDENT 0.0 .INDENT 3.5 If the disks are mounted with option \fB\-\-only_mount\fP , they can be unmounted with this option. .UNINDENT .UNINDENT .sp \fB\-\-only_copydata\fP .INDENT 0.0 .INDENT 3.5 This will not create partitions, but only copy data to the directory \fICOPYDEST\fP defined with \fB\-\-COPYDEST\fP \fICOPYDEST\fP\&. Filesystems have to be mounted before. The Bootloader will not be activated. .UNINDENT .UNINDENT .sp \fB\-p|\-\-only_print_options\fP .INDENT 0.0 .INDENT 3.5 Print the options calculated from defaults, config\-file and commandline and exit. .sp Hint: This option may display more information about defined functions in a non\-bash environment, if calling \fIbash bootcd2disk \-p ...\fP\&. .UNINDENT .UNINDENT .sp \fB\-z|\-\-zerodsk\fP .INDENT 0.0 .INDENT 3.5 This option writes zeros to the beginning of a disk before using it. .UNINDENT .UNINDENT .sp \fI\-\-variable_from_bootcd2disk.conf(5)\fP \fIvalue\fP .INDENT 0.0 .INDENT 3.5 variables listed in \fBbootcd2disk.conf(5)\fP can be overwritten from command line. For example a variable called \fIVARIABLE\fP will get the value \fIVALUE\fP with the option: \fI\-\-VARIABLE\fP \fIVALUE\fP .UNINDENT .UNINDENT .sp \fI\-\-function_from_bootcd2disk.conf(5)\fP \fIdefinition\fP .INDENT 0.0 .INDENT 3.5 functions listed in \fBbootcd2disk.conf(5)\fP can be overwritten from command line. For example a function \fIfun() { echo \(dqhello world\(dq; }\fP could be defined with the option: \fI\-\-fun \(aqfun() { echo \(dqhello world\(dq; }\(aq\fP .UNINDENT .UNINDENT .sp \fB\-\-only_sync\fP .INDENT 0.0 .INDENT 3.5 To use this option, \fBbootcd2disk\fP should have been run before, because the target disk should be partitioned and formatted already. With \fB\-\-\-only_sync\fP only the steps needed to sync will be done. That means the target disc will be mounted, the files will be synced, the bootloader will be activated and the target disk will be unmounted. .UNINDENT .UNINDENT .SH ENV .sp All variables, that can be given as \fIOPTIONS\fP or in the \fIbootcd2disk.conf\fP file, will not be taken form Environment variables. .sp Only the following variables will be set as Environment variables. .sp \fBLUKS_PASSWD\fP .INDENT 0.0 .INDENT 3.5 This variable contains the \fIluks\fP passphrase. It is used to initialize \fIluks\fP partitions and to open \fIluks\fP partitions. If this variable is not set in the \fIenvrionment\fP it will be asked interactively by bootcd2disk if needed. .UNINDENT .UNINDENT .SH SEE ALSO .sp bootcd(7), bootcdwrite(1), bootcdflopcp(1), bootcdmk2diskconf(1), bootcdwrite.conf(5), bootcd2disk.conf(5) .SH AUTHOR bernd.schumacher@hpe.com License: GNU General Public License, version 3 .SH COPYRIGHT Bernd Schumacher (2007-2020) .\" Generated by docutils manpage writer. .