Project

General

Profile

Feature #28064

Use FreeBSD boot code for installation images

Added by Benno Rice about 1 year ago. Updated 10 months ago.

Status:
Done
Priority:
Critical
Assignee:
Benno Rice
Category:
OS
Target version:
Estimated time:
Severity:
Low Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

Currently the installation images boot using GRUB despite the installed system using FreeBSD's loader.

This runs into problems on existing systems where GRUB is failing (see #27432).

We should move the installation images to use the FreeBSD boot code too.


Related issues

Related to FreeNAS - Bug #35317: Build single hybrid CD/USB ISO imageDone

History

#1 Updated by Benno Rice about 1 year ago

Summary of needed changes:

  • Need loader support files, loader, and cdboot in /boot on the install filesystem.
  • Need code to create an EFI filesystem image containing loader.efi as efi/boot/bootx64.efi. This then needs to be put in the image directory.
  • Need to update the ISO creation command to be something like the following:
xorriso -as mkisofs -graft-points --modification-date=[BUILD DATE] -b /boot/cdboot -no-emul-boot --efi-boot [EFI BOOT IMAGE] \
    -o [OUTPUT FILE NAME] -r --sort-weight 0 / --sort-weight 1 /boot [IMAGE SRC DIRECTORY] --volid FreeNAS

#2 Avatar?id=13649&size=24x24 Updated by Ben Gadd about 1 year ago

  • Priority changed from No priority to Critical
  • Target version set to 11.2-RC2

#3 Updated by Benno Rice about 1 year ago

So currently this works under UEFI both as a CD and HDD image (which means it should work via USB).

Under legacy BIOS it works as a CD but not yet as a HDD.

#4 Updated by Benno Rice about 1 year ago

I've got a proof of concept image that appears to work, although wider testing suggests some possible issues with Dell UEFI. I also need further loader changes to properly specify the root filesystem to the booted kernel.

I'm currently working on cleaning up the boot2 changes.

#5 Updated by Benno Rice about 1 year ago

So after trying many times to come up with a way to improve the sanity of the boot code without blowing the 8KB limit for MBR/BSD boot code I've given up and have just copied stand/i386/boot2/boot2.c to stand/i386/boot2/isoboot2.c and done it that way.

I'm now building test images to make sure it all works and will then put the results up for review.

#6 Updated by Benno Rice about 1 year ago

#8 Updated by Benno Rice about 1 year ago

D14913 (NetBSD makefs El Torito sync) has been committed.
D14915 (loader changes for ISO9660) has been approved but I'm doing to wait until D14194 (isoboot) has been approved to commit both.
Still waiting on D14916.

#9 Updated by Benno Rice about 1 year ago

https://reviews.freebsd.org/D14952 (etdump tool for inspecting El Torito images)

#10 Updated by Benno Rice about 1 year ago

D14952 has been committed.

Still waiting on D14194 to be reviewed.

#11 Updated by Benno Rice about 1 year ago

  • Severity set to Low Medium

#12 Updated by Benno Rice 12 months ago

Pull request for bringing the code into freenas/os:

https://github.com/freenas/os/pull/118

After this we'll need to tweak freenas/build.

#13 Updated by Dru Lavigne 11 months ago

  • Status changed from In Progress to Ready for Testing
  • Target version changed from 11.2-RC2 to 11.2-BETA1

#14 Updated by Dru Lavigne 10 months ago

  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#15 Updated by Dru Lavigne 10 months ago

  • Related to Bug #35317: Build single hybrid CD/USB ISO image added

#16 Updated by Joe Maloney 10 months ago

  • Status changed from Ready for Testing to Passed Testing

#17 Updated by Dru Lavigne 10 months ago

  • Status changed from Passed Testing to Done

#18 Updated by Dru Lavigne 10 months ago

  • Needs QA changed from Yes to No

Also available in: Atom PDF