This file is indexed.

/usr/share/initramfs-tools/scripts/local-bottom/bootcdaufs is in bootcd 4.05.

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
82
83
84
85
#!/bin/sh

# if necessary mount iso image loopback
# use aufs to make iso image "writable"

# See manpage initramfs-tools(8)
[ -f /scripts/functions ] && . /scripts/functions

PREREQ=""
prereqs()
{
    echo "$PREREQ"
}

case $1 in
prereqs)
    prereqs
    exit 0
    ;;
esac

# chkerr <EXIT CODE> <action performed>
chkerr()
{
    e=$1
    shift 
    if [ $e -ne 0 ]; then
      echo "bootcdaufs: ERROR $e while running: $*"
      echo "try to fix and exit"
      /bin/sh
    fi
}

getiso()
{
  sed -n "s/^.*\<root=iso:\([^ :]*\):\([^ ]*\)\>.*$/\2/p"
}


if [ "$(grep "\<bootcd=" /proc/cmdline)" ]; then
    echo "bootcdaufs rootmnt=<$rootmnt>"

    iso="$(cat /proc/cmdline | getiso)"
    if [ "$iso" ]; then
      mkdir /bootcd.disk_with_iso
      mount --move ${rootmnt} /bootcd.disk_with_iso
      chkerr $? "mount --move ${rootmnt} /bootcd.disk_with_iso"

      modprobe loop
      mount -o loop -t iso9660 /bootcd.disk_with_iso/${iso} ${rootmnt}
      chkerr $? "mount -o loop -t iso9660 /bootcd.disk_with_iso/${iso} ${rootmnt}"
    fi

    mkdir /bootcd.aufs
    mount none -t tmpfs /bootcd.aufs
    chkerr $? "mount none -t tmpfs /bootcd.aufs"

    mkdir /bootcd.ro
    mount --move ${rootmnt} /bootcd.ro
    chkerr $? "mount --move ${rootmnt} /bootcd.ro"

    mkdir /aufs
    mount none -t aufs -o dirs=/bootcd.aufs:/bootcd.ro=ro /aufs
    chkerr $? "mount none -t aufs -o dirs=/bootcd.aufs:/bootcd.ro=ro /aufs"


    mkdir -p /aufs/mnt/bootcd.ro 
    mount --move /bootcd.ro /aufs/mnt/bootcd.ro
    chkerr $? "mount --move /bootcd /aufs/mnt/bootcd.ro"

    if [ "$iso" ]; then
      mkdir -p /aufs/mnt/bootcd.disk_with_iso
      mount --move /bootcd.disk_with_iso /aufs/mnt/bootcd.disk_with_iso
      chkerr $? "mount --move /bootcd.disk_with_iso /aufs/mnt/bootcd.disk_with_iso"
    fi

    mkdir -p /aufs/mnt/bootcd.aufs
    mount --move /bootcd.aufs /aufs/mnt/bootcd.aufs
    chkerr $? "mount --move /bootcd.aufs /aufs/mnt/bootcd.aufs"

    mount --move /aufs ${rootmnt}
    chkerr $? "mount --move /aufs ${rootmnt}"
fi

exit 0