TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.57k stars 246 forks source link

OS-8198 Allow bootable-off-ZFS-pool ("standalone") SmartOS #942

Closed danmcd closed 4 years ago

danmcd commented 4 years ago

Allow a bootable zones pool, OR if manual pool configuration generates a standalone pool, use that. Bootable pools can be on either BIOS or UEFI.

This is a WIP. As indicated in the installer comments, the initial thought is to have PIs live in $BOOTPOOL/boot/platform-YYYYxxxxx/ directories, and have $BOOTPOOL/boot/platform symlink to the desired PI.

Needs lots more work, including better install-time mechanisms, and a tool not unlike sdcadm platform to deal with PIs. (One thought I had was piadm(1M), which future sdcadm platform could use on the Head Node.)

sjorge commented 4 years ago

Needs lots more work, including better install-time mechanisms, and a tool not unlike sdcadm platform to deal with PIs. (One thought I had was piadm(1M), which future sdcadm platform could use on the Head Node.)

This is for new installs only in the current state right? Will this future tool also be able to convert exsting cdrom/usb booting nodes to having it on the zones pool?

danmcd commented 4 years ago

This is for new installs only in the current state right? Will this future tool also be able to convert exsting cdrom/usb booting nodes to having it on the zones pool?

Right now, this is only about new installs. Experiments have demonstrated that a pool not created with zpool create -B CAN be induced to boot from BIOS (either as standalone, or even to iPXE for a Triton CN), but they cannot be induced to boot from UEFI w/o pool reformatting/etc. I have in my piadm notes a piadm bootable which could affect such a change, but that's all still very much up in the air.

danmcd commented 4 years ago

This most recent commit gets us to a testable place. There are install-time corner cases that may bite, pools created with slices are iffy, and whole-disk pools created without -B can boot on BIOS systems, but not on EFI (and piadm bootable can attempt to discern the difference).

danmcd commented 4 years ago

Opening up for proper review. Still subject to change in face of testing and test results, but happy enough with it to expose it more more scrutiny.

danmcd commented 4 years ago

Now with proper bug id: OS-8198

danmcd commented 4 years ago

Time permitting, I think this is closer to ready now.

danmcd commented 4 years ago

I will also be picking one of tabs or spaces, now that I get this isn't cstyle.

danmcd commented 4 years ago

Tested new installation script that should address @jlevon's feedback:

7.) Install time pool testing (post-jlevon CR).
7a.) Hit RETURN (no bootable pool, can't even EFI-activate it) (PASSED)
7b.) Specify "zones" with auto-layout (PASSED)
7c.) Specify "standalone" with auto-layout, should complain (PASSED, maybe
     direct piadm output to /dev/null ?!?)
7d.) Create "zones" and "standalone" manually, should print choices and you
     can/should specify one of them (PASSED)
jlevon commented 4 years ago

I think you need to push the new smartos prompt changes that are no longer interactive?

danmcd commented 4 years ago

I think you need to push the new smartos prompt changes that are no longer interactive?

DAMN, I thought I had. No wonder I'd not heard anything.

danmcd commented 4 years ago

Last push, test-result-driven cleanup.

sjorge commented 4 years ago

:tada: one less patch to pull in when I do pi builds! congrats all, this is good stuff.