Port-sparc archive

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

Re: Installation from a tape



Hello, I returned to my SS20 physical console.

On Sun, 04 Jan 2026 15:31:46 +1100,
matthew green <mrg%eterna23.net@localhost> wrote:

> it occured to me that gzip could handle this better so now i think
> this patch would make this problem go away.
> 
> can someone try?  it seems to work for me - depending on what fstat(2)
> tells it as st_blksize, it uses that for IO for that first chunk:
> 
>     https://www.netbsd.org/~mrg/gzip.blksize.diff
...
> if this works, i'll commit either as-is, or advance as above..


I tried this patch on my SS20. This patch solves the problem
reading/writing tape completely, in both normally booted and
installation boot from a tape.

I tested on NetBSD 10.1, in following procedure:
1. Replaced /usr/bin/gzip with this patch applied one in HDD booted
   multi-user environment. Then:
    $ /usr/bin/gzip -h
    NetBSD gzip 20260103
    usage: ramdiskbin [-123456789cdhlV] [<file> [<file> ...]]
    $ cd somewhere_writable_place
    $ tar czvf /dev/nrst0 /usr/pkg    (confirmed no error)
    $ mt rewind
    $ tar xvf /dev/nrst0    (confirmed no error too)
    $ md5 ./usr/pkg/bin/* > ~/tarup_on_the_tape.txt
    $ cd /
    $ md ./usr/pkg/bin/* > ~/orignal_pkg.txt
    $ diff ~/tarup_on_the_tape.txt ~/orignal_pkg.txt
  And I confirmed no difference between two md5 signatures.

2. I rebuilt entire /usr/obj with this patch, doing
    # ./build.sh -T /usr/obj/tools -O /usr/obj -j 2 -x -u release)
  in qemu. then, I created installation tape with newly build
  release files:
    #  /usr/obj/distrib/sparc/ramdisk/ramdiskbin gzip -h
    NetBSD gzip 20260103
    usage: ramdiskbin [-123456789cdhlV] [<file> [<file> ...]]
    # cd /usr/obj/releasedir/sparc/installation/tape
    # gunzip -c tapefile1.gz | dd of=/dev/nrst0 bs=4k conv=sync
    # dd if=tapefile2 of=/dev/nrst0 bs=4k conv=sync
    # mt rewind
    # shutdon -p now
  Then, cold booted from the tape. I confirmed .tgz of tapefile2 was
  extracted, and installer was invoked, as following picures:
    https://mstdn.nere9.help/@7n2jju/115841938522851429
    https://imgs.nere9.help/media_attachments/files/115/841/934/052/393/451/original/f070145eddfa910e.jpg
    https://imgs.nere9.help/media_attachments/files/115/841/937/965/856/375/original/88720355a419052f.jpg
    https://imgs.nere9.help/media_attachments/files/115/841/938/212/809/924/original/a3aadf205cea45a9.jpg

Thank you veri much!! I think the patch is committable.



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