.\" 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.CONF" 5 "2020-08-07" "0.1" "bootcd utils" .SH NAME bootcd2disk.conf \- bootcd utils .SH SYNOPSIS .sp /etc/bootcd/bootcd2disk.conf .SH DESCRIPTION .sp \fBbootcd2disk.conf\fP is a configuration file used by \fBbootcd2disk\fP\&. .sp The default \fB/etc/bootcd/bootcd2disk.conf\fP is also available in directory \fB/usr/share/doc/bootcd/examples/\fP\&. The default can be used, when running from an iso image created by \fBbootcdwrite\fP, to reinstall the first disk. .sp \fBbootcd2disk.conf\fP will be sourced as shell file. The following \fBOPTIONS\fP can be used. They are ordered alphabetical. .SH OPTIONS .sp \fBafter_copy()\fP .INDENT 0.0 .INDENT 3.5 If the function is defined, it will run after the system has been copied to the target system and while the target system is still mounted at \fICOPYDEST\fP\&. .sp For example to change the network configuration the following script could be defined: .INDENT 0.0 .INDENT 3.5 .sp .EX after_copy() { cat <$COPYDEST/etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.2 netmaks 255.255.255.0 gateway 192.168.1.1 EOF } .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX # the function is not defined unset \-f after_copy .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBbootcd_mount()\fP .INDENT 0.0 .INDENT 3.5 The function will be called with the \(dqmountpoint directory\(dq as option. To use Partiton 1 of the first disk as /boot and partiton 3 of the first disk as / the function could be defined as: .INDENT 0.0 .INDENT 3.5 .sp .EX bootcd_mount() { local mountpoint bootcd_global DISK0P1 DISK0P3 mountpoint=\(dq$1\(dq mount $DISK0P3 $mountpoint mkdir $mountpoint/boot mount $DISK0P1 $mountpoint/boot } .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX # the function is not defined unset \-f bootcd_mount .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBbootcd_umount()\fP .INDENT 0.0 .INDENT 3.5 The function will be called with the \(dqmountpoint directory\(dq as option. If / and /boot are mounted, the function could be defined as: .INDENT 0.0 .INDENT 3.5 .sp .EX bootcd_umount() { local mountpoint mountpoint=\(dq$1\(dq umount $mountpoint/boot umount $mountpoint\(dq } .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX # the function is not defined unset \-f bootcd_umount .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBBOOTCDMP\fP .INDENT 0.0 .INDENT 3.5 This defines the mountpoint, where filesystems can be mounted to be temporarily modified by bootcd2disk. .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX BOOTCDMP=\(dq/mnt/bootcd.disc\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBCOPYDEST\fP .INDENT 0.0 .INDENT 3.5 This points to the mounted disk and normally needs not to be changed. Default: .INDENT 0.0 .INDENT 3.5 .sp .EX COPYDEST=\(dq/mnt/bootcd.disc\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBDISK#\fP .INDENT 0.0 .INDENT 3.5 \fBDISK#\fP stands for one of \fBDISK0\fP, \fBDISK1\fP, ... \fBDISK99\fP\&. The Variables \fBDISK#\fP can be defined to specify the disks disk that will be newly partitioned before copying the cd to it: .INDENT 0.0 .INDENT 3.5 .sp .EX DISK0=\(dq/dev/hda\(dq .EE .UNINDENT .UNINDENT .sp To not partition any disk: .INDENT 0.0 .INDENT 3.5 .sp .EX DISK0=\(dq\(dq .EE .UNINDENT .UNINDENT .sp To let bootcd2disk find a disk (bootcd2disk tries to use the first disk): .INDENT 0.0 .INDENT 3.5 .sp .EX DISK0=\(dqauto\(dq .EE .UNINDENT .UNINDENT .sp It is possible to define more disks. The disk number must be increased by 1: .INDENT 0.0 .INDENT 3.5 .sp .EX DISK1=\(dqauto\(dq DISK2=\(dqauto\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX DISK0=\(dqauto\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBDISKIDTYP\fP .INDENT 0.0 .INDENT 3.5 With the variable \fBDISKIDTYP\fP it can be defined which type of name bootcd should write in config files. When naming a disk in a file, bootcd2disk can try to name the disk by UUID: .INDENT 0.0 .INDENT 3.5 .sp .EX DISKIDTYP=\(dqUUID\(dq .EE .UNINDENT .UNINDENT .sp Or bootcd can name the disk by the devicename: .INDENT 0.0 .INDENT 3.5 .sp .EX DISKIDTYP=\(dqDEVNAME\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX DISKIDTYP=\(dqUUID\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBdo_first()\fP .INDENT 0.0 .INDENT 3.5 A function \fBdo_first()\fP can be defined, to do some things first before doing anything else. Example of a function, that prints something: .INDENT 0.0 .INDENT 3.5 .sp .EX do_first() { info \(dqfunction do_first is now running\(dq } .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX # make sure the function is not defined unset \-f do_first .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBdo_last()\fP .INDENT 0.0 .INDENT 3.5 A function \fBdo_last()\fP can be defined, to do some things laster after doing anything else. Example of a function, that prints something: .INDENT 0.0 .INDENT 3.5 .sp .EX do_last() { info \(dqfunction do_last is now running\(dq } .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX # make sure the function is not defined unset \-f do_last .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBEFIBOOT\fP .INDENT 0.0 .INDENT 3.5 Create a disk that can boot with old BIOS: .INDENT 0.0 .INDENT 3.5 .sp .EX EFIBOOT=\(dqbios\(dq .EE .UNINDENT .UNINDENT .sp Create a disk that can boot with EFI. Will work with secureboot enabled, if kernel and grub are signed or original from debian.: .INDENT 0.0 .INDENT 3.5 .sp .EX EFIBOOT=\(dqefi\(dq .EE .UNINDENT .UNINDENT .sp To check current system. If EFI is enabled use \(dqefi\(dq if not use \(dqbios\(dq. The needed bootloader software for this option is probably aready installed: .INDENT 0.0 .INDENT 3.5 .sp .EX EFIBOOT=\(dqauto\(dq .EE .UNINDENT .UNINDENT .sp Create a disk that can boot from BIOS and EFI. If you have installed grub\-pc\-bin and grub\-efi\-amd64\-bin this may be the best option. The disk may be removed, and used on another host, with either bios or efi: .INDENT 0.0 .INDENT 3.5 .sp .EX EFIBOOT=\(dqbios+efi\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX EFIBOOT=\(dqauto\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBEXCLUDE_SYSTEM\fP .INDENT 0.0 .INDENT 3.5 This files need to be excluded on most systems. So the default may be ok in most cases. Additional files to be excluded can be defined in \fBEXCLUDE\fP .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX EXCLUDE_SYSTEM=\(dq/dev/ /mnt/ /proc/ /run/ /sys/ /tmp/ /var/tmp/\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBEXCLUDE\fP .INDENT 0.0 .INDENT 3.5 This variable can also contain special characters. See \fBEVALVARS\fP\&. .sp Some files are already exluded with \fBEXCLUDE_SYSTEM\fP\&. With \fBEXCLUDE\fP additional Files can be excluded. Directories or files that should not be copied can be defined in this variable as a space separated list. Each entry should start with \fB/\fP\&. .sp Each list item will be given to rsync as \fI\-\-exclude \fP\&. .sp Example: To exlcude everything in directory \fB/etc/dir1\fP use: .INDENT 0.0 .INDENT 3.5 .sp .EX EXCLUDE=\(dq/etc/dir1/\(dq .EE .UNINDENT .UNINDENT .sp To exclude directory itself use: .INDENT 0.0 .INDENT 3.5 .sp .EX EXCLUDE=\(dq/etc/dir1\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX EXCLUDE=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBEXT2FS\fP .INDENT 0.0 .INDENT 3.5 Each device or logical volume definition needs a new line!. Do not not create ext2 filesystems: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT2FS=\(dq\(dq .EE .UNINDENT .UNINDENT .sp Create partitions defined in EXT2FS with mke2fs: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT2FS=\(dq/dev/hda1 /dev/hda3\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT2FS=\(dq\(dq .EE .UNINDENT .UNINDENT .sp if also EXT3FS=\(dqauto\(dq then ext3 will be used if possible .UNINDENT .UNINDENT .sp \fBEXT3FS\fP .INDENT 0.0 .INDENT 3.5 Each device or logical volume definition needs a new line! Do not not create ext3 filesystems: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT3FS=\(dq\(dq .EE .UNINDENT .UNINDENT .sp Create partitions defined in EXT3FS with mke2fs \-j: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT3FS=\(dq/dev/hda1 /dev/hda3\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT3FS=\(dq\(dq .EE .UNINDENT .UNINDENT .sp if also EXT4FS=\(dqauto\(dq then ext4 will be used if possible .UNINDENT .UNINDENT .sp \fBEXT4FS\fP .INDENT 0.0 .INDENT 3.5 Each device or logical volume definition needs a new line! Do not not create ext4 filesystems: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT4FS=\(dq\(dq .EE .UNINDENT .UNINDENT .sp Create partitions defined in EXT4FS as ext4 filesystems: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT4FS=\(dq/dev/hda1 /dev/hda3\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX EXT4FS=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBFSTAB\fP .INDENT 0.0 .INDENT 3.5 Don\(aqt change the /etc/fstab copied form cd: .INDENT 0.0 .INDENT 3.5 .sp .EX FSTAB=\(dq\(dq .EE .UNINDENT .UNINDENT .sp Example to define FSTAB yourself: .INDENT 0.0 .INDENT 3.5 .sp .EX FSTAB=\(dq/dev/sda1 /boot ext2 defaults 0 1 /dev/sda2 none swap sw 0 0 /dev/sda3 / ext2 defaults,errors=remount\-ro 0 1 proc /proc proc defaults 0 0\(dq .EE .UNINDENT .UNINDENT .sp The string \fBDISK0P1\fP will be automatically changed to . The string \fBUUID!DISK1P3\fP will be automacally changed to the UUID of the third partition of the second disk>. .sp Depends on: .INDENT 0.0 .INDENT 3.5 .sp .EX EFIBOOT .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX FSTAB=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBGRUB\fP .INDENT 0.0 .INDENT 3.5 If you don\(aqt want to use GRUB: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUB=\(dq\(dq .EE .UNINDENT .UNINDENT .sp If GRUB2 is not installed or defined and GRUB is defined and grub is installed it will be used and LILO will be ignored. .sp If you want to define it yourself: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUB=\(dqdefault 0 timeout 5 color cyan/blue white/blue title Debian GNU/Linux root (hd0,0) kernel /vmlinuz\-2.4.27\-2\-386 root=/dev/hda3 ro initrd /initrd.img\-2.4.27\-2\-386 savedefault boot\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUB=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBGRUB2\fP .INDENT 0.0 .INDENT 3.5 This variable defines if GRUB2 will be used and how the file /boot/grub/grub.cfg is created. If GRUB2 and GRUB and LILO is defined and installed, GRUB2 will be used .sp If you don\(aqt want to use GRUB2: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUB2=\(dq\(dq .EE .UNINDENT .UNINDENT .sp GRUB2 can also define the content of /boot/grub/grub.cfg. Grub2 starts counting partitions at 1 and grub1 starts at 0. Example: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUB2=\(dq set lang=en insmod gettext set timeout=5 set menu_color_normal=cyan/blue set menu_color_highlight=white/blue menuentry \(aqDebian GNU/Linux\(aq \-\-class debian \-\-class gnu\-linux \-\-class gnu \-\-class os { insmod ext2 set root=\(aq(hd0,1)\(aq linux /$(basename $KERNEL) root=DISK0P3 ro initrd /$(basename $INITRD) }\(dq .EE .UNINDENT .UNINDENT .sp If GRUB2 is auto, update\-grub will be used to create /boot/grub/grub.cfg automatically. Default: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUB2=\(dqauto\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBGRUBBOOTDIR\fP .INDENT 0.0 .INDENT 3.5 Example: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUBBOOTDIR=\(dq0\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUBBOOTDIR=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBGRUBBOOTDISK\fP .INDENT 0.0 .INDENT 3.5 If /boot is not the first partition on disk, we need to know which one it is to install grub properly. bootcd starts counting with 0 like grub1 ! Example: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUBBOOTDISK=\(dqhd0\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUBBOOTDISK=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBGRUBDEVICEMAP\fP .INDENT 0.0 .INDENT 3.5 Syntax: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUBDEVICEMAP=auto|no| .EE .UNINDENT .UNINDENT .sp Let bootcd2disk delete the original device.map, so that it will be auto\-created by grub again.: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUBDEVICEMAP=\(dqauto\(dq .EE .UNINDENT .UNINDENT .sp bootcd2disk shoult not change device.map. This should work if a bootcd is installed on the original hardware: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUBDEVICEMAP=\(dqno\(dq .EE .UNINDENT .UNINDENT .sp Everything else will be used as new value for device.map. Default: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUBDEVICEMAP=\(dqauto\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBGRUB_INSTALL_OPTS_BIOS\fP .INDENT 0.0 .INDENT 3.5 If \fBbootcd2disk\fP makes a disk bootable from bios with the command \fBgrub\-install\fP, it uses always the same basic default options, that can be changed with this option. .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUB_INSTALL_OPTS_BIOS=\(dq\-\-target=i386\-pc \-\-recheck \-\-no\-floppy \-\-force\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBGRUB_INSTALL_OPTS_EFI\fP .INDENT 0.0 .INDENT 3.5 If \fBbootcd2disk\fP makes a disk bootable from efi with the command \fBgrub\-install\fP, it uses always the same basic default options, that can be changed with this option. The option \fB\-\-removable\fP will be added by \fBbootcd2disk\fP if needed. .sp If the newly created disk will not be moved away \fB\-\-no\-nvram\fP may be omitted. .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX GRUB_INSTALL_OPTS_EFI=\(dq\-\-target=x86_64\-efi \-\-recheck \-\-no\-floppy \-\-force \-\-no\-nvram\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBIMAGEURL\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 a image server to get the image from. bootcd2disk use the SWAP partition of your upcoming system as temporary space and copy the image from the configured image server (IMAGEURL or cmdline \-url) to this partition and use it as image. Please use a ip because of failed DNS and you need also the configured ip interface. The \(dqurl\(dq is used with \(dqwget\(dq so all url from wget are possible. Example: .INDENT 0.0 .INDENT 3.5 .sp .EX IMAGEURL=\(dqhttp://192.168.100.10/cdimage.iso\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX IMAGEURL=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBISOLOOPBACK\fP .INDENT 0.0 .INDENT 3.5 Normally the System is running from \fBbootcd\fP, when \fBbootcd2disk\fP is called. Then files under \fB/\fP are copied to the new disk. But it may be faster to additionally mount the \fBbootcd\fP to another mountpoint and copy from there. This mountpoint can then be defined with \fBISOLOOPBACK\fP .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX ISOLOOPBACK=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBLILO\fP .INDENT 0.0 .INDENT 3.5 If GRUB is defined and installed LILO will be ignored. If you don\(aqt want to change the /etc/lilo.conf copied from cd: .INDENT 0.0 .INDENT 3.5 .sp .EX LILO=\(dq\(dq .EE .UNINDENT .UNINDENT .sp If you want to define it yourself: .INDENT 0.0 .INDENT 3.5 .sp .EX LILO=\(dqboot=DISK0 delay=20 vga=0 image=/vmlinuz root=DISK0P3 initrd=/initrd.img label=Linux read\-only\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX LILO=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBLINUXFS\fP .INDENT 0.0 .INDENT 3.5 This can be set to the preferred filesystem. Possible values are \fBext4\fP, \fBext3\fP, \fBext2\fP, \fBxfs\fP or \fBauto\fP to calculate an an available filesystem. .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX LINUXFS=\(dqauto\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBLUKS\fP .INDENT 0.0 .INDENT 3.5 Each line should have the 4 values \fItarget\fP, \fIsource_device\fP, \fIkey_file\fP and \fIoptions\fP as described in crypttab(5). .sp Only the \fIoptions\fP \fBluks\fP and \fBswap\fP are supported. If \fBbootcd2disk\fP is running without controlling tty for password input, the default password \fBbootcd\fP will be set, that has to be changed manually later. .sp Example with \fItarget\fP root filesystem \fIluksroot\fP and \fItarget\fP swap partition \fIluksswap\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX LUKS=\(dqluksroot DISK0P1 none luks luksswap DISK0P2 /dev/urandom swap\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX LUKS=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBLVMGRP\fP .INDENT 0.0 .INDENT 3.5 Each volume group definition needs a new line. Syntax .INDENT 0.0 .INDENT 3.5 .sp .EX LVMGRP=\(dq [ ...][][...]\(dq .EE .UNINDENT .UNINDENT .sp Example1 .INDENT 0.0 .INDENT 3.5 .sp .EX LVMGRP=\(dqvg00 DISK0P1 vg01 DISK0P2 vg02 DISK0P3 DISK0P4\(dq .EE .UNINDENT .UNINDENT .sp Example2 which is the same as Example1 because it uses the default schema .INDENT 0.0 .INDENT 3.5 .sp .EX LVMGRP=\(dqvg00 DISK0P1 vgcreate vg00 DISK0P1 vg01 DISK0P2 vgcreate vg01 DISK0P2 vg02 DISK0P3 vgcreate vg02 DISK0P3 DISK0P4\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX LVMGRP=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBLVMVOL\fP .INDENT 0.0 .INDENT 3.5 Each logical volume definition needs a new line! Size in vgcreate syntax is MByte, e.g.: 100 means 100 MByte. Syntax .INDENT 0.0 .INDENT 3.5 .sp .EX LVMVOL=\(dq [][...]\(dq .EE .UNINDENT .UNINDENT .sp Example1 .INDENT 0.0 .INDENT 3.5 .sp .EX LVMVOL=\(dqlv00 2000 vg00\(dq .EE .UNINDENT .UNINDENT .sp Example2 which is the same as Example1 because it used the default schema .INDENT 0.0 .INDENT 3.5 .sp .EX LVMVOL=\(dqlv00 2000 vg00 lvcreate \-n lv00 \-L 2000 vg00\(dq .EE .UNINDENT .UNINDENT .sp Example3 uses striping for the second volume .INDENT 0.0 .INDENT 3.5 .sp .EX LVMVOL=\(dqlv00 2000 vg00 lv01 100 vg00 lvcreate \-n lv01 \-i 3 \-I 8 \-L 100 vg00\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX LVMVOL=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBMD\fP .INDENT 0.0 .INDENT 3.5 To define Raid devices. Not well tested. Not documented. Syntax .INDENT 0.0 .INDENT 3.5 .sp .EX MD=\(dq ... []\(dq .EE .UNINDENT .UNINDENT .sp Example: .INDENT 0.0 .INDENT 3.5 .sp .EX MD=\(dqmd0 1 .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX MD=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBORDER\fP .INDENT 0.0 .INDENT 3.5 This defines the order of \fItasks\fP neccessarry to produce disk partitions. The tasks available are \fIparti\fP \fImd\fP \fIluks\fP \fIlvm\fP\&. .sp The task \fBparti\fP can be defined with the variable \fBSFDISK#\fP\&. The task \fBluks\fP can be defined with the variable \fBLUKS\fP\&. The task \fBmd\fP can be defined with the variable \fBMD\fP\&. The task \fBlvm\fP can be defined with the variables \fBLVMGRP\fP and \fBLVMVOL\fP\&. Only if a task is defined, the \fItask\fP will be executed. .sp It is possible to schedule a \fItask\fP multiple times in \fBORDER\fP\&. If \fItask\fP \fBparti\fP is defined multiple times, the \fItask\fP will only be executed, if \fBDISK#\fP that corresponds to \fBSFDISK#\fP is available at \fItask\fP\(aqs turn. If \fItask\fP \fBmd\fP is defined multipe times, the task will only be executed, if \fI\fP defined in \fBMD\fP is available at \fItask\fP\(aqs turn. If * task* \fBlvm\fP is defined multipe times, the task will only be executed, if \fI\fP defined in \fBLVMGRP\fP is available. at \fItask\fP\(aqs turn. .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX ORDER=\(dqparti luks md lvm\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBPARTITIONLABEL\fP .INDENT 0.0 .INDENT 3.5 If you want the filesystem or swap partitions to have labels you can define them here. Example: .INDENT 0.0 .INDENT 3.5 .sp .EX PARTITIONLABEL=\(dq/dev/sda1:/ /dev/sda2:SWAP\-sda2\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX PARTITIONLABEL=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBRESUME\fP .INDENT 0.0 .INDENT 3.5 If you get the Warning \(dqGave up waiting for suspend/resume device\(dq when booting from a disk created with bootcd2disk, this may help. It fixes the file /etc/initramfs\-tools/conf.d/resume by changing the RESUME option in /etc/initramfs\-tools/initramfs.conf For example to define the RESUME device as \fB/dev/hda2\fP use: .INDENT 0.0 .INDENT 3.5 .sp .EX RESUME=\(dq/dev/hda2\(dq .EE .UNINDENT .UNINDENT .sp To define the RESUME device with a Filesystem UUID: .INDENT 0.0 .INDENT 3.5 .sp .EX RESUME=\(dqUUID=86c6e572\-eec4\-4a29\-8cbd\-2864f4e44621\(dq .EE .UNINDENT .UNINDENT .sp To not change the RESUME configuration, the variable has to be empty: .INDENT 0.0 .INDENT 3.5 .sp .EX RESUME=\(dq\(dq .EE .UNINDENT .UNINDENT .sp To disable the RESUME Feature, RESUME has to be \fBnone\fP:: Default: .INDENT 0.0 .INDENT 3.5 .sp .EX RESUME=\(dqnone\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBSFDISK#\fP .INDENT 0.0 .INDENT 3.5 \fBSFDISK#\fP stands for one of \fBSFDISK0\fP, \fBSFDISK1\fP, ... \fBSFDISK99\fP and defines how \fIsfdisk\fP will partition the \fBDISK#\fP\&. .sp If a disk should not be repartitioned, no definition is needed. .sp To partition \fIDISK2\fP the following config could be used, see man \fIsfdisk(8)\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX SFDISK2=\(dq unit: sectors ,50 ,100,S ; \(dq .EE .UNINDENT .UNINDENT .sp See \fBSFDISK#\fP in default \fBbootcd2disk.conf\fP for an example that calculates \fBSFDISK0\fP depending on on \fBEFIBOOT\fP\&. .sp The Default is to not repartition any disks. .UNINDENT .UNINDENT .sp \fBSSHHOSTKEY\fP .INDENT 0.0 .INDENT 3.5 Syntax: .INDENT 0.0 .INDENT 3.5 .sp .EX SSHHOSTKEY=yes|no .EE .UNINDENT .UNINDENT .sp If you are using ssh it is helpful to have a unique ssh hostkey for each PC installed with bootcd2disk. This will be generated with: .INDENT 0.0 .INDENT 3.5 .sp .EX SSHHOSTKEY=\(dqyes\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX SSHHOSTKEY=\(dqyes\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBSWAP\fP .INDENT 0.0 .INDENT 3.5 Each swap device definition needs a new line! If you don\(aqt want to run mkswap use: .INDENT 0.0 .INDENT 3.5 .sp .EX SWAP=\(dq\(dq .EE .UNINDENT .UNINDENT .sp If you want to specify partitions for mkswap: .INDENT 0.0 .INDENT 3.5 .sp .EX SWAP=\(dq/dev/hda2\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX SWAP=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBALLOWEDDISKS\fP .INDENT 0.0 .INDENT 3.5 If a disk is searched (e.g. DISK0=\(dqauto\(dq) and ALLOWEDDISKS=\(dq\(dq, the first free disk found will be used. IF ALLOWEDDISKS is defined the first free disk listed in ALLOWEDDISKS will be used. .sp To try only disks /dev/sda and /dev/hda in this order use: .INDENT 0.0 .INDENT 3.5 .sp .EX ALLOWEDDISKS=\(dq/dev/sda /dev/hda\(dq .EE .UNINDENT .UNINDENT .sp This can also be used to only try individual disks, if they are connected: .INDENT 0.0 .INDENT 3.5 .sp .EX ALLOWEDDISKS=\(dq/dev/disk/by\-id/ /dev/disk/by\-id/ /dev/disk/by\-id/\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX ALLOWEDDISKS=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBUDEV_FIXNET\fP .INDENT 0.0 .INDENT 3.5 Syntax: .INDENT 0.0 .INDENT 3.5 .sp .EX UDEV_FIXNET=yes|no .EE .UNINDENT .UNINDENT .sp If you are using udev filesystem and install the image on other machines you need to set this to \(dqyes\(dq because the network interfaces are hardwired in /etc/udev/rules.d/z25_persistent\-net.rules (etch) or in /etc/udev/rules.d/70\-persistent\-net.rules (lenny) and we must remove them.: .INDENT 0.0 .INDENT 3.5 .sp .EX UDEV_FIXNET=\(dqyes\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX UDEV_FIXNET=\(dqyes\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBVFAT\fP .INDENT 0.0 .INDENT 3.5 Each device or logical volume definition needs a new line!. VFAT is often needed for EFI. If not needed: .INDENT 0.0 .INDENT 3.5 .sp .EX VFAT=\(dq\(dq .EE .UNINDENT .UNINDENT .sp To ceate partitions with mkdosfs: .INDENT 0.0 .INDENT 3.5 .sp .EX VFAT=\(dq/dev/sdb4\(dq .EE .UNINDENT .UNINDENT .sp Default: .INDENT 0.0 .INDENT 3.5 .sp .EX VFAT=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .sp \fBXFS\fP .INDENT 0.0 .INDENT 3.5 Each device or logical volume definition needs a new line! Create partitions defined as xfs filesystems: .INDENT 0.0 .INDENT 3.5 .sp .EX XFS=\(dq/dev/hda1 /dev/hda3\(dq .EE .UNINDENT .UNINDENT .sp Do not not create xfs filesystems:: Default: .INDENT 0.0 .INDENT 3.5 .sp .EX XFS=\(dq\(dq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH EVALVARS .INDENT 0.0 .INDENT 3.5 Most variables listed in chapter \fBOPTIONS\fP can\(aqt contain special characters. .sp It is not recommended to use special characters anyway, but the variable \fBEXCLUDE\fP may contain blank ( ), dollar ($), backslash (\e), qoute (\(dq) and backquote (\(ga). This variables are called \fBEVALVARS\fP in this manpage, because in shell script, the \fIeval\fP command can be used to easily read them. .sp For example to define \fBEXCLUDE\fP with the files or directories \(dq/etc/noblank\(dq, \(dq/etc/blank name1\(dq and \(dq/etc/blank name2\(dq the following config line would be possible: .INDENT 0.0 .INDENT 3.5 .sp .EX EXCLUDE=\(dq/etc/noblank \e\(dq/etc/blank name1\e\(dq /etc/blank\e name2\(dq .EE .UNINDENT .UNINDENT .sp Because all variables have to be readable by shell with the \fIeval\fP command, the syntax can be checked. if the config line above is entered in a shell with the test commands: .INDENT 0.0 .INDENT 3.5 .sp .EX eval \(dqset \-\- $EXCLUDE\(dq echo \(dq#=<$#> 1=<$1> 2=<$2> 3=<$3> 4=<$4>\(dq .EE .UNINDENT .UNINDENT .sp should print out the result: .INDENT 0.0 .INDENT 3.5 .sp .EX #=<3> 1= 2= 3= 4=<> .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH ENVIRONMENT .sp \fBia_logfile\fP .INDENT 0.0 .INDENT 3.5 The logfile of \fIbootcd2disk\fP is \fI/var/log/bootcd2disk\fP, if not overwriten with variable \fIia_logfile\fP before. .UNINDENT .UNINDENT .SH DEFINING OPTIONS .INDENT 0.0 .INDENT 3.5 There are \fIfunction OPTIONS\fP, \fInumber OPTIONS\fP and \fInormal OPTIONS\fP that can be defined directly: .sp Example: direct definition of \fIfunction OPTION\fP \fBdo_first()\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX do_first() { info \(dqfunction do_first is now running\(dq; } .EE .UNINDENT .UNINDENT .sp Example: direct definition of a \fInumber OPTION\fP \fBDISK#\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX DISK0=\(dq/dev/hda\(dq; DISK2=\(dqauto\(dq .EE .UNINDENT .UNINDENT .sp Example: direct definition of a \fInormal OPTION\fP \fBDISKIDTYP\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX DISKIDTYP=\(dqUUID\(dq .EE .UNINDENT .UNINDENT .sp If an \fIOPTION\fP can not be defined immediatelly, because it needs the definition of another \fIOPTION\fP, a function \fIdefine_OPTION\fP can be created, that calls the function \fIneeds\fP with a string containing a space separated list of \fIOPTIONS\fP needed: .sp Example: function \fBdo_first\fP needs \fBDISKIDTYP\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX define_do_first() { needs \(dqDISKIDTYP\(dq if [ \(dq$DISKIDTYP\(dq = \(dqUUID\(dq ]; then do_first() { info \(dqDISKIDTYP = UUID\(dq; } else do_first() { info \(dqDISKIDTYP != UUID\(dq; } fi } .EE .UNINDENT .UNINDENT .sp Example: \fInumber OPTION\fP \fBSFDISK#\fP needs \fBDISKIDTYP\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX define_SFDISK() { needs \(dqDISKIDTYP\(dq if [ \(dq$DISKIDTYP\(dq = \(dqUUID\(dq ]; then SFDISK0=\(dq...\(dq SFDISK3=\(dq...\(dq else SFDISK0=\(dq...\(dq SFDISK3=\(dq...\(dq fi } .EE .UNINDENT .UNINDENT .sp Example: \fInormal OPTION\fP \fBFSTAB\fP needs \fBDISKIDTYP\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX define_FSTAB() { needs \(dqDISKIDTYP\(dq if [ \(dq$DISKIDTYP\(dq = \(dqUUID\(dq ]; then FSTAB=\(dq...\(dq else FSTAB=\(dq...\(dq fi } .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH USING PARTITION-TOKENS .INDENT 0.0 .INDENT 3.5 In some \fIOPTIONS\fP special \fIpartition\-tokens\fP can be used, that will be replaced with the \fIdevice path\fP or the \fIUUID\fP of the partition, depending on \fIOPTION\fP \fBDISKIDTYP\fP .sp Example \fIpartition\-token\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX DISK3P7 .EE .UNINDENT .UNINDENT .sp This means 7th partition of 4th disk. Example usage of \fIpartition\-token\fP in \fIOPTION\fP FSTAB: .INDENT 0.0 .INDENT 3.5 .sp .EX FSTAB=\(dqDISK3P7 /boot ext3 defaults 0 1 \&...\(dq .EE .UNINDENT .UNINDENT .sp To use \fIpartition\-tokens\fP in a \fIfunction OPTION\(dq\fP variables have to be declared with \fBbootcd_global\fP . Example: .INDENT 0.0 .INDENT 3.5 .sp .EX bootcd_mount() { bootcd_global DISK0P3 mountpoint=\(dq$1\(dq mount $DISK0P3 $mountpoint ... } .EE .UNINDENT .UNINDENT .sp The function \fBbootcd_global\fP makes sure that all \fIpartition\-tokens\fP are available in the same named variable. .UNINDENT .UNINDENT .SH SEE ALSO .sp bootcd(7), bootcdwrite(1), bootcd2disk(1), bootcdflopcp(1), bootcdmk2diskconf(1), bootcdwrite.conf(5), crypttab(5), /usr/share/doc/bootcd/examples/ .SH AUTHOR bernd.schumacher@hpe.com License: GNU General Public License, version 3 .SH COPYRIGHT Bernd Schumacher (2007-2020) .\" Generated by docutils manpage writer. .