On Sun, Jun 30, 2019 at 09:23:56PM -0400, Chris Ross wrote: > On Sun, Jun 30, 2019 at 03:12:22PM -0400, Gao-Mi Baohao wrote: > > Here's your debug build of ofwboot. > > Thanks. Unfortunately, I can't install that. Maybe a size issue? > > I'll look into the installboot code, but let me know if you have an idea.
Okay, looking at installboot, BIOCINSTALLBOOT, and sys/dev/softraid.c, I see that sr_ioctl_installboot() returns an error without explanatory output if the bootblk or bootloader provided to it are "too big". For boot loader, that's: if (bb->bb_bootldr_size > SR_BOOT_LOADER_SIZE * DEV_BSIZE) and SR_BOOTLOADER_SIZE is 320, so assuming DEV_BSIZE is 512 bytes, that's 160kb. The debugging ofwboot was 250, so too big. Anyone else have an idea what I could try to see why ofwboot seems not to be able to load and boot my system from my RAID1 softraid on sparc64? - Chris (bits of earlier off-list email showing the failure to install the build of ofwboot compiled with debugging:) > # ls -l > total 972 > -rw-r--r-- 1 root bin 5840 Apr 14 05:37 bootblk > -r--r--r-- 1 root bin 102344 Apr 14 05:37 ofwboot > -rw------- 1 root wheel 253802 Jun 30 21:20 ofwboot.debug > -r--r--r-- 1 root bin 54416 Apr 14 05:37 ofwboot.net > -r--r--r-- 1 root bin 54160 Apr 14 05:37 ofwbootfd > # chmod 644 ofwboot.debug > # installboot -v sd4 > Using / as root > installing bootstrap on /dev/rsd4c > using first-stage /usr/mdec/bootblk, second-stage /usr/mdec/ofwboot > boot block is 5840 bytes (12 blocks @ 512 bytes = 6144 bytes) > sd4: softraid volume with 2 disk(s) > sd4: installing boot loader on softraid volume > sd2a: installing boot blocks on /dev/rsd2c > writing boot block to disk /dev/rsd2c > sd3a: installing boot blocks on /dev/rsd3c > writing boot block to disk /dev/rsd3c > # installboot -v sd4 /usr/mdec/bootblk /usr/mdec/ofwboot.debug > Using / as root > installing bootstrap on /dev/rsd4c > using first-stage /usr/mdec/bootblk, second-stage /usr/mdec/ofwboot.debug > boot block is 5840 bytes (12 blocks @ 512 bytes = 6144 bytes) > sd4: softraid volume with 2 disk(s) > sd4: installing boot loader on softraid volume > installboot: softraid installboot failed > # installboot -v sd4 /usr/mdec/bootblk /usr/mdec/ofwboot.debug > Using / as root > installing bootstrap on /dev/rsd4c > using first-stage /usr/mdec/bootblk, second-stage /usr/mdec/ofwboot.debug > boot block is 5840 bytes (12 blocks @ 512 bytes = 6144 bytes) > sd4: softraid volume with 2 disk(s) > sd4: installing boot loader on softraid volume > installboot: softraid installboot failed > # file * > bootblk: data > ofwboot: ELF 64-bit MSB executable, SPARC V9, version 1 > ofwboot.debug: ELF 64-bit MSB executable, SPARC V9, version 1 > ofwboot.net: ELF 64-bit MSB executable, SPARC V9, version 1 > ofwbootfd: ELF 64-bit MSB executable, SPARC V9, version 1 > # ls -l * > -rw-r--r-- 1 root bin 5840 Apr 14 05:37 bootblk > -r--r--r-- 1 root bin 102344 Apr 14 05:37 ofwboot > -rw-r--r-- 1 root wheel 253802 Jun 30 21:20 ofwboot.debug > -r--r--r-- 1 root bin 54416 Apr 14 05:37 ofwboot.net > -r--r--r-- 1 root bin 54160 Apr 14 05:37 ofwbootfd > #