Malcolm,

This is quite a slick method, but I've always found it easier to just have a
current copy of the kernel on the guest's 191 disk, and create an
appropriate parmline that points to the root file system on DASD.  That
method works in an LPAR install as well.  I have to admire your ingenuity,
though.  :)


Mark Post

-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
Malcolm Beattie
Sent: Monday, March 07, 2005 11:05 AM
To: [email protected]
Subject: Re: possible to boot zLinux (SLES8) in different user mode?


Peter 1 Oberparleiter writes:
> [EMAIL PROTECTED] wrote:
> > is it possible to boot zLinux (SLES8) in different user mode (2)? We're
> > having the problem that a process is hanging during startup,
> unfortunately
> > before the sshd daemon gets started...
>
> Newer distributions support a boot menu which can be activated at IPL time
> to specifiy an additional command line parameter. Unfortunately, as far as
> I know, this feature is not available on SLES8 systems.

If you're running under VM and don't mind delving into a few CP
commands then you can use the following quick and dirty way. I saw
it on an IBM internal forum recently. I've added some extra
explanation, shown some example output and mentioned the case where
the parmline is EBCDIC instead of ASCII. I've tested it (the
ASCII one anyway) and it works for me but no guarantees.

Create a trace trap for when Linux starts running:
    CP TRACE I R 10000

Then IPL from your normal boot device:
    IPL vdev

You'll almost immediately see
    Tracing active at IPL
     -> 00010000  BASR  0DD0        CC 0

Display the current kernel command line (the first 100 bytes)
as hex and ASCII:
    D TX10480.100

If you're parmline is in ASCII (see below if not), it'll show
something like
    R00010480  64617364 3D323830 302D3238 30462072 06 *dasd=2800-280F r*
    R00010490  6F6F743D 2F646576 2F646173 64613120    *oot=/dev/dasda1 *
    R000104A0  766D706F 66663D4C 4F474F46 4620766D    *vmpoff=LOGOFF vm*
    R000104B0  68616C74 3D4C4F47 4F46460A 00000000    *halt=LOGOFF.....*
    R000104C0  00000000 00000000 00000000 00000000    *................*
    R000104D0 to 0001057F suppressed line(s) same as above ....

The parmline is terminated with a newline character
(ASCII 0x0A above). You can append a space and S to the parmline
(which tells Linux to boot into single user mode) by overwriting
the newline with space+S+newline. Do that as follows (still assuming
you're parmline is ASCII), replacing the address with where your
trainling newline character lives:
    STORE S104BB 20530A
Note that the leading S before the address 104BB (no intervening
space) says that the following data (20530A) is hex for a byte
string (in ASCII, 0x20 = space, 0x53 = S, 0x0A = newline).
Repeat the display to check you got it right:
    D TX10480.100
    R00010480  64617364 3D323830 302D3238 30462072 06 *dasd=2800-280F r*
    R00010490  6F6F743D 2F646576 2F646173 64613120    *oot=/dev/dasda1 *
    R000104A0  766D706F 66663D4C 4F474F46 4620766D    *vmpoff=LOGOFF vm*
    R000104B0  68616C74 3D4C4F47 4F464620 530A0000    *halt=LOGOFF S...*
    R000104C0  00000000 00000000 00000000 00000000    *................*
    R000104D0 to 0001057F suppressed line(s) same as above ....

Now let the guest continue the boot process:
    B
and you'll see the usual boot messages as it comes up in single
user mode. You can then unregister the trace with
    #CP TRACE END ALL

As mentioned above, Linux can also cope with EBCDIC kernel command
lines so that you can easily create the parmline from CMS for
example. I think most people who've completed a full install will be
using zipl to write the text in ASCII but, for completeness, if your
parmline data is in EBCDIC, you'll need to use "D T10480.100" instead
of "D TX10480.100" (i.e. with no "X") in order to interpret the data
being displayed correctly and you'll need to use EBCDIC for the
hex codes to append to the parmline.

--Malcolm

--
Malcolm Beattie <[EMAIL PROTECTED]>
Linux Technical Consultant
IBM EMEA Enterprise Server Group...
...from home, speaking only for myself

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to