beadm + grub is slow
Near as I can tell, when you do anything with a boot environment, beadm goes through, mounts each BE, and then does its thing.
This is a very annoying thing to do when you have 20+ BEs, and you are booted off a thumb drive. (Which even with USB3 is still slow.)
Can this be improved?
#1 Updated by Kris Moore over 5 years ago
- Status changed from Unscreened to Screened
Yea, anytime you update beadm, it will need to re-gen GRUB config files for all the BE's. There are two ways to solve this:
1. Disable updating GRUB automatically from beadm in /usr/local/etc/beadm.conf (set GRUB=NO). Then after you do all your beadm commands, run "grub-mkconfig -o /boot/grub/grub.cfg" manually.
2. I could add an environment variable to skip updating GRUB, so you could set it before doing a lot of beadm options, then unset it before running the last command.
Either one of those ways would work. Additionally I'll take a look into the grub scripts themselves, see if anything can be sped up there. I think the mounting / umounting of datasets is probably taking the longest.
#2 Updated by Kris Moore over 5 years ago
- Status changed from Screened to Resolved
Ok, these two changes should speed up grub re-stamping.
This one has been sent to Xin, which disables the probing of other disks for dual-boot
This one went in yesterday, it removes the mount / copy of grub.cfg / modules to each BE in the boot-pool (saving lots of time here). You'll want to remove that from your relevant restamp-grub script also. This step isn't necessary anymore.