Discussion:
GRUB problem (modaddr)
Leon Brits
2004-07-05 20:34:05 UTC
Permalink
Hi all,

Finally got L4Linux (L4Env) and Fiasco compiled and ready to rock & roll!
BUT.....

...on this website [http://os.inf.tu-dresden.de/L4/LinuxOnL4/use.shtml]
the examples are only for tftpboot is this true?

I've setup a local boot with following grub config:

title Fiasco L4Linux-2.4.26
kernel /fiasco/rmgr -sigma0
module /fiasco/main -nokdb
module /fiasco/sigma0
module /fiasco/names
module /fiasco/con
module /fiasco/log
module /fiasco/dm_phys
module /fiasco/simple_ts -t 300
module /fiasco/l4io --noirq
module /fiasco/l4exec
module /fiasco/loader /fiasco/l4linux-l4env.cfg

The loader stopped and reported that there was an overlap with the
"loader" module and that I must add "modaddr" just after the kernel to fix
the problem. So I inserted the statement "modaddr 0x02000000" just after
the "kernel..." entry in the list.
Upon reboot GRUB (0.93) reported that it does not understand the "modaddr"
command. So...

I CVSed the grub from Dresden:

cvs -d :pserver:***@os.inf.tu-dresden.de:/home/remote-cvs checkout grub

but this GRUB seems to be buggy with errors in its strings (no '\'
character used to break up long strings). I corrected these errors but
alas the compiler stoped with an error:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes
-Wunused -Wshadow -Wpointer-arith -malign-jumps=1 -malign-loops=1
-malign-functions=1 -Wundef -O2 -I../lib -DGRUB_UTIL=1 -DFSYS_EXT2FS=1
-DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1
-DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
-fwritable-strings -g -c -o libgrub_a-char_io.o `test -f char_io.c || echo
'./'`char_io.c
cc1: warning: -malign-loops is obsolete, use -falign-loops
cc1: warning: -malign-jumps is obsolete, use -falign-jumps
cc1: warning: -malign-functions is obsolete, use -falign-functions
char_io.c: In function `grub_printf':
char_io.c:93: warning: dereferencing type-punned pointer will break
strict-aliasing rules
char_io.c: In function `grub_sprintf':
char_io.c:149: warning: dereferencing type-punned pointer will break
strict-aliasing rules
char_io.c: In function `translate_keycode':
char_io.c:888: error: `KEY_LEFT' undeclared (first use in this function)
char_io.c:888: error: (Each undeclared identifier is reported only once
char_io.c:888: error: for each function it appears in.)
char_io.c:891: error: `KEY_RIGHT' undeclared (first use in this function)
char_io.c:894: error: `KEY_UP' undeclared (first use in this function)
char_io.c:897: error: `KEY_DOWN' undeclared (first use in this function)
char_io.c:900: error: `KEY_HOME' undeclared (first use in this function)
char_io.c:903: error: `KEY_END' undeclared (first use in this function)
char_io.c:906: error: `KEY_DC' undeclared (first use in this function)
char_io.c:909: error: `KEY_BACKSPACE' undeclared (first use in this
function)
char_io.c:912: error: `KEY_NPAGE' undeclared (first use in this function)
char_io.c:915: error: `KEY_PPAGE' undeclared (first use in this function)
make[3]: *** [libgrub_a-char_io.o] Error 1
make[3]: Leaving directory `/root/Temp2/grub/stage2'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/root/Temp2/grub/stage2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Temp2/grub'
make: *** [all] Error 2

Any suggestions?
Thanks
Leon

PS! I have installed a newer version of GRUB (0.94) but the "modaddr"
command is also not included in that version.
Adam Lackorzynski
2004-07-05 20:42:41 UTC
Permalink
Post by Leon Brits
...on this website [http://os.inf.tu-dresden.de/L4/LinuxOnL4/use.shtml]
the examples are only for tftpboot is this true?
No, tftp is just an example.
Post by Leon Brits
title Fiasco L4Linux-2.4.26
kernel /fiasco/rmgr -sigma0
module /fiasco/main -nokdb
module /fiasco/sigma0
module /fiasco/names
module /fiasco/con
module /fiasco/log
module /fiasco/dm_phys
module /fiasco/simple_ts -t 300
module /fiasco/l4io --noirq
module /fiasco/l4exec
module /fiasco/loader /fiasco/l4linux-l4env.cfg
The loader stopped and reported that there was an overlap with the
"loader" module and that I must add "modaddr" just after the kernel to fix
the problem. So I inserted the statement "modaddr 0x02000000" just after
the "kernel..." entry in the list.
Upon reboot GRUB (0.93) reported that it does not understand the "modaddr"
command. So...
Yeah, modaddr is not the upstream version of GRUB.
Post by Leon Brits
but this GRUB seems to be buggy with errors in its strings (no '\'
character used to break up long strings). I corrected these errors but
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes
-Wunused -Wshadow -Wpointer-arith -malign-jumps=1 -malign-loops=1
-malign-functions=1 -Wundef -O2 -I../lib -DGRUB_UTIL=1 -DFSYS_EXT2FS=1
-DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DFSYS_VSTAFS=1
-DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
-fwritable-strings -g -c -o libgrub_a-char_io.o `test -f char_io.c || echo
'./'`char_io.c
cc1: warning: -malign-loops is obsolete, use -falign-loops
cc1: warning: -malign-jumps is obsolete, use -falign-jumps
cc1: warning: -malign-functions is obsolete, use -falign-functions
char_io.c:93: warning: dereferencing type-punned pointer will break
strict-aliasing rules
char_io.c:149: warning: dereferencing type-punned pointer will break
strict-aliasing rules
...

Looks like our public-CVS version doesn't like recent compilers. Using
an old one could work (2.95 would be a good choice I guess).

Or try http://os.inf.tu-dresden.de/~fm3/grub.html for a ready to go
floppy image.
Post by Leon Brits
PS! I have installed a newer version of GRUB (0.94) but the "modaddr"
command is also not included in that version.
Yeah, upstream version does not help you here.



Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon Brits
2004-07-05 21:30:03 UTC
Permalink
Adam,

Thanks for your quick response! I am almost there....

Grub loads all the modules (printed in dimmed white chars) and then pass
control to RGMR which prints (bright white chars) some stuff and then the
boot process stalls while loading the kernel "Loading ELF image
(kernel)..."

Any suggestions?
Thanks agian for your time!
Leon




On Mon, 5 Jul 2004 15:42:28 +0200, Adam Lackorzynski
Post by Adam Lackorzynski
Post by Leon Brits
...on this website [http://os.inf.tu-dresden.de/L4/LinuxOnL4/use.shtml]
the examples are only for tftpboot is this true?
No, tftp is just an example.
Post by Leon Brits
title Fiasco L4Linux-2.4.26
kernel /fiasco/rmgr -sigma0
module /fiasco/main -nokdb
module /fiasco/sigma0
module /fiasco/names
module /fiasco/con
module /fiasco/log
module /fiasco/dm_phys
module /fiasco/simple_ts -t 300
module /fiasco/l4io --noirq
module /fiasco/l4exec
module /fiasco/loader /fiasco/l4linux-l4env.cfg
The loader stopped and reported that there was an overlap with the
"loader" module and that I must add "modaddr" just after the kernel to fix
the problem. So I inserted the statement "modaddr 0x02000000" just after
the "kernel..." entry in the list.
Upon reboot GRUB (0.93) reported that it does not understand the "modaddr"
command. So...
Yeah, modaddr is not the upstream version of GRUB.
Post by Leon Brits
but this GRUB seems to be buggy with errors in its strings (no '\'
character used to break up long strings). I corrected these errors but
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../stage1 -Wall -Wmissing-prototypes
-Wunused -Wshadow -Wpointer-arith -malign-jumps=1 -malign-loops=1
-malign-functions=1 -Wundef -O2 -I../lib -DGRUB_UTIL=1 -DFSYS_EXT2FS=1
-DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1
-DFSYS_VSTAFS=1
-DUSE_MD5_PASSWORDS=1 -DSUPPORT_SERIAL=1 -DSUPPORT_HERCULES=1
-fwritable-strings -g -c -o libgrub_a-char_io.o `test -f char_io.c || echo
'./'`char_io.c
cc1: warning: -malign-loops is obsolete, use -falign-loops
cc1: warning: -malign-jumps is obsolete, use -falign-jumps
cc1: warning: -malign-functions is obsolete, use -falign-functions
char_io.c:93: warning: dereferencing type-punned pointer will break
strict-aliasing rules
char_io.c:149: warning: dereferencing type-punned pointer will break
strict-aliasing rules
...
Looks like our public-CVS version doesn't like recent compilers. Using
an old one could work (2.95 would be a good choice I guess).
Or try http://os.inf.tu-dresden.de/~fm3/grub.html for a ready to go
floppy image.
Post by Leon Brits
PS! I have installed a newer version of GRUB (0.94) but the "modaddr"
command is also not included in that version.
Yeah, upstream version does not help you here.
Adam
Adam Lackorzynski
2004-07-06 04:47:59 UTC
Permalink
Post by Leon Brits
Grub loads all the modules (printed in dimmed white chars) and then pass
control to RGMR which prints (bright white chars) some stuff and then the
boot process stalls while loading the kernel "Loading ELF image
(kernel)..."
I currently do not know where that "Loading ELF image" message should
appear. Can you say which programs writes that out?
Post by Leon Brits
Post by Leon Brits
title Fiasco L4Linux-2.4.26
kernel /fiasco/rmgr -sigma0
module /fiasco/main -nokdb
module /fiasco/sigma0
module /fiasco/names
module /fiasco/con
module /fiasco/log
module /fiasco/dm_phys
module /fiasco/simple_ts -t 300
module /fiasco/l4io --noirq
module /fiasco/l4exec
module /fiasco/loader /fiasco/l4linux-l4env.cfg
There's another problem here. It could also be related to your tftp
question. The loader needs to get the programs from somewhere, and uses a
file provider for that. We have one, "tftp", which uses the tftp
protocol along with some network drivers. We have another one that runs
inside L4Linux and uses L4Linux to get the files. But that's it. So for
using the loader you need tftp right now. We're planning to improve the
situation in this area but not really immediately.


Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Adam Lackorzynski
2004-07-06 04:59:13 UTC
Permalink
Hi Leon!
Post by Adam Lackorzynski
Post by Leon Brits
Grub loads all the modules (printed in dimmed white chars) and then pass
control to RGMR which prints (bright white chars) some stuff and then the
boot process stalls while loading the kernel "Loading ELF image
(kernel)..."
I currently do not know where that "Loading ELF image" message should
appear. Can you say which programs writes that out?
I'm just told that this comes from the kernel itself. Difficult to say
what's wrong from here. How much memory has your test system?



Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon Brits
2004-07-06 15:08:54 UTC
Permalink
Post by Adam Lackorzynski
I'm just told that this comes from the kernel itself. Difficult to say
what's wrong from here. How much memory has your test system?
512MB, PIV-Prescott, I875 motherboard (target system is lighter but memory
can be 512MB if required)

Leon
Leon Brits
2004-07-06 15:26:19 UTC
Permalink
Post by Adam Lackorzynski
I currently do not know where that "Loading ELF image" message should
appear. Can you say which programs writes that out?
Kernel (main)
Post by Adam Lackorzynski
There's another problem here. It could also be related to your tftp
question. The loader needs to get the programs from somewhere, and uses a
file provider for that. We have one, "tftp", which uses the tftp
protocol along with some network drivers. We have another one that runs
inside L4Linux and uses L4Linux to get the files. But that's it. So for
using the loader you need tftp right now. We're planning to improve the
situation in this area but not really immediately.
Does the TFTP server use the network drivers included in GRUB?

Thanks
Leon
Adam Lackorzynski
2004-07-06 20:00:29 UTC
Permalink
Post by Leon Brits
Post by Adam Lackorzynski
There's another problem here. It could also be related to your tftp
question. The loader needs to get the programs from somewhere, and uses a
file provider for that. We have one, "tftp", which uses the tftp
protocol along with some network drivers. We have another one that runs
inside L4Linux and uses L4Linux to get the files. But that's it. So for
using the loader you need tftp right now. We're planning to improve the
situation in this area but not really immediately.
Does the TFTP server use the network drivers included in GRUB?
Partially, it got upgraded recently with some etherboot drivers, based
on a etherboot patch for GRUB which is floating around.



Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon Brits
2004-07-06 19:42:29 UTC
Permalink
Me again,

Thanks for all the help so far!

I've setup TFTP and configured GRUB accordingly, but I can still not boot
a L4Linux kernel.

Q1: The TFTP server does not work the first time. I must press Ctrl-C and
try to boot again. Only then does the files get download (verified with
tcpdump on servers side). Any suggestions as to why?

The system hangs again at the same place as without TFTP. It prints (of
what I can remember):

Disabling ethernet.....

RMGR: Stage 1
loading /././sigma0
loading kernel /././main -nokdb
kernel at .....
detect new-style DD-L4......
configuring sigma0
reserve meodules memeory range
Starting kernel /././main ......
Loading ELF image....

and there is stops AGAIN.

Q2: Can this be caused not by the loading of modules and kernel but by one
of the config settings when I compiled the l4linux image?

Thanks
Leon
Adam Lackorzynski
2004-07-06 20:13:36 UTC
Permalink
Post by Leon Brits
I've setup TFTP and configured GRUB accordingly, but I can still not boot
a L4Linux kernel.
Q1: The TFTP server does not work the first time. I must press Ctrl-C and
try to boot again. Only then does the files get download (verified with
tcpdump on servers side). Any suggestions as to why?
Hmm, difficult to say. Which tftp-server are you using? We have made
good experiences with tftp-hpa.
Post by Leon Brits
The system hangs again at the same place as without TFTP. It prints (of
Disabling ethernet.....
RMGR: Stage 1
loading /././sigma0
loading kernel /././main -nokdb
kernel at .....
detect new-style DD-L4......
configuring sigma0
reserve meodules memeory range
Starting kernel /././main ......
Loading ELF image....
and there is stops AGAIN.
Q2: Can this be caused not by the loading of modules and kernel but by one
of the config settings when I compiled the l4linux image?
No, this has nothing to do with l4inux. At this stage rmgr loads the
kernel, l4linux will be started much later (it isn't even in memory yet
as it will be fetched by the loader). Is the demofloppy working for you?
Can you put your kernel-image online somewhere so that I can boot it and
see if it works for me (or see anything useful)?




Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon Brits
2004-07-06 23:01:21 UTC
Permalink
Adam,
Post by Adam Lackorzynski
Hmm, difficult to say. Which tftp-server are you using? We have made
good experiences with tftp-hpa.
The Fedora Core 1 server: tftp-hpa 0.33
Post by Adam Lackorzynski
No, this has nothing to do with l4inux. At this stage rmgr loads the
kernel, l4linux will be started much later (it isn't even in memory yet
as it will be fetched by the loader). Is the demofloppy working for you?
Can you put your kernel-image online somewhere so that I can boot it and
see if it works for me (or see anything useful)?
I will test the demo floppy but here:
http://home.tiscali.co.za/~20519830/fiasco DOT bz2
is the fiasco kernel.

Thanks
Leon
Adam Lackorzynski
2004-07-07 00:30:36 UTC
Permalink
Post by Leon Brits
Post by Adam Lackorzynski
Hmm, difficult to say. Which tftp-server are you using? We have made
good experiences with tftp-hpa.
The Fedora Core 1 server: tftp-hpa 0.33
Hmm, no real idea then. Some uncommon network card on the client side
maybe?
Post by Leon Brits
Post by Adam Lackorzynski
No, this has nothing to do with l4inux. At this stage rmgr loads the
kernel, l4linux will be started much later (it isn't even in memory yet
as it will be fetched by the loader). Is the demofloppy working for you?
Can you put your kernel-image online somewhere so that I can boot it and
see if it works for me (or see anything useful)?
http://home.tiscali.co.za/~20519830/fiasco DOT bz2
is the fiasco kernel.
Your kernel works just fine on my test system (PIII), with these
settings:

kernel (nd)/.../rmgr -serial -comport=1 -sigma0 -symbols task modname "L4Linux task"
modaddr 0x02000000
module (nd)/.../fiasco -nowait -serial_esc -comport 1 -nokdb
module (nd)/.../sigma0
module (nd)/.../fiasco_symbols
module (nd)/.../names
module (nd)/.../log --prio 0xA1
module (nd)/.../dm_phys
module (nd)/.../simple_ts -t 380
module (nd)/.../rtc
module (nd)/.../l4io --noirq
module (nd)/.../tftp -i
module (nd)/.../l4exec
module (nd)/.../loader (nd)/.../cfg_linux.l4env



Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon Brits
2004-07-07 12:41:34 UTC
Permalink
Post by Adam Lackorzynski
Post by Leon Brits
The Fedora Core 1 server: tftp-hpa 0.33
Hmm, no real idea then. Some uncommon network card on the client side
maybe?
No, RTL8139.
In my grub.conf, I added some lines to setup the TFTP:
dhcp
ifconfig --server=a.b.c.d
kernel (nd)/.....etc.
The "dhcp" detects the 8139 correctly every time and the "ifconfig" set my
computer as the tftp server.
It seems to work fine, but maybe this confuses my "new" GRUB v.90-os?
Post by Adam Lackorzynski
Your kernel works just fine on my test system (PIII), with these
kernel (nd)/.../rmgr -serial -comport=1 -sigma0 -symbols task modname "L4Linux task"
modaddr 0x02000000
module (nd)/.../fiasco -nowait -serial_esc -comport 1 -nokdb
module (nd)/.../sigma0
module (nd)/.../fiasco_symbols
module (nd)/.../names
module (nd)/.../log --prio 0xA1
module (nd)/.../dm_phys
module (nd)/.../simple_ts -t 380
module (nd)/.../rtc
module (nd)/.../l4io --noirq
module (nd)/.../tftp -i
module (nd)/.../l4exec
module (nd)/.../loader (nd)/.../cfg_linux.l4env
With the above settings I do get a "better"-boot but not yet into linux. I
did not have the two files "fiasco_symbols" and "rtc" so I just removed
them from the list.(Problem? Should I have them?)
The system stops booting after a few messages in cyan-colour of format
"##: loading <module>". The last module loaded is the loader module.
The stop message is something like:
log | [5.0] log/server/src/logserver.c:341:main()
| Error: Can not register at nameserver falling asleep
|
| Exiting with rc=1
Any suggestions?

I will start to investigate which of the parameter options you added to
the modules made the difference.
Where can I get documentation on what parameter option can be passed to
all the modules (e.g. the log server --prio 0xA1), or is the code the
documentation?

Thanks again
Leon
Leon Brits
2004-07-07 17:17:00 UTC
Permalink
No answer yet on previous question, so here is a progress report with new
questions...

Because I do not have the module "fiasco_symbols" and removed it from the
module list I had to remove the "-symbols"-option from the commandline to
RMGR as well. (thanks RMGR manual)
Now the boot progresses further....but stops (after a lot of output from
io-module) at the tftp-module where it pauses for a while and then fails
with the loader module reporting:

tftp | Found rtl8139
tftp | -- ioaddr: .....
tftp | Ethernet addr: <MAC>
=> loader | File provider "TFTP" not found
loader | our_exit(): Exiting with rc=-8
loader | Return reboots, ....

It seems that the tftp module can not find my tftp server (tftp server is
up and running!). Probably wants to download the kernel.

Q1: So how do I give the tftp-module an IP address and my TFTP server's IP
address?
Q2: The tftp module probes my onboard NIC which is a Intel E1000. For now
I disabled the NIC in BIOS, but how can I prevent the tftp module to use
that NIC instead of the RTL8139 on the PCI bus?

Thanks
Leon
Post by Leon Brits
Post by Adam Lackorzynski
Post by Leon Brits
The Fedora Core 1 server: tftp-hpa 0.33
Hmm, no real idea then. Some uncommon network card on the client side
maybe?
No, RTL8139.
dhcp
ifconfig --server=a.b.c.d
kernel (nd)/.....etc.
The "dhcp" detects the 8139 correctly every time and the "ifconfig" set
my computer as the tftp server.
It seems to work fine, but maybe this confuses my "new" GRUB v.90-os?
Post by Adam Lackorzynski
Your kernel works just fine on my test system (PIII), with these
kernel (nd)/.../rmgr -serial -comport=1 -sigma0 -symbols task modname "L4Linux task"
modaddr 0x02000000
module (nd)/.../fiasco -nowait -serial_esc -comport 1 -nokdb
module (nd)/.../sigma0
module (nd)/.../fiasco_symbols
module (nd)/.../names
module (nd)/.../log --prio 0xA1
module (nd)/.../dm_phys
module (nd)/.../simple_ts -t 380
module (nd)/.../rtc
module (nd)/.../l4io --noirq
module (nd)/.../tftp -i
module (nd)/.../l4exec
module (nd)/.../loader (nd)/.../cfg_linux.l4env
With the above settings I do get a "better"-boot but not yet into linux.
I did not have the two files "fiasco_symbols" and "rtc" so I just
removed them from the list.(Problem? Should I have them?)
The system stops booting after a few messages in cyan-colour of format
"##: loading <module>". The last module loaded is the loader module.
log | [5.0] log/server/src/logserver.c:341:main()
| Error: Can not register at nameserver falling asleep
|
| Exiting with rc=1
Any suggestions?
I will start to investigate which of the parameter options you added to
the modules made the difference.
Where can I get documentation on what parameter option can be passed to
all the modules (e.g. the log server --prio 0xA1), or is the code the
documentation?
Thanks again
Leon
Adam Lackorzynski
2004-07-07 18:08:08 UTC
Permalink
Post by Leon Brits
Because I do not have the module "fiasco_symbols" and removed it from the
module list I had to remove the "-symbols"-option from the commandline to
RMGR as well. (thanks RMGR manual)
Right.
Post by Leon Brits
Now the boot progresses further....but stops (after a lot of output from
io-module) at the tftp-module where it pauses for a while and then fails
tftp | Found rtl8139
tftp | -- ioaddr: .....
tftp | Ethernet addr: <MAC>
=> loader | File provider "TFTP" not found
loader | our_exit(): Exiting with rc=-8
loader | Return reboots, ....
It seems that the tftp module can not find my tftp server (tftp server is
up and running!). Probably wants to download the kernel.
It first wants to get the config file. tftp uses DHCP to get an IP
configuration. Setting IP address and co manually is not supported right
now (but can probably added quite easily).
Post by Leon Brits
Q1: So how do I give the tftp-module an IP address and my TFTP server's IP
address?
DHCP.
Post by Leon Brits
Q2: The tftp module probes my onboard NIC which is a Intel E1000. For now
I disabled the NIC in BIOS, but how can I prevent the tftp module to use
that NIC instead of the RTL8139 on the PCI bus?
Go to l4/pkg/tftp/server/src and call "make config", disable the drivers
you do not want and recompile.
Post by Leon Brits
Post by Leon Brits
Where can I get documentation on what parameter option can be passed to
all the modules (e.g. the log server --prio 0xA1), or is the code the
documentation?
The source is probably the best documentation but sometimes there's
something useful at http://os.inf.tu-dresden.de/l4env/doc/



Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon
2004-07-07 23:04:48 UTC
Permalink
Post by Adam Lackorzynski
It first wants to get the config file. tftp uses DHCP to get an IP
configuration. Setting IP address and co manually is not supported right
now (but can probably added quite easily).
I think the DHCP process fails. Is there a method to get more output from
the tftp module.
I tried the "-s <IP>" command line option but no success.
Post by Adam Lackorzynski
Post by Leon Brits
Where can I get documentation on what parameter option can be passed to
all the modules (e.g. the log server --prio 0xA1), or is the code the
documentation?
The source is probably the best documentation but sometimes there's
something useful at http://os.inf.tu-dresden.de/l4env/doc/
I did not find any docs about the tftp module there?

Thanks
Leon
Adam Lackorzynski
2004-07-09 00:15:40 UTC
Permalink
Post by Leon
Post by Adam Lackorzynski
It first wants to get the config file. tftp uses DHCP to get an IP
configuration. Setting IP address and co manually is not supported right
now (but can probably added quite easily).
I think the DHCP process fails. Is there a method to get more output from
the tftp module.
No, there's no such possibility. But you can add some printfs in the
source of course.
Post by Leon
I tried the "-s <IP>" command line option but no success.
-s is just to specify a different server than the one supplied by DHCP.

Could you try with the e1000 NIC? Your GRUB may not support it but maybe
it's possible to circumvent this with changing the network cable to the
e1000 card after grub has finished!?
Post by Leon
Post by Adam Lackorzynski
something useful at http://os.inf.tu-dresden.de/l4env/doc/
I did not find any docs about the tftp module there?
Well, then there's none unfortunately.



Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon
2004-07-12 22:25:23 UTC
Permalink
Hi again,
Post by Adam Lackorzynski
Could you try with the e1000 NIC? Your GRUB may not support it but maybe
it's possible to circumvent this with changing the network cable to the
e1000 card after grub has finished!?
I did but it did not solve the problem. The TFTP module still does not
perform step 2 (acknowledge assigned IP-address) in the DHCP process.
It was quite nice - GRUB would auto detect the RTL8139 and the TFTP module
would autodetect the E1000. No cable swapping.

So, before I start hacking the code I decided to firts verify that my
l4linux compilation it working so that I can distinguish between bad
hacking and other coding problems.
I've taken the l4linux config and changed it from 'l4env' to
'l4/2.0/fiasco'. Nothing else is enabled except for the debugging
IRQ-wheel.

I recompiled and moved everything locally (no TFTP). My GRUB config is:

title Fiasco L4Linux HD (2.4.26)
root (hd0,0)
kernel /fiasco/rmgr -noserial -sigma0
modaddr 0x02000000
module /fiasco/fiasco -nowait -nokdb -noserial
module /fiasco/sigma0
module /fiasco/vmlinuz.V2 l4irqack=linux root=/dev/hda2

The problem:
1. With boot up I get to the point where the kernel says:

Configuring Kernel Parameters: [ OK ]

and starts complaining with every command executed about the fact that it
cannot create a thread-local storage.

cannot setup thread-local storage: cannot setup LDT for thread local
storage
:
:
Checking root filesystem
/dev/hda2 is mounted. e2fchk: Cannot continue, aborting.

It stops after it fails to check the file system, thinking that the disk
is corrupt.

Q1: Any explainations?

Thanks
Leon

Note1: I am running Fedora Core 1 - 2.4.22-1.2115.nptl SMP kernel
Adam Lackorzynski
2004-07-12 22:35:50 UTC
Permalink
Post by Leon
I've taken the l4linux config and changed it from 'l4env' to
'l4/2.0/fiasco'. Nothing else is enabled except for the debugging
IRQ-wheel.
title Fiasco L4Linux HD (2.4.26)
root (hd0,0)
kernel /fiasco/rmgr -noserial -sigma0
modaddr 0x02000000
module /fiasco/fiasco -nowait -nokdb -noserial
module /fiasco/sigma0
module /fiasco/vmlinuz.V2 l4irqack=linux root=/dev/hda2
Configuring Kernel Parameters: [ OK ]
and starts complaining with every command executed about the fact that it
cannot create a thread-local storage.
cannot setup thread-local storage: cannot setup LDT for thread local
storage
Checking root filesystem
/dev/hda2 is mounted. e2fchk: Cannot continue, aborting.
It stops after it fails to check the file system, thinking that the disk
is corrupt.
Q1: Any explainations?
Disable nptl, it does not work with L4Linux (mv /lib/tls /lib/tls.foo on
your normal system).




Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon
2004-07-12 23:03:26 UTC
Permalink
Adam,
Post by Adam Lackorzynski
Disable nptl, it does not work with L4Linux (mv /lib/tls /lib/tls.foo on
your normal system).
This did not help?

Leon
Adam Lackorzynski
2004-07-12 23:39:41 UTC
Permalink
Post by Leon
Post by Adam Lackorzynski
Disable nptl, it does not work with L4Linux (mv /lib/tls /lib/tls.foo on
your normal system).
This did not help?
Indeed. Fedora/Redhat are doing nice things again. Looks like their
glibc thinks nptl is working on 2.4 kernels (as they have backported
that to their kernels). L4Linux can not support that so it's not
working. Workaround: add LD_ASSUME_KERNEL=2.4 your kernel command line.
This survives until someone clears the environment (will definitely
happen on login), so you'll have to set it again there.



Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon
2004-07-12 23:56:03 UTC
Permalink
Adam,

Again - thanks for your knowledge and willingness to help!..
...BUT still a problem...
and I must admit this, like the previous question, is mostly Linux based
(maybe not L4linux).
Your solution to the nptl problem is definitely "new" - do you recommend
another distro?

The TLS problem is solved - no more messages - but it still fails at the
point where it test the filesystem:
:
: <snip>
:
Checking root filesystem
/dev/hda2 is mounted. e2fchk: Cannot continue, aborting.

The filesystem is ext3. There is nothing wrong with the partition or
filesystem.

Thanks
Leon


On Mon, 12 Jul 2004 18:39:29 +0200, Adam Lackorzynski
Post by Adam Lackorzynski
Post by Leon
Post by Adam Lackorzynski
Disable nptl, it does not work with L4Linux (mv /lib/tls /lib/tls.foo
on
Post by Adam Lackorzynski
your normal system).
This did not help?
Indeed. Fedora/Redhat are doing nice things again. Looks like their
glibc thinks nptl is working on 2.4 kernels (as they have backported
that to their kernels). L4Linux can not support that so it's not
working. Workaround: add LD_ASSUME_KERNEL=2.4 your kernel command line.
This survives until someone clears the environment (will definitely
happen on login), so you'll have to set it again there.
Adam
Adam Lackorzynski
2004-07-13 00:03:20 UTC
Permalink
Post by Leon
Your solution to the nptl problem is definitely "new" - do you recommend
another distro?
Well, all recents distros have (or will have) nptl, so it's difficult to
give a recommendation here. Under Debian it's possible to move the tls
dirs away (yes, there can be multiple of them (/usr/lib, /lib,
/usr/X11R6/lib, ...)) so that it works. But the situation may change
any time (or I may get confused on all the possible variations), so that
I cannot really say anything for sure.
Post by Leon
The TLS problem is solved - no more messages - but it still fails at the
: <snip>
Checking root filesystem
/dev/hda2 is mounted. e2fchk: Cannot continue, aborting.
The filesystem is ext3. There is nothing wrong with the partition or
filesystem.
Ah, add "ro" to the kernel command line. FC wants the root FS to be
mounted read-only and barfs otherwise.



Adam
--
Adam ***@os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
Leon
2004-07-13 03:01:06 UTC
Permalink
Adam,

That did the trick!

Some of the commands excuted during bootup still gave an TLS error. Even
after I login and set an environment variable as:
export LD_ASSUME_LINUX=2.4
Also it seems that all 'special'-characters such as the ascii-line
characters are printed as control characters (garbage) - any clue why?

Anyway, now back to my 'real' problem - the TFTP module.

Thanks
Leon
Post by Adam Lackorzynski
Ah, add "ro" to the kernel command line. FC wants the root FS to be
mounted read-only and barfs otherwise.
Leon
2004-07-07 23:31:06 UTC
Permalink
Hi Adam,

Some additional information...

When the tftp module performs a DHCP discover, the "Discover"-message is
sent and the "Offer"-message is sent back, but the tftp module does not
send the "Request"-message to acknowledge the new IP.

This was all determined using tcpdump on port 67.

Thnaks
Leon
Frank Mehnert
2004-07-13 14:40:06 UTC
Permalink
Hi Leon,
Post by Leon Brits
Now the boot progresses further....but stops (after a lot of output from
io-module) at the tftp-module where it pauses for a while and then fails
tftp | Found rtl8139
tftp | -- ioaddr: .....
tftp | Ethernet addr: <MAC>
=> loader | File provider "TFTP" not found
loader | our_exit(): Exiting with rc=-8
loader | Return reboots, ....
It seems that the tftp module can not find my tftp server (tftp server is
up and running!). Probably wants to download the kernel.
Q1: So how do I give the tftp-module an IP address and my TFTP server's IP
address?
The L4 TFTP client first tries to detect the network card an then performs
up to 20 dhcp lookups (see constant MAX_BOOTP_RETRIES). This is bad since
the loader uses a timeout waiting for the TFTP client to get ready. So if
you want to specify your own server, try to apply the following patch:

diff -u -r1.2 nic.c
--- nic.c 12 May 2004 11:24:04 -0000 1.2
+++ nic.c 13 Jul 2004 07:34:39 -0000
@@ -630,7 +630,8 @@
if(!eth_probe())
return 0;

- network_ready = 0;
+ network_ready = 1;
+ return 1;

memset(&ip, 0, sizeof(struct dhcpip_t));
ip.bp.bp_op = BOOTP_REQUEST;

and then specify your TFTP server with the 's' option.

Any success?

Frank
--
## Dept. of Computer Science, Dresden University of Technology, Germany ##
## http://os.inf.tu-dresden.de/~fm3 ##
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://lists.ira.uka.de/pipermail/l4ka/attachments/20040713/b8d581d2/attachment.bin
Leon
2004-07-20 14:27:58 UTC
Permalink
Hi Frank,
Post by Frank Mehnert
The L4 TFTP client first tries to detect the network card an then performs
up to 20 dhcp lookups (see constant MAX_BOOTP_RETRIES). This is bad since
the loader uses a timeout waiting for the TFTP client to get ready. So if
diff -u -r1.2 nic.c
--- nic.c 12 May 2004 11:24:04 -0000 1.2
+++ nic.c 13 Jul 2004 07:34:39 -0000
@@ -630,7 +630,8 @@
if(!eth_probe())
return 0;
- network_ready = 0;
+ network_ready = 1;
+ return 1;
memset(&ip, 0, sizeof(struct dhcpip_t));
ip.bp.bp_op = BOOTP_REQUEST;
and then specify your TFTP server with the 's' option.
No Success! This way the machine does not get an IP address.

I had success with the following change I made in function await_dhcp() of
file nic.c:
From: if (memcmp((char *)&dhcpreply->bp_siaddr, (char *)&zeroIP,
sizeof(in_addr)) == 0)
To: if (memcmp((char *)&dhcpreply->bp_yiaddr, (char *)&zeroIP,
sizeof(in_addr)) == 0)
This way await_dhcp() does not fail if the server IP is zero but only if
the assigned IP is zero.

Now the system boots-up, ...BUT...
I get the following error when l4linux tries to load the E1000 NIC driver:
l4lx | [E.3] ../../include/__macros.h:57:DICE_ERR():
l4lx | Error: call failed (ret=-18, exc=0) .....
--l4io_request_mem_region error ----------------------------EIP:.....

Q1: Any suggestions? It seems that I should exclude some memory ranges?

Thanks
Leon
Frank Mehnert
2004-07-20 20:56:21 UTC
Permalink
Post by Leon
Now the system boots-up, ...BUT...
l4lx | Error: call failed (ret=-18, exc=0) .....
--l4io_request_mem_region error ----------------------------EIP:.....
Q1: Any suggestions? It seems that I should exclude some memory ranges?
The reason for this error message is that L4Linux tries to get the IO memory
region of the E1000 card which is owned by the TFTP server. We have never
bootet L4Linux with an E1000 card here ... :-)

The L4-TFTP server has to unmap the IO memory region before returning the
requested file. This is currently not implemented and I've currently no
time to do this. Would it be possible that you switch to your other NIC, the
RTL card?

Frank
--
## Dept. of Computer Science, Dresden University of Technology, Germany ##
## http://os.inf.tu-dresden.de/~fm3 ##
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
Url : http://lists.ira.uka.de/pipermail/l4ka/attachments/20040720/93650178/attachment.bin
Leon
2004-07-21 14:25:40 UTC
Permalink
Frank,
Post by Frank Mehnert
The reason for this error message is that L4Linux tries to get the IO
memory region of the E1000 card which is owned by the TFTP server.
The L4-TFTP server has to unmap the IO memory region before returning the
requested file. This is currently not implemented and I've currently no
time to do this. Would it be possible that you switch to your other NIC,
the RTL card?
Yes, that is what I've done - removed the E1000 driver from my kernel
image. For now that is fine but I will require a GigE driver eventually.
Since it is l4io that seems to have a problem mapping the region, can't I
"exclude" that memory region via the commandline?

Thanks for your time - appreciated!
Leon

Alexander Boettcher
2004-07-05 21:18:38 UTC
Permalink
Post by Leon Brits
char_io.c:888: error: `KEY_LEFT' undeclared (first use in this function)
char_io.c:888: error: (Each undeclared identifier is reported only once
char_io.c:888: error: for each function it appears in.)
char_io.c:891: error: `KEY_RIGHT' undeclared (first use in this function)
char_io.c:894: error: `KEY_UP' undeclared (first use in this function)
char_io.c:897: error: `KEY_DOWN' undeclared (first use in this function)
char_io.c:900: error: `KEY_HOME' undeclared (first use in this function)
char_io.c:903: error: `KEY_END' undeclared (first use in this function)
char_io.c:906: error: `KEY_DC' undeclared (first use in this function)
char_io.c:909: error: `KEY_BACKSPACE' undeclared (first use in this
function)
char_io.c:912: error: `KEY_NPAGE' undeclared (first use in this function)
char_io.c:915: error: `KEY_PPAGE' undeclared (first use in this function)
Hi,

it seems, that the configure script didn't find a useable curses library
or headers. For me worked to comment out "#define HAVE_LIBCURSES 1" in
config.h, to avoid the errors with "KEY_...", so that the alternative
defines are used in "stage2/shared.h" for "KEY_...". (see line 272 ff)


Alexander B?ttcher.
Loading...