Re: Bug#340508: missing modules on s390/s390x

2006-03-16 Thread Bastian Blank
On Thu, Mar 16, 2006 at 07:33:59PM +0100, Bastian Blank wrote:
 Hmm. It is no dependency as the kernel can work without. Also it needs a
 converter for chandev to the new config format.

Which will only work automaticaly in the easiest config: only one
device/type as there is not longer any order. And ifupdown can't
handle device-ids instead of names.

Bastian

-- 
Lots of people drink from the wrong bottle sometimes.
-- Edith Keeler, The City on the Edge of Forever,
   stardate unknown


signature.asc
Description: Digital signature


Re: Bug#340508: missing modules on s390/s390x (mkinitramfs for 2.6.14)

2005-12-04 Thread Frans Pop
(CC to d-s390 as there may be people who can provide additional 
information.)

On Friday 02 December 2005 22:58, you wrote:
 can you please retest if that device gets created?

OK. I've done some testing and made some progress.

First, the following modules need to be available in the initrd:
- dasd_eckd_mod
- dasd_fba_mod
- dasd_mod
- dcssblk

It I add these in /etc/mkinitramfs/modules, they will of course be loaded, 
but the dasd devices are not created. A boot results in:

snip from console
Loading, please wait...
Begin: Initializing /dev ...
Done.
Begin: Loading modules ...
Done.
Begin: Running /scripts/init-premount ...
Done.
Begin: Mounting root file system ...
Begin: Running /scripts/local-top ...
Done.
ALERT  /dev/dasda1 does not exist. Dropping to a shell
/snip

Reason is that dasd_mod needs an option to tell it which dasd devices 
should be used. I've written a script that creates a config file for 
modprobe in /etc/modprobe.d/.
The script is a first approximation and probably needs cleaning up. 
Background info and some possible issues are documented in the script.

The script was added in /etc/mkinitramfs/hooks/
During reconfiguration of the kernel-image, I got the following error.
snip
$ sudo dpkg-reconfigure linux-image-2.6.14-2-s390
Using /usr/sbin/mkinitramfs to build the ramdisk.
Full list of probed ramdisk generating tools :
/usr/sbin/mkinitrd /usr/sbin/mkinitrd.yaird /usr/sbin/mkinitramfs.
ln: creating symbolic link `/tmp/mkinitramfs_Znxcw0//etc/modprobe.d/dasd'
to `/tmp/initramfs_dasd': File exists
/snip

I used 'set -x' in the script to debug and that told me it was being 
executed twice! This looks like a bug in initramfs-tools.

A boot with the initrd thus created resulted in:

snip from console
Loading, please wait...
Begin: Initializing /dev ...
Done.
Begin: Loading modules ...
dasd(eckd): 0.0.0120: 3390/02(CU:3990/02) Cyl:1113 Head:15 Sec:224
dasd(eckd): 0.0.0120: (4kB blks): 801360kB at 48kB/trk compatible disk 
layout
 dasda:VOL1/  LX0120: dasda1 dasda2
dasd(eckd): 0.0.0121: 3390/02(CU:3990/02) Cyl:1113 Head:15 Sec:224
dasd(eckd): 0.0.0121: (4kB blks): 801360kB at 48kB/trk compatible disk 
layout
 dasdb:VOL1/  0X0121: dasdb1 dasdb2
Done.
Begin: Running /scripts/init-premount ...
Done.
Begin: Mounting root file system ...
Begin: Running /scripts/local-top ...
Done.
Begin: Running /scripts/local-premount ...
Done.
FATAL: Module ext3 not found.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Begin: Running /scripts/log-bottom ...
Done.
Done.
Begin: Running /scripts/init-bottom ...
Done.
Kernel panic - not syncing: Attempted to kill init
HHCCP011I CPU: Disabled wait state
  PSW=000A 8003025E
/snip

So now the devices are created.
The FATAL: Module ext3 not found. error is bogus as ext3 is built in.
The next lines tell that a ext3 partition is mounted.
I have no idea why init fails after that. As I did not get a shell, I'm 
not sure how to debug further. Suggestions welcome.

Cheers,
FJP

[EMAIL PROTECTED]:~$ cat /etc/mkinitramfs/hooks/dasd_cfg
#! /bin/sh

# initramfs hook script: /etc/mkinitramfs/hooks/dasd_cfg

# dasd_mod module needs option listing dasd's to initialize
# Example: options dasd_mod dasd=0120,0121
# Devices are taken from /proc/dasd/devices. Example (from 2.4.27 kernel):
# $ cat /proc/dasd/devices
# 0120(ECKD) at ( 94:  0) is dasda  : active at blocksize: 4096, 200340 
blocks, 782 MB
# 0121(ECKD) at ( 94:  4) is dasdb  : active at blocksize: 4096, 200340 
blocks, 782 MB


# TODO
# Maybe /proc/dasd/devices needs to be parsed better.
# I assume that the ordering of devices is determined by their order in the
# module option. I'm not sure of the sorting in /proc/dasd/devices, so it
# may not do the right thing if dasda is 0121 and dasdb is 0120.
# I'm also not sure how reliable the format of the file is.


. /usr/share/initramfs-tools/hook-functions

[ -r /proc/dasd/devices ] || exit 1

dasd_dev=$(cut -d( -f1 /proc/dasd/devices)
for dev in $dasd_dev; do
[ -n $dasd_devs ]  dasd_devs=${dasd_devs},
dasd_devs=${dasd_devs}${dev}
done

if [ -n $dasd_devs ] ; then
echo options dasd_mod dasd=$dasd_devs /tmp/initramfs_dasd

copy_exec /tmp/initramfs_dasd /etc/modprobe.d/dasd
fi


pgp9mbRP2NVWV.pgp
Description: PGP signature


Re: Bug#340508: missing modules on s390/s390x (mkinitramfs for 2.6.14)

2005-12-04 Thread Frans Pop
Some additional info.

I've done my research from a system (Hercules emulator) running 2.4.27.

For 2.4.27, the dasd modules are built into the kernel. The option to set 
the dasd devices is therefore passed from the zipl bootloader.

The dasd= option in the [debian_26] section was of course ignored by the 
initrd.

$ cat /etc/zipl.conf
[defaultboot]
defaultmenu = menu

:menu
target = /boot
1 = debian_24
2 = debian_26
default = 1
prompt = 1
timeout = 3

[debian_24]
target = /boot
image = /boot/vmlinuz-2.4.27-2-s390
parameters = ro vmpoff=LOGOFF dasd=0120,0121 root=/dev/dasda1

[debian_26]
target = /boot
image = /boot/vmlinuz-2.6.14-2-s390
ramdisk = /boot/initrd.img-2.6.14-2-s390
parameters = ro vmpoff=LOGOFF dasd=0120,0121 root=/dev/dasda1


pgpQ0tIeYLLP0.pgp
Description: PGP signature


Re: Bug#340508: missing modules on s390/s390x (mkinitramfs for 2.6.14)

2005-12-04 Thread Arnd Bergmann
Am Sonntag 04 Dezember 2005 16:31 schrieb Frans Pop:
 Reason is that dasd_mod needs an option to tell it which dasd devices
 should be used. I've written a script that creates a config file for
 modprobe in /etc/modprobe.d/.
 The script is a first approximation and probably needs cleaning up.
 Background info and some possible issues are documented in the script.

Note that it is not required to pass the list of dasd devices when loading
the module. You also have the option of enabling devices through sysfs
or with one of the tools from s390tools (I forgot the name of the binary),
which is probably easier to do from initramfs.

Arnd 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]