Operating System Programming 4DISS

(V144a-20210918). This site is managed by VauLSMorg (vlsm.org) since 2020.
May the fork() be with Jolan Tru! --- operatingsystems (@T) vlsm dot org.

View on GitHub

HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT


Assignment WEEK 08 (eg. cbkadal)

Read OSC-10 Chapter 5 slides.


Visit https://os.vlsm.org/GitHubPages/


Create your TOP 10 List of WEEK 08


WEEK 08 - 10: Build Your Own Linux From Scratch (LFS)

WEEK 08: LFS chapter 1, 2, 3, 4.

WEEK 09: LFS chapter 5, 6, 7.

WEEK 10: LFS chapter 8.


Preparation


New Hostname


Username


WEEK08-REPORT1.txt

INPUT-01

FILE1="WEEK08-REPORT1.txt"

rm    -rf $HOME/RESULT/W08/
mkdir -pv $HOME/RESULT/W08/
cd        $HOME/RESULT/W08/

echo "ZCZC pwd"          > $FILE1
pwd                     >> $FILE1
echo "ZCZC date"        >> $FILE1
date                    >> $FILE1
echo "ZCZC df"          >> $FILE1
df                      >> $FILE1
echo "ZCZC hostnamectl" >> $FILE1
hostnamectl             >> $FILE1
echo "ZCZC chktoken"    >> $FILE1
chktoken cbkadalW08     >> $FILE1

cat  $FILE1

echo "Do verifyToken!"
ls -al

OUTPUT-01

cbkadal@osp:~$ FILE1="WEEK08-REPORT1.txt"

cbkadal@osp:~$ rm    -rf $HOME/RESULT/W08/

cbkadal@osp:~$ mkdir -pv $HOME/RESULT/W08/
mkdir: created directory '/home/cbkadal/RESULT/W08/'

cbkadal@osp:~$ cd        $HOME/RESULT/W08/

cbkadal@osp:~/RESULT/W08$ echo "ZCZC pwd"          > $FILE1

cbkadal@osp:~/RESULT/W08$ pwd                     >> $FILE1

cbkadal@osp:~/RESULT/W08$ echo "ZCZC date"        >> $FILE1

cbkadal@osp:~/RESULT/W08$ date                    >> $FILE1

cbkadal@osp:~/RESULT/W08$ echo "ZCZC df"          >> $FILE1

cbkadal@osp:~/RESULT/W08$ df                      >> $FILE1

cbkadal@osp:~/RESULT/W08$ echo "ZCZC hostnamectl" >> $FILE1

cbkadal@osp:~/RESULT/W08$ hostnamectl             >> $FILE1

cbkadal@osp:~/RESULT/W08$ echo "ZCZC chktoken"    >> $FILE1

cbkadal@osp:~/RESULT/W08$ chktoken cbkadalW08     >> $FILE1

cbkadal@osp:~/RESULT/W08$ cat  $FILE1
ZCZC pwd
/home/cbkadal/RESULT/W08
ZCZC date
Sun  2 May 23:11:32 WIB 2021
ZCZC df
Filesystem     1K-blocks    Used Available Use% Mounted on
udev              490184       0    490184   0% /dev
tmpfs             101016    3008     98008   3% /run
/dev/sda2       65543732 5065712  57118788   9% /
tmpfs             505076       0    505076   0% /dev/shm
tmpfs               5120       0      5120   0% /run/lock
tmpfs             505076       0    505076   0% /sys/fs/cgroup
/dev/sdb2       65543732   53272  62131228   1% /mnt/lfs
tmpfs             101012       0    101012   0% /run/user/1000
ZCZC hostnamectl
   Static hostname: cbkadal
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ZYXYZZYXYZZYXYZZYXYZZYXYZZYXYZZY
           Boot ID: ZYXYZZYXYZZYXYZZYXYZZYXYZZYXYZZY
    Virtualization: oracle
  Operating System: Debian GNU/Linux 10 (buster)
            Kernel: Linux 4.19.0-16-amd64
      Architecture: x86-64
ZCZC chktoken
cbkadal 1134-CF32

cbkadal@osp:~/RESULT/W08$ echo "Do verifyToken!"
Do verifyToken!

cbkadal@osp:~/RESULT/W08$ ls -al
total 12
drwxr-xr-x 2 cbkadal cbkadal 4096 May  2 23:11 .
drwxr-xr-x 8 cbkadal cbkadal 4096 May  2 23:11 ..
-rw-r--r-- 1 cbkadal cbkadal  977 May  2 23:11 WEEK08-REPORT1.txt

cbkadal@osp:~/RESULT/W08$

cbkadal@osp:~/RESULT/W08$ verifyToken cbkadalW08 cbkadal 1134-CF32
Verified


Do LFS chapter 1 - 4


Verify your work

INPUT-02

LFS=/mnt/lfs
FILE2="$HOME/RESULT/W08/WEEK08-REPORT2.txt"
FILE3="$HOME/RESULT/W08/WEEK08-md5sum.txt"

pushd $LFS/sources
  rm -f md5sums
  wget https://www.linuxfromscratch.org/lfs/view/10.1/md5sums
echo "ZCZC md5sum"       > $FILE3
  md5sum -c md5sums     >> $FILE3
popd
echo "ZCZC df"           > $FILE2
df                      >> $FILE2
echo "ZCZC pwd"         >> $FILE2
pwd                     >> $FILE2
echo "ZCZC date"        >> $FILE2
date                    >> $FILE2
echo "ZCZC hostname"    >> $FILE2
hostname                >> $FILE2
echo "ZCZC chktoken"    >> $FILE2
chktoken cbkadalW08     >> $FILE2

ls -al

OUTPUT-02

cbkadal:~/RESULT/W08$ LFS=/mnt/lfs

cbkadal:~/RESULT/W08$ FILE2="$HOME/RESULT/W08/WEEK08-REPORT2.txt"

cbkadal:~/RESULT/W08$ FILE3="$HOME/RESULT/W08/WEEK08-md5sum.txt"

cbkadal:~/RESULT/W08$ pushd $LFS/sources
/mnt/lfs/sources ~/RESULT/W08
cbkadal:/mnt/lfs/sources$   rm -f md5sums
cbkadal:/mnt/lfs/sources$   wget https://www.linuxfromscratch.org/lfs/view/10.1/md5sums
--2021-05-03 00:36:46--  https://www.linuxfromscratch.org/lfs/view/10.1/md5sums
Resolving www.linuxfromscratch.org (www.linuxfromscratch.org)... 208.118.68.85
Connecting to www.linuxfromscratch.org (www.linuxfromscratch.org)|208.118.68.85|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4586 (4.5K)
Saving to: ‘md5sums’

md5sums                     100%[=========================================>]   4.48K  --.-KB/s    in 0.001s  

2021-05-03 00:36:48 (3.35 MB/s) - ‘md5sums’ saved [4586/4586]

cbkadal:/mnt/lfs/sources$ echo "ZCZC md5sum"       > $FILE3

cbkadal:/mnt/lfs/sources$   md5sum -c md5sums     >> $FILE3

cbkadal:/mnt/lfs/sources$ popd
~/RESULT/W08

cbkadal:~/RESULT/W08$ echo "ZCZC df"           > $FILE2

cbkadal:~/RESULT/W08$ df                      >> $FILE2

cbkadal:~/RESULT/W08$ echo "ZCZC pwd"         >> $FILE2

cbkadal:~/RESULT/W08$ pwd                     >> $FILE2

cbkadal:~/RESULT/W08$ echo "ZCZC date"        >> $FILE2

cbkadal:~/RESULT/W08$ date                    >> $FILE2

cbkadal:~/RESULT/W08$ echo "ZCZC hostname"    >> $FILE2

cbkadal:~/RESULT/W08$ hostname                >> $FILE2

cbkadal:~/RESULT/W08$ echo "ZCZC chktoken"    >> $FILE2

cbkadal:~/RESULT/W08$ chktoken cbkadalW08     >> $FILE2

cbkadal:~/RESULT/W08$ ls -al
total 16
drwxr-xr-x 2 cbkadal cbkadal 4096 May  3 00:36 .
drwxr-xr-x 3 cbkadal cbkadal 4096 May  2 23:38 ..
-rw-r--r-- 1 cbkadal cbkadal 2078 May  3 00:36 WEEK08-md5sum.txt
-rw-r--r-- 1 cbkadal cbkadal  977 May  2 23:11 WEEK08-REPORT1.txt
-rw-r--r-- 1 cbkadal cbkadal  648 May  3 00:36 WEEK08-REPORT2.txt

cbkadal:~/RESULT/W08$

cbkadal:~/RESULT/W08$ verifyToken cbkadalW08 cbkadal 3653-7B1A
Verified


Update “TXT/myscript.sh”

INPUT-03

cd $HOME/git/os211/TXT/
ls -al
bash myscript.sh
ls -al

OUTPUT-03

cbkadal@cbkadal:~$ cd $HOME/git/os211/TXT/

cbkadal@cbkadal:~/git/os211/TXT$ ls -al
total 164
drwxr-xr-x 2 cbkadal cbkadal   4096 Apr 27 15:39 .
drwxr-xr-x 9 cbkadal cbkadal   4096 May  2 18:21 ..
-rw-r--r-- 1 cbkadal cbkadal   1171 Mar 11 14:28 mylog.txt
-rw-r--r-- 1 cbkadal cbkadal   3147 Mar 11 14:28 mypubkey.txt
-rw-r--r-- 1 cbkadal cbkadal    491 Mar 11 14:28 myrank.txt
-rw-r--r-- 1 cbkadal cbkadal   1590 Mar 27 00:12 myscript.sh
-rw-r--r-- 1 cbkadal cbkadal   3555 Apr 27 15:39 myW03.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal  11713 Apr 27 15:39 myW04.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal 109574 Apr 27 15:39 myW05.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal   2653 Apr 27 15:39 myW06.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal   3478 Apr 27 15:39 myW07.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal    730 Apr 27 15:39 SHA256SUM
-rw-r--r-- 1 cbkadal cbkadal    833 Apr 27 15:39 SHA256SUM.asc

cbkadal@cbkadal:~/git/os211/TXT$ bash myscript.sh
~/RESULT ~/git/os211/TXT
tar cfj myW03.tar.bz2 W03/
gpg --armor --output myW03.tar.bz2.asc --encrypt --recipient operatingsystems@vlsm.org --recipient cbk@dummy myW03.tar.bz2
tar cfj myW04.tar.bz2 W04/
gpg --armor --output myW04.tar.bz2.asc --encrypt --recipient operatingsystems@vlsm.org --recipient cbk@dummy myW04.tar.bz2
tar cfj myW05.tar.bz2 W05/
gpg --armor --output myW05.tar.bz2.asc --encrypt --recipient operatingsystems@vlsm.org --recipient cbk@dummy myW05.tar.bz2
tar cfj myW06.tar.bz2 W06/
gpg --armor --output myW06.tar.bz2.asc --encrypt --recipient operatingsystems@vlsm.org --recipient cbk@dummy myW06.tar.bz2
tar cfj myW07.tar.bz2 W07/
gpg --armor --output myW07.tar.bz2.asc --encrypt --recipient operatingsystems@vlsm.org --recipient cbk@dummy myW07.tar.bz2
tar cfj myW08.tar.bz2 W08/
gpg --armor --output myW08.tar.bz2.asc --encrypt --recipient operatingsystems@vlsm.org --recipient cbk@dummy myW08.tar.bz2
~/git/os211/TXT
Check and move /home/cbkadal/RESULT/myW03.tar.bz2.asc...
Check and move /home/cbkadal/RESULT/myW04.tar.bz2.asc...
Check and move /home/cbkadal/RESULT/myW05.tar.bz2.asc...
Check and move /home/cbkadal/RESULT/myW06.tar.bz2.asc...
Check and move /home/cbkadal/RESULT/myW07.tar.bz2.asc...
Check and move /home/cbkadal/RESULT/myW08.tar.bz2.asc...
rm -f SHA256SUM SHA256SUM.asc
sha256sum my*.asc my*.txt my*.sh > SHA256SUM
sha256sum -c SHA256SUM
myW03.tar.bz2.asc: OK
myW04.tar.bz2.asc: OK
myW05.tar.bz2.asc: OK
myW06.tar.bz2.asc: OK
myW07.tar.bz2.asc: OK
myW08.tar.bz2.asc: OK
mylog.txt: OK
mypubkey.txt: OK
myrank.txt: OK
myscript.sh: OK
gpg -o SHA256SUM.asc -a -sb SHA256SUM
gpg --verify SHA256SUM.asc SHA256SUM
gpg: Signature made Mon 03 May 2021 00:25:45 WIB
gpg:                using RSA key 56754A8214D01B20B97BF5EF078CA2C2F3F22F37
gpg: Good signature from "Cicak Bin Kadal (CBK) <cbk@dummy>" [ultimate]

cbkadal@cbkadal:~/git/os211/TXT$ ls -al
total 172
drwxr-xr-x 2 cbkadal cbkadal   4096 May  3 00:25 .
drwxr-xr-x 9 cbkadal cbkadal   4096 May  2 18:21 ..
-rw-r--r-- 1 cbkadal cbkadal   1171 Mar 11 14:28 mylog.txt
-rw-r--r-- 1 cbkadal cbkadal   3147 Mar 11 14:28 mypubkey.txt
-rw-r--r-- 1 cbkadal cbkadal    491 Mar 11 14:28 myrank.txt
-rw-r--r-- 1 cbkadal cbkadal   1590 Mar 27 00:12 myscript.sh
-rw-r--r-- 1 cbkadal cbkadal   3555 May  3 00:25 myW03.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal  11713 May  3 00:25 myW04.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal 109574 May  3 00:25 myW05.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal   2653 May  3 00:25 myW06.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal   3092 May  3 00:25 myW07.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal   6626 May  3 00:25 myW08.tar.bz2.asc
-rw-r--r-- 1 cbkadal cbkadal    814 May  3 00:25 SHA256SUM
-rw-r--r-- 1 cbkadal cbkadal    833 May  3 00:25 SHA256SUM.asc

cbkadal@cbkadal:~/git/os211/TXT$


Do the “4 git mantra”: pull, add, commit, push.

INPUT-04

git pull; git add -A; git commit -m "OS211 cbkadal"; git push;

OUTPUT-04

cbkadal@cbkadal:~/git/os211$ git pull; git add -A; git commit -m "OS211 cbkadal"; git push;
Already up to date.
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
Enumerating objects: 22, done.
Counting objects: 100% (22/22), done.
Delta compression using up to 6 threads
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 103.87 KiB | 20.77 MiB/s, done.
Total 12 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:cbkadal/os211.git
   436d35c..bae1253  master -> master

cbkadal@cbkadal:~/git/os211$ 


Update your log


CHECK LIST

HOMEPAGE: links to W01/, W02/, W03/, W04/, W05/, W06/, W07/, W08/.
Top10 Files: w01.md, w02.md, w03.md, w04.md, w05.md, w06.md, w07.md, w08.md.
TXT/mypubkey.txt: Public Key.
TXT/myrank.txt: Top10 review up to Week07.
W08/WEEK08-md5sum.txt  (assignment).
W08/WEEK08-REPORT1.txt (assignment).
W08/WEEK08-REPORT2.txt (assignment).
TXT/myscript.sh: A script to automate the process.
TARBALLS: myW03.tar.bz2.asc, myW04.tar.bz2.asc, myW05.tar.bz2.asc, 
myW06.tar.bz2.asc, myW07.tar.bz2.asc, myW08.tar.bz2.asc (assignments).
TXT/mylog.txt: Log Update.
Checksum: SHA256SUM .
Signature: SHA256SUM.asc.



HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT