Oracle Solaris 11:First Look
上QQ阅读APP看书,第一时间看更新

Installation from CD-ROM

Installation from physical media is almost the same as prior versions of Solaris. Simply answer some questions about filesystems, hostname, networking and so on, and you're off to the races.

However, here are a few things that you should know, even with the simple installation method:

  1. There is no longer "an install image". There are now two standard flavors to choose from: Text Install or Automated Installer (AI). This will be explained in more detail in the later sections of this chapter, but the short answer is: If you're installing from physical media, you probably need the Text Install image.
  2. No more GUI install mode. This isn't such a big deal, as GUI mode has been not much more than a slow wrapper around the text installer for a while now. However, it was occasionally nice to be able to use multiple windows and adjust font sizes, and so on.
  3. There is an optional LiveCD (or now called Live Media, since it does not fit on a CD) image available, for x86 only. This is "kindasorta-butnotquite" a GUI installer. It is fairly handy for trying out Solaris x86 in a pinch, and to have the capability to install itself to disk. The drawback is, it only installs itself to disk. That's great if you want to perform a generic desktop install, but not so great if you want to install a server. It will install an exact copy of the package set on the media, without asking you any fine tuning questions. More detail on it are mentioned in the later sections.
  4. Similar to the Live Media option, there is a USB media image option that is now downloadable. Once again, this is unfortunately for x86 only.

Once you deploy your chosen image, simply answer more or less the same questions you are used to answering with prior Solaris Text Install menus. This will have you on your way relatively quickly, with just a few caveats mentioned later in the Common traps and pitfalls section.

The x86 LiveCD install

The x86-only LiveCD has the benefit of being fully GUI-driven, and comes with features such as wireless networking ready to go, even if you install nothing to hard disk.

One drawback of doing an initial install from LiveCD, is that it installs the LiveCD OS installation to your disk, almost as-is. You get a pretty GUI that offers you almost no choices besides partitioning, language, and time zone. That being said, you can always use the sysconfig command after reboot to re-answer those and other questions, such as naming service and Kerberos use.

For security conscious people, you will be happy to know that it prompts you for a new user and password to use for the on-disk install, so you will not be left with the security hole of a known user and password.

Tip

The password you set for this user will also be the initial password for root (not to mention that the user will be sudo-enabled). So make it a good one, or change it ASAP.

Another potential drawback is that it will install a set of packages suitable for desktop use if you don't want to waste space and management on packages that you may not need. Specifically, it will install the IPS package grouping, group/system/solaris-desktop. Currently, this contains over 800 packages.

If you would rather stick to a minimal set of packages, you can choose to start from one of the other ISOs available to you.

Make sure to read the Common traps and pitfalls section of this chapter for some other important points.

Choosing Text Install image or Automated Install image

If you don't wish to use the Live Media, or you are on SPARC, you must still choose between two different ISO images to download: The Text Install image or the Automated Install image.

I usually hate table comparisons, but making a choice between these two seems to merit one.

This table hopefully will help you to decide which image to install from. If you are still unsure, you can choose the larger text installer image. It makes a better emergency disk, as it can do a full install even without network connectivity.

Details on installing from either of the images are given in later sections. But first, here are some more specifics on the previously mentioned set of comparisons.

When you boot into a shell from the AI image, you will have only the group/system/solaris-auto-install set of packages (335). In contrast, the Text Install image comes with the group/system/solaris-large-server set of packages (464).

Both make for a decent system recovery disk. They both have full ZFS tools and other core tools, plus a full set of kernel drivers. However, the Text Install image comes with other fancy stuff, such as nano, Java, CUPS printing, not to mention manpages. (This requires 500 MB more on an installed disk, if you let it do its normal install). It also has everything it needs in its own disk image, rather than downloading from the network, so may be faster to install. Both images require a network if you wish to install desktop related packages.

Oddly, even though the AI image is smaller, by default it requires a larger disk to install. Or at least the installer program insists on having one. However, there are ways around that, such as not using the AI installer program.

Manually invoking the install programs

It turns out that the AI image defaults to calling a program named auto-install, and the Text Installer defaults to calling a program named text-install. However, both are present in both disks, so you can technically use either method, with either disk.

It's good to know that while neither of the ISO images give you the entire set of Solaris packages, you can easily install the full set over the network, directly from Oracle. No special configuration is required; as soon as you reboot into your on-disk Solaris, you can use the pkg command to install extra packages, or package sets, presuming that you have Internet connectivity and DNS configured properly. Note that you can always set your DNS server to be Google's public server, 8.8.8.8, if you at least have IP routing working properly.

It is thus trivial to add packages to the very small solaris-auto-install package set once it is installed (for example, if you wish to augment it up to the solaris-large-server installed package group). However, there is no simple way to downgrade from solaris-server-large to a smaller package grouping. Because of this you may wish to have your standard installation CD be the smaller AI one, if you plan on doing a lot of bare-metal installs via CD rather than over the network.

Tip

If you are going to invoke an install program manually, you probably want to use text-install. The auto-install program likes to have certain prerequisites around. If you have those, then you probably don't want to be wasting your time doing manual installs in the first place.

Text Install image

The Text Install image will skip the GRUB menu entirely, unless you press Esc within 5 seconds. Don't panic! Unlike the default AI installer, you will be given a chance to drop out to a shell prompt soon after you set the keyboard type and language preferences.

If you allow it to proceed, it will continue to invoke its local text-install script, which will give you a somewhat standard-looking Solaris Text Install sequence.

The initial questions will be the usual choice of primary language, and so on. You can bail out cleanly to a shell prompt or officially start the installer, and eventually get to the selection of computer name and network connection. (Note the Common traps and pitfalls section in this chapter.)

This part gets a little weird and nonstandard. Unlike every other part of the installer, you have to press the down arrow key, and highlight the networking choice you want, but then press F2 instead of Enter.

Keep going and eventually, you will get the group/system/solaris-large-server set of packages installed to your hard drive, which is currently up to 462 packages. You are not given a choice of which packages to install at the initial install time.

If you would rather install a smaller set of packages from media, you should use the AI image, but manually run the text-install program from a shell prompt.

Text Installer does AI too

It is technically possible to use the Text Installer ISO to do AI style installs. However, you have to jump through quite a few hoops if you do not have a custom manifest all set out.

First, you must manually drop into a shell, and then call auto-install -m some-manifest.xml. If you do not have a custom one written, you may use the default one in /usr/share/auto_install/manifest/default.xml.

This is required because the Text Installer image does not come with the "find manifest automatically" services, aka the manifest-locator and auto-installer services, automatically enabled. These are mentioned in more detail in the AI installer client-side services section of this chapter. You may wish to manually enable them with svcadm if you do not wish to manually pull in and invoke a manifest as described previously, and you have the server side already configured appropriately.

There are some important things to note about the auto-install program on the Text Install image:

  1. It will give you the solaris-large-server package set, unless you tell it to use a different manifest file. If you wish for it to install a different package group, you can edit the manifest, and/or copy it to a local HTTP location, and tell it to use that.
  2. By default, it will point you at pkg.oracle.com for its repository. This is set in the manifest file.
  3. Normally, the text-install program cheats and just copies its own image files with cpio to the disk, rather than doing an official pkg install type operation. If however, you use AI, it will use the standard pkg mechanisms. Therefore, networking is required if you choose to invoke auto-install.

Tip

If you don't want to install multiple (more than 5?) instances of Solaris, you probably don't need to read any further in this chapter, other than potentially the Common traps and pitfalls section at the end.

Automated Install image

The AI image media is targeted at organizations that have large numbers of machines, but for some reason cannot boot their machines directly from DHCP. (If you can boot from DHCP, why would you want to go running around putting DVDs in every machine?) It is also of interest if you want the smallest on-disk footprint installed. In this case, you can boot from the AI image, but skip to shell and manually use the text-install program.

If you boot from the AI image, you will first see a standard GRUB menu with seven choices, looking similar to the following:

Oracle Solaris 11 Install custom
Oracle Solaris 11 Install
Oracle Solaris 11 Install custom ttya
Oracle Solaris 11 Install custom ttyb
Oracle Solaris 11 Install ttya
Oracle Solaris 11 Install ttyb
Boot from Hard Disk

For the most part they are self explanatory, allowing you options to have the console be one of the serial ports, or normal, or opt out to boot from the local disk. The three prompts with "custom" might be better labeled "interactive".

In contrast, the near-identical three prompts without the "custom" tag, will not ask any questions whatsoever. They will presume default answers to all questions and do a completely hands-off install.

If you choose the custom option, it will prompt you for the URL of an optional override for the default manifest. Either way, working networking is expected for an AI type of install; although you can drop out of a "custom" install and install directly from the media if you wish.

Getting a shell prompt from AI image

The AI installer does not normally give you a shell prompt. If you wish to avoid it attempting to reinstall to your disk, you should remove the "install" boot time option before fully booting into the OS. In SPARC, this is done by simply typing boot cdrom, instead of boot cdrom – install. In x86, you must use e to edit your chosen GRUB line to remove install=true from the kernel line.

Once you have done this, even though it may prompt you about a default manifest, it should go no further than that.

Speed of AI installer

It should be noted that the AI installer will likely be either somewhat slower or significantly slower than the Text Installer, depending on your network speed. It seems to first download the entire set of packages before installing, rather than doing both in parallel. It also may seem to sit doing nothing for several minutes. In contrast, the Text Installer starts copying to the disk right away, and tends to give better progress reports.

Potential problems specific to AI install

If you have a slow DHCP server, or even possibly a slow DNS server, this may result in a fatal error for the AI. It may complain that pkg.oracle.com is unreachable. Or the problem may be that the image has a misconfigured the nsswitch.conf entry for hosts, as follows:

hosts: files

Thankfully, all of the fore mentioned errors are recoverable. Log in as user root, password solaris, then fix what is required.

Tip

If you are attempting to install to a VM, you might try to just increase the size of the emulated disk before you try these fixes. I found that certain types of errors just disappeared when I increased the disk size to 7 GB. Yes, the Oracle FAQ claims the AI installer can work for something as small as 2.5 GB. However, I suspect that is only if you configure it with a custom teeny-tiny manifest, or run the text-install command. In contrast, the default template seems to really want at least 7 GB of disk space.

As we will discuss in Chapter 3, Sysadmin Configuration Differences, fixing nsswitch.conf is not done in the same way as in earlier versions of Solaris. After editing the file, you must run nscfg import -f name-server/switch.

Alternatively, you can skip the vi and import steps by a little hardcoding of /etc/hosts.

echo 127.254.56.21 pkg.oracle.com >>/etc/hosts

After you have fixed all networking issues (one way to verify this is by wget pkg.oracle.com), you can then manually invoke the AI install command, as described in the next section.