forked from linuxboot/heads
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit
executable file
·37 lines (31 loc) · 1 KB
/
init
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
#!/bin/ash
# First thing it is vital to mount the /dev and other system directories
mkdir /proc /sys /dev /tmp /boot 2>&- 1>&-
mount -t devtmpfs none /dev
mount -t proc none /proc
mount -t sysfs none /sys
# Now it is safe to print a banner
echo '====================================================='
echo ' _ _ _ ____ ___ __ __ '
echo '| | | | ___ __ _ __| |___ _ | _ \ / _ \| \/ |'
echo '| |_| |/ _ \/ _` |/ _` / __| (_) | |_) | | | | |\/| |'
echo '| _ | __/ (_| | (_| \__ \ _ | _ <| |_| | | | |'
echo '|_| |_|\___|\__,_|\__,_|___/ (_) |_| \_\\___/|_| |_|'
echo ''
echo '====================================================='
echo
echo "Run './start-xen' to load the hypervisor"
echo "Run 'kexec -e' to boot it"
echo
# Load the date from the hardware clock, setting it in local time
hwclock -l -s
# Verify the user's TPM secret
date
if [ -r /secret.totp ]; then
echo
echo -n "Verify TPM PCR: "
unsealtotp /secret.totp
echo
fi
# Start an interactive shell
exec /bin/ash