freedombone-image(1)

NAME
freedombone-image - Creates a debian image suitable for installing onto systems

SYNOPSIS
freedombone-image -t [target] -u [username] -p [password] --ip [box static IP address] --iprouter [IP address of internet router] --ns1 [First DNS server IP] --ns2 [Second DNS server IP] -c [configuration file] -s [image size] --generic [yes|no] --minimal [yes|no] --ssh [port number]

DESCRIPTION
This creates a debian image suitable for writing to a microSD card.

INSTALLATION
Dependencies can be installed with:
    sudo apt-get -y install build-essential git python-docutils mktorrent vmdebootstrap
    sudo apt-get -y install dosfstools btrfs-tools extlinux python-distro-info mbr
    sudo apt-get -y install qemu-user-static binfmt-support u-boot-tools qemu If you wish to create virtualbox images then on Debian you'll need to enable the contrib repo within /etc/apt/sources.list and then install the virtualbox package.

TYPICAL USAGE
An example of creating a minimal image which can be uploaded to the internet and potentially obtained by many users is:
    freedombone-image -t beaglebone -s 8G It will take some time to create the image, and you should do this on a laptop or desktop machine (i.e. not the beaglebone itself). Once it's completed you can copy it to a microSD card using the dd command and then log into the box.
    sudo dd bs=1M if=myimagefile of=/dev/sdX conv=fdatasync Possible targets are: beaglebone, cubieboard2, cubietruck, a20-olinuxino-lime2, i386, amd64, virtualbox-i386, virtualbox-amd64, qemu-i386, qemu-x86_64 The minimal generic image does not have any services installed. The first time you ssh into it you will be prompted to change your password and then the rest of the installation will continue. For example:
    ssh fbone@freedombone.local -p 2222 With the password 'freedombone'. The --ssh option can be used to change the default ssh port number to be used. Optionally you can also interactively configure the image to build a complete system in one go. This is intended for a custom build specific to your needs - not a generic image usable by anyone. Note that if you make such builds publicly available then they become a security hazard, because all downloads will have the same ssh host keys and passwords.
    freedombone-image -t beaglebone -u myusername -p mypassword -s 8G --interactive yes --generic no Or if you don't want any manual interaction then specify a configuration file. You can easily create a configuration file with:
    sudo apt-get install dialog
    freedombone-config This will generate a configuration file called freedombone.cfg containing your settings. It could be included in the image creation as follows:
    freedombone-image -t beaglebone -u myusername -p mypassword -s 8G -c freedombone.cfg --generic no After image creation if you subsequently need to increase the size you can do that with gparted, or a similar disk utility.

INTERACTIVE INSTALL
For advanced users you can set the option --minimal no in order to show more decisions during the interactive install of the system. By default the number of options will be kept to a minimum level.

SECURITY
For images which you intend to be made public and potentially downloaded by many people use the --generic yes option. The generic option ensures that the user changes their login password and does not install any services so that the user can select which variant they want. The biggest potential problem when distributing images is the use of fixed default passwords. Adversaries will bet upon users being lazy or uninformed and not changing their passwords from the defaults. To increase the level of security you can optionally specify an ssh public key during image creation. This will ensure that nobody other than the holder of those keys can log into the resulting system. For example:
    freedombone-image -t beaglebone -u myusername -p mypassword -s 8G --interactive yes --pubkey "ssh-ed25519 C1Flz..." --generic no

VIRTUAL MACHINES
To make a qemu image:
    freedombone-image -t qemu-x86_64 -s 8G Then to run it:
    qemu-system-x86_64 myimage.qcow2 You can also use i386 in place of x86_64 to create 32bit images. To make a virtualbox image:
    sudo apt-get install virtualbox
    freedombone-image -t virtualbox-amd64 -s 8G The resulting vdi image can then be run within virtualbox. At the time of writing virtualbox is an almost-but-not-quite open source system and so qemu is the preferred virtual machine environment.

BUGS
Report bugs at https://github.com/bashrc/freedombone/issues

AUTHOR
Bob Mottram <bob@robotics.uk.to>
PGP/GPG: EA982E38
Bitmessage: BM-2cWuhmBvVdfrHhLoZTdspCkKeiTorUesSL
Web: http://robotics.uk.to