OK, so if I read this correctly, you want to boot the system, have it do some custom setup if it hasn't already been done, and then record the fact that your setup has been done for future boots. At some point, you want to be able to revert to the master configuration and re-do the custom setup in a possibly different way on demand. Is that what you're shooting for?
If so, then you need to do some work in both CMS and Linux. Your Linux systems should have only a private writable 191 and a link to a shared R/O 192 that initially IPL CMS and use CMS facilities to define the basic configuration of the virtual machine. The PROFILE EXEC on the 191 should test for a LINPROF EXEC on the 192 (which will be accessed as D automagically by CMS, execute it as the "common" configuration part of the Linux setup for the parts of the Linux virtual machine configuration that are the same for all the guests, then test for <userid> EXEC D that contains CP and CMS commands that make this virtual machine unique at the VM layer. The <userid> EXEC should write two files on the A disk (one indicating that the basic setup has been performed (call it CONFIG COMPLETE), and the second file should contain a list of Linux commands that need to be executed after booting to perform the Linux half of the configuration. The <userid> EXEC should terminate by IPLing Linux from the appropriate boot device. On the Linux side, you will have to ensure that the CMS filesystem utility is available in the boot partition, and in the setup for init, a step is performed to copy the the file containing the Linux commands from the CMS A disk to a known location in the Linux guest. Suitable /etc/init.d entries should be made to read and execute the commands in the file as part of the boot. Your <userid> EXEC can check for the existance of the CONFIG COMPLETE file on the A disk and react accordingly. If you want to force reconfiguration, delete CONFIG COMPLETE and your <userid> EXEC can go through the setup steps and rewrite the CONFIG COMPLETE and Linux command files when done. If necessary, the <userid> EXEC can DDR over a master copy of the base Linux image and start from there. Does this do what you want? -- db David Boyes Sine Nomine Associates > -----Original Message----- > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] Behalf Of > Tzafrir Cohen > Sent: Saturday, March 15, 2003 7:26 PM > To: [EMAIL PROTECTED] > Subject: Re: reset a computer > > > Trying to explain the question once again > > On Thu, Mar 13, 2003 at 05:59:03PM +0200, Tzafrir Cohen wrote: > > Hi > > > > Short version of the question: > > > > How do do a "hard-reset" to a linux guest from within linux? > > > > Note that I don't mean to IPL the boot specific device: I > need to re-run > > profile.exec from cms . I know I can do that using hcp. > > (As if the user has ogged-off and re-logged-on) > > > > > (I have an environment in which for some users those things are very > > different) > > That is: "hcp i <device num>" is not the answer to my question. > > I don't care if it would cause data inconsistencies, as I'm going to > "reformat" the linux partitions anyway. > > Why would I want this: > > The system in question can boot in one of two modes: > * setup mode: setup a system > * run mode: run a system that has already been setup. > > I currently have some major problems running this. I > currently use many > cludges. What I ccurrently really miss is a simple and robust > way for a > system in "run mode" to go back to "setup mode". Such a "hard reset" > should have been the perfect solution. > > > > > Any pointers to FMs (that answer this) would be appreciated. > > Also: are there any *specific* details that might help? > > Thanks in advance > > -- > Tzafrir Cohen > mailto:[EMAIL PROTECTED] > http://www.technion.ac.il/~tzafrir/ >
