...
 
Commits (2)
# dqib - Debian quick image baker
# Copyright © 2019 Giovanni Mascellani <gio@debian.org>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FROM debian:unstable
ENV DEBIAN_FRONTEND=noninteractive
......
......@@ -16,6 +16,43 @@ use. The script is nowhere near debian-installer in terms of
completeness, so created images are probably not suitable for
production use. Just use them for playing and development.
## How to use it
Basically you have to run as root the script `create.sh` passing as
only argument the type of system for which you want to create an
image. The script should not touch anything outside a temporary
directory created inside `/tmp`, but if (rightfully so) do not like to
run random scripts as root, then a `Dockerfile` is provided that
creates a docker container with the packages you need already
installed (the script still has to be run as root, but at least there
is a container around it). Unfortunately the root requirement comes
from `debootstrap` and cannot be removed.
You can also pass some environment variables to `create.sh` to change
some default settings. Read the script (it is very simple!) to know
which environment variables and system types are supported.
For example:
$ docker build . -t dqib
$ docker run -it dqib
# cd
# DISK_SIZE=15G MEM=512M ./create.sh mipsel-malta
At the end, the creation script will print a QEMU call line that
should just work and that you can customize according to your wishes
(in particolar, for machines that support graphics hardware you might
want to remove `-nographic` and `console` commands).
All machines have root password set to `root` and an unprivileged user
named `debian` with password `debian`. The hostname is also
`debian`. The machine should automatically have Internet connection if
the host computer has, and an SSH server should be running. QEMU will
automatically forward connections to the host port 2222 to the SSH
server inside.
Have fun!
## Feedback
I am not an expert of most if not all architectures for which `dqib`
......
#!/bin/bash
# dqib - Debian quick image baker
# Copyright © 2019 Giovanni Mascellani <gio@debian.org>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
set -e
SYSTEM="$1"
......