This file is indexed.

/usr/share/subiquity/installer/runinstaller is in subiquity-tools 0.0.29.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
# Copyright 2015 Canonical, Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

ARCH=${ARCH-"`uname -m`"}
MEM=${MEM-"1024"}
INSTALLER=${INSTALLER-"installer.img"}
UEFI=${UEFI-"1"}
TARGET=${TARGET-"target.img"}
GRAPHIC="-serial stdio"
SPORT=2445

QEMU=`which qemu-system-$ARCH`;
case $ARCH in
    i386|x86_64)
        PKG="ovmf qemu-system-x86"
        if [ "${UEFI}" == "1" ]; then
            UEFI=" -bios /usr/share/ovmf/OVMF.fd"
        else
            UEFI=""
        fi
    ;;
    arm*) PKG=qemu-system-arm ;;
    ppc*) PKG=qemu-system-ppc ;;
    *)
    echo "Unsupported arch: $ARCH";
    exit 1;
    ;;
esac
if [ -z $QEMU ]; then
    echo "Installing required packages: $PKG"
    sudo apt-get install $PKG || {
        echo "Failed to install qemu-system package(s) $PKG";
        if echo $PKG | grep -q ovmf; then
            echo "ovmf package is only available in multiverse."
            echo "You can enable multiverse and try again:"
            echo "sudo add-apt-repository multiverse"
        fi
        exit 1;
    }
fi
# don't spawn sdl if we're headless
if [ -z $DISPLAY ]; then
    GRAPHIC="-nographic"
fi

# always recreate the target image
echo "Creating dummy target image: ${TARGET}"
qemu-img create -f raw ${TARGET}_1 5G
qemu-img create -f raw ${TARGET}_2 1G
qemu-img create -f raw ${TARGET}_3 1G
qemu-img create -f raw ${TARGET}_4 1G

# TODO, curses should work, make serial|nographic optional
echo "Launching Installer VM"
sudo qemu-system-$ARCH -smp 2 -m $MEM -enable-kvm $UEFI\
                       -drive snapshot=on,format=raw,cache=unsafe,if=ide,file=$INSTALLER,serial=QM_INSTALL_01 \
                       -drive format=raw,cache=unsafe,if=ide,file=${TARGET}_1,serial=QM_TARGET_01 \
                       -drive format=raw,cache=unsafe,if=virtio,file=${TARGET}_2,serial=QM_TARGET_02 \
                       -drive format=raw,cache=unsafe,if=virtio,file=${TARGET}_3,serial=QM_TARGET_03 \
                       -drive format=raw,cache=unsafe,if=virtio,file=${TARGET}_4,serial=QM_TARGET_04 \
                       -global isa-fdc.driveA= -net user \
                       -net nic,model=e1000 \
                       -net nic,model=virtio \
                       -net nic,model=i82559er \
                       -monitor telnet:127.0.0.1:2446,server,nowait \
                       ${GRAPHIC}

exit $?