Port-sparc archive

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

RE: Installation from a tape



Does the NetBSD installer miniroot have 'dd'? If it does, you could try test-reading the tape with that instead (directing the output to /dev/null), and try several different read-block-sizes.

Secondly, is it an HP drive? Many HP DDS-1/2/3 drives have a jumper for selecting UNIX or DOS/Win compatibility (yeah, I know such shouldn't be needed for a SCSI drive, but is due to HP's stupidly-written DOS/Win tape software). You need that jumper set for UNIX.

- Mike



Sent from my Galaxy


-------- Original message --------
From: Nobuyoshi SATO <nobu-s%iwate-pu.ac.jp@localhost>
Date: 29/12/2025 08:59 (GMT+00:00)
To: port-sparc%netbsd.org@localhost
Cc: nobu-s%iwate-pu.ac.jp@localhost
Subject: Installation from a tape


Hello all,

I purchased DDS3 DAT drive for my SS20, and trying execute
installer booting from a tape.
(My SS20 has NetBSD 10.1 in its HDD, and can be booted from an
internal CD-ROM drive. Just trying booting from the tape.
The tape drive itself works fine.)


Based on "Installing NetBSD by using a bootable tape" section of
Installation note for 10.1, I created bootable tape as follows:
    # dd if=tapefile1 of=/dev/nrst0 bs=4k conv=sync
    # dd if=tapefile2 of=/dev/nrst0 bs=4k conv=sync
(note that conv=osync in installation instruction does not work
with bs=, so I used conv=sync)


Then, I booted my SS20 from the tape. Kernel is successfully
loaded and asked name of tape drive and place of tapefile2 and
block size. Then I got errors as following:

[198.2459840] st0: 4096-byte tape record too big for 4-byte user buffer
[198.2609645] st0(esp0:0:4:0): Sense Key 0x00, info = -4092 (decimal), data = ""> 00 00 00 00 00 00 00 00 00 00 00
gzip: can't read stdin: Input/output error
tar: End of archive volume 1 reached
tar: Sorry, unable to determine archive format.

Pictures trying 4k block and 512 byte block are here:
https://imgs.nere9.help/media_attachments/files/115/801/349/416/514/298/small/98
18552bbfe58c41.jpg
https://imgs.nere9.help/media_attachments/files/115/801/354/696/829/695/small/35
93f8181a633a37.jpg
https://mstdn.nere9.help/@7n2jju/115801360048233652

This seem to be caused by user-land buffer is too small to read()
a block device. user-land buffer is only 4 bytes. According to
src/distrib/sparc/ramdisk/dot.profile, failed command is tar:
    echo "Extracting installation utilities... "
    (cd $INSTFS_MP && tar $bsa -z -x -p -f $dev) || return 1

tar is just running
    tar zxpf releasedir/sparc/installation/bootfs/instfs.tgz
from tape device.

After booted in multi-user, /bin/tar can read tapefile2 from
/dev/nrst0 normally.

tar command in kernel's ramdisk is crunched binary based on pax
command, according to obj/distrib/sparc/ramdisk/pax.

Then, I tried to read tapefile2 using crunched binary in
ramdisk image at obj/distrib/sparc/ramdisk in multi-user mode,
booted from HDD:
    # cd /tmp
    # mt rewind
    # mt fsf 1
    # /usr/obj/distrib/sparc/ramdisk/ramdiskbin tar zxf /dev/nrst0
This causes similar errors shown above. Also,
    # /usr/obj/distrib/sparc/ramdisk/ramdiskbin pax -rzvf /dev/nrst0
gives the same result.

However,
    # cd somewhere
    # /usr/obj/distrib/sparc/ramdisk/ramdiskbin pax -rzvf /usr/obj/releasedir/sparc/installation/bootfs/instfs.tgz
works fine.


This result seem to be caused by differences between block device
and raw device/character based file. However, referring st(4)
manpage, st have both of block device and raw modes.

Creating a tape with bs=4 (not 4K, adjusted for user-land buffer
size) for tapefile2 itself succeeded, however, loading and
extracting it failed:
https://imgs.nere9.help/media_attachments/files/115/801/651/589/726/321/original
/721eb54dbf2f4b32.jpg
https://mstdn.nere9.help/@7n2jju/115801651917939976

Does someone test and try?, or any good idea?


Lecturer / Faculty of Software & Info. Sci., Iwate Prefectural Univ., Japan
Nobuyoshi Sato, Ph.D / nobu-s%iwate-pu.ac.jp@localhost / +81-19-694-2612


Home | Main Index | Thread Index | Old Index