[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debian-hppa on a C8000



Hi Lothar,

On 3/16/19 22:42, Lothar Paltins wrote:
And for the hppa port of
Debian GNU/Linux I think it's a very good combination of size and
hardware resources. In addition it has built-in remote control
capabilities (see [1]).

Interesting for a remote server with modem access to the serial port.
I've tried it out on my machine, but after entering ESC-(, the serial
line simply freezes up. Maybe a BMC-password is set that should be cleared.

Can't remember seeing something like this on my c8000s, but I can check
tomorrow.


All of my HP
workstations are just museum pieces and to be authentic, all of them are
running HP-UX, except for this one C8000.

Nice! Would you be interested in testing these with Debian to see what
works and what does not?

Why not? My 68k workstations are out of topic here

There is still an active port for m68k, though I don't have any
experience with that and don't know if your hardware would be supported.
ISO images are on [1], the mailing list archive is on [2].

[1]: https://cdimage.debian.org/cdimage/ports/current/m68k/

[2]: https://lists.debian.org/debian-68k/

, but I've got the
following running parisc machines: 710, several 715, one with HCRX-24
graphics, 725, C360, C3600, J5600, C8000. Is there a machine, where I
could help testing?

I myself have a J5600, a c3700 and a c3750 and c8000s available, from
which I know they're working with Debian GNU/Linux. From Helge's answer
I assume 715 and C3600 (most likely identical to a c3700 or c3750 except
for the processor and maybe chipset revision) are supposed to work in
addition. I don't know how much hardware is identical between C200 and
C360, but my C200 also works, so chances are good for the C360, I think.


All of the PA-RISC machines I own, support network booting, so maybe
yours will, too. Testing wouldn't then require an actual on disk
installation, so not touching any existing HP/UX installations or
creating the need for a disk. You only need to setup the needed
infrastructure services (DNS, DHCP, TFTP, NFS, etc.).

No problem, if you tell me exactly what to do. But be aware, that I do
have a lot of Linux experience, but only with RHEL and openSuse, not
with Debian.

Great! Actually this is pretty easy to set up as soon as you have found
out all needed details. :-) You only need a lifimage (with palo, Linux
kernel and initramfs), a NFS root FS for the host and - as said - the
following infrastructure services in addition:

* DNS (I use dnsmasq)
* DHCP (I use ISC's DHCP server)
* TFTP (I use HPA's TFTP server)
* NFS (I use the in-kernel NFS server limited to NFS v2 and v3)

I have them spread over two hosts, one for DNS and DHCP and one for TFTP
and NFS, but that is not necessary. You can basically host everything on
just a Raspberry Pi, but use a separate real block device for the NFS
shares to not spoil the SD card too much.

## Configuration ##

Typical configuration (you should be able to configure the same services
on your Linux distribution of choice):

`/etc/hosts` (for dnsmasq):
```
[...]
172.16.0.2 nfs.domain.tld nfs
<IP_ADDRESS_1> hp-710.domain.tld hp710
<IP_ADDRESS_2> hp-725.domain.tld hp725
<IP_ADDRESS_3> c360.domain.tld c360
[...]
```

`/etc/dhcp/dhcpd.conf`
```
option domain-name "domain.tld";
option domain-name-servers 172.16.0.1;
[...]
authoritative;
[...]
## Example for one host; should work the same for all others, too.
## AC100003 is the IP address in upper case hex and actually a symlink
## to the actual lifimage in the TFTP server's base directory, i.e.:
##
## AC100003 -> linux.sp.lifimage.4.17.0-1-parisc.debian.sid.hppa
host hp-710 {
        fixed-address hp-710.domain.tld;
        hardware ethernet 08:00:09:11:22:33;
        option root-path "/srv/nfs/hp-710/root";
        filename "/AC100003";
        next-server nfs.domain.tld;
        option host-name "hp-710";
}
[...]
```

`/etc/default/tftpd-hpa`
```
## Configured to work in a changed root, so `/srv/tftp` transforms to
## `/` in any path specs.. I only use IPv4 and increased verbosity. You
## should check how this is configured on your Linux distribution.
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/srv/tftp"
[...]
TFTP_OPTIONS="-4 --secure -vvv"
```

`/etc/exports`
```
## As shown in the DHCP configuration I usually use a per-host directory
## plus separate dir for the actual root directory. I don't mind that
## all local machines can mount all host directories so I also allow
## them to mount everything if needed. This is useful for doing package
## management with a more powerful host (e.g. I use a rp3440 to manage
## the root directory pf my 712/80).
##
## Notice if you use BTRFS: You (still) need per-host directives if the
## host directories are on subvolumes.
/srv/nfs 172.16.0.0/255.255.0.0(rw,async,no_subtree_check,no_root_squash)
[...]
```

`/etc/default/nfs-kernel-server`
```
## I limit NFS to version 2 and 3. You should check how this is
## configured on your Linux distribution.
[...]
RPCNFSDOPTS="--nfs-version 2 --nfs-version 3  --no-nfs-version 4"
[...]
RPCMOUNTDOPTS="--manage-gids --nfs-version 2 --nfs-version 3
--no-nfs-version 4"
```

## Kernel and initramfs ##

This needs to be done from a hppa host with installed Debian, e.g. your
c8000 or an emulated one (i.e. using QEMU as in [3]). Maybe it will also
work with QEMU hppa user emulation from a x86 machine (see [4] for
details), but you need a ready-made installation of Debian for hppa for
this option anyhow, so can just stay with one of the other two options.

[3]: https://parisc.wiki.kernel.org/index.php/Qemu

[4]: https://wiki.debian.org/QemuUserEmulation

### Kernel ###

My C200 - though using a 64bit PA-8200 - uses a 32bit kernel, so maybe
this will also work on your C360 with PA-8500. If not, you'll already
have the 64bit kernel installed in your on-disk installation on your
c8000. Install the 32bit kernel with:

```
# apt install linux-image-parisc
```

Installed 32bit kernels have "parisc" in the kernel name, 64bit kernels
have "parisc64" in the kernel name instead.

### Initramfs ###

Add "BOOT=nfs" to `/etc/initramfs-tools/initramfs.conf` and change the
"MODULES" definition to "MODULES=list". I use the following modules lists:

* for the 712/80
`/etc/initramfs-tools/modules`:
```
lasi_82596
nfsv3
nfs_acl
nfs
lockd
grace
sunrpc
fscache
```

* for all other hppa hosts:
`/etc/initramfs-tools/modules`:
```
pps_core
ptp
libphy
tg3
lasi_82596
tulip
e100
e1000
nfsv3
nfs_acl
nfs
lockd
grace
sunrpc
fscache
```

Theoretically the last one should also work with the 712/80 (and 710 and
725 accordingly), but it actually only needs the `lasi_82596` module
during network booting. Make sure that there is no overwrite active in
`/etc/initramfs-tools/conf.d` for the "MODULES" definition.

Well, actually it might also work with "MODULES=netboot" instead, but
using a short module list will also limit the size of the final
initramfs and hence also shorten the boot times.

Then run `update-initramfs -c -k <KERNEL_RELEASE>`. If an initramfs for
the specified kernel release already exists, use `-u` instead of `-c`.
The kernel release string in Debian on hppa is everything after
"vmlinuz-" ("vmlinux-" in the past) in the actual kernel's file name in
`/boot`.

## Lifimage ##

This is created with palo. You can basically use the stock
`/etc/palo.conf`. Put the desired kernel and initramfs into your $CWD or
just `cd` to `/boot` and create two symlinks matching the names for
kernel and initramfs in the used palo configuration file. Don't mind the
part about NFS root in the stock palo configuration, this is not needed,
as this is done by our initramfs. Then just run `palo -f
/etc/palo.conf`. This will create a lifimage (conveniently named
"lifimage") in $CWD that needs to be placed in the TFTP server's base
directory and symlinked as written in the DHCP server's configuration
file. You can hard-code the kernel command line in the palo
configuration or interact with palo at the start of the boot process.

## Root directory ##

As the hppa port uses a 32bit userland, you should be able to use any
Debian hppa userland on any compatible hppa host.

* You can either make a tarball of your existing on-disk installation on
your c8000, e.g. from the Debian installer environment and untar that on
your NFS server. There are SSH clients available as udeb packages, you
can install these in the installer environment by using the expert mode
installation or changing the debconf priority to medium and then
selecting the additional udebs for installation. In the resulting FS you
just need to change (remove could also work) the `/etc/fstab` and update
`/etc/hostname` for a network boot.

* Or you can use `debootstrap` to create a root directory from a working
Debian installation on your c8000. The whole process is a little too
long to explain in this message and I'm afraid I might have already
bored the remainder of the subscribers, so I'd propose to first check if
a specific lifimage boots on your machines and if that works, also build
a root FS.

## Actual network boot ##

With everything above in place, you should be able to network boot using
just `bo[ot] lan` from BCH. To be able to modify the kernel command line
from palo on my 712/80, I needed to add ` isl`. I believe later machines
ask if one wants to interact with IPL when booting manually. Because of
[5] and the 710 and 725 using a similar(?) built-in NIC, I'd recommend
to (1) use the same settings for NFS (rsize/wsize=16384) in the kernel
command line argument (add
`nfsroot=/srv/nfs/<HOSTNAME>/root,rsize=16384,wsize=16384`) and (2)
configure the used switch port to 10 Mbps half-duplex and enable flow
control or better use a 10 Mbps Ethernet hub for these machines. In
addition use `cryptomgr.notests` in the kernel command line to speed up
the kernel boot process on slow machines.

[5]: https://lists.debian.org/debian-hppa/2018/04/msg00024.html

I hope I didn't forget anything important. In case of questions just
make contact.

And regarding the crashes and instabilities I see, I'm now sure, that
they are coming from the "apt-get upgrade". The original 8 (jessie)
installation works absolutely stable. But after the upgrade, the system
either doesn't boot or it crashes sometime later. This doesn't happen
without the upgrade.

Never noticed a difference in stability for my c8000s depending on the
OS release level, but mostly used rp3440s since I have acquired them. I
can check with a c8000 tomorrow if I notice any differences in behaviour.

Cheers,
Frank


Reply to: