> For the complete documentation index, see [llms.txt](https://fashaun.gitbook.io/gw-feature/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fashaun.gitbook.io/gw-feature/third_chapter.md).

# Third Chapter

DISKd sda1 - boot disk (You can mount this partition and change grub.conf to ElGnIs then reboot to enter single mode)

* Enter ElGnIs
  1. /etc/rc.d/rc.sysinit
     * loopback interface
  2. /etc/rc.d/rc.mount
  3. /etc/rc.d/rcS
* mkdir /conf/rc.d and put your code under here , /etc/rc.d will not be executed

S20if-order.sh

* initiforder.sh
  * Check $NET\_MOD
    * \[ -f /conf/$driver.ko ]
      * true insmod
      * false modprobe
* setup\_mgmt\_port.sh
  * Check $MANAGE\_PORT or $HA\_Support then oeen

S22if-setup.sh 1. ifwan.sh //setup WAN interface

* wan\_start - /sbin/dhcpcd -R -t 30 -c /ramfs/bin/dhcpcd.exe eth0
* wan2\_start
* wan.sh //configure ip

1. initifpost.sh
2. linkMonitor.sh (use "ip monitor" \[iproute2])
3. if.sh //setup LAN interface

S45dhcpcd.sh (dhcp server)

* dhcpd.sh
* mk\_dhcpd.conf.sh
* ntp server cant not query before S35 because of default route
