Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PROBLEM: kernel/init messages don't go to serial console
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nickbrown
n00b
n00b


Joined: 07 Apr 2003
Posts: 15
Location: Edinburgh, Scotland.

PostPosted: Fri Apr 25, 2003 9:43 am    Post subject: PROBLEM: kernel/init messages don't go to serial console Reply with quote

I have followed the widely available Remote-Serial-Console Howto and I can happily see the bootloader (lilo) messages over the serial connection, as the initial section of lilo.conf below has been setup correctly.
I can also succesfully login into the machine over the serial connection as I've added the appropriate agetty line to my inittab file (see below).
But even though I believe I have the correct append options for the kernel in my lilo.conf file (see below) and I have the correct kernel compile options (see below) I cannot see either the kernel boot messages or inits boot messages. "dmesg" confirms that the kernel received the "console" option (see below). It would appear however that it is not using this serial console as I still see the boot/init messages on the vga console.
Below is the output I see on the serial console. (lilo prompt, followed by load linux message then nothing until the login prompt)

Does anyone have any ideas what is wrong and how to solve this?

The problem;
Code:
root@localhost etc # shutdown -r now

Broadcast message from root (tts/0) (Fri Apr 25 00:24:01 2003):

The system is going down for reboot NOW!
root@localhost etc #
Session terminated, killing shell... ...killed.
nick@localhost etc $
LILO 22.3.3 boot:
Loading Gentoo......................
BIOS data check successful

localhost.(none) (Linux i686 2.4.20-gentoo-r2) 00:26:18
all your base are belong to us!
localhost login: nick
Password:
Last login: Fri Apr 25 00:22:24 on 0
nick@localhost nick


my /etc/lilo.conf;
Code:
# Start LILO global section
boot=/dev/hdc
map=/boot/System.map
lba32
prompt
default=Gentoo
timeout= 50
#vga=0x31A
serial=0,9600n8
restricted
password=123456
# End LILO global section

# Linux bootable partition config begins
        image=/boot/bzImage
        root=/dev/hdc3
        label=Gentoo
        read-only # read-only for checking
        append="console=ttyS0,9600n8r"
# Linux bootable partition config ends


the start of dmesg;
Code:
Linux version 2.4.20-gentoo-r2 (root@dhcp-158-45623) (gcc version 3.2.2) #6 Wed
Apr 23 17:10:59 BST 2003
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000001f7f0000 (usable)
 BIOS-e820: 000000001f7f0000 - 000000001f7f3000 (ACPI NVS)
 BIOS-e820: 000000001f7f3000 - 000000001f800000 (ACPI data)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
503MB LOWMEM available.
On node 0 totalpages: 129008
zone(0): 4096 pages.
zone(1): 124912 pages.
zone(2): 0 pages.
Kernel command line: auto BOOT_IMAGE=Gentoo ro root=1603 console=ttyS0,9600n8r
Initializing CPU#0
Detected 531.841 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 1061.68 BogoMIPS
Memory: 507084k/516032k available (1644k kernel code, 8564k reserved, 511k data,
 104k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)


What I believe are the correct kernel compile options;
Code:
root@localhost linux # grep VT .config
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
root@localhost linux # grep SERIAL .config
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_USB_SERIAL is not set
root@localhost linux # pwd
/usr/src/linux
root@localhost linux #


part of me /etc/inittab;
Code:
# TERMINALS
co:2345:respawn:/sbin/agetty -h -L ttyS0 9600 vt102
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:12345:respawn:/sbin/agetty 38400 tty2 linux
c3:12345:respawn:/sbin/agetty 38400 tty3 linux
c4:12345:respawn:/sbin/agetty 38400 tty4 linux
c5:12345:respawn:/sbin/agetty 38400 tty5 linux
c6:12345:respawn:/sbin/agetty 38400 tty6 linux
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Fri Apr 25, 2003 12:36 pm    Post subject: Reply with quote

Moving this thread to the duplicates forum and locking in favor of the previous topic posted here.

Please do not cross post one topic into multiple forums, please choose one forum to post it in. Later if you would like a moderator to move the thread into another forum please PM one of us and we will be happy to help.

Thanks,
BonezTheGoon
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Fri Apr 25, 2003 8:43 pm    Post subject: Reply with quote

Per nickbrown's request I am moving this thread into Hardware and Laptops from the Duplicates forum and I will move the other thread linked above that is currently in Hardware and Laptops from there to Duplicate Threads. I am unlocking this thread and will lock the other given there is more complete and current information in this thread (according to nickbrown.)

Regards,
BonezTheGoon
Back to top
View user's profile Send private message
SmegTheLight
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2002
Posts: 97
Location: 3rd Planet

PostPosted: Fri Apr 25, 2003 11:10 pm    Post subject: Reply with quote

I also had a LOT of problem trying to get serial ONLY console to work.
There is a lot of conflicting info out there too.

It is now working for me - BUT many things cause it to not work.. Sometimes it works on some hardware, and not on others.

Here is what I suggest :
1) Get it working with a plain vanilla kernel WITHOUT VT console selected. This will force the kernel to put out to the serial port. Also make this the bare minimum that you need from the kernel to make your machine run (No ACPI, No PPP, No Netfilter, etc..)

This will prove that everything else your are doing is working (Lilo, etc.).
For me, patches to the Frame Buffer code in the Gentoo (and Wolk) kernels prevented the serial console from working.

2) On the kernel line (Grub, Lilo, etc.) I only needed "console=ttyS0,9600" (plus all your regular settings)

Some guides and papers have you put it in twice with an upper and lower case "console".. ie "CONSOLE=" and "console="..

I am using it now, and it is working with only the line above (plus regular settings, root=, etc..)

3) After you prove that it works, put back the VT Support
Code:

CONFIG_VT=y
CONFIG_VT_CONSOLE=y


4) If that works, try the gentoo kernel again.. Chances are that is where it will STOP working for you. I wound up having to make my own custom kernel with just what I wanted in it (Vanilla + Preemp, etc.)

In short, it can and does work.. I currently have not a shred of info going out the video port - it all goes to com1 at 9600 baud. It is for an embedded app and I don't want all the diag crap spewing out for the customer to see.
Back to top
View user's profile Send private message
nickbrown
n00b
n00b


Joined: 07 Apr 2003
Posts: 15
Location: Edinburgh, Scotland.

PostPosted: Sun Apr 27, 2003 1:36 am    Post subject: Reply with quote

SmegTheLight wrote:


3) After you prove that it works, put back the VT Support
Code:

CONFIG_VT=y
CONFIG_VT_CONSOLE=y


4) If that works, try the gentoo kernel again.. Chances are that is where it will STOP working for you. I wound up having to make my own custom kernel with just what I wanted in it (Vanilla + Preemp, etc.)


I left my config exactly as it was, execpt, as you suggested, I turned these both off.
Code:

# CONFIG_VT is not set

And then the serial console worked fine. So it would appear the VT console stuff does infact break the serial console support.
This looks like a serious bug in the kernel. I'm not sure if its specific to the gentoo kernel, but I've raised a bug report for it any how.

This needs to be fixed, as I'd really like to have virtual terminals (and thus graphics) while also being able to use the serial console for monitoring etc.
Back to top
View user's profile Send private message
BonezTheGoon
Bodhisattva
Bodhisattva


Joined: 14 Jun 2002
Posts: 1408
Location: Albuquerque, NM -- birthplace of Microsoft and Gentoo

PostPosted: Sun Apr 27, 2003 3:42 am    Post subject: Reply with quote

Please post your bug report in this thread so that others can find it easily should they need to check on it or submit information regarding it.

Thanks,
BonezTheGoon
Back to top
View user's profile Send private message
SmegTheLight
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2002
Posts: 97
Location: 3rd Planet

PostPosted: Sun Apr 27, 2003 7:45 am    Post subject: Reply with quote

I am pretty sure that the bug is related to something related to frame buffer support patches not in the standard kernel (as of 2.4.20).

Well, "pretty sure" might be a bit strong.. I was very tired, and had be flying through unfamiliar kernel code at warp speed for an entire weekend trying to ressolve this problem. I didn't document my discoveries, and all that remains in my mind is a gut feeling that it was the Frame Buffer stuff. It is as if the console= iine is getting ignored.

When I compile a plain vanilla standard kernel, I can have both the VT and serial support turned on. Turning off the VT in the popular "Patched" kernels simply forces the kernel to have no other choice (and / or bypasses the patched buggy code)

With that I started adding in the patches I needed (Scheduler, O(1), MPPE/MPPC, IPSEC, etc). It's all good now. None of those patches messed it up. I now have my framebuffer graphics, plain old penguin logo, and serial ONLY kernel messages. I even have an agetty running on VT2 and VT3. VT1 is consumed by my GDK-Framebuffer app.
Back to top
View user's profile Send private message
nickbrown
n00b
n00b


Joined: 07 Apr 2003
Posts: 15
Location: Edinburgh, Scotland.

PostPosted: Sun Apr 27, 2003 10:27 am    Post subject: serial console support broken when VT support included Reply with quote

See bug report;
https://bugs.gentoo.org/show_bug.cgi?id=20025
Back to top
View user's profile Send private message
pfeifer
Retired Dev
Retired Dev


Joined: 31 Aug 2002
Posts: 37
Location: 49 degrees north

PostPosted: Thu May 01, 2003 2:18 pm    Post subject: Reply with quote

has nothing to do with framebuffer patches.

you can get the patch to fix from the bug report nickbrown lists above. i have attached the fix there. it'll be in the pfeifer/gentoo-sources in the next day. i will retro it to gentoo-sources-2.4.20-r2/r3 and pfeifer-sources-2.4.20_pre8 for now.

Regards,

Jay Pfeifer
Gentoo Linux Developer
Core System/Kernel
Back to top
View user's profile Send private message
SmegTheLight
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2002
Posts: 97
Location: 3rd Planet

PostPosted: Fri May 02, 2003 1:18 am    Post subject: Reply with quote

Yeah, I was watching the bugthread.

It was awhile ago for me when I was debugging it. It was probably a lot of coincidences all combining to lead me to belive it had to do with the fb patches.
(I was also having a lot of problems with fb logos, etc.. at the time).

I wonder what other code is/was failing because of -O3 ? ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum