Port-alpha archive

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

Re: writing cdhdtape to CD

Thanks Olaf and Anders.

I came across this messsage from Luke:


in which he answers a question about mounting NetBSD/i386's boot-big.fs file. He wrote:

It's not an FFS image, it's a bootable file system image, comprising of:
        * 8KB of boot blocks (ustarfs)
        * ustarfs (tar file) containing
                USTAR.volsize.NNNN      (metadata for boot to use)
                netbsd                  (gzipped kernel)
The netbsd kernel contains an embedded file system which is mounted as `/'.

To extract the kernel, you need to:
    *   Extract the tarfile that's 8KB into boot-big.fs
                dd if=boot-big.fs of=boot-big.tar bs=8k skip=1
        Multi-volume images need a bit more work.
        See src/distrib/common/buildfloppies.sh for more info.

    *   Extract the kernel from the tarfile
                pax -r -f boot-big.tar netbsd
                mv netbsd netbsd.gz
                gunzip netbsd.gz

To extract the file system you'd need to use
        mdsetimage -x netbsd image.ffs
unfortunately that requires "netbsd" to be unstripped, which it is not :(

cdhdtape appears to be the same type of file:

% ls -l
total 7428
-rw-------  1 ray  wheel     1984 Apr 26 16:54 README.files
-rw-------  1 ray  wheel  3776512 Apr 26 16:54 cdhdtape
% mkdir 0
% cd 0
% dd if=../cdhdtape of=cdhdtape.tar bs=8k skip=1
460+0 records in
460+0 records out
3768320 bytes transferred in 0.221 secs (17051221 bytes/sec)
% ls -l
total 7392
-rw-r--r--  1 ray  wheel  3768320 May 29 01:28 cdhdtape.tar
% file *
cdhdtape.tar: POSIX tar archive
% tar tf *
% mkdir 0
% cd 0
% tar xf ../*r
% ls -l
total 7412
-rw-r--r--  1 ray  wheel        0 Apr 26 16:54 USTAR.volsize.23420
-r--r--r--  1 ray  wheel    41640 Apr 26 16:54 boot
-rw-r--r--  1 ray  wheel  3723267 Apr 26 16:54 netbsd
% file *
USTAR.volsize.23420: empty
boot:                data
netbsd: gzip compressed data, was "netbsd.tmp", from Unix, max compression


Home | Main Index | Thread Index | Old Index