Menu
Boot Sequence support two ways of boot procedure:. Using bootscript (default since 2.0). Auto detect root device ( LABEL=DEBWRTROOT ). Kexec to boot alternate kernels.
OpenWRT for Raspberry PI. No way to recover, expect by a reboot. (mount -o remount, rw /dev/root did not work). These were because OpenWRT's default init is /etc/preinit - and raspbian uses propably /sbin/init. Well, this can be fixed with a kernel command-line change - and voila.
Directly boot from /dev/sda1. Failsafe The boot procedure is selected in make menuconfig in the ' boot options/Boot method' menu. See boot.log attachment of this wiki for an example.
Bootscript Instead of mounting the root device directly, this method initially mounts /dev/mtdblock2 as root device. This is where by default stores its root file system.
Uses this rootfs to provide advanced boot options for. A init script is started which auto detects the root device, optionally boots into an alternate kernel from disk and continues to boot from the discovered root device: Auto detect root device searches and waits 30 seconds for a block device with LABEL=DEBWRTROOT to appear. It falls back to /dev/sda1 if it can't find any.
The hotplug2 system of is used to detect connected devices. Tip: Set the label DEBWRTROOT when creating the root filesystem to prevent waiting 30 seconds before falls back to /dev/sda1. Optionally boot alternate kernel from disc (kexec) The discovered root device is mounted and /boot is searched for an alternate kernel ( /boot/vmlinux.elf).
When found, kexec is used to boot into this kernel. The kernel is booted with an additional parameter kexec=1 to prevent a loop of kexecing kernels. The boot process( /etc/preinit) is re-executed after the alternate kernel has been executed. In future this kexec feature will allow to ship kernels in normal Debian packages. No more need for re-flashing the device.
Kexecing the alternate kernel is very fast. The entire POST of the device is skipped. The overhead of kexec is therefore minimal. Continue to boot Once the root file system is mounted ( and optionally the alternate kernel is loaded ) the the discovered root filesystem is set( pivotroot) as root filesystem and Debian is normally booted ( /sbin/init). Note: The initial root filesystem(/dev/mtdblock2( is unmounted before Debian is booted. Directly boot from /dev/sda1 This method provides the quickest way of booting, in case above functionality is not required. The kernel directly mounts /dev/sda1 and runs /sbin/init to boot Debian.
The rootdevice ( /dev/sda1 by default) can be selected in menuconfig in ' boot options/Config Command line' if in ' boot options/Boot method' menu the option 'Directly boot from device' has been selected. Failsafe When no root device has been discovered and /dev/sda1 does not exist, a shell( /bin/sh) is started.
Request: You’re a super modder, you work on the 99/1 rule, you’re full of ideas and will check them one day. We rely on your work but please – leave the other wiki pages alone for others to go through and verify your work so the average user can follow it. These are your pages. sysupgrade -i -b filename.tar.gz – backup modem configuration; usb suggested. sysupgrade -f filename.tar.gz – restore configuration after firmware reflash Decrypting Firmware See for details (original code from ). Follow instructions with OSCK from, or extract OSCK from modem, then decrypt firmware.
This procedure is safe (no files are overwritten on the modem). The Boot Process To be updated – refer to the as an example for now but don't rely on it. The OpenWrt Flash Layout To be updated – refer to the as an example for now but don't rely on it. Eg: root@mygateway:# cat /proc/mtd dev: size erasesize name mtd0: 1000000 'brcmnand.0' mtd1: 02c0000 'rootfs' mtd2: 0590000 'rootfsdata' mtd3: 0500000 'bank1' mtd4: 0500000 'bank2' mtd5: 0000000 'eripv2' mtd6: 0000000 'rawstorage' Preinit and Root Mount and Firstboot Scripts To be updated – refer to the as an example for now but don't rely on it.
Backup / Restore without rbi file Bank1 is on mtd3 partition and bank2 is on mtd4. Log into the shell as root:. Backup: dd if=/dev/mtd X of=/tmp/oldfw.bin (replace X with 3 or 4). Restore: mtd write /tmp/oldfw.bin bank X (replace X with 1 or 2) Firmware can be restored to either bank. Tiscali firmware (which has no RBI files) is flashed this way to other TG789 devices. IPv6 Connection Issue Ipv6 is really problematic. On openwrt on this old base it think it's quite broken.
Also the configuration depends on the ISP. BusyBox The gateway runs, an embedded linux system with minimalist documentation. Root@mygateway:# busybox -help BusyBox v1.23.2 (2017-08-22 01:34:50 UTC) multi-call binary. BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed copyright notices. Usage: busybox function arguments. or: busybox -list or: function arguments. BusyBox is a multi-call binary that combines many common Unix utilities into a single executable.
Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as.