Port-macppc archive

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

boot partition (Was: install on PowerBook - no root partition defined)



On Wed, Oct 04, 2023 at 11:39:44 +0200, Riccardo Mottola wrote:

> Not related with this issue, but to the bootloader in general: do I
> need to have a small HFS or FAT partition to hold ofwboot.xcf in the
> final setup?  Rethinking, I probably do.  It is not that well
> explained in the documentation, but can be inferred.

You need some partition that OFW groks where you can put ofwboot.  The
options I used on different machines at different times are: dd'ing a
small ISO image with ofwboot to the beginning of the disk, apple's
pmap and a small HFS partition, or MBR (not(!) pmap) and a FAT
partition.

The latter option is by far more convenient.  E.g. on the mini g4 that
is currently on my desk:

    # grep /boot /etc/fstab 
    /dev/wd0h       /boot           msdos   ro,noauto        0 0
    # mount /boot
    # mount | grep /boot
    /dev/wd0h on /boot type msdos (read-only, local)
    # ls -la /boot
    total 3054
    drwxr-xr-x   1 root  wheel     4096 Jan  1  1980 .
    drwxr-xr-x  23 root  wheel      512 Oct  1 18:41 ..
    -r-xr-xr-x   1 root  wheel  2961379 Feb 10  2023 netbsd-INSTALL.gz
    -r-xr-xr-x   1 root  wheel    67772 Feb 10  2023 ofwboot.elf
    -r-xr-xr-x   1 root  wheel    86024 Feb 10  2023 ofwboot.xcf
    # fdisk wd0 | sed | sed -n '/Partition table:/,$p'
    fdisk: Cannot determine the number of heads
    Partition table:
    0: Primary DOS with 32 bit FAT (sysid 11)
        start 2048, size 4194304 (2048 MB, Cyls 0-261/53/48)
    1: NetBSD (sysid 169)
        start 4196352, size 484200448 (236426 MB, Cyls 261/53/49-30401/75/10)
            PBR is not bootable: All bytes are identical (0x00)
    2: <UNUSED>
    3: <UNUSED>
    No active partition.
    Drive serial number: 1216588916 (0x4883ac74)
    # disklabel wd0 | sed -n -e 's/ #.*//' -e '/partitions:/,$p'
    8 partitions:
    #        size    offset     fstype [fsize bsize cpg/sgs]
     a:  83886080   4196352     4.2BSD   4096 16384     0 
     b:  16580608  88082432       swap                    
     c: 488397168         0     unused      0     0       
     d: 484200448   4196352     unused      0     0       
     f: 134217728 104663040     4.2BSD   4096 16384     0 
     g: 249516032 238880768     4.2BSD      0     0     0 
     h:   4194304      2048      MSDOS                    


Not sure why I marked it r/o, out of general paranoia probably.  I
used this test machine to debig ofwboot problems a few years ago and
r/w FAT was just SO convenient compared to other methods.

I was upgrading the HDD (that died) to an SSD, so iirc I just put the
install kernel into that FAT partition too before sticking the disk
into the machine and then had sets on the USB.

-uwe


Home | Main Index | Thread Index | Old Index