Anoop Rajendra wrote:
> Thanks Ethan.
>
> My comments/ questions are inline.
>
> On 12/15/06, *Ethan Quach* <ethan.quach at sun.com
> <mailto:ethan.quach at sun.com>> wrote:
>
> If security is not an issue, then rlogin is already in the miniroot's
> repository. You can just add the following two lines to your jumpstart
> begin script.
>
> rm /tmp/root/etc/nologin
> svcadm enable -t login:rlogin
>
>
> Security is not an issue (not right now, anyway), but I still would like
> to know how to start any services that I want. So I need a generic
> explanation. I also would like to start services outside of the begin
> script. So i need a more native way of doing things.
First, understand that the miniroot is *not* a full blown solaris, so it
simply doesn't have all services that a regular repository has. We
purposely build the miniroot seed repository with just what's needed for
the miniroot to function and install Solaris.
>
>
> Anoop Rajendra wrote:
> > Hi. I'm trying to hack the installer to add new services during
> jumpstart.
> >
> > I want to start the ssh server in the jumpstart environment, so
> that I
> > can log in to the installing node, and monitor the installation. I
> > figured I'd have to unpack the x86.miniroot archive and include the
> > utilities. The way I did this was as follows
> > -----------------
> > I unpacked x86.miniroot using the root_archive shell script like this
> >
> > # /boot/solaris/bin/root_archive unpack x86.miniroot /root/tmp/
>
> use unpackmedia instead of unpack (see its manpage)
>
>
>
> Will do this.
>
> >
> > I added the ssh server and ssh configurations to the root of the
> archive
> > using copy. The way I did this was
> > - check the packages SUNWsshdr, SUNWsshdu, SUNWsshcu,
> > SUNWopenssl-libraries, and get the list of files from each.
> > - Copy those files from my server installation into the unpacked
> miniroot.
>
> This will most likely work, although it'd be better to just pkgadd these
> packages into the miniroot. I think you'll be safe as long as these
> packages don't deliver anything into /var.
>
>
> Using pkgadd is the first thing that I tried to do, but, like you said,
> the packages added things to /var and broke my miniroot. So I had to do
> it by hand rather than by pkgadd.
>
> > - Copy the ssh.xml manifest file into .tmp_proto/root/var/svc
> > /manifest/network/ssh.xml and
> tmp/root/var/svc/manifest/network/ssh.xml
> > in the root archive.
>
> The manifest-import service doesn't run on a miniroot boot, so placing
> the manifest there won't do it. You'd have to actually import it into
> the repository by hand.
>
>
> So where would I need to make a change so that the manifest is imported
> automatically, and not through the begin script?
manifest-import is a noop in the miniroot. Since you're customizing
your netimage, you should just manually import it into the miniroot's
repository in the netimage.
Just set SVCCFG_REPOSITORY=<netimage_miniroot>/etc/svc/repository.db
And then run
/usr/sbin/svccfg import <location of ssh.xml>
And if you want it enabled by default,
/usr/sbin/svcadm -s network/ssh setprop general/enabled=true
Pre-importing the miniroot's repository saves boot time, which is also
the reason why manifest-import is designed to be a noop in the miniroot.
Keep in mind you've also got to figure out network/ssh's service
dependency chain and make sure they are all in the miniroot as well.
And after all that, its still not guaranteed to work. If the ssh
service (or any of its dependent services) expect some files to be
writable, and they're not writable in the miniroot, then those services
might fail. But it worth a try.
>
> >
> > Repack the whole archive using root_archive again like this
> >
> > # /boot/solaris/bin/root_archive pack x86.miniroot.new /root/tmp/
>
> again, you can use packmedia instead of unpackmedia. This will modify
> your x86.miniroot file directory, and you won't have to modify and tftp
> grub configuration.
>
> >
> > I then copied cp x86.miniroot.new to my jumpstart installation
> directory
> > present at /export/jumpstart/install/boot/
> >
> > Finally, I changed the tftpboot grub configuration to use
> > x86.miniroot.new instead of x86.miniroot
> >
> > Rebooted the node; the installation started. It failed to start
> the ssh
> > service on the compute node. I had console access to the node and
> when I
> > ran svcs on the node, it did not list ssh as one of the services
> > running. In fact it did not even import the xml configuration.
> Otherwise
> > ssh would atleast have shown up in the list as disabled, offline or
> > maintenance. It didn't show up in the list at all.
> >
> > So now, I'm not sure what else I need to modify in the root
> archive to
> > enable ssh.
>
> *If* all that goes well, then if the ssh service isn't enabled by
> default in the manifest you imported, you'd have to enable it. You can
> do that directly to the repository when you're doing this hack to the
> miniroot, or you can do it on the fly like the rlogin sevice I showed
> you above.
>
>
> I'd rather make the change directly to the repository to import the
> manifest, but I don't know where to make this change. Like I mentioned
> above, I'd rather not use the begin script to enable the service.
As mentioned above, you do this when you customize your netimage.
>
> Thanks,
> -anoop
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> install-discuss mailing list
> install-discuss at opensolaris.org
> http://opensolaris.org/mailman/listinfo/install-discuss