> Am 12.04.2016 um 23:30 schrieb Dirk Steinberg <[email protected]>: > > >> Am 12.04.2016 um 23:09 schrieb Richard Elling >> <[email protected] <mailto:[email protected]>>: >> >> >>> On Apr 12, 2016, at 1:39 PM, Dirk Steinberg <[email protected] >>> <mailto:[email protected]>> wrote: >>> >>> The root file system actually resides on a ram disk, which cannot be used >>> for booting. >> >> The RAM disk contains a UFS file system. >> >>> >>> If I do not boot from USB or PXE, I like to put the boot files >>> (kernel and boot_archive, plus a few GRUB files) onto my zones >>> pool. I agree that one could use UFS, but that requires slicing/ >>> partitioning the disk making things more complex than necessary. >>> Using a whole-disk pool is much easier. >> >> This is a significant change in SmartOS architecture and IMHO, a >> significantly inferior >> approach. >> >> At InterModal Data, we have a different approach. We do install on one or >> more >> "boot disks" and keep a grub menu set for locally storing OS images (UFS in >> RAMdisk >> image). However, this is not a general-purpose solution. In our world, the >> "zones" pool >> is quite small, typically 32G or less. Thus we can easily accomodate "boot >> disks" that >> are 64GB or more, though it is very rare for us to see more than 200GB. >> There are a >> number of other constraints that impact us, that are not general purpose. >> >> So, can you have a boot image area that cohabitates a single disk? Yes, but >> there is >> a fair amount of work involved and every step brings you farther away from >> the easy, >> scalable method used by default in SmartOS. You'll be better served by >> burning a USB >> stick and taking a long lunch. >> — richard > > Richard, > > thanks for the explanation. I do understand the advantage of booting from > USB, > just that the box I am currently fiddling with is a new, legacy-free Skylake > box > with only xHCI, so effectively once SmartOS has booted, there is NO USB > support > whatsoever, no keyboard, no USB stick, nada. > > I also understand that I can slice a physical disk and have multiple UFS file > systems > and potentially even multiple ZFS pools on that disk. I have done all of this > before. > All I am saying is that I find it easier to use whole-disk zpools, and for > some time now, > the GRUB that ships with SmartOS does support (legacy-)booting off whole-disk > zpools. > That is very easy: just use the zones pool and copy the boot files to it. > I create a separate zfs dataset for the boot files (zones/smartos) and use > that as the bootfs. > > ## enable GRUB boot from whole-disk vdev zones pool > mkdir /zones/boot > cp -a <…..>/boot/grub /zones/boot > ## first save boot ramdisk image without any pools mounted > dd bs=1M if=/dev/ramdisk/a of=/tmp/boot_archive > fsck -y /tmp/boot_archive > zfs create zones/smartos > mkdir -p /zones/smartos/platform/i86pc/amd64 > mv /tmp/boot_archive /zones/smartos/platform/i86pc/amd64/boot_archive > print /platform/i86pc/kernel/amd64/unix | cpio -pduvma /zones/smartos > ## install GRUB to MBR on whole-disk zones pool > installgrub -m -f /zones/boot/grub/stage1 /zones/boot/grub/stage2 > /dev/rdsk/c0t0d0s0 > > Now you only need to add „bootfs zones/smartos“ to your > /zones/boot/grub/menu.lst entries, like so: > > sed -i '' -e '/kernel/{x;s:.*: bootfs zones/smartos:;p;x;}' > /zones/boot/grub/menu.lst > > That’s all. You can boot off you whole-disk zones pool now. > Disclaimer: YMMV. Be very careful. The above commands are potentially very > dangerous and could result in data loss. Check you device names. > > / Dirk
I have to add something: better copy the boot_archive and the grub files from the USB stick to the zones pool. The hack of getting the boot_archive from /dev/ramdisk/a is from my notes of doing a remote, headless install without even having access to a USB stick (I use that for installing SmartOS on kimsufi). The conditions there are extreme, so one needs to resort to extreme hacks. If you have a USB stick a hand, it’s much easier. ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
