User Tools

Site Tools


cucumber_linux_from_scratch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cucumber_linux_from_scratch [2018/11/07 20:41]
z5t1 [Create Essential Files]
cucumber_linux_from_scratch [2018/11/14 00:12] (current)
z5t1 [The End]
Line 212: Line 212:
   mkdir -pv /​{media/​{floppy,​cdrom},​sbin,​srv,​var}   mkdir -pv /​{media/​{floppy,​cdrom},​sbin,​srv,​var}
   install -dv -m 0750 /root   install -dv -m 0750 /root
-  install -dv -o 1000 /​home/​portuser 
   install -dv -m 1777 /tmp /var/tmp   install -dv -m 1777 /tmp /var/tmp
   mkdir -pv /​usr/​{,​local/​}{bin,​include,​lib,​sbin,​src}   mkdir -pv /​usr/​{,​local/​}{bin,​include,​lib,​sbin,​src}
Line 355: Line 354:
  
  
-Also create a dummy su to satisfy a dependency in Portmake:+Also create a dummy sudo to satisfy a dependency in Portmake:
  
-  cat > /tools/bin/su << EOF+  cat > /tools/bin/sudo << EOF
   #!/bin/bash   #!/bin/bash
   ​   ​
   while [ \$# -ne 0 ]; do   while [ \$# -ne 0 ]; do
     case \$1 in     case \$1 in
-      '-c') +      '-u') 
-        ​exec \$2+        ​shift 2
         ;;         ;;
       *)       *)
-        ​shift 1+        ​exec \$@
         ;;         ;;
     esac     esac
   done   done
   EOF   EOF
-  chmod 755 /tools/bin/su+  chmod 755 /tools/bin/sudo
  
 Build and install them: Build and install them:
Line 491: Line 490:
 At the end of this phase the system will be complete. At the end of this phase the system will be complete.
  
-Similarly, this entire process can be automated with portmake as well. Note that this will take a //very long// time (even longer than phases 1. 2 & 3).+===== Modifying the Chroot Environment =====
  
-  /usr/ports/​utilities/​tools/​portmake ​install phase4+Before we can build the remainder of the system, we must make a few modifications to the chroot environment to enable the ports tree and portmake ​to function properly.
  
-====== Chapter 9 - Creating the Installer Image ======+==== Set up DNS ====
  
-We are done building the packages now, so exit the chroot ​environment.+Create a resolv.conf ​so the chroot ​can resolve DNS queries. Feel free to substitute in your favorite DNS servers here.
  
-  ​exit+  ​cat > /​etc/​resolv.conf << EOF 
 +  nameserver 208.67.222.222 
 +  nameserver 208.67.220.220 
 +  EOF
  
-===== Getting ​the Installer Buildscripts =====+==== Remove ​the Tools Directory ​====
  
-Navigate ​to /​opt/​culfs ​and download the installer buildscripts from the Cucumber Linux mirror:+The ''/​tools''​ directory is no longer needed, so remove it to ensure that the tools located there do not impact phase 4 and update ​the PATH variable accordingly.
  
-  ​cd /opt/culfs +  ​rm -rf /tools 
-  ​rsync mirror.cucumberlinux.com::cucumber/cucumber-current/installer .-rv+  ​export PATH=/bin:/usr/bin:/sbin:/usr/sbin
  
-===== Preparing ​the Installer Build Environment ​=====+===== Building ​the Packages ​=====
  
-Create a symlink ​to the directory containing the binary ​packages. ​Replace ''​$CUCARCH'' ​with the architecture you are building for (''​i686''​ or ''​x86_64''​). If you are building for both architectures,​ create a separate symlink for each one.+Proceed ​to build the phase 4 packages. ​Similarly to phase 3, this entire process can be automated ​with portmake. Note that this will take a //very long// time (even longer than phases 1. 2 & 3).
  
-  ​ln -s chroot/opt/packages/cucumber cucumber-$CUCARCH+  /usr/ports/utilities/​tools/​portmake install phase4
  
-===== Building ​the Installer =====+====== Chapter 9 - Creating ​the Installer ​Image ======
  
-==== Build the Initrds ====+We are done building ​the packages now, so exit the chroot environment.
  
-If desired, rebuild the initrds. This step is optional; if you skip it, the prebuilt initrds in the official Cucumber Linux source tree will be used instead. See the file installer/​README for instructions on this.+  exit
  
-==== Build the ISOs ====+===== Getting ​the Installer Buildscripts =====
  
-Cd to the installer/iso directory.+Navigate ​to /opt/culfs and download ​the installer ​buildscripts from GitHub:
  
-  cd installer/iso+  cd /opt/culfs 
 +  git clone https://​github.com/​cucumberlinux/​installer.git 
 + 
 +===== Building the Installer =====
  
-If you are not building ​the ISOs for every architecture,​ you will need to modify iso.buildscript. If you are building for all architectures you can skip this step.+Enter the installer directory.
  
-In iso.buildscript,​ find the line that reads:+  cd installer
  
-  for a in x86_64 i686; do+Run the build-iso.sh script, setting some special variables.
  
-Delete the architectures that you are not building from that line.+  PORTSDIR=/​opt/​culfs/​chroot/​usr/​ports PKGDIR=/​opt/​culfs/​chroot/​opt/​packages ​./​build-iso.sh
  
-Finally, run iso.buildscript. ​This will build your installer ISO images ​and place them in /tmp.+This will the installer ISO file and place it in /tmp.
  
-  ./​iso.buildscript+====== The End ======
  
 +Congrats, you made it!
cucumber_linux_from_scratch.1541623307.txt.gz · Last modified: 2018/11/07 20:41 by z5t1