Here is the 9 pin(DB9) RS232 interface. Null cable is also called "crossed cable"
Null cable plugs with their pin numbers
A Plug | B plug |
2 and 3 | 3 and 2 |
4 and 6+1 | 6+1 and 4 |
5 | 5 |
7 and 8 | 8 and 7 |
This is a synpotic flowchart resuming the boot process of Linuxbios.
In probable case you crashed your bootloader, i.e lilo (the std bootloader) freeze on "LI" display. A crashed kernel is mostly a problem if not other sane was prepared, but it is obviously not your case, isn't it ? The goal is to reach a sane command line, this a type a 'lilo' command for example. Here is a procedure to recover your MBR when you don't have a floppy drive and you just have a bootable Linux CD such as Red Hat Linux.
Objectives : Get a shell, mount partitions, disk integrity checkout, have a recovering 'lilo' command.
Type linux rescue at redhat type install CD boot menu. A menu invites you to configure language and keyboard. Then another menu comes, do the same for ethernet device eth0 and eventually setup ftp if you need to recover some config. files (ie rc.sysint or lilo.conf) from network. After Ananconda starts, access via CTRL+ALT+1 to first virtual terminal to check out if your bootable device /dev/hdaxx is present, otherwise come back via CTRL+ALT+7 to let pass some menus before coming back again to first terminal.
All is right ? Ok, now remount your partition in read write mode with mount -no remount,rw /. Mount root partition i.e hda3 like this mkdir /hda then mount /dev/hda3 /hda3. Do same for other partitions, especially those where /etc /sbin resides. Chroot yourself : chroot / /bin/sh. If your keyboard is buggy type a loadkeys en to reset it to your language (here english). At last, you can edit your lilo.conf and launch a /sbin/lilo before exiting for maintenance mode with CTRL+D. Synchronise partitions with sync and reboot reboot.
Compound | Min. version requiered | Current version |
GNU C | 2.91.66 "egcs1.1.2" * | gcc --version |
GNU Make | 3.77 | make --version |
Binutils | 2.9.1.0.25 | ld -v |
Util-linux | 2.10o | fdformat --version |
modutils | 2.4.0 | insmod -V |
e2fs progs | 1.19 | tune2fs --version |
pcmcia-cs | 3.1.21 | cardmgr -V |
ppp | 2.4.0 | pppd --version |
isdn4k-utils | 3.1 beta 7 | isdnctrl 2>&1 |
Compound | Min. version requiered | Current version |
GNU C | 3.2.2 | gcc --version |
GNU Make | 3.77 | make --version |
Binutils | 2.14.90 | ld -v |
CVS | 1.11.6 | cvs --version |
Python | 2.3 | python -V |
+ Restores a Rom image +
bios_restore /dev/mtd_x romimage [--vendor VENDOR] [--part PART]
+ Save Bios content in a Rom image file +
bios_save /dev/mtd_x romimage [--vendor VENDOR] [--part PART]
+ A utility to edit CMOS 'RAM settings' configuration
cmos_util [-d|-u|-s|-h] [--image file] [--outpout_image file]
[--layout file] [--new_layout file] [settings file]
lxbios + Reads and writes Linuxbios table parameters
lbflash + a flash solution dedicated to MTD DOC chip for Linuxbios
also make a checkout with motherboard type.
#!/bin/sh
#
# Hear script listen & log onto ttyS0 (serial port a.k.a COM1)
#
#
VERSION="24/05/04|09:32:49 MD"
i="Bienvenu(e) dans Hear! v. $VERSION j'ecoute sur ttyS0 ..."
ter=`tty`
if [ "x$1" = "x" ]; then
echo "Usage $0 log_to_file"
exit 0
else
LOG="$1"
fi
echo $i
echo "Logging in $LOG"
stty ispeed 115200
stty | tee -a "$LOG"
echo "****************************************************" >>"$LOG"
echo " Hear! Boot Log started on `date +%d/%m/%y\|%T` " >> "$LOG"
echo " tty in use : $ter from ttyS0 " >>"$LOG"
echo "****************************************************" >>"$LOG"
/usr/bin/time -pao "$LOG" -- cat -sbA < /dev/ttyS0 | tee -a "$LOG"
./digest.sh "$LOG" -s
echo "----------------------------------------------" >> "$LOG"
echo -e "\n"
echo "Please add a comment to this boot log .."
sleep 3
vi tmp
echo -e "Comments :\n" >> "$LOG"
cat tmp >> "$LOG"
rm -f tmp
echo "done."
#!/bin/bash
#
# Script to digest hard-human readable hear! logs
# Mathieu Deschamps for mangrove-systems
#
VERSION="11/05/04|09:40:28 MD"
SUPP=0
DAT="`date +%d\-%m\-%y\ %T`"
if [ "x$1" = "x" ]; then
echo "usage: $0 hear!_log_file [--suppress-log,-s] "
echo "v. $VERSION"
exit 0
else
FIL="$1"
fi
[ "x$2" = "x-s" ] || [ "x$2" = "x--suppress-log" ] && SUPP=1
if [ -f "$FIL.adv" ]; then
mv "$FIL.adv" "$FIL.adv.$DAT"
fi
cat $FIL | while read line;
do
[ "x$line" != "x$" ] && echo "$line"
done > "$FIL.adv"
mv -f $FIL $FIL.digested
mv -f $FIL.adv $FIL
( [ $? -eq 0 ]; echo "$FIL digested, rename old as $FIL.digested" ) ||
echo "Digestion gets harden ...blurp (error) "
[ $SUPP -eq 1 ] && rm -f $FIL.digested 2>&1 >/dev/null
Pipermail Record date | Subjects or Topics |
2002-October, 2002-November | ADLO |
2002-December | VGA Splash screen |
2003-April | Xfree, IDE boot, CF boot |
2003-September | Command line boot options |
2004-February | Use of CF |
mkelfImage --kernel=/usr/src/linux-2.4/vmlinux \
--output=vmlinuz.target\
--command-line=''console=ttyS0,115200n8 \
root=/dev/hda3''
Into kernel option, any gzip compressed Image file makes the deal. Now if you launch a 'file vmlinuz.target', it will answer not stripped. If you want to reduce it a bit more, you can strip it and Image file debug & comments sections will be dropped. Follow this :
strip file.elf
objcopy -R .note -R .comment file.elf
Now file.elf.stripped which can be rename to file.elf if you want contains strictly want is needed to be loaded. You can check this out by yourself this way :
objdump file.elf -t
If you want it to be booted from i.g /dev/hda3 which is root partition, you need to copy the first 4Ko on it. Do it this way:
dd if=file.elf of=/dev/hda3 bs=4096 seek=1
Script that tests direct writing to stress I/O to frame buffer fb0
#!/bin/bash
# /root/img is a test bitmap
#
i=0
while [ $i -ne 60 ]; do
cat /root/img >/dev/fb0
# sleep 1
xrefresh -display 0:0
i=` expr $i + 1 `
done
Script that tests frame buffer device's graphic modes
#!/bin/bash
#
#
if [ "x$1" = "x" ]; then
echo "Usage : $0 -test | -do "
fi
if [ "$1" = "-test" ]; then
for i in `cat /etc/fb.modes | grep "mode " | cut -f2 -d"\""`;do echo -n
"Testing $i"; T=`fbset -x --test "$i"`; [ $T ] && echo -e" \t\t '!'" ||
echo -e " \t\t Ok ";done
fi
if [ "$1" = "-do" ]; then
for i in `cat /etc/fb.modes | grep "mode " | cut -f2 -d"\""`;do echo -n
"Doing $i"; T=`fbset -x "$i"`; [ $T ] && echo -e" \t\t '!'" || echo -e "
\t\t Ok ";done
fi