X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=init.sh;h=eac9bd9834685f05636934ff298f92c23de03529;hb=eb6574f806edc7b1f26f7c56132be9c6ae8a8778;hp=f619f30999d65fb374a4a583dba5acaf61c1e3bb;hpb=2222e64625020ecffca52928660e94afde4426c3;p=fedora-riscv.git diff --git a/init.sh b/init.sh index f619f30..eac9bd9 100755 --- a/init.sh +++ b/init.sh @@ -1,6 +1,37 @@ #!/bin/bash - # Init script installed in stage3 disk image. +# Root filesystem is mounted as ro, remount it as rw. +mount.static -o remount,rw / + +# Mount standard filesystems. +mount.static -t proc /proc /proc +mount.static -t sysfs /sys /sys +mount.static -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run +mkdir -p /run/lock + +# XXX devtmpfs + +# Initialize dynamic linker cache. +ldconfig /usr/lib64 /usr/lib /lib64 /lib + +# There is no hardware clock, just ensure the date is not miles out. +date `date -r /usr/bin +%m%d%H%M%Y` + +hostname stage3 +echo stage3.fedoraproject.org > /etc/hostname + +# Set up the PATH. The GCC path is a hack because I wasn't able to +# find the right flags for configuring GCC. +PATH=/usr/libexec/gcc/riscv64-unknown-linux-gnu/6.1.0:\ +/usr/local/bin:\ +/usr/local/sbin:\ +/usr/bin:\ +/usr/sbin:\ +/bin:\ +/sbin +export PATH + echo echo "Welcome to the Fedora/RISC-V stage3 disk image" echo "https://fedoraproject.org/wiki/Architectures/RISC-V"