PDA

View Full Version : Access CC packages during install



subhanahmed2013
09-Oct-2013, 15:55
I'm installing SLES 11 SP2 in a VMWare VM with autoyast configuration. I've gotten to the point where I'm prompted for the location of my CC files.

The formats accepted are url://, ftp:// and file:///. This VM has no internet connectivity, so I am attempting to provide the location as 'file'. On physical machines we could do this by ALT+F2 to bring up a terminal, mount a USB device, and ALT+F2 to go back to the installation screen, but this does not seem to work in the VM. I can bring up a terminal but cannot dismiss it to continue (ALT+F2 does nothing). Giving the raw device name (as either file:///dev/sdXX or just file:///sdXX) doesn't work.

I also tried utilizing a shared folder to do this, but no luck. I tried by file:///<shared folder name>/path, and by file:///mnt/hfgs/<shared folder name>/path based on this article (http://www.vmware.com/support/ws4/doc/running_sharefold_ws.html), but in all cases I get:


cp: cannot stat '<path>': No such file or directory.
cp: missing destination file operand after <path>
FAILED: could not obtain file <path>
FAILED: please provide URI holding all CC files

Does anyone know of a workaround for this problem?

jmozdzen
10-Oct-2013, 09:42
Hi subhanahmed2013,

I'm installing SLES 11 SP2 in a VMWare VM with autoyast configuration. I've gotten to the point where I'm prompted for the location of my CC files.

The formats accepted are url://, ftp:// and file:///. This VM has no internet connectivity, so I am attempting to provide the location as 'file'. On physical machines we could do this by ALT+F2 to bring up a terminal, mount a USB device, and ALT+F2 to go back to the installation screen, but this does not seem to work in the VM. I can bring up a terminal but cannot dismiss it to continue (ALT+F2 does nothing). Giving the raw device name (as either file:///dev/sdXX or just file:///sdXX) doesn't work.

I also tried utilizing a shared folder to do this, but no luck. I tried by file:///<shared folder name>/path, and by file:///mnt/hfgs/<shared folder name>/path based on this article (http://www.vmware.com/support/ws4/doc/running_sharefold_ws.html), but in all cases I get:


cp: cannot stat '<path>': No such file or directory.
cp: missing destination file operand after <path>
FAILED: could not obtain file <path>
FAILED: please provide URI holding all CC files

Does anyone know of a workaround for this problem?

I've been wondering at first if "the CC files" refers to the C compiler (which would be part of the SDK add-on), but you seem to actually have the required files and are only looking for a way to make them accessible during install.

> On physical machines we could do this by ALT+F2 [...] but this does not seem to work in the VM.

manual intervention seems to contradict with an autoyast install ;) But the problem with doing the same for the VM might be simply caused by your host's window manager "catching" that special key code. If you're using KDE, go into the VM window's system menu (the outer left icon of the window, left of the window's title bar), select "advanced" - "special window settings" - tab "appearance & fixes" - check "ignore global shortcuts", change "do not affect" to "force" or "force temporarily" and check "yes". Close the dialog with "OK". Now "Alt-F2" would be sent to the VM, rather than intercepted by the host's window manager. There might be some menu option in the VM's window "to send special keys to the VM", too.

Using shared folders might fail because the VMware Tools are not yet installed or running.

Who's asking for the files, is it something you put in your autoyast's <files/> or <scripts/> nodes or is it some RPM's post-installation script? If the latter, you'd depend on what access methods are supported by that installer...

Depending on the stage of installation this is happening in, you might be able to provide a script that mounts some network resource to provide the files - or copy them in advance via entries in the "<files/>" node. You could create your own RPM and add that to the install - there are many ways to skip a cat and to me it is not yet clear what the actual requirements and dependencies are.

With regards,
Jens

subhanahmed2013
10-Oct-2013, 15:11
Hi, thanks for replying!


I've been wondering at first if "the CC files" refers to the C compiler (which would be part of the SDK add-on), but you seem to actually have the required files and are only looking for a way to make them accessible during install.

Apologies for not being clear. By 'CC files' I meant a set of .rpms provided by Novell which are required for an install of SLES 11 which conforms to EAL4 "Common Criteria" security accreditation. These rpms aren't present on the SLES 11 or SDK discs. You are correct that I already have them and just need to make them accessible.


manual intervention seems to contradict with an autoyast install

Ha, indeed. I phrased this poorly :) I have an autoyast .xml file provided by Novell which I pass in as a boot option:
autoyast=device://<device handle>/path/to/xml

Installation proceeds as usual with autoyast until it fails to find these extra RPM files. It then presents me with an ncurses screen asking for their location. I am unsure what options are valid at this point in the install (it has installed almost everything but has not yet reached the point where it would normally reboot and ask to set the root password). As you suggest, I suspect VMWare Tools is not yet available, which may scupper the shared folder idea.

ALT+F2 works the first time to open the terminal, so the key codes are getting through to the VM at least once. Although this may be a VMWare bug, as I've seen a few things in my searches online about VMWare messing up control keys, but little in the way of resolution :(


Depending on the stage of installation this is happening in, you might be able to provide a script that mounts some network resource to provide the files - or copy them in advance via entries in the "<files/>" node.

This sounds promising - do you have any pointers on how I would go about such a thing? Or know where I can find instructions online to do so? As this .xml was provided to us rather than written by us, I don't know much about what scripting options autoyast has.

mikewillis
10-Oct-2013, 16:53
The way I make rpms which are not part of SLES or the SDK available to AutoYast installations is to have my own repository which contains the rpms and include it in the AutoYaST Profile. E.g.


<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<add-on>
<add_on_products config:type="list">
<listentry>
<media_url><![CDATA[http://mywebserver.mydomain/repos/myrepo]]></media_url>
<product>MyRepo</product>
<product_dir>/</product_dir>
</listentry>
< [etc] >
</add_on_products>
</add-on>
< [etc] >
</profile>


mywebserver.mydomain runs SLES. Repos can be created using the createrepo command.


Having the packages in a repo means that if I want to distribute updated versions of the packages I can just add them to the repo and the machines pick them up as updates in the normal manner.

If you want a graphical editor for AutoYaST profiles you can use the Autoinstallation module in YaST

General AutoYaST documentation can be fond at

http://doc.opensuse.org/projects/YaST/SLES11/autoinstall/index.html

There's a section about adding additional packages
http://doc.opensuse.org/projects/YaST/SLES11/autoinstall/CreateProfile.Software.html#id2556301

If you wanted to run a script before the package installation starts you could use a pre-install script
http://doc.opensuse.org/projects/YaST/SLES11/autoinstall/createprofile.scripts.html#pre-install.scripts
But just mouting a volume containing the additional packages isn't going to be enough, you still need to tell AutoYaST to look for packages in that location.


Another way to handle it would be to install the packages in a post-install script. Mount the volume containing the volume the packages them with rpm. Something like


mkdir /tmp/mnt
mount -t cifs //server/path /tmp/mnt -o user=whatever password=whatever
cd /tmp/mnt
rpm -ivh *rpm

subhanahmed2013
11-Oct-2013, 09:08
Thanks very much for that info Mike, I will give it a go and report back :)

subhanahmed2013
12-Oct-2013, 02:16
Hi SubhanAhmed2013,

Hit "Alt+F1" after you done with mount (to go back to the ncurses menu). Ensure that the path you specified for the location of rpm should refer to the "mounted" location. ;)

Alt+F1 and Alt+F2 provides a "swtich" between existing shells (ncurses menu and commandline).

thanks to everyone for participating on this thread.

Thank you.