Project

General

Profile

Feature #17132

Avatar?id=14398&size=50x50

Feature #17388: Merge FN9 and FN10 installers

When doing upgrades, install direct to existing zpool

Added by Kris Moore almost 3 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Vaibhav Chauhan
Category:
OS
Target version:
Estimated time:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

Porting over a new feature from PC-BSD/TrueOS. When we do upgrades from install media, we should
skip all the disk partitioning and instead do a "fresh" non-destructive install to the existing zpool
in a new BE. This means nothing on disk changes, so if something goes amiss during the upgrade, we still
can roll-back to a previous BE, or mount the old BE's and poke around manually.


Related issues

Related to FreeNAS - Bug #19096: Installer "Upgrade Method" screen is inconsistent and assumes too much knowledge of ZFS and FreeNASResolved2016-11-21

Associated revisions

Revision b047820b (diff)
Added by Kris Moore almost 3 years ago

This feature does the following:

If we are doing an upgrade from ISO, check if we are on the new
upgrade style. If so, we will instead skip disk partitioning
entirely and do a "fresh" non-destructive installation to the
existing zpool. This means we import the existing freenas-boot
zpool, create a new BE dataset, and install "fresh" into that.

If something goes amiss, no harm is done to the existing datasets,
allowing the user to roll back, or manually mount and inspect
all the old BE's.

If we are upgrading from the "old-style" freenas-boot, it will
continue to do the same thing as before with a re-partition of
the disk in order to upgrade to the newest style.

Ticket: #17132

Revision 63baa2de (diff)
Added by Kris Moore almost 3 years ago

When doing interactive upgrade, prompt user if they want to install
into existing zpool, or do a fresh format.

Fix the confirmation dialog text to reflect this.

Set the non-interactive case to do a fresh format (same as previous)

Change BE name to default-<timestamp> in case of existing zpool
upgrade.

Ticket: #17132

Revision a3edaebb (diff)
Added by Kris Moore almost 3 years ago

Add support for selecting between BIOS and UEFI installations

This cleans up some of the legacy code around UEFI, and still
keeps TrueNAS as BIOS-only for the time being.

The user will be prompted anytime the disk is going to be
formatted, both on Fresh and Upgrade installs.

Ticket: #17132

Revision 95c2096c (diff)
Added by Kris Moore almost 3 years ago

In the non-interactive case, make the default BOOTMODE the
one in which the installer was booted

Ticket: #17132

Revision 1dd2286c (diff)
Added by Kris Moore almost 3 years ago

Select BIOS or UEFI as the selected input option depending on how
we are booted.

Ticket: #17132

History

#1 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Status changed from Fix In Progress to Needs Developer Review
  • Assignee changed from Kris Moore to Sean Fagan

Over to Sean for review. I've tested upgrades here, seems to work fine. But like all things install-related, we will want to test it out a bit.

#2 Updated by Sean Fagan almost 3 years ago

  • Status changed from Needs Developer Review to Fix In Progress
  • Assignee changed from Sean Fagan to Kris Moore

The code, as it is, seems okay, but

  1. We tell people to do an ISO install when they've got problems that won't go away through a normal install. Also when they simply want to clean up their installation media.
  2. ISO installs deliberately repartition.
  3. There is no UI to decide whether to repartition or not.
  4. Since a required features is asking whether to use BIOS or (U)EFI, that's going to impact it as well.

#3 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

For 1-3, that's what a "fresh" install is for. I.E if you want to start-over, then backup your DB and do a fresh-install and re-import the DB. For an "upgrade" it should keep old data around, I.E. be non-destructive. I'll discuss it with Paetzel today, but I'm pretty sure that was the workflow we both agreed on for this change.

For #4, we don't currently prompt for UEFI/BIOS. It's set the same as before, depending upon which mode the installer was booted in. Do you do that different for FN10?

#4 Updated by Sean Fagan almost 3 years ago

No, it's not.

You are attempting to change what we've said about ISO installs for the entire life of FreeNAS. You can't really do that.

Changing it so that it asks is okay. Have to handle the non-interactive case, however. (And then it would ask about BIOS/(U)EFI after asking about partitioning, because that's the only time it can. And of course a fresh install would always partition%.)

No, it does not currently -- in 9 or 10 -- ask about BIOS vs (U)EFI, but it has to, because. And the install.sh versions need to stop being different, so that means merging them back together.

------
% For that matter, why only do this on upgrades? Making a fresh install as a new BE is exactly as valid as this.

#5 Updated by Sean Fagan almost 3 years ago

Also, the code

a) Doesn't handle the case where the BE already exists; and
b) names the BE incorrectly -- although this is debatable and I can take both sides of that debate.

#6 Updated by Sean Fagan almost 3 years ago

Also: I'd suggest if you want to do this, there's no need to do it on the ISO -- it can be done (with or without configuration migration) while the system is up and running. I'd suggest a shell script that would prepare the BE and invoke freenas-install -- since it doesn't need to format, install grub, or otherwise do anything other than install the files and then activate the BE.

#7 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

Sean, when you get a chance, take a look at the more recent change. Now it'll do the following:

Prompt user if they want to install into zpool, or format as before. Also handle the non-interactive case. Renamed the new BE to default-<timestamp>. I also massaged the confirmation dialog to display correct text in either case.

I'm unsure how to handle differently if the BE name already exists. It is a time-stamp, so collision seems unlikely. However if it happens, it will fail, isn't that what we would want?

I'm also not so sure about asking to do this on a "Fresh Install". Isn't that kinda the point of "Fresh Install?" That you are starting over from scratch? Maybe it would be better to instead change the OK dialog about importing the database to a Yes/No, so the user could skip importing. Wouldn't that accomplish the same thing?

As for the UEFI dialog, I will leave that for another ticket once we get this part sorted out.

Thanks!

#8 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

Sean Fagan wrote:

Also: I'd suggest if you want to do this, there's no need to do it on the ISO -- it can be done (with or without configuration migration) while the system is up and running. I'd suggest a shell script that would prepare the BE and invoke freenas-install -- since it doesn't need to format, install grub, or otherwise do anything other than install the files and then activate the BE.

Also, interesting idea! Again, probably best for another ticket / utility, lets discuss this further offline :)

#9 Updated by Sean Fagan almost 3 years ago

No, on a Fresh Install, you're going to be partitioning, so it will ask about BIOS vs (U)EFI. On the upgrade install, if you repartition, you'll ask about BIOS vs (U)EFI, but not if you do not repartition.

The changes look reasonable, but I'll have to go over it all in detail when my eyes can focus agian.

#10 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Status changed from Fix In Progress to Needs Developer Review
  • Assignee changed from Kris Moore to Sean Fagan

Sef,

I've implemented the BIOS/UEFI selector as well now. Give it a spin / review and let me know thoughts.

Thanks!

#11 Updated by Jordan Hubbard almost 3 years ago

We'd like this in 10, too, when you get the chance. :)

#12 Updated by Sean Fagan almost 3 years ago

See 17033.

#13 Updated by Sean Fagan almost 3 years ago

  • Status changed from Needs Developer Review to Reviewed
  • Assignee changed from Sean Fagan to Kris Moore

I'm still somewhat agin' this, but that's just me. Also the UI chosen for the pickers is different from the rest of the pickers. I honestly have no idea whether that's a problem, or if we should use this style everywhere.

#14 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Status changed from Reviewed to Ready For Release
  • Parent task set to #17388

The fixes for this are included in #17388, so no need for FIX branch here.

#15 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 3 years ago

  • Assignee changed from Kris Moore to Vaibhav Chauhan

#16 Updated by Warren Block over 2 years ago

  • Related to Bug #19096: Installer "Upgrade Method" screen is inconsistent and assumes too much knowledge of ZFS and FreeNAS added

#17 Updated by Dru Lavigne over 1 year ago

  • Status changed from Ready For Release to Resolved

Also available in: Atom PDF