Thanks for the pointer to smartos-isomerge. That might do the job, although I’d still prefer the dynamic, boot-time „patching“ of the GRUB/bootfs method. Maybe I’ll just make a minimal change to the ramdisk image to copy over the stuff found in /system/boot. The root (/) ramdisk is r/w anyway, and for modifying /usr I could use bind mounts (mount -F lofs), i.e. to change the manpage for at(1):
mount -F lofs /system/boot/usr/share/man/man1/at.1 /usr/share/man/man1/at.1 /Dirk > Am 06.10.2015 um 09:26 schrieb Gérczei Tamás <[email protected]>: > > Hi Dirk, > > Since /system/boot is a preferred path only for kernel modules and their > configurations, You'll likely have to resort to using smartos-isomerge. It's > a tiny node application that takes a platform ISO, a JSON configuration file > plus the files you want to replace and will spit out a modified image with > those. I ended up extracting the kernel and the boot archive from the > resulting image and booting them via TFTP. > > Nahum told me about this a few weeks ago. It works indeed. > > T. > > On 6 October 2015 8:46:53 am "Dirk Steinberg" <[email protected]> wrote: > >> Hi Nahum (and others), >> >> with great interest I read your blog post about >> „Overriding Driver Config Files on SmartOS“ >> >> http://blog.shalman.org/overriding-driver-config-files-on-smartos/ >> <http://blog.shalman.org/overriding-driver-config-files-on-smartos/> >> >> I want to do almost the same, but overriding other files on the >> ramdisk, for example the installer script. >> >> I was able to reproduce your example of modifying kernel/drv/sd.conf, >> in my case I set the blocksize to 4096 and it did work. >> >> Changing the installer script /smartdc/lib/smartos_prompt_config.sh >> did not work — in fact, even the modified /kernel/drv/sd.conf that >> clearly took effect when configuring the kernel had been reverted >> back to the original under the path /kernel/drv/sd.conf. After looking >> around I could find the modified versions of my files under >> >> /system/boot/kernel/drv/sd.conf and >> /system/boot/smartdc/lib/smartos_prompt_config.sh >> >> However, that does not help me much, as the installer is launched >> from /smartdc/lib/smartos_prompt_config.sh and not >> from /system/boot/smartdc/lib/smartos_prompt_config.sh. >> The installer script is just an example here, I might want to >> override other files in the ramdisk as well. >> >> At the very least, could I place a „hook“ (script) somewhere under >> /system/boot that would get called sometime during the bootup >> process that would allow me to do whatever changes I want? >> >> Background of this is that I want to modify the ramdisk such that >> it brings up DHCP networking and sshd without importing >> the zones pool. I also want to inject an ssh key into the ramdisk >> image so that after booting and network auto-config I could >> login remotely via ssh and run the installer from the ssh session. >> >> Any hints on how to do this? >> >> BTW, the ssh service seems to have tons of dependencies, >> way too many to be realistic. Normally, if networking is up, >> you should just be able to run sshd. What is the minimalistic way >> to get the ssh service running when in the ramdisk environment >> without a „zones“ pool? >> >> I still hope to be able to use the GRUB mechanism the override >> ramdisk files. However, if this should not be possible, what is >> the easiest way to change the actual ramdisk image? >> >> I realize that I could set up a full build system and rebuild the entire >> SmartOS including the ramdisk, but this appears to be too much effort. >> Is there a way to unpack the ramdisk, make some changes, and repack >> the thing? >> >> I am sending this to the list as this might be interesting for others as >> well. >> >> /Dirk >> > > smartos-discuss | Archives > <https://www.listbox.com/member/archive/184463/=now> > <https://www.listbox.com/member/archive/rss/184463/24390006-796fb66c> | > Modify <https://www.listbox.com/member/?&> Your Subscription > <http://www.listbox.com/> ------------------------------------------- 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
