2019-02-10 10:18:12 +00:00
|
|
|
if [ $(id -u) != 0 ]; then
|
|
|
|
echo "This needs to be run as root"
|
|
|
|
exit
|
|
|
|
fi
|
2018-11-09 00:25:31 +00:00
|
|
|
rm -vf _fs_contents.lock
|
|
|
|
rm -vf _fs_contents
|
2019-02-23 16:24:50 +00:00
|
|
|
dd if=/dev/zero of=_fs_contents bs=1M count=256
|
2019-02-08 07:45:59 +00:00
|
|
|
mke2fs _fs_contents
|
|
|
|
chown 1000:1000 _fs_contents
|
2018-11-09 00:25:31 +00:00
|
|
|
mkdir -vp mnt
|
2018-10-23 08:12:50 +00:00
|
|
|
mount -o loop _fs_contents mnt/
|
2019-02-08 07:45:59 +00:00
|
|
|
mkdir -vp mnt/bin
|
|
|
|
mkdir -vp mnt/etc
|
|
|
|
mkdir -vp mnt/proc
|
2019-02-09 08:22:04 +00:00
|
|
|
mkdir -vp mnt/tmp
|
|
|
|
chmod 1777 mnt/tmp
|
2018-11-16 21:14:40 +00:00
|
|
|
mkdir -vp mnt/dev
|
2019-02-08 07:45:59 +00:00
|
|
|
mkdir -vp mnt/dev/pts
|
2019-02-21 14:45:31 +00:00
|
|
|
mknod -m 666 mnt/dev/bxvga b 82 413
|
2018-11-16 21:14:40 +00:00
|
|
|
mknod mnt/dev/tty0 c 4 0
|
|
|
|
mknod mnt/dev/tty1 c 4 1
|
|
|
|
mknod mnt/dev/tty2 c 4 2
|
|
|
|
mknod mnt/dev/tty3 c 4 3
|
2019-02-11 05:59:02 +00:00
|
|
|
mknod mnt/dev/random c 1 8
|
|
|
|
mknod mnt/dev/null c 1 3
|
|
|
|
mknod mnt/dev/zero c 1 5
|
|
|
|
mknod mnt/dev/full c 1 7
|
2019-01-16 16:20:58 +00:00
|
|
|
mknod mnt/dev/keyboard c 85 1
|
2019-01-14 13:21:51 +00:00
|
|
|
mknod mnt/dev/psaux c 10 1
|
2019-02-21 14:45:31 +00:00
|
|
|
mknod -m 666 mnt/dev/ptmx c 5 2
|
2019-02-03 11:38:03 +00:00
|
|
|
ln -s /proc/self/fd/0 mnt/dev/stdin
|
|
|
|
ln -s /proc/self/fd/1 mnt/dev/stdout
|
|
|
|
ln -s /proc/self/fd/2 mnt/dev/stderr
|
2019-01-30 19:40:41 +00:00
|
|
|
cp -vR ../Base/* mnt/
|
2019-02-23 16:24:50 +00:00
|
|
|
cp -vR ../Root/* mnt/
|
2019-02-21 22:35:07 +00:00
|
|
|
mkdir mnt/home/anon
|
|
|
|
mkdir mnt/home/nona
|
2019-03-06 23:31:06 +00:00
|
|
|
cp ../ReadMe.md mnt/home/anon/
|
2019-02-10 10:18:12 +00:00
|
|
|
chown -vR 100:100 mnt/home/anon
|
2019-02-21 22:35:07 +00:00
|
|
|
chown -vR 200:200 mnt/home/nona
|
2018-11-09 00:25:31 +00:00
|
|
|
cp -v ../Userland/sh mnt/bin/sh
|
|
|
|
cp -v ../Userland/id mnt/bin/id
|
|
|
|
cp -v ../Userland/ps mnt/bin/ps
|
|
|
|
cp -v ../Userland/ls mnt/bin/ls
|
2018-11-11 19:42:41 +00:00
|
|
|
cp -v ../Userland/fgrep mnt/bin/fgrep
|
2018-11-09 00:25:31 +00:00
|
|
|
cp -v ../Userland/sleep mnt/bin/sleep
|
|
|
|
cp -v ../Userland/date mnt/bin/date
|
|
|
|
cp -v ../Userland/true mnt/bin/true
|
|
|
|
cp -v ../Userland/false mnt/bin/false
|
|
|
|
cp -v ../Userland/hostname mnt/bin/hostname
|
|
|
|
cp -v ../Userland/cat mnt/bin/cat
|
|
|
|
cp -v ../Userland/uname mnt/bin/uname
|
|
|
|
cp -v ../Userland/clear mnt/bin/clear
|
|
|
|
cp -v ../Userland/tst mnt/bin/tst
|
|
|
|
cp -v ../Userland/mm mnt/bin/mm
|
|
|
|
cp -v ../Userland/kill mnt/bin/kill
|
|
|
|
cp -v ../Userland/tty mnt/bin/tty
|
2018-11-18 13:57:41 +00:00
|
|
|
cp -v ../Userland/mkdir mnt/bin/mkdir
|
2018-12-19 20:14:55 +00:00
|
|
|
cp -v ../Userland/touch mnt/bin/touch
|
2018-12-19 23:39:29 +00:00
|
|
|
cp -v ../Userland/sync mnt/bin/sync
|
2018-12-21 01:42:30 +00:00
|
|
|
cp -v ../Userland/more mnt/bin/more
|
2019-01-22 06:03:44 +00:00
|
|
|
cp -v ../Userland/rm mnt/bin/rm
|
2019-01-28 03:16:01 +00:00
|
|
|
cp -v ../Userland/rmdir mnt/bin/rmdir
|
2019-01-27 06:18:26 +00:00
|
|
|
cp -v ../Userland/cp mnt/bin/cp
|
2019-01-20 04:48:43 +00:00
|
|
|
cp -v ../Userland/guitest2 mnt/bin/guitest2
|
2019-01-18 14:35:38 +00:00
|
|
|
cp -v ../Userland/sysctl mnt/bin/sysctl
|
2019-02-08 15:19:16 +00:00
|
|
|
cp -v ../Userland/pape mnt/bin/pape
|
2019-01-28 21:40:55 +00:00
|
|
|
cp -v ../Userland/dmesg mnt/bin/dmesg
|
2019-01-29 03:55:08 +00:00
|
|
|
cp -v ../Userland/chmod mnt/bin/chmod
|
2019-02-27 11:32:53 +00:00
|
|
|
cp -v ../Userland/chown mnt/bin/chown
|
2019-02-04 09:28:12 +00:00
|
|
|
cp -v ../Userland/top mnt/bin/top
|
2019-02-21 12:26:40 +00:00
|
|
|
cp -v ../Userland/ln mnt/bin/ln
|
2019-02-21 13:48:00 +00:00
|
|
|
cp -v ../Userland/df mnt/bin/df
|
2019-02-21 22:35:07 +00:00
|
|
|
cp -v ../Userland/su mnt/bin/su
|
2019-02-22 00:55:22 +00:00
|
|
|
cp -v ../Userland/env mnt/bin/env
|
2019-02-27 20:45:06 +00:00
|
|
|
cp -v ../Userland/stat mnt/bin/stat
|
2019-03-12 14:51:42 +00:00
|
|
|
cp -v ../Userland/ping mnt/bin/ping
|
2019-03-13 14:00:02 +00:00
|
|
|
cp -v ../Userland/uc mnt/bin/uc
|
2019-03-13 16:33:40 +00:00
|
|
|
cp -v ../Userland/tc mnt/bin/tc
|
2019-02-21 22:35:07 +00:00
|
|
|
chmod 4755 mnt/bin/su
|
2019-02-10 07:35:01 +00:00
|
|
|
cp -v ../Applications/Terminal/Terminal mnt/bin/Terminal
|
|
|
|
cp -v ../Applications/FontEditor/FontEditor mnt/bin/FontEditor
|
|
|
|
cp -v ../Applications/Launcher/Launcher mnt/bin/Launcher
|
|
|
|
cp -v ../Applications/FileManager/FileManager mnt/bin/FileManager
|
2019-02-28 00:43:50 +00:00
|
|
|
cp -v ../Applications/ProcessManager/ProcessManager mnt/bin/ProcessManager
|
2019-02-12 14:23:07 +00:00
|
|
|
cp -v ../Applications/About/About mnt/bin/About
|
2019-03-06 23:31:06 +00:00
|
|
|
cp -v ../Applications/TextEditor/TextEditor mnt/bin/TextEditor
|
2019-02-16 23:13:47 +00:00
|
|
|
cp -v ../WindowServer/WindowServer mnt/bin/WindowServer
|
2018-11-09 00:25:31 +00:00
|
|
|
cp -v kernel.map mnt/
|
2019-02-08 15:19:16 +00:00
|
|
|
sh sync-local.sh
|
2018-10-23 08:12:50 +00:00
|
|
|
umount mnt
|
|
|
|
sync
|