Discussion:
Installing a custom kernel on Debian S/390(wheezy/sid)
(too old to reply)
Sampsa Laine
2012-08-05 12:10:02 UTC
Permalink
Guy, I've just finished installing the S/390 version of wheezy/sid into a Hercules emulator (the one from the Xubuntu repositories, seems to work fine).

Everything is working including networking, but to my dismay I noticed there's no DECNET support compiled into the kernel (yes, I am that nuts, I want DECNET on an S/390).

Anyway, so I downloaded kernel sources for linux-2.6.32.59 (2.6.32.59 seemed the closest to 2.6.32-45, which was shipped with the distro) from kernel.org and did a make menuconfig. All went swimmingly.

I am now running the proper "make" to build the kernel, and it seems to be working fine, too.

Now to my question: How do I _install_ this kernel, ideally as a new boot option when I IPL the box.

I assume I have to:

1. Generate a new initramdisk
2. Put the kernel somewhere
3. Put the new modules somewhere
4. Modify the bootloader

Now it's been a LONG time since I've done this (think slackware with lilo and kernel 1.x) so I have no idea how to proceed, especially on an S/390.

Anyone got any pointers?

As for my current setup, here's some data:

#cat /etc/debian_version:
wheezy/sid

#cat uname -a:
Linux version 2.6.32-5-s390x (Debian 2.6.32-45) (***@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun May 6 03:12:45 UTC 2012

# cat /proc/version
Linux version 3.2.0-23-generic (***@crested) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) ) #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012



PS: In the future, could you guys maybe include DECNET support in the mainstream kernel releases? Or is this a problem?
Stephen Powell
2012-08-05 13:10:02 UTC
Permalink
Post by Sampsa Laine
Guy, I've just finished installing the S/390 version of wheezy/sid
into a Hercules emulator (the one from the Xubuntu repositories,
seems to work fine).
First of all, are you running Debian or Ubuntu? This is a Debian list.
Advice you get here is going to be Debian-specific and may not work
for Ubuntu. Debian has its own s390 port.
Post by Sampsa Laine
Everything is working including networking, but to my dismay I noticed
there's no DECNET support compiled into the kernel (yes, I am that nuts,
I want DECNET on an S/390).
Anyway, so I downloaded kernel sources for linux-2.6.32.59 (2.6.32.59
seemed the closest to 2.6.32-45, which was shipped with the distro)
from kernel.org and did a make menuconfig. All went swimmingly.
I am now running the proper "make" to build the kernel, and it seems
to be working fine, too.
Now to my question: How do I _install_ this kernel, ideally as a new
boot option when I IPL the box.
1. Generate a new initramdisk
2. Put the kernel somewhere
3. Put the new modules somewhere
4. Modify the bootloader
Now it's been a LONG time since I've done this (think slackware with
lilo and kernel 1.x) so I have no idea how to proceed, especially
on an S/390.
Anyone got any pointers?
wheezy/sid
(gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun May 6 03:12:45 UTC 2012
# cat /proc/version
(gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) )
#36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012
PS: In the future, could you guys maybe include DECNET support
in the mainstream kernel releases? Or is this a problem?
Second, let me qualify my remarks by saying that I am not a member of
the Debian s390/s390x port team and I do not speak for them: I am just
an ordinary Debian user (including a Debian for s390 user).

For building and installing custom kernels under Debian GNU/Linux,
I recommend the web page

http://users.wowway.com/~zlinuxman/Kernel.htm

This is not an official Debian web page, but this is what I use.
Take it with however many grains of salt you think it's worth.

Finally, a request to include DECNET support in the kernel by default
should probably be posted to the debian-kernel list.
--
.''`. Stephen Powell
: :' :
`. `'`
`-
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@md01.wow.synacor.com
Stephen Powell
2012-08-05 14:00:02 UTC
Permalink
Please reply to the list, not to me personally. Placing my reply
on the list.
Post by Stephen Powell
First of all, are you running Debian or Ubuntu? This is a Debian list.
Advice you get here is going to be Debian-specific and may not work
for Ubuntu. Debian has its own s390 port.
Debian on the S/390 - I just thought I'd mention I installed Hercules
on the host machine which is running Xubuntu.
Oh.
Post by Stephen Powell
Second, let me qualify my remarks by saying that I am not a member of
the Debian s390/s390x port team and I do not speak for them: I am just
an ordinary Debian user (including a Debian for s390 user).
For building and installing custom kernels under Debian GNU/Linux,
I recommend the web page
http://users.wowway.com/~zlinuxman/Kernel.htm
This is not an official Debian web page, but this is what I use.
Take it with however many grains of salt you think it's worth.
Yeah, found that page too. Does step 11 (Install the kernel image
package) work pretty much like they say on that page (thinking S/390
bootloaders are pretty different from i386 ones)?
The boot loader for s390 is ZIPL (part of the s390-tools package),
which is similar to LILO in that it uses a list of blocks determined
at map installer time to load the map file, kernel image, and initial
RAM file system image into memory. It also is typically configured
to use symbolic links, as LILO typically is too. The configuration
file is /etc/zipl.conf. Step 11 is not where you will have your
problem: Step 10 is. With ZIPL configured to use symbolic links and
using a custom kernel created by make-kpkg under Squeeze and later
releases, it will be necessary to install the two hook scripts called
zy-symlinks. Read that section carefully. You must install these
hook scripts BEFORE you install the kernel.
--
.''`. Stephen Powell
: :' :
`. `'`
`-
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@md01.wow.synacor.com
Sampsa Laine
2012-08-05 14:10:01 UTC
Permalink
Post by Stephen Powell
Yeah, found that page too. Does step 11 (Install the kernel image
package) work pretty much like they say on that page (thinking S/390
bootloaders are pretty different from i386 ones)?
The boot loader for s390 is ZIPL (part of the s390-tools package),
which is similar to LILO in that it uses a list of blocks determined
at map installer time to load the map file, kernel image, and initial
RAM file system image into memory. It also is typically configured
to use symbolic links, as LILO typically is too. The configuration
file is /etc/zipl.conf. Step 11 is not where you will have your
problem: Step 10 is. With ZIPL configured to use symbolic links and
using a custom kernel created by make-kpkg under Squeeze and later
releases, it will be necessary to install the two hook scripts called
zy-symlinks. Read that section carefully. You must install these
hook scripts BEFORE you install the kernel.
Does anyone have any practical examples of this? I don't want to bugger up my system (am of course backuping the DASD's before any install step :)

Sampsa
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/A4418699-BB8E-4B83-BD81-***@mac.com
Stephen Powell
2012-08-05 19:00:02 UTC
Permalink
Post by Sampsa Laine
Does anyone have any practical examples of this? I don't want
to bugger up my system (am of course backuping the DASD's
before any install step :)
I know it's long, but I recommend that you read the entire web
page before starting. There's a lot of material there, and many
"gotchas" are documented. If you read the web page first, you
will avoid most of the common "gotchas". If you are talking
specifically about the hook scripts, what I use is the lynx
browser (text mode only) to do the download. Bring up the web
page in lynx under Debian for s390. Position to the first
download link, then press "d" to download. Exit the browser,
become root, move (mv) the file to /etc/kernel/postinst.d, change
the group to root (chgrp), the owner to root (chown), and the
attributes to 755 (chmod). Revert back to your non-root userid
again, run lynx, position to the second download link, type "d"
to download, exit lynx again, become root, move the second file to
/etc/kernel/postrm.d, and change the group, owner, and attributes
as before. Then edit /etc/kernel-img.conf and change do_symlinks
to no.

There are examples in the web page itself, but they are for the
i386 architecture. Slight changes will need to be made in the
kernel naming convention for s390 kernels, but other than that
the examples in the web page itself should suffice.

After reading the entire web page, if you still have specific
questions, ask away.
--
.''`. Stephen Powell
: :' :
`. `'`
`-
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@md01.wow.synacor.com
Sampsa Laine
2012-08-05 19:10:02 UTC
Permalink
Post by Stephen Powell
Post by Sampsa Laine
Does anyone have any practical examples of this? I don't want
to bugger up my system (am of course backuping the DASD's
before any install step :)
I know it's long, but I recommend that you read the entire web
page before starting. There's a lot of material there, and many
"gotchas" are documented. If you read the web page first, you
will avoid most of the common "gotchas". If you are talking
specifically about the hook scripts, what I use is the lynx
browser (text mode only) to do the download. Bring up the web
page in lynx under Debian for s390. Position to the first
download link, then press "d" to download. Exit the browser,
become root, move (mv) the file to /etc/kernel/postinst.d, change
the group to root (chgrp), the owner to root (chown), and the
attributes to 755 (chmod). Revert back to your non-root userid
again, run lynx, position to the second download link, type "d"
to download, exit lynx again, become root, move the second file to
/etc/kernel/postrm.d, and change the group, owner, and attributes
as before. Then edit /etc/kernel-img.conf and change do_symlinks
to no.
I copied the two scripts into the /etc/kernel dirs.
Post by Stephen Powell
There are examples in the web page itself, but they are for the
i386 architecture. Slight changes will need to be made in the
kernel naming convention for s390 kernels, but other than that
the examples in the web page itself should suffice.
After reading the entire web page, if you still have specific
questions, ask away.
Am in the progress of re-reading it for the third time now, I think I've got most of it.

I also looked in the /etc/kernel/post* dirs, I take it the dpkg command will invoke zipl to add the relevant entries to the boot loader?

Sampsa
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/B90AC5A8-21B1-47F1-9BB1-***@mac.com
Stephen Powell
2012-08-05 20:00:02 UTC
Permalink
Post by Sampsa Laine
I copied the two scripts into the /etc/kernel dirs.
Good. Make sure the attributes are set properly. In particular,
it's very important that the scripts be marked executable. Otherwise,
they won't get run.
Post by Sampsa Laine
Am in the progress of re-reading it for the third time now,
I think I've got most of it.
I also looked in the /etc/kernel/post* dirs, I take it the dpkg
command will invoke zipl to add the relevant entries to the boot
loader?
Yes. When dpkg installs the .deb package, the scripts in
/etc/kernel/postinst.d will get run in alphabetical order.
The three most important scripts in this directory are

(1) initramfs-tools, which will build an initial RAM file system for
the new kernel
(2) zy-symlinks, which will maintain the symbolic links. (In particular,
the most recently installed kernel will get the vmlinuz symbolic link,
and the initial RAM file system which goes with it will get the
initrd.img symbolic link.)
(3) zz-zipl, which will run zipl to re-create the map file. The newly
installed kernel will now be the default kernel.
--
.''`. Stephen Powell
: :' :
`. `'`
`-
--
To UNSUBSCRIBE, email to debian-s390-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@md01.wow.synacor.com
Loading...