Add strace to the stage3 chroot.
[fedora-riscv.git] / init.sh
1 #!/bin/bash -
2 # Init script installed in stage3 disk image.
3
4 # Root filesystem is mounted as ro, remount it as rw.
5 mount.static -o remount,rw /
6
7 # Mount standard filesystems.
8 mount.static -t proc /proc /proc
9 mount.static -t sysfs /sys /sys
10 mount.static -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run
11 mkdir -p /run/lock
12
13 # XXX devtmpfs
14
15 # Initialize dynamic linker cache.
16 ldconfig /usr/lib64 /usr/lib /lib64 /lib
17
18 echo
19 echo "Welcome to the Fedora/RISC-V stage3 disk image"
20 echo "https://fedoraproject.org/wiki/Architectures/RISC-V"
21 echo
22
23 PS1='stage3:\w\$ '
24 export PS1
25
26 # Run bash.
27 bash -i
28
29 # Sync disks and shut down.
30 sync
31 poweroff