Discussion:
Network installation of 6.1.4 to a Sparc 2.
Peter Easthope
2014-08-11 17:05:38 UTC
Permalink
A terminal emulator is now connected via a serial line to the
Sparc 2 here. Network installation of 6.1.4 proceeds until the
attempt to partition the disk gives "Status: openpty() failed". These
lines in Debian Wheezy, server:/var/log/syslog, seem correct.

Aug 8 11:08:43 dalton rarpd[3896]: RARP request from 08:00:20:0e:84:78 on
DmzBel00bb74
Aug 8 11:08:43 dalton rarpd[3896]: RARP response to 08:00:20:0e:84:78
172.25.2.2 on DmzBel00bb74
Aug 8 11:08:45 dalton dnsmasq-tftp[3107]: sent /tftpboot/AC190202.SUN4C
to 172.25.2.2
Aug 8 11:08:49 dalton dnsmasq-dhcp[3107]: DHCPDISCOVER(DmzBel00bb74)
08:00:20:0e:84:78
Aug 8 11:08:49 dalton dnsmasq-dhcp[3107]: DHCPOFFER(DmzBel00bb74)
172.25.2.2 08:00:20:0e:84:78
Aug 8 11:08:49 dalton dnsmasq-dhcp[3107]: DHCPDISCOVER(DmzBel00bb74)
08:00:20:0e:84:78
Aug 8 11:08:49 dalton dnsmasq-dhcp[3107]: DHCPOFFER(DmzBel00bb74)
172.25.2.2 08:00:20:0e:84:78
Aug 8 11:08:49 dalton dnsmasq-dhcp[3107]: DHCPREQUEST(DmzBel00bb74)
172.25.2.2 08:00:20:0e:84:78
Aug 8 11:08:49 dalton dnsmasq-dhcp[3107]: DHCPACK(DmzBel00bb74)
172.25.2.2 08:00:20:0e:84:78 sparc2
Aug 8 11:08:49 dalton rpc.mountd[3981]: authenticated mount request from
172.25.2.2:1023 for /export/sparc2/root (/export/sparc2/root)

In http://pbraun.nethence.com/obsolete/software/netboot_sparc.html
Martin Husemann mentioned,
ln -s netbsd-GENERIC.gz netbsd.gz
whereas http://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.4/sparc/INSTALL.html
has only the unpacked netbsd.
# gunzip netbsd-GENERIC.gz
# mv netbsd-GENERIC /export/client/root/netbsd

Ideas?

Thanks, ... Peter E.
--
Telephone 1 360 639 0202. Bcc: peter at easthope.ca "http://carnot.yi.org/ "
Greg Troxel
2014-08-12 12:43:14 UTC
Permalink
Sparc 2 here. Network installation of 6.1.4 proceeds until the
attempt to partition the disk gives "Status: openpty() failed". These

That makes me wonder if the root filesystem being used is missing pty
entries, or something like that.

If you can run the machine diskless (over NFS), you might then write the
miniroot image to the disk, and then boot that, as described in
INSTALL.html.
Izumi Tsutsui
2014-08-19 15:41:03 UTC
Permalink
Post by Peter Easthope
A terminal emulator is now connected via a serial line to the
Sparc 2 here. Network installation of 6.1.4 proceeds until the
attempt to partition the disk gives "Status: openpty() failed". These
lines in Debian Wheezy, server:/var/log/syslog, seem correct.
Ideas?
I've tried NetBSD/sparc 6.1.4 binaries:
ftp://ftp7.jp.netbsd.org/pub/NetBSD/NetBSD-6.1.4/sparc/binary/kernel/netbsd-GENERIC.gz
ftp://ftp7.jp.netbsd.org/pub/NetBSD/NetBSD-6.1.4/sparc/installation/bootfs/instfs.tgz
via netboot, then sysinst goes fine including disklabeling.
(netboot/rootfs.tgz is symlink to bootfs/instfs.tgz)

What does "ls -l /dev/ptyp?" show on sh prompt after suspend sysinst?

Mine is:
---
[1] + Suspended /sysinst
# ls -l /dev/ttyp?
crw--w---- 1 root tty 20, 0 Apr 13 08:15 /dev/ttyp0
crw-rw-rw- 1 root wheel 20, 1 Apr 13 08:15 /dev/ttyp1
#
---

Another option is to boot netbsd.ram.gz instead of GENERIC
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.4/sparc/installation/bootfs/netbsd.ram.gz
and use CD iso image for installation.
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.4/iso/NetBSD-6.1.4-sparc.iso

---
Izumi Tsutsui
Peter Easthope
2014-08-20 12:36:07 UTC
Permalink
From: Izumi Tsutsui <***@ceres.dti.ne.jp>
Date: Wed, 20 Aug 2014 00:41:03 +0900
Post by Izumi Tsutsui
What does "ls -l /dev/ptyp?" show on sh prompt after suspend sysinst?
---
[1] + Suspended /sysinst
# ls -l /dev/ttyp?
crw--w---- 1 root tty 20, 0 Apr 13 08:15 /dev/ttyp0
crw-rw-rw- 1 root wheel 20, 1 Apr 13 08:15 /dev/ttyp1
#
[1] + Suspended sysinst
# ls -l /dev/ttyp?
crw-rw-rw- 1 root wheel 20, 0 Apr 13 08:15 /dev/ttyp0
crw-rw-rw- 1 root wheel 20, 1 Apr 13 08:15 /dev/ttyp1
#

Do you have the system console or a serial console? Why
does one system report "/sysinst" and the other "sysinst"?

Thanks, ... Peter E.
--
Telephone 1 360 639 0202. Bcc: peter at easthope.ca "http://carnot.yi.org/ "
Izumi Tsutsui
2014-08-20 14:30:58 UTC
Permalink
Post by Peter Easthope
Date: Wed, 20 Aug 2014 00:41:03 +0900
Post by Izumi Tsutsui
What does "ls -l /dev/ptyp?" show on sh prompt after suspend sysinst?
---
[1] + Suspended /sysinst
# ls -l /dev/ttyp?
crw--w---- 1 root tty 20, 0 Apr 13 08:15 /dev/ttyp0
crw-rw-rw- 1 root wheel 20, 1 Apr 13 08:15 /dev/ttyp1
#
[1] + Suspended sysinst
# ls -l /dev/ttyp?
crw-rw-rw- 1 root wheel 20, 0 Apr 13 08:15 /dev/ttyp0
crw-rw-rw- 1 root wheel 20, 1 Apr 13 08:15 /dev/ttyp1
#
Do you have the system console or a serial console? Why
does one system report "/sysinst" and the other "sysinst"?
I captured the above ls output on serial console, but
sysinst also works fine on cgthree + keyboard.

"/sysinst" is in /.profile in instfs.tgz (or rootfs.tgz):
http://nxr.netbsd.org/xref/src/distrib/sparc/miniroot/dot.profile?r=1.15#74
How did you invoke sysinst?

I'm not sure why sysinst on your environment complains
about openpty, but one possibility is Linux NFS server issue.

Could you try to remove all device nodes (and leave only MAKEDEV script)
in your server's nfsroot /dev directory (and make GENERIC kernel
make tmpfs /dev files itself)?

---
Izumi Tsutsui
Peter Easthope
2014-08-20 22:34:38 UTC
Permalink
From: Izumi Tsutsui <***@ceres.dti.ne.jp>
Date: Wed, 20 Aug 2014 23:30:58 +0900
Post by Izumi Tsutsui
Could you try to remove all device nodes (and leave only MAKEDEV script)
in your server's nfsroot /dev directory ...
***@dalton:/export/sparc2/root/dev$ ls M*
ls: cannot access M*: No such file or directory

OK! That must be incorrect.

***@dalton:/export/sparc2/root/dev$ ls -1 | wc -l
906

Remove all 906 files & directories in /export/sparc2/root/dev ?
Post by Izumi Tsutsui
How did you invoke sysinst?
ok> boot net

Then follow the prompts leading to I(nstall).

The log from the terminal emulator is appended. I deleted some
blank lines but otherwise copied directly.

Thanks for the interest and responses, ... Peter E.

====== Log =======
Opened ...

WARNING: Unable to determine keyboard type
SPARCstation 2, No Keyboard
ROM Rev. 2.9, 128 MB memory installed, Serial #4246143.
Ethernet address 8:0:20:e:84:78, Host ID: 5540ca7f.

Testing 1 megs of memory
Initializing Memory
Initializing Memory
Initializing Memory
Type help for more information
ok boot net
Boot device: /sbus/***@0,c00000 File and args:
4200 4400 4600 4800 4a00 4c00 4e00 5000 5200 5400 5600 5800 5a00 5c00 5e00
6000 6200 6400 6600 6800 6a00 6c00 6e00 7000 7200 7400 7600 7800 7a00 7c00
7e00 8000 8200 8400 8600 8800 8a00 8c00 8e00 9000 9200 9400 9600 9800 9a00
9c00 9e00 a000 a200 a400 a600 a800 aa00 ac00 ae00 b000 b200 b400 b600 b800
ba00 bc00 be00 c000 c200 c400 c600 c800 ca00 cc00 ce00 d000 d200 d400 d600
d800 da00 dc00 de00 e000 e200 e400 e600 e800 ea00 ec00 ee00 f000 f200 f400
f600 f800 fa00 fc00 fe00 10000 10200 10400 10600 10800 10a00 10c00 10e00
11000 11200 11400 11600 11800 11a00 11c00 11e00 12000 12200 12400 12600
12800 12a00 12c00 12e00 13000 13200 13400 13600 13800 13a00 13c00 13e00
14000 14200
Post by Izumi Tsutsui
NetBSD/sparc Secondary Boot, Revision 1.15
Booting netbsd
Trying BOOTP protocol... ip address: 172.25.2.2, hostname: sparc2,
netmask: 255.255.255.0, gateway: 172.25.2.1
root addr=172.25.2.1 path=/export/sparc2/root/
4085568+150176 [261904+249480]=0x4874b4
OBP version 2, revision 2.9 (plugin rev 2)
initialized boothowt from bootloader: 0
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.

NetBSD 6.1.4 (GENERIC)
total memory = 127 MB
avail memory = 120 MB
bootpath: /***@1,f8000000/***@0,c00000
mainbus0 (root): SUNW,Sun 4/75: hostid 5540ca7f
cpu0 at mainbus0: CY7C601 @ 40 MHz, TMS390C602A FPU
cpu0: cache chip bug; trap page uncached
cpu0: 64K byte write-through, 32 bytes/line, hw flush: cache enabled
memreg0 at mainbus0 ioaddr 0xf4000000
clock0 at mainbus0 ioaddr 0xf2000000: mk48t02
timer0 at mainbus0 ioaddr 0xf3000000 ipl 10: delay constant 17, frequency
= 1000000 Hz
auxreg0 at mainbus0 ioaddr 0xf7400003
zs0 at mainbus0 ioaddr 0xf1000000 ipl 12 softpri 6
zstty0 at zs0 channel 0 (console i/o)
zstty1 at zs0 channel 1
zs1 at mainbus0 ioaddr 0xf0000000 ipl 12 softpri 6
zstty4 at zs1 channel 0
kbd0 at zstty4
zstty5 at zs1 channel 1
ms0 at zstty5
wsmouse0 at ms0 mux 0
audioamd0 at mainbus0 ioaddr 0xf7201000 ipl 13 softpri 4
audio0 at audioamd0: full duplex, playback, capture
sbus0 at mainbus0 ioaddr 0xf8000000: clock = 20 MHz
dma0 at sbus0 slot 0 offset 0x400000: DMA rev 1+
esp0 at sbus0 slot 0 offset 0x800000 level 3: ESP100A, 25MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
le0 at sbus0 slot 0 offset 0xc00000 level 4 (ipl 5): address
08:00:20:0e:84:78
le0: 8 receive buffers, 2 transmit buffers
cgsix0 at sbus0 slot 2 offset 0x0 level 7: SUNW,501-1481, 1152 x 900, rev 1
cgsix0: attached to /dev/fb0
cgsix0: framebuffer size: 1 MB
wsdisplay1 at cgsix0 kbdmux 1
fdc0 at mainbus0 ioaddr 0xf7200000 ipl 11 softpri 4: chip 82072
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
scsibus0: waiting 2 seconds for devices to settle...
wskbd0 at kbd0 mux 1
sd0 at scsibus0 target 1 lun 0: <QUANTUM, FIREBALL1080S, 1Q00> disk fixed
sd0(esp0:0:1:0): Check Condition on CDB: 0x00 00 00 00 00 00
SENSE KEY: Not Ready
ASC/ASCQ: Logical Unit Not Ready, Cause Not Reportable

sd0: drive offline
sd0: sync (200.00ns offset 8), 8-bit (5.000MB/s) transfers
sd1 at scsibus0 target 2 lun 0: <MAXTOR, LXT-213S SUN0207, 4.20> disk fixed
sd1: 202 MB, 1310 cyl, 7 head, 45 sec, 512 bytes/sect x 415436 sectors
sd1: async, 8-bit transfers
kbd0: reset failed
root on le0
nfs_boot: trying DHCP/BOOTP
nfs_boot: DHCP next-server: 172.25.2.1
nfs_boot: my_name=sparc2
nfs_boot: my_addr=172.25.2.2
nfs_boot: my_mask=255.255.255.0
nfs_boot: gateway=172.25.2.1
root on 172.25.2.1:/export/sparc2/root/
root file system type: nfs
erase ^H, werase ^W, kill ^U, intr ^C
Terminal type? [vt100]
Erase
is
backspace.

This installer now uses the new `sysinst' installer tool by default. To
use the old install or upgrade shell scripts instead, enter the options
(OI) for Old Install or (OU) for Old Upgrade.

The script-based installers may be removed in a future release.

(I)nstall/Upgrade, (H)alt or (S)hell? I

NetBSD/sparc 6.1.4

This menu-driven tool is designed to help you install NetBSD to a hard disk,
or upgrade an existing NetBSD system, with a minimum of work.
In the following menus type the reference letter (a, b, c, ...) to select an
item, or type CTRL+N/CTRL+P to select the next/previous item.
The arrow keys and Page-up/Page-down may also work.
Activate the current selection from the menu by typing the enter key.
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx>a: Installation messages
in Englishxx b: Messages d'installation en frangais xx c:
Installation auf Deutschxx d: Komunikaty instalacyjne w jezyku polskim xx
e: Mensajes de instalacion en castellano
xmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
If you booted from a floppy, you may now remove the disk.
Thank you for using NetBSD!
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx NetBSD-6.1.4 Install
Systemxxxx>a: Install NetBSD to hard diskxx b: Upgrade NetBSD on a hard
diskxx c: Re-install sets or install additional sets xx d: Reboot the
computerxx e: Utility menuxx f: Config menuxx x: Exit Install
Systemxmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
You have chosen to install NetBSD on your hard disk. This will change
information on your hard disk. You should have made a full backup before
this procedure! This procedure will do the following things:
a) Partition your disk
b) Create new BSD file systems
c) Load and install distribution sets
d) Some initial system configuration

(After you enter the partition information but before your disk is changed,
you will have the opportunity to quit this procedure.)

Shall we continue?lqqqqqqqqqqqqqqqkx yes or no? xxxx>a: Noxx b: Yes
xmqqqqqqqqqqqqqqqj a: No>b: Yes

I found only one disk, sd1 (203M, MAXTOR LXT-213S SUN0207).
Therefore I assume you want to install NetBSD on it.
lqqqqqqqqqqqqqqqqqqqqqqqkx>Hit enter to continuexmqqqqqqqqqqqqqqqqqqqqqqqj

The NetBSD distribution is broken into a collection of distribution sets.
There are some basic sets that are needed by all installations and there are
some other sets that are not needed by all installations. You may choose to
install a core set (Minimal installation), all of them (Full
installation) or
you select from the optional distribution sets.
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx Select your distribution xxxx>a: Full
installationxx b: Installation without X11 xx c: Minimal installation
xx d: Custom installation xmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj a: Full
installation>b: Installation without X11 b: Installation without X11>c:
Minimal installation

NetBSD uses a BSD disklabel to carve up the NetBSD portion of the disk into
multiple BSD partitions. You must now set up your BSD disklabel.

You can use a simple editor to set the sizes of the NetBSD partitions, or
keep the existing partition sizes and contents.

You will then be given the opportunity to change any of the disklabel
fields.

The NetBSD part of your disk is 198 Megabytes. A full installation requires
at least 260 Megabytes without X and at least 295 Megabytes if the X sets
are
included.lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx Choose your installation
xxxx>a: Set sizes of NetBSD partitionsxx b: Use existing
partition sizes xmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
You can now change the sizes for the system partitions. The default is to
allocate all the space to the root file system, however you may wish to have
separate /usr (additional system files), /var (log files etc) or /home
(users' home directories).

Free space will be added to the partition marked with a '+'.

MB Cylinders Sectors Filesystem
Post by Izumi Tsutsui
132 (132) 835 270540 + /
66419 135756 swap
00 0 /tmp (mfs)
00 0 /usr
00 0 /var
00 0 /home
Add a user defined partition
Change input units (sectors/cylinders/MB)
Accept partition sizes. Free space 0 MB, 5 free
partitions.lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkxxmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjSize
for / in MB? [132+]: 12222 772 250128 9 122
772 250128 /
Post by Izumi Tsutsui
66 419 135756 swap 66 419
135756 swap
Post by Izumi Tsutsui
0 0 0 /tmp (mfs) 0
0 0 /tmp (mfs)
Post by Izumi Tsutsui
0 0 0 /usr 0 0
0 /usr
Post by Izumi Tsutsui
0 0 0 /var 0 0
0 /var
Post by Izumi Tsutsui
0 0 0 /home 0 0
0 /home
Post by Izumi Tsutsui
Add a user defined partition> 0 0 0 /home
Add a user defined partition
lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkxxmqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqjSize
for /home in MB? [0]: 4+4 (9) 26 8424 +5 MB, 4 4
(9) 26 8424 + /home
Post by Izumi Tsutsui
Add a user defined partition Add a user defined partition
Change input units (sectors/cylinders/MB) Change input units
(sectors/cylinders/MB)
Post by Izumi Tsutsui
Accept partition sizes. Free space 5 MB, 4 free partitions.
We now have your BSD-disklabel partitions as:
This is your last chance to change them.

Start MB End MB Size MB FS type Newfs Mount Mount point
--------- --------- --------- ---------- ----- ----- -----------
a: 0 121 122 FFSv1 Yes Yes /
b: 122 187 66 swap
c: 0 197 198 Whole disk
d: 188 197 9 FFSv1 Yes Yes /home
e: 0 0 0 unused
f: Show all unused partitions
g: Change input units (sectors/cylinders/MB)
Post by Izumi Tsutsui
x: Partition sizes ok
Please enter a name for your NetBSD disk

[LXT-213S SUN020]: LXT213
Ok, we are now ready to install NetBSD on your hard disk (sd1). Nothing has
been written yet. This is your last chance to quit this process before
anything gets changed.

Shall we continue?
lqqqqqqqqqqqqqqqkx yes or no? xxxx>a: Noxx b: Yes
xmqqqqqqqqqqqqqqqj a: No>b: Yes Status: Running
Command: disklabel -w -r -f /tmp/disktab sd1 'LXT213'

--------------------------------------------------------------------------------
openpty() failedHit enter to continue[1] + Suspended /sysinst

#
====== Log =======
--
Telephone 1 360 639 0202. Bcc: peter at easthope.ca "http://carnot.yi.org/ "
Izumi Tsutsui
2014-08-21 14:18:01 UTC
Permalink
Post by Peter Easthope
Date: Wed, 20 Aug 2014 23:30:58 +0900
Post by Izumi Tsutsui
Could you try to remove all device nodes (and leave only MAKEDEV script)
in your server's nfsroot /dev directory ...
ls: cannot access M*: No such file or directory
OK! That must be incorrect.
Ah, sorry, I was wrong. instfs.tgz doesn't include MAKEDEV.

You can extract the /dev/MAKEDEV script from the etc.tgz set
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-6.1.4/sparc/binary/sets/etc.tgz
into your nfsroot dir instead.
Post by Peter Easthope
906
Remove all 906 files & directories in /export/sparc2/root/dev ?
Yes. If the init(8) program can't fined /dev/console but find /dev/MAKEDEV,
it will try to mount /dev as tmpfs and create necesary device nodes.
http://nxr.netbsd.org/xref/src/sbin/init/init.c?r=1.105#1704

If your problem is caused by device nodes over NFS
(openpty(3) tries to chmod(2) and chown(2) to /dev/ttyp0 and
these operations might require more NFS server settings on Linux),
/dev/ttyp[01] on tmpfs should work.
http://nxr.netbsd.org/xref/src/lib/libutil/pty.c?r=1.31#116
Post by Peter Easthope
Post by Izumi Tsutsui
How did you invoke sysinst?
ok> boot net
Then follow the prompts leading to I(nstall).
The log from the terminal emulator is appended. I deleted some
blank lines but otherwise copied directly.
openpty() failedHit enter to continue[1] + Suspended /sysinst
I don't see any particular problem.
The only visible difference is the NFS server (mine is NetBSD/i386)..

---
Izumi Tsutsui
Izumi Tsutsui
2014-08-21 14:42:00 UTC
Permalink
Post by Izumi Tsutsui
If your problem is caused by device nodes over NFS
(openpty(3) tries to chmod(2) and chown(2) to /dev/ttyp0 and
these operations might require more NFS server settings on Linux),
It looks you probably need "no_root_squash" option in /etc/exports
file on your Linux NFS server.

---
Izumi Tsutsui
p***@easthope.ca
2014-08-21 19:48:52 UTC
Permalink
Ps. If nothing more direct comes to light I can try Greg's
suggestion.

From: Greg Troxel <***@ir.bbn.com>
Date: Tue, 12 Aug 2014 08:43:14 -0400
Post by Greg Troxel
If you can run the machine diskless (over NFS), you might then write the
miniroot image to the disk, and then boot that, as described in INSTALL.html.
Although, I fear it will come to another "openpty() failed".

A bootable installer which can be retrieved by TFTP and executed directly
would be so convenient and efficient. Difficulties I don't recognize must
preclude that.

Regards, ... Peter E.
--
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +1 360 639 0202 http://carnot.yi.org/ Bcc: peter at easthope. ca
Martin Husemann
2014-08-22 06:23:11 UTC
Permalink
Post by p***@easthope.ca
A bootable installer which can be retrieved by TFTP and executed directly
would be so convenient and efficient. Difficulties I don't recognize must
preclude that.
Yes, we do that for most other architectures, and it could be done for
sparcs with enough memory easily (I suppose, unless it runs into kernel
VA managing issues or something). Guess I should try & test.

Martin

Continue reading on narkive:
Loading...