tech-install archive

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

MBR table looks strange after the installation



Hello list.

I am observing an odd issue installing recent snapshots of NetBSD.
Although in my few NetBSD architectures it happens only in the MIPS
context (confirmed for both evbmips-mips64eb and evbmips-mipsn64eb), it
does not look MIPS-specific to me.

When I prepare an SD card for NetBSD-current/MIPS installation, I use
MBR (to avoid the root device name mismatch) and add a 100MB FAT (type
0x0c) partition at the beginning, so netbsd-INSTALL_OCTEON can be
written from a Linux desktop and read by the device's u-boot.

The installer sees the MBR table, it creates a NetBSD (type 0xa9)
partition just after the FAT partition and even copies the FAT MBR
partition into the NetBSD disklabel automatically:

5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  14626752    200704     4.2BSD      0     0     0  # (Cyl.     98 -   7239*)
 b:    262144  14827456       swap                     # (Cyl.   7239*-   7367*)
 c:  15286272         0     unused      0     0        # (Cyl.      0 -   7463)
 e:    196608      2048      MSDOS                     # (Cyl.      1 -     96)
disklabel: warning, partition p increased number of partitions from 5 to 16
disklabel: partition p: partition extends past end of unit

However, after the installation is complete the MBR table does not look
right: the FAT MBR partition no longer exists (although the gap is
there), and the NetBSD MBR partition has type 0 (as seen using Linux
fdisk):

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sdc2       196608 15282175 15085568  7.2G  0 Empty

I then re-add the FAT MBR partition to make a place for netbsd-OCTEON,
and while at it also fix the NetBSD partition type:

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sdc1         2048   196607   194560   95M  c W95 FAT32 (LBA)
/dev/sdc2       196608 15282175 15085568  7.2G a9 NetBSD

With these fixes applied the disk starts to look very much like what is
in RPI (AArch64) NetBSD 9.1 or 9.2 release, although in the latter case
I use the pre-built disk image instead of the installer. It does not
feel right to have to fix the MBR table after every reinstallation. Is
this a bug in the installer?

-- 
    Denis Ovsienko


Home | Main Index | Thread Index | Old Index