Hello L4-Hackers,
I have a problem regarding the loading of modules: If I want to load a module and put the regarding entry into the menu.lst including parameters for the module, the module cannot be found in the memory.
For example, I have the entry:
module (nd)/hddencrypter --with-password-dialog or module (nd)/ramdisk --with-password-dialog
(the --with-password-dialog is an argument, which forces GRUB to prompt for a password and afterwards replaces the --with-password-dialog with a new parameter --password='xxx'. This is needed for the harddisc encrypter in order to get the password for decrypting the configuration file).
But whenever I put a parameter behind a module, the loader isn't able to locate the entry inside the memory (probably because it compares the whole string?).
l4lx | l4env_rd_path: ramdisk l4lx | Loading: ramdisk bmodfs | [B.2] generic_fprov/examples/bmodfs/dm.c:135:dm_open(): bmodfs | Error: Object 'ramdisk' not found! l4lx | Couldn't load RAM disk from fprov!
Are there any ideas on how to solve this?
Best regards,
Marcel Selhorst
Hi Marcel,
On Thursday 13 October 2005 11:10, Marcel Selhorst wrote:
I have a problem regarding the loading of modules: If I want to load a module and put the regarding entry into the menu.lst including parameters for the module, the module cannot be found in the memory.
For example, I have the entry:
module (nd)/hddencrypter --with-password-dialog or module (nd)/ramdisk --with-password-dialog
(the --with-password-dialog is an argument, which forces GRUB to prompt for a password and afterwards replaces the --with-password-dialog with a new parameter --password='xxx'. This is needed for the harddisc encrypter in order to get the password for decrypting the configuration file).
But whenever I put a parameter behind a module, the loader isn't able to locate the entry inside the memory (probably because it compares the whole string?).
l4lx | l4env_rd_path: ramdisk l4lx | Loading: ramdisk bmodfs | [B.2] generic_fprov/examples/bmodfs/dm.c:135:dm_open(): bmodfs | Error: Object 'ramdisk' not found! l4lx | Couldn't load RAM disk from fprov!
Are there any ideas on how to solve this?
Please would you post your complete menu.lst GRUB entry?
Frank
Rehi,
Please would you post your complete menu.lst GRUB entry?
title=-= ( Fiasco mit DoPe und L4Linux)=- kernel (nd)/v2bins/bootstrap modaddr 0x06000000 module (nd)/fiasco -nokdb -serial -comport 1 -comspeed 115200 -nowait module (nd)/v2bins/sigma0 module (nd)/v2bins/roottask -sigma0 task modname "bmodfs" module module module module module module task modname "l4dope" boot_priority 0xA8 module (nd)/v2bins/names module (nd)/v2bins/dmon module (nd)/v2bins/dm_phys module (nd)/v2bins/simple_ts -t 380 module (nd)/v2bins/rtc module (nd)/v2bins/l4io --noirq module (nd)/v2bins/bmodfs module (nd)/cfg/run.bmodfs.cfg module (nd)/v2bins/run module (nd)/v2bins/libloader.s.so module (nd)/vmlinuz26 module (nd)/cfg/l4linux26ramdisk.cfg module (nd)/ramdisk --with-password-dialog module (nd)/v2bins/l4exec module (nd)/v2bins/l4dope --l4io module (nd)/v2bins/loader --fprov=BMODFS l4linux26ramdisk.cfg vbeset 0x117
Marcel
Hi Marcel,
On Thursday 13 October 2005 11:24, Marcel Selhorst wrote:
Please would you post your complete menu.lst GRUB entry?
title=-= ( Fiasco mit DoPe und L4Linux)=-
Ok, seems correct. On hint: You can replace "module module module ..." by "attached z modules" where z is the number of attached modules.
Looking at the sources of generic_fprov/examples/bmodfs/dm.c we see that bmodfs does not differ between modules and module arguments. We will fix that shortly. BTW: It was not difficult to find that bug. :-) Simply look for the string "Object '%s' not found" in the bmodfs sources and follow that code path. You see the strcmp which compares the filenames plus the arguments.
The fix should be available in our remote CVS tomorrow.
Greetings,
Frank
On Thursday 13 October 2005 13:15, Frank Mehnert wrote:
On Thursday 13 October 2005 11:24, Marcel Selhorst wrote:
Please would you post your complete menu.lst GRUB entry?
title=-= ( Fiasco mit DoPe und L4Linux)=-
Ok, seems correct. On hint: You can replace "module module module ..." by "attached z modules" where z is the number of attached modules.
Looking at the sources of generic_fprov/examples/bmodfs/dm.c we see that bmodfs does not differ between modules and module arguments. We will fix
Hmm. One additional note: It does not make much sense to add a parameter to a module which is loaded via bmodfs because the parameter cannot be evaluated by bmodfs or any other application. An L4 application which want to access the module does it by using the generic_fprov interface and gets a dataspace if open was successful. There is simply no room for an argument.
So what do you want to achive? If you want to pass the password to hddencrypter you should start hddencrypter using the loader, e.g.
(nd)/loader --fprov=BMODFS "hddencrypter --with-password-dialog"
Frank
Hi Frank,
So what do you want to achive? If you want to pass the password to hddencrypter you should start hddencrypter using the loader, e.g.
ok, we use the loader now to load the modules, but we have another problem now...
(nd)/loader --fprov=BMODFS "hddencrypter --with-password-dialog"
If we pass an argument to our module, which includes spaces, e.g.
(nd)/loader --fprov=BMODFS "hddencrypter --password='xx x'" ^param1 ^param2 ^param3
your loader doesn't recognize the quotation marks as an argument boundary. Therefore the loader will recognize three different parameters, although (param2+param3) belong together. Could you please include an escape sequence or assign priority to single quotation marks, so that it is possible to pass arguments incl. spaces to a module?
Thanks in advance,
Marcel
Hi Marcel,
On Friday 14 October 2005 14:16, Marcel Selhorst wrote:
So what do you want to achive? If you want to pass the password to hddencrypter you should start hddencrypter using the loader, e.g.
ok, we use the loader now to load the modules, but we have another problem now...
(nd)/loader --fprov=BMODFS "hddencrypter --with-password-dialog"
If we pass an argument to our module, which includes spaces, e.g.
(nd)/loader --fprov=BMODFS "hddencrypter --password='xx x'" ^param1 ^param2 ^param3your loader doesn't recognize the quotation marks as an argument boundary. Therefore the loader will recognize three different parameters, although (param2+param3) belong together. Could you please include an escape sequence or assign priority to single quotation marks, so that it is possible to pass arguments incl. spaces to a module?
Parsing the command line arguments is done by parse_args() in
l4util/lib/src/getopt2.c
This function recognizes quotations as first character of an command line argument. Please could you try if
(nd)/loader --fprov=BMODFS "hddencrypter '--password=xx x'" ^param0 ^param1
works for you?
Frank
l4-hackers@os.inf.tu-dresden.de