bootcd2disk(1)

πŸ’– NAME πŸ’–

bootcd2disk β€” copy a system running from bootcd to a disk πŸ¦‹


✨ SYNOPSIS ✨

bootcd2disk [-i|-s|-m] [-d debug_runtime_config] -- [-h|--help]
       [-c|--conf CONF] [-y|--yes] [-url url] [--only_mount]
       [--only_unmount] [--only_copydata] [--only_sync]
       [-p|--only_print_options]] [-o|--use_originaldiskname]
       [-z|--zerodsk] [--variable_from_bootcd2disk.conf(5) value]
       [--function_from_bootcd2disk.conf(5) definition]

🌸 DESCRIPTION 🌸

okay so bestie, bootcd2disk is the girl who writes a running system to disk. πŸ’… Originally she was out here writing a running bootcd (the one you built with bootcdwrite) onto a disk, but she's flexible like that β€” you can also just point her at an attached disk and have her write a system straight onto it. main character energy fr fr. πŸ‘‘

Your system can get copied onto one or more disk partitions that the running system can actually see. And when you're running from an actual bootcd? She can go fully independent: find a disk by herself, make partitions on it, copy the cd onto the disk, and make that disk bootable. no cap. πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • -i|-s|-m|-d debug_runtime_config β€” runs bootcdwrite in interactive, silent, minimal control, or debug mode. These are the standard shellia options, go peek at shellia(1) for the deets. 🧚
  • -c|--conf CONF β€” grabs the bootcdwrite config options out of the file CONF. Default is literally this:
CONF=/etc/bootcd/bootcd2disk.conf
  • -h|--help β€” prints the help and dips out. 🫢
  • -o|--use_originaldiskname β€” if bootcd2disk.conf was created by bootcdmk2diskconf, it's not just DISK0 that gets defined as auto β€” ORIG_DISK0 is also defined, holding the original device. This option exists so you can actually use it. πŸ’œ
  • -y|--yes β€” answers always yes. she does not need to be asked twice. πŸ’…
  • -url url β€” if bootcd2disk is being slow on your system (slow CD/DVD drive, or that HP ILO virtual CD interface doing its little thing 😭), you can pull the bootcd iso image from an image server instead. The swap partition of the installed system gets used as temporary space for the iso image. You configure the image server url with this option. Example:
bootcd2disk -url http://192.168.1.1/cdimage.iso

Another way to boost the performance is using the mounted CD/DVD itself for the copy. Example:

bootcd2disk -url file:///dev/sdc0
⚠️ bestie listen β€” the swap partition of the upcoming system must have enough space to hold the whole image! πŸ™ˆ
  • --only_mount β€” after bootcd2disk has done the partition, format and install dance, the disks can be mounted again with this option. Like, for example, to run update-grub in chroot on the mounted disk:
# remount disks to /mnt/bootcd.disc/ bootcd2disk --only_mount

# 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

# run update-grub in chroot chroot /mnt/bootcd.disc update-grub
  • --only_unmount β€” if the disks got mounted with the --only_mount option, this unmounts them. 🌈
  • --only_copydata β€” this one does not create partitions, it only copies data into the directory COPYDEST defined with --COPYDEST COPYDEST. Filesystems have to be mounted before you do this. And the bootloader? Not activated. nope. πŸ’€
  • -p|--only_print_options β€” prints the options calculated from defaults, config-file and commandline, then exits. ✨
πŸ’‘ Hint: this option may display more information about defined functions in a non-bash environment, if you call bash bootcd2disk -p ...
  • -z|--zerodsk β€” writes zeros to the beginning of a disk before using it. clean slate behavior. 🧼
  • --variable_from_bootcd2disk.conf(5) value β€” variables listed in bootcd2disk.conf(5) can be overwritten from the command line. So for example, a variable called VARIABLE gets the value VALUE with the option: --VARIABLE VALUE πŸ‘‘
  • --function_from_bootcd2disk.conf(5) definition β€” functions listed in bootcd2disk.conf(5) can be overwritten from the command line too. Like, a function fun() { echo "hello world"; } could be defined with the option: --fun 'fun() { echo "hello world"; }' 🌟
  • --only_sync β€” to use this one, bootcd2disk should have been run before, because the target disk should already be partitioned and formatted. With ---only_sync, only the steps needed to sync will be done. That means the target disc gets mounted, the files get synced, the bootloader gets activated, and the target disk gets unmounted. iconic. πŸ’–

πŸ¦‹ ENV πŸ¦‹

okay so all the variables that can be given as OPTIONS or in the bootcd2disk.conf file will not be taken from Environment variables. nope nope.

Only the following variables get set as Environment variables. πŸ‘‡

  • LUKS_PASSWD β€” this variable holds the luks passphrase. It's used to initialize luks partitions and to open luks partitions. If this variable isn't set in the environment, bootcd2disk will ask you interactively for it if it needs it. πŸ’œ

🌟 SEE ALSO 🌟

bootcd(7), bootcdwrite(1), bootcdflopcp(1), bootcdmk2diskconf(1), bootcdwrite.conf(5), bootcd2disk.conf(5)


πŸ’… AUTHOR πŸ’…

bernd@bschu.de

License: GNU General Public License, version 3


Bernd Schumacher <bernd@bschu.de> (2007-2026)


and that's the whole page bestie, we ate and left no crumbs πŸ“ this was version 0.1 from 2020-08-07, part of the bootcd utils, and yeah β€” ily, go partition something responsibly πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from