From 2dd3e29cb96c3802e371a25e1656c15a2363e8df Mon Sep 17 00:00:00 2001 From: ficus Date: Sun, 18 Nov 2012 22:44:30 +0100 Subject: add serial console debugging notes --- doc/debian-live-problems.txt | 18 ++++++++++++++++++ doc/dev.txt | 8 ++++++++ doc/dns-dhcp.txt | 21 +++++++++++++++++++++ doc/dreamplug.txt | 20 ++++---------------- doc/serial-console.txt | 10 ++++++++-- 5 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 doc/dev.txt create mode 100644 doc/dns-dhcp.txt (limited to 'doc') diff --git a/doc/debian-live-problems.txt b/doc/debian-live-problems.txt index 0ca005d..13fe99b 100644 --- a/doc/debian-live-problems.txt +++ b/doc/debian-live-problems.txt @@ -7,6 +7,9 @@ here: ### Errors when building flat ("plain") filesystem images +NOTE: these problems should have been fixed by removing the rootfs stage from +caching? + When building a chroot-filesystem=none image, if you encounter: cp: cannot create regular file `binary/live/filesystem.packages': No such file or directory @@ -20,6 +23,21 @@ If you don't run the second line as well, you will get the error: cp: cannot stat `cache/binary_rootfs/filesystem.*': No such file or directory +### Missing symlinked files + +If you get a boot error like: + + Kernel panic - not syncing: Attempted to kill init! + +Then init may be unable to link to necessary library (like lib/ld-linux.so.3), +because of some badness in the binary build system. Try overcoming with: + + lb clean --binary + lb config + lb binary_chroot + lb binary_rootfs + lb binary_hdd + ### mksquashfs Segfaults in qemu mksquashfs always segfaults when run inside of qemu. Perhaps due to large diff --git a/doc/dev.txt b/doc/dev.txt new file mode 100644 index 0000000..1061730 --- /dev/null +++ b/doc/dev.txt @@ -0,0 +1,8 @@ + +If you build "plainroot" flat ext3 images during development, you might be able +to save time by using rsync instead of dd: + + sudo mount /dev/sdb1 /mnt + sudo rsync -arv ./binary/ /mnt/ + sudo umount /mnt + diff --git a/doc/dns-dhcp.txt b/doc/dns-dhcp.txt new file mode 100644 index 0000000..ec5caed --- /dev/null +++ b/doc/dns-dhcp.txt @@ -0,0 +1,21 @@ + +The DNS and DHCP scheme is very complicated. + +torouter itself (the base configuration) uses the OpenDNS servers, as +configured in /etc/resolv.conf. + +Seperate dnsmasq configurations and init scripts are used for local ethernet +and the transparently tor-ified wifi access point. The "regular" dnsmasq daemon +is disabled (in /etc/default/dnsmasq). The ethernet daemon makes upstream +requests "as usual" (according to /etc/resolve.conf), while the wifi daemon +makes upstream requests to ttdnsd on port 5354. + +ttdnsd is used to make upstream requests locally via Tor on port 5353. It is +configured in /etc/default/ttdnsd and listens for requests on port 5354. + +Tor is configured (in /etc/tor/torrc) to listen locally on port 5353 of address +172.16.23.1. + +The /etc/network/interfaces file makes pre- and post- interface configuration +calls to (re) start the tor, ttdnsd, and dnsmasq daemons. + diff --git a/doc/dreamplug.txt b/doc/dreamplug.txt index af5c0ed..fd72444 100644 --- a/doc/dreamplug.txt +++ b/doc/dreamplug.txt @@ -32,7 +32,8 @@ The desired u-boot configuration is: x_bootcmd_kernel ext2load usb 1:1 0x6400000 live/uImage x_bootcmd_initrd ext2load usb 1:1 0x6900000 live/uInitrd x_bootargs_root root=/dev/sdb1 rootdelay=4 - x_bootargs console=ttyS0,115200 boot=live config username=torouter hostname=torouter live-media=/dev/sdb1 live-media-timeout=10 debug plainroot + x_bootargs_console console=ttyS0,115200 + x_bootargs boot=live config username=torouter hostname=torouter live-media=/dev/sdb1 live-media-timeout=10 debug plainroot HOWTO: flash and configure u-boot @@ -59,7 +60,8 @@ file size changes from exactly 196076 bytes): setenv x_bootcmd_kernel ext2load usb 1:1 0x6400000 live/uImage setenv x_bootcmd_initrd ext2load usb 1:1 0x6900000 live/uInitrd setenv x_bootargs_root root=/dev/sdb1 rootdelay=4 - setenv x_bootargs console=ttyS0,115200 boot=live config username=torouter hostname=torouter live-media=/dev/sdb1 live-media-timeout=10 debug plainroot + setenv x_bootargs_console console=ttyS0,115200 + setenv x_bootargs boot=live config username=torouter hostname=torouter live-media=/dev/sdb1 live-media-timeout=10 debug plainroot saveenv reset @@ -67,20 +69,6 @@ NOTE: it's possible the above directions are out of date and need to be refreshed -u-boot Configuration ----------------------- - -You need a recent version of u-boot; search the internet for install/flash -instructions. - -Use the following boot arguments: - - set x_bootcmd_kernel ext2load usb 1:1 0x6400000 live/uImage - set x_bootcmd_initrd ext2load usb 1:1 0x6900000 live/uInitrd - set x_bootargs_root root=/dev/sdb1 rootdelay=4 - set x_bootargs console=ttyS0,115200 boot=live config username=torouter hostname=torouter live-media=/dev/sdb1 live-media-timeout=10 debug plainroot - - Background Info, Links -------------------------- diff --git a/doc/serial-console.txt b/doc/serial-console.txt index a5ba6ea..d369ce0 100644 --- a/doc/serial-console.txt +++ b/doc/serial-console.txt @@ -16,5 +16,11 @@ on /dev/ttySO after system boot. See also: -config/includes.chroot/etc/inittab -config/includes.chroot/lib/live/config/9999-serial_console + config/includes.chroot/etc/inittab + config/includes.chroot/lib/live/config/9999-serial_console + + +### New fix + +echo "T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt100" >> /etc/inittab + -- cgit v1.2.3