Current-Users archive

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

Re: NetBSD -current/-8 EFI CDROM boot on SuperMicro A2SDi broken



I don't think that that is the problem, It is not a manually build
gpt boot partition, but the stock install UEFI image.

I debugged the "bad partition" path in the boot loader.
Setup a NetBSD-8.0_BETA-amd64-uefi-install.img.gz on a CD via a real USB DVD-Reader/Writer. A bootx64.efi compiled with -DDISK_DEBUG shows "illegal partition". This is caused as the EFI environment on that system claims that the CDROM device is a HARD_DISK. Thus stand/lib/biosdisk.c:biosdisk_open() exits early due to a wrongly created default label in read_partitions().
int
biosdisk_open(struct open_file *f, ...)
/* struct open_file *f, int biosdev, int partition */
{
        va_list ap;
        struct biosdisk *d;
        int biosdev;
        int partition;
        int error = 0;

        va_start(ap, f);
        biosdev = va_arg(ap, int);
        d = alloc_biosdisk(biosdev);
        if (d == NULL) {
                error = ENXIO;
                goto out;
        }

        partition = va_arg(ap, int);
#ifdef _STANDALONE
        bi_disk.biosdev = d->ll.dev;
        bi_disk.partition = partition;
        bi_disk.labelsector = -1;

        bi_wedge.biosdev = d->ll.dev;
        bi_wedge.matchblk = -1;
#endif

#if !defined(NO_DISKLABEL) || !defined(NO_GPT)
        error = read_partitions(d);
        if (error == -1) {
                error = 0;
                goto nolabel;
        }
        if (error)
                goto out;

        if (partition >= BIOSDISKNPART ||
            d->part[partition].fstype == FS_UNUSED) {
#ifdef DISK_DEBUG
                printf("illegal partition\n");
#endif
                error = EPART;                <<<< here we start returning
                goto out;
        }
...

If just the kernel would be missing I would have expected a 'not found' instead of 'illegal partition'.

Did I miss something? Is the UEFI install image known to work elsewhere?

Frank

On 10/22/17 19:14, Michael van Elst wrote:
kardel%netbsd.org@localhost (Frank Kardel) writes:

booting hd0a:netbsd - starting in 0 seconds
open betbsd: bad partition

hd0a is the EFI partition. Did you copy the kernel there? If the
root partition follows next, then you need to boot hd0b:netbsd.





Home | Main Index | Thread Index | Old Index