Installation Notes for Teo En Ming Extremely Simple Linux 1810.08
=================================================================
Definitely must watch YouTube video: https://www.youtube.com/watch?v=YrJADssqaQU
Author: Mr. Turritopsis Dohrnii Teo En Ming
Country: Singapore
Start: 8th October 2018 Monday 10:00 PM Singapore Time GMT+8
End: 9th October 2018 Tuesday 2:30 AM Singapore Time GMT+8
NOTE: Compiling a Linux operating system on Intel Core i7-5820K (6
cores) will take
approximately 4.5 hours.
Steps
=====
001. Download CentOS 7.5 1804 from the mirror at National University
of Singapore (NUS)
http://mirror.nus.edu.sg/centos/7.5.1804/isos/x86_64/CentOS-7-x86_64-DVD-1804.iso
002. Install CentOS 7.5 1804 as an Oracle VirtualBox 5.2.18 virtual
machine in Windows 10 version 1803 host operating system.
003. During Software Selection, choose *Development and Creative
Workstation*. This is mandatory for compiling software and
operating systems.
004. Click Additional Development.
005. Click Development Tools.
006. Click Perl for Web.
007. Click Platform Development.
008. Click Done.
009. After completing installation, login to CentOS 7.5 1804 using Putty.
010. Search for gcc (GNU Compiler Collection).
[teoenming@centos ~]$ rpm -qa | grep gcc
gcc-4.8.5-28.el7.x86_64
gcc-c++-4.8.5-28.el7.x86_64
gcc-gfortran-4.8.5-28.el7.x86_64
libgcc-4.8.5-28.el7.x86_64
011. Search for make.
[teoenming@centos ~]$ rpm -qa | grep make
make-3.82-23.el7.x86_64
automake-1.13.4-3.el7.noarch
cmake-2.8.12.2-2.el7.x86_64
012. Search for ncurses.
[teoenming@centos ~]$ rpm -qa | grep ncurses
ncurses-base-5.9-14.20130511.el7_4.noarch
ncurses-devel-5.9-14.20130511.el7_4.x86_64
ncurses-5.9-14.20130511.el7_4.x86_64
ncurses-libs-5.9-14.20130511.el7_4.x86_64
013. Search for perl.
[teoenming@centos ~]$ rpm -qa | grep perl
<Super long list...snipped>
014. Search for grub (Grand Unified Boot Loader).
[root@centos ~]# rpm -qa | grep grub
grub2-pc-modules-2.02-0.65.el7.centos.2.noarch
grubby-8.28-23.el7.x86_64
grub2-2.02-0.65.el7.centos.2.x86_64
grub2-common-2.02-0.65.el7.centos.2.noarch
grub2-tools-minimal-2.02-0.65.el7.centos.2.x86_64
grub2-tools-extra-2.02-0.65.el7.centos.2.x86_64
grub2-tools-2.02-0.65.el7.centos.2.x86_64
grub2-pc-2.02-0.65.el7.centos.2.x86_64
***Apparently GRUB Legacy 0.97 has been deprecated on CentOS 7.5.
GRUB2 is now installed by default on CentOS 7.5.***
015. Download the latest binutils-2.31
wget https://ftp.gnu.org/gnu/binutils/binutils-2.31.tar.xz
016. Download the latest busybox-1.29.3
wget https://busybox.net/downloads/busybox-1.29.3.tar.bz2
017. Download the latest Cross Linux From Scratch (CLFS) Bootscripts
wget http://ftp.osuosl.org/pub/clfs/conglomeration/clfs-embedded-bootscripts/clfs-embedded-bootscripts-1.0-pre5.tar.bz2
018. Download the latest GNU Compiler Collection (gcc) version 8.2.0
wget https://ftp.gnu.org/gnu/gcc/gcc-8.2.0/gcc-8.2.0.tar.xz
019. Download the latest C Programming Library version 2.28
wget https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.xz
020. Download the latest gmp-6.1.2
wget https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.bz2
021. Download the latest Linux Kernel version 4.18.12 (stable branch)
wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.18.12.tar.xz
022. Download the latest mpc-1.1.0
wget https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
023. Download the latest mpfr-4.0.1
wget https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.1.tar.xz
024. Download the latest zlib-1.2.11
wget https://zlib.net/zlib-1.2.11.tar.gz
From now on, follow Petros Koutoupis' guide at Linux Journal.
[Guide] DIY: Build a Custom Minimal Linux Distribution from Source
Link: https://www.linuxjournal.com/content/diy-build-custom-minimal-linux-distribution-source
Follow the instructions until the section "Building the Cross Compiler".
At the Kernel Headers sub-section,
025. Extract the latest Linux Kernel 4.18.12 (stable branch)
tar xfvJ linux-4.18.12.tar.xz
026. Change directory into the Linux Kernel 4.18.12 source code directory
cd linux-4.18.12
Then continue following the instructions.
At the section on Glibc, glibc-2.28 (C Programming Library version
2.28) won't compile.
So we will use glibc-2.27 (C Programming Library version 2.27) instead.
027. Download C Programming Library version 2.27
wget https://ftp.gnu.org/gnu/glibc/glibc-2.27.tar.xz
At "The Bootscripts" section, modify Makefile in the root directory as follows.
You *CANNOT* copy and paste the following code section into a
patchfile and use the patch command
patch -p0 <patchfile
@@ -19,7 +19,9 @@ dist:
rm -rf "dist/clfs-embedded-bootscripts-$(VERSION)"
create-dirs:
- install -d -m ${DIRMODE} ${EXTDIR}/rc.d/{init.d,start,stop}
+ install -d -m ${DIRMODE} ${EXTDIR}/rc.d/init.d
+ install -d -m ${DIRMODE} ${EXTDIR}/rc.d/start
+ install -d -m ${DIRMODE} ${EXTDIR}/rc.d/stop
install-bootscripts: create-dirs
install -m ${CONFMODE} clfs/rc.d/init.d/functions ${EXTDIR}/rc.d/init.d/
Now it is time to install the target image.
At the section on "Installing the Target Image", we *CANNOT* use the
grub-install command since GRUB Legacy 0.97
has been deprecated on CentOS 7.5. GRUB2 is installed by default on CentOS 7.5.
Since I am no expert on the Grand Unified Boot Loader (GRUB), I am
going to use the GRUB2 grub2-install command.
028. grub2-install --root-directory=/home/teoenming/tmp/ /dev/sdb
/dev/sdb is another virtual harddisk in Oracle Virtualbox 5.2.18.
Although GRUB2 is installed in Teo En Ming Extremely Simple Linux
1810.08, I am not seeing any operating system selection menu.
This is because /boot/grub/grub.cfg as seen in Petros' instructions is
defined for GRUB Legacy 0.97 only.
You will see a grub> prompt instead.
At the grub> prompt, execute the following commands.
grub> linux /boot/vmlinuz-4.18.12 root=/dev/sda1 ro quiet
grub> boot
Teo En Ming Extremely Simple Linux 1810.08 will now boot up.
Please watch my YouTube video at https://www.youtube.com/watch?v=YrJADssqaQU
Question: Should I use CentOS 6 as my development workstation instead?
This is because CentOS 6 will definitely have GRUB Legacy.
===BEGIN SIGNATURE===
Turritopsis Dohrnii Teo En Ming's Academic Qualifications as at 30 Oct 2017
[1] https://tdtemcerts.wordpress.com/
[2] http://tdtemcerts.blogspot.sg/
[3] https://www.scribd.com/user/270125049/Teo-En-Ming
===END SIGNATURE===