aboutsummaryrefslogtreecommitdiffstats
path: root/tools/create-image.sh
Commit message (Collapse)AuthorAgeFilesLines
* tools/create-image.sh: add option to specify output prefixAndrew Donnellan2025-12-181-6/+18
| | | | | | | | | | | | Add an option, -o / --output, to specify a prefix used for the name of the directory where debootstrap generates the system, and the final disk image and SSH key filenames. The default remains using the distro release codename. For now, ban the use of slashes, spaces, . and .. as output names. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: improve help messageAndrew Donnellan2025-12-181-16/+16
| | | | | | | | | | | | | Improve the help message: - sort options alphabetically - print default values - print first line to stdout like the rest of the message - fix typos, improve style Also sort the options parsing to be alphabetical (except --help), and use spaces consistently for indentation in this section. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: update default Debian release to trixieAndrew Donnellan2025-12-111-1/+1
| | | | | | | | | | Debian bullseye is now oldoldstable, so update the default release to trixie. While we're at it, update documentation references to old Debian releases to match. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools: fix perf compiling on debootstrap imagesAlexandre Maloteaux2025-06-161-0/+2
|
* tools: correct resolv.conf filename for nameserver configurationRichard Smith2024-06-051-1/+1
| | | | Signed-off-by: Richard Smith <happyercat@gmail.com>
* tools/create-image.sh: support creating old EoL Debian imagesAlexander Popov2024-05-031-1/+10
| | | | | | | | | | | | Try using `archive.debian.org` and old keys from the Debian keyring if debootstrap fails. This improvement allows the following scenario: ``` sh create-image.sh -s 4096 -d wheezy ``` Signed-off-by: Alexander Popov <alex.popov@linux.com>
* tools/create-image.sh: allow working with multiple imagesAlexander Popov2024-05-031-1/+1
| | | | | | | | | | Currently, the `create-image.sh` script prepares the image in the `./chroot` directory. Let's do that in the `$RELEASE` directory. That allows having multiple debootstrap images at the same time. Signed-off-by: Alexander Popov <alex.popov@linux.com>
* tools/create-image.sh: preserve proxy variables when running debootstrapAndrew Donnellan2023-07-241-1/+1
| | | | | | | | | | | create-image.sh uses sudo to invoke debootstrap, which by default drops existing environment variables. Tell sudo to preserve http_proxy, https_proxy, ftp_proxy and no_proxy variables so that the user's proxy settings are respected by debootstrap. Suggested-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: add non-free-firmware Debian archive componentAndrew Donnellan2023-07-241-1/+1
| | | | | | | | | | | | | In the latest Debian release, bookworm, non-free firmware has been moved to a new archive component, non-free-firmware. This means that running create-image.sh for bookworm will fail, because the firmware-atheros package can no longer be found. Add the non-free-firmware component to debootstrap's arguments. (This appears to still work for older releases such as bullseye, which don't have a non-free-firmware component.) Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: upgrade default release to bullseyeAndrew Donnellan2023-04-121-1/+1
| | | | | | | | | | | | bullseye has been the current Debian stable release since 2021, and stretch is now well and truly in the LTS support phase. Change the default release in create-image.sh to bullseye. Also update most other references to stretch in the documentation and elsewhere (there's still a few references we don't change because they're links to images etc). Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-gce-image.sh: move sysctl's to executorDmitry Vyukov2020-11-211-9/+0
| | | | | | | | | Move the remaining sysctls from image creation scripts into executor. We have the rest in executor now, and these are captured in reproducers and are not duplicated. It seems that ping_group_range was accidentially lost along the way, re-add it.
* tools: add script to check shebang lines (#2234)Mark Johnston2020-11-021-1/+1
| | | | | | | | | | | * pkg/vcs: remove obsolete test script Per Dmitry, this should have been removed as part of 8f58e4b ("pkg/bisect: switch to kconfig.Minimize"). * all: convert shebang lines to use /usr/bin/env * Makefile: fix non-portable use of find(1)
* tools/create-image.sh: use the basename instead of hard-coded linux to point ↵Changming Liu2020-10-311-3/+4
| | | | | | | | | | to the $KERNEL src current script hard-coded the basename for the path of kernel source if the basename of the path for the kernel source code is not "linux", this script will just abort. Fix this by using the basename obtained by the basename utility.
* tools/create-image.sh: support building riscv64 imagesAndrew Donnellan2020-10-081-1/+6
| | | | | | | | riscv64 is not yet a released Debian port, so it's hosted by the debian-ports repository. Add a special case to use debian-ports if the architecture is riscv64. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: fix building of i386 images on x86_64 hostAndrew Donnellan2020-10-081-4/+14
| | | | | | | | | | | | When building an i386 image on an x86_64 host, we don't need to use qemu or check for the presence of an appropriate qemu binfmt_misc configuration. i386 binaries can run natively, so we also don't need to do debootstrap in two stages. Skip qemu checks and run debootstrap in one stage when building i386 on an x86_64 host. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: add architecture mapping x86_64 -> amd64Andrew Donnellan2020-10-081-12/+15
| | | | | | | | | Add a mapping from qemu architecture x86_64 to Debian architecture amd64 which I forgot to add earlier. (Also fix up the indentation to be consistent while we're here.) Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: map qemu -> Debian architecture namesAndrew Donnellan2020-09-181-1/+17
| | | | | | | | | | | | create-image.sh assumes that the qemu name and the Debian name for the target architecture are the same. This is not always true. For comedy and/or historical reasons, Debian refers to 64-bit little endian PowerPC as ppc64el, whereas qemu and most other things use ppc64le. Debian refers to aarch64 as arm64, and 32-bit little endian arm as armel. Add special cases to handle this. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* tools/create-image.sh: resolve mismatch between help message and opt parsingSeonghyun Park2020-09-141-1/+1
|
* tools/create-image.sh: support for foreign architecturesAlexander Egorenkov2020-09-131-1/+35
| | | | | | Also update sy-env to be able to build the root image inside. Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
* tools: add custom udev rules to generated imagesRicardo Cañuelo2020-06-101-0/+4
| | | | | | | | Add a default udev rule file to the image creation process in create-gce-image.sh and create-image.sh. This change creates a default rule to make udev create a custom-named symlink for the specific vim2m device.
* tools/create-image.sh: make sure filesystem root has correct permissionsAndrey Konovalov2020-04-031-1/+2
|
* executor, sys/linux: add ath9k usb descriptionsAndrey Konovalov2020-03-131-2/+2
| | | | | | | Among other things this changes timeout for USB programs from 2 to 3 seconds. ath9k fuzzing also requires ath9k firmware to be present, so system images need to be regenerated with the updated script.
* tools/create-image.sh: install tcpdumpAndrey Konovalov2019-12-191-1/+1
| | | | It's quite useful for debugging network related stuff.
* tools/create-image.sh: add a new option seekZwb2019-10-151-1/+7
| | | | | | | | | | | | | | | | The usage of current create-image.sh: ``` ./create-image.sh -d=stretch -f=minimal --add-perf The options are in the following: -d, --distribution Set on which debian distribution to create -f, --feature Check what packages to install in the image, options are minimal, full -s, --seek Image size (MB), default 2048 (2G) -p, --add-perf Add perf support with this option enabled The default image size may too small (2G) in some debugging scenarios, so change it to configurable.
* tools/create-image.sh: fix two issuesDongliang Mu2019-03-121-4/+18
| | | | allow user to provide ADD_PACKAGE and double check if KERNEL is set when perf is enabled
* create-image.sh: Fix "full" package listKees Cook2019-03-061-3/+2
| | | | | The list of packages to install is comma-separated, not space. This fixes the "-f full" argument to actually install the expected packages.
* tweak create-image.sh script and modify document about its deployment (#1022)Dongliang Mu2019-03-011-2/+6
|
* tools/create-image.sh: make more flexibleDongliang Mu2019-02-151-2/+59
| | | | | | | | | | | | | | The usage of current create-image.sh: ``` ./create-image.sh -d=stretch -f=minimal --add-perf The options are in the following: -d, --distribution Set on which debian distribution to create -f, --feature Check what packages to install in the image, options are minimal, full -p, --add-perf Add perf support with this option enabled The default image is stretch with minimal feature, without perf.
* tools/create-gce-image.sh: mount securityfs and configfsDmitry Vyukov2018-09-261-0/+2
|
* tools: update to Debian stretchKees Cook2018-09-051-4/+5
| | | | | | | This updates the image creation tool to use Debian stretch (current stable) instead of wheezy, which is very out of date. The only change needed here was a hint to systemd to make the root filesystem read-write after booting. Documentation has also been updated.
* dashboard/config: re-enable selinuxDmitry Vyukov2018-09-051-1/+0
| | | | | | | Upstream "selinux: fix mounting of cgroup2 under older policies" commit fixes mounting of cgroup2 under wheezy selinux policy. So don't disable selinux on start. Create separate cmdline arguments that enable selinux and apparmor.
* bpf: disable hardening in favor of unwindingDaniel Borkmann2018-07-051-1/+1
| | | | | | | | | | | | | | | | | I had missed that once hardening is enabled, it automatically disables any exposure of JITed addresses, therefore when crashes or warnings are thrown we don't unwind beyond a helper function. For now disable hardening. After merge window I'll see if it's possible to detangle the case where kernel queries kallsyms internally to find function names whenever a WARN or BUG is thrown. If that's not possible easily, we can potentially add a harden mode 3 which does hardening but does not disable kallsyms exposure and then set this here for tools like syzkaller. Fixes: ac9b19d2e435 ("bpf: enable hardening mode 1 for jited images") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> [dvyukov: also updated dashboard/config/upstream.sysctl]
* bpf: enable hardening mode 1 for jited imagesDaniel Borkmann2018-06-071-0/+1
| | | | | | | | This will harden non-root programs from kernel side, but not root-only ones. Helps also to increase coverage a bit since syzkaller generates programs for both cases. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* bpf: enable full unwind and kallsym export support for jited imagesDaniel Borkmann2018-06-071-0/+1
| | | | | | | Helps syzkaller in particular for unwinding full stack in case of warnings or crashes. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* tools/create-image.sh: fix watchdog_thresh valueDmitry Vyukov2018-05-191-1/+1
| | | watchdog_thresh is capped at 60, so 120 causes EINVAL.
* tools/create-image.sh: add few useful sysctl'sDmitry Vyukov2018-05-181-1/+3
|
* tools: fix create-image.sh againDmitry Vyukov2018-04-071-3/+3
|
* sys/linux: test various binfmt's in execveDmitry Vyukov2018-04-021-3/+4
|
* tools: remove stray comments in create-image.shDmitry Vyukov2018-03-291-3/+3
| | | | The comments were unintentionally committed in a previous commit.
* sys/linux: add cgroup descriptionsDmitry Vyukov2018-03-251-26/+27
|
* tools: fix create-image.shDmitry Vyukov2017-12-081-3/+3
| | | | Uncomment unintentionally commented out lines from a previous commit.
* tools: include selinux packages when building imagesDmitry Vyukov2017-12-081-3/+3
| | | | These packages are required to actually activate selinux during boot.
* tools/create-image.sh: create 2G imagesDmitry Vyukov2017-07-171-1/+1
| | | | | 1G does not seem to be enough. Create 2G images as we do in create-gce-image.sh.
* Added GCC and glibcraminfp2017-06-221-1/+1
|
* tools: sync create-image.sh and create-gce-image.shDmitry Vyukov2017-06-031-0/+3
| | | | Move few additional settings from create-gce-image.sh to create-image.sh.
* Add sudo for mkfs.ext4Oscar Salvador2017-03-301-1/+1
|
* prog, sys: add icmp descriptions and checksumAndrey Konovalov2017-02-061-0/+1
|
* tools/create-image.sh: add psmisc package for killallDmitry Vyukov2017-01-241-1/+2
| | | | + raise console output level, otherwise stack traces may be dropped
* tools/create-image.sh: simplify scriptDmitry Vyukov2017-01-161-5/+1
| | | | Checkout necessary packages during debootstrap instead of a separate step.
* tools/create-image.sh: install sudo into the imageDmitry Vyukov2016-12-071-1/+1
|