Chinaunix首页 | 论坛 | 博客
  • 博客访问: 107584
  • 博文数量: 38
  • 博客积分: 1520
  • 博客等级: 上尉
  • 技术积分: 325
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-20 11:12
文章分类

全部博文(38)

文章存档

2012年(4)

2011年(1)

2010年(7)

2009年(21)

2008年(1)

2007年(4)

我的朋友

分类:

2009-06-26 11:50:50

Sun xVM hypervisor

Here is Sun's announcement on Sun xVM hypervisor, which is based on the OpenSolaris Xen community.

Announcing Sun xVM hypervisor

As the hypervisor becomes productized, it is necessary to consider the choice of feature name. As a result, the official name for this implementation has become Sun xVM hypervisor.

Sun is still fully committed to working with, and being an active member of, the Xen opensource community.

Please read the attached FAQ for further information about the reason for the change.


Sun xVM hypervisor

Q: Why are we doing the name change?

As the hypervisor becomes productized, it is necessary to consider the choice of feature name. As a result, the official name for this implementation will become Sun xVM hypervisor. Sun is still fully committed to working with, and being an active member of, the Xen opensource community.

Q: Does the change to Sun xVM hypervisor imply that Sun is no longer committed to Xen?

Sun is fully committed to working with, and being an active member of, the Xen opensource community. The Xen community page on OpenSolaris.org will continue to be maintained and updated with the latest developments.

Q: Can I use the Xen trademark with Solaris?

The product that will provide virtualization capabilities on x86 based Solaris platforms will be called the Sun xVM hypervisor and will not include the Xen trademark.

Q: Why was Sun xVM hypervisor chosen as the product name?

Sun xVM hypervisor was chosen to reflect that the xVM product is Sun virtualization technology that runs on x86 platforms.

Q: Does this mean that you are not porting the x86 virtual machine to SPARC?

The Sun xVM hypervisor product will target and run on x86 platforms. For SPARC, Sun already has the SPARC hypervisor technology (Logical Domains) and Solaris OS Virtualization (Solaris Containers) is already well established for cross platform support of x86 and SPARC architectures.

Q: What other technologies are available?

The Sun xVM hypervisor product will target and run on x86 platforms. For SPARC, Sun already has the SPARC hypervisor technology (Logical Domains) and Solaris OS Virtualization (Solaris Containers) is already well established for cross platform support of x86 and SPARC architectures.

Sun has also announced its intention to provide the Sun xVM Product Group. This product group includes the Sun xVM Server, which in turn contains the Sun xVM hypervisor.

Setup the Solaris diskless root server

Creating an OpenSolaris domU

In this first release, there is no support for virtual disk devices in OpenSolaris domU. What follows is a procedure for creating a diskless client domU.

Setup the Solaris diskless root server for the OpenSolaris domU

Loopback mount the build 31 Solaris DVD ISO image

# mount -F hsfs `lofiadm -a /full/path/to/the/iso/image` /mnt

Create a Solaris root image that the client (the Solaris domU) will boot from using smosservice(1M) to install the client OS services from the DVD image:

dlserver# /usr/sadm/bin/smosservice add -u root -- \
 -x mediapath=/path/to/install/media \
 -x platform=i386.i86pc.Solaris_11 \
 -x cluster=SUNWCXall

Add Clients

Obtain a static IP address and hostname to use for each OpenSolaris domU you want to start.

Now configure each diskless client on the server with:

dlserver# /usr/sadm/bin/smdiskless add -u root -- \
 -i  -e  -n  \
 -x os=i386.i86pc.Solaris_11 \
 -x root=/export/root/ \
 -x swap=/export/swap/ \
 -x dump=/export/dump/\
 -x swapsize=512 -x dumpsize=512

where is the IP address that the Solaris domU will use, is the corresponding hostname and is the MAC address to assign to the virtual network interface for the Solaris domU. Choose a different MAC address for each client to ensure each virtual network interface will be unique on your subnet.

BFU OpenSolaris over the root image

As a prerequisite, the ON Specific build tools package (SUNWonbld) must be installed on the diskless client server. SPARC and x86 version of the SUNWonbld package are available here.

The Solaris i86xen archives must be bfu'd over the top of the root image(s) and usr image that were created by smosservice(1M).

First create an empty directory for the i86xen kernel bits in each client root filesystem so that bfu knows that these need to be added:

dlserver# mkdir /export/root//platform/kernel/i86xen

At this point, BFU should be used to update the root image for diskless clients using the following syntax (note the -c):

dlserver# /opt/onbld/bin/bfu -c  /export/exec/Solaris_11_i386.all

Then carefully use ACR to resolve any BFU conflicts:

dlserver# /opt/onbld/bin/acr /export/root/

Finally, use bootadm(1M) to update the boot archive on the client root image

dlserver# bootadm update-archive -R /export/root/

If you do modify and then rebuild the OpenSolaris on Xen code base, BFU should be used in exactly the same way to update the root images and the usr filesystem (/export/exec/Solaris_11_i386.all). Note, however, because that usr filesystem is shared between the clients, that all client roots are (and must be) updated by BFU at the same time.

And Finally …

Back on the dom0 machine, NFS mount the diskless root(s) so that the dom0 domain builder can access them. You will almost certainly have to fiddle with the default restrictive NFS export permissions on dlserver to enable the dom0 kernel to mount them.
On the dom0 box, add an entry like this to /etc/fstab to automatically mount the Solaris domU root image at boot.

dlserver:/export/root    /x/root   nfs   defaults,rw     0 0

Don't forget the mount point!

dom0# mkdir -p /x/root
dom0# mount -a

Create a domain configuration file with entries like the following:

memory = 256
name = ""
kernel = "/x/root//platform/i86xen/kernel/unix"
extra = "/platform/i86xen/kernel/unix -B console=xen"
ramdisk = "/x/root//platform/i86pc/boot_archive"
nics = 1
ip = ""
vif = [ 'mac=, bridge=xenbr0' ]
nfs_root = "dlserver:/export/root/"
nfs_server = ""
restart = 'none'

You can now boot the Solaris domain by typing the following command as root on the dom0 kernel:

dom0# xm create -c 

Be patient with the first boot; SMF initialization is not particularly efficient yet on diskless clients, and it may appear to be hung.

Quite a journey, but worth it once you get there!

Solaris 8 Network Install from Linux


I was able to successfully install Solaris 8 on my SPARCstation 10 using my Red Hat 7.3 Linux machine as a boot server. I downloaded the Solaris 8 CD images from Sun. I don't have a SCSI CD-ROM for the SS 10. But I do have CD-RW drive on my Linux machine and a network to connect them together. I connected to the serial console on the SS10.


Network Boot
The Solaris Install CD isn't needed for the install; it is for booting from the CD drive and doing a graphical install. The Software 1 CD CD contains the root filesystem and core packages. The Software 2 CD contains optional packages that can be copied over for the main install, or installed later.


The Solaris_8/Tools directory contains some shell scripts that are used on Solaris machine to setup a boot server. These don't work under Linux but inspecting them shows how a boot server can be setup on other Unix machines.

Setup network booting as described in my Network Boot Server for SPARC article.

Root Files
The root filesystem is on the Software 1 CD in the Solaris_8/Tools/Boot directory. It needs to be copied to the boot server using either tar or cpio commands to preserve all the file attributes.

# cd /mnt/cdrom/Solaris_8/Tools
# find . -depth -print | cpio -pdmu /pub/solaris/Solaris_8/Tools

TFTP
The network boot file for loading over TFTP is the usr/platform/platform/lib/fs/nfs/inetboot file in Solaris_8/Tools/Boot. Copy the file for your platform to the /tftpboot directory and symlink it to the file for the client.

# cd /pub/solaris/Solaris_8/Tools/Boot
# cp usr/platform/sun4m/lib/fs/nfs/inetboot /tftpboot
# cd /tftpboot
# ln -sf inetboot C0A8010C.SUN4M

Product Files
The core packages are also on the Software 1 CD in the Solaris_8/Product directory. This directory must be available over NFS. It can be copied from the CD-ROM to the hard drive. If you want to install the packages from the Software 2 CD, also copy them to the same location onto the hard disk with the same command.

# cd /mnt/cdrom/Solaris_8
# find Product -depth -print | cpio -pdmu
# /pub/solaris/Solaris_8

Alternatively, the CD-ROM can be exported directly over NFS. One snag with this is that you won't be able to unmount or eject the CD while it is exported. The solution is to not add a line to the /etc/exportfs file, but use the exportfs -i command to export it and then do exportfs -r to remove it.

# exportfs -v -i -o ro,no_root_squash 192.168.1.0/24:/mnt/cdrom

Bootparams
All the locations for directories above needed to be exported through NFS. They also need to be transmitted to the client with the bootparamd file. Add the configuration for the client to the /etc/bootparams file.

# cat >> /etc/bootparams
balrog root=kraken:/pub/solaris/Solaris_8/Tools/Boot \
        install=kraken:/pub/solaris \
        rootopts=:rsize=32768 boottype=:in

Problems
Some people have reported problems with interaction between the Linux NFS daemon and Solaris. I didn't have any trouble with the Linux 2.4.18 kernel so this may have been fixed in more recent kernels. You can try changing the rsize option to 8192 if you run into problems.

The first couple of times that I tried booting Solaris, the boot process would hang after loading the kernel but before loading the installer. After some investigation of the scripts in /sbin in the root filesystem, I discovered that the /sbin/get_netmask program was handing. Since it didn't seem to be doing anything important (the interface has already been properly configured), I moved it out the way.


# cd /pub/solaris/Solaris_8/Tools/Boot
# cd sbin
# mv get_netmask get_netmask.boot

Booting
Now you are ready to boot the Solaris installer over the network. Enter the boot command from the OpenPROM prompt.

ok boot net-tpe - install

Install
If everything is working correctly, the Solaris interactive installer should appear on the console. Most of the questions it asks are pretty straightforward and I didn't have any trouble installing Solaris once I got it to boot.

It should be possible to automate the installation using Jumpstart. Jumpstart uses a couple of files to configure the install. These are also exported through NFS and parameters added to the bootparams file. The scripts used to set this up automatically won't work on Linux but it should be possible to do it manually.

Related
Network Boot Server for SPARC
Copyright © 2005 Ian Burrell
All content on this website, unless otherwise noted, is licensed under a Creative Commons License.
Last Modified: 2006-08-17
 
1. device:
root@nwtgz # ls /dev/rmt/*
/dev/rmt/0     /dev/rmt/0cbn  /dev/rmt/0hn   /dev/rmt/0m    /dev/rmt/0u
/dev/rmt/0b    /dev/rmt/0cn   /dev/rmt/0l    /dev/rmt/0mb   /dev/rmt/0ub
/dev/rmt/0bn   /dev/rmt/0h    /dev/rmt/0lb   /dev/rmt/0mbn  /dev/rmt/0ubn
/dev/rmt/0c    /dev/rmt/0hb   /dev/rmt/0lbn  /dev/rmt/0mn   /dev/rmt/0un
/dev/rmt/0cb   /dev/rmt/0hbn  /dev/rmt/0ln   /dev/rmt/0n

name #hn

h---------

density:

l-low
m-mid
h-high
c-compressed
u-ultra compressed

n---------
no-rewind


2. status
root@nwtgz # mt -f /dev/rmt/0 status
Quantum Super DLT 320 tape drive:
   sense key(0x0)= No Additional Sense   residual= 0   retries= 0
   file no= 0   block no= 0


root@nwtgz # mt status
Quantum Super DLT 320 tape drive:
   sense key(0x6)= Unit Attention   residual= 0   retries= 0
   file no= 0   block no= 0

3. reject

root@nwtgz # mt offline

4. rewind

root@nwtgz # mt rewind

 
1.配置root用户SSH登陆

# vi /etc/ssh/sshd_config
ListenAddress 192.168.0.10
PermitRootLogin yes
# > /etc/motd
# vi /etc/default/init
LANG=zh

2.取消几个影响系统启动的TIMEOUT

# vi /etc/bootrc
set boot_timeout 0
# vi /boot/solaris/bootenv.rc
setprop auto-boot-timeout 0
setprop boottimeout '0'
# vi /boot/solaris/strap.rc
Options timeout=0

3.取消自动关机

# vi /etc/power.conf
#autoshutdown 30 9:00 9:00 default

4.设置用户的环境变量

# vi /etc/passwd
root:x:0:1:Super-User:/:/usr/bin/bash
# vi /.bashrc
PS1='[\u@\H \W]\$'
PATH=$PATH:/bin:/sbin:/usr/bin:/usr/ucb:/usr/sbin:/etc:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/sfw/bin
MANPATH=$MANPATH:/usr/man:/usr/local/man:/opt/sfw/man
LD_LIBRARY_PATH=/usr/lib:/usr/dt/lib:/usr/openwin/lib:/usr/sfw/lib:
/usr/local/lib:/usr/local/ssl/lib
CC=gcc
export PS1 PATH MANPATH LD_LIBRARY_PATH CC
export ED99vOR=vim
umask 022
TMOUT=1800
# vi .bash_profile
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

5.安装常用软件包

TOP工具:
# gzip -d top-3.5beta12.5-sol9-intel-local.gz
# pkgadd -d top-3.5beta12.5-sol9-intel-local

VIM工具:
# gzip -d ncurses-5.3-sol9-intel-local.gz
# pkgadd -d ncurses-5.3-sol9-intel-local
# gzip -d vim-6.2-sol9-intel-local.gz
# pkgadd -d vim-6.2-sol9-intel-local
# mv /bin/vi /bin/vi.bak
# ln -s /usr/local/bin/vim /bin/vi
# cp /usr/local/share/vim/vim62/vimrc_example.vim /.vimrc
# vi /.vimrc
把其中的:
set backup " keep a backup file
修改为:
set nobackup " keep a backup file
# vi /etc/hosts
加一条记录:
192.168.0.15 win2k

GCC工具:
# gzip -d libiconv-1.8-sol9-intel-local.gz
# gzip -d gcc-3.3.2-sol9-intel-local.gz
# pkgadd -d libiconv-1.8-sol9-intel-local
# pkgadd -d gcc-3.3.2-sol9-intel-local

MAKE工具:
# gzip -d make-3.80-sol9-intel-local.gz
# gzip -d automake-1.7.2-sol9-intel-local.gz
# pkgadd -d make-3.80-sol9-intel-local
# pkgadd -d automake-1.7.2-sol9-intel-local

MOZILLA:
# pkgrm SUNWnsb SUNWnsm SUNWnspsm SUNWnsxp
# gzip -d mozilla-i386-pc-solaris2.8-1.6.pkg.tar.gz
# tar -vxf mozilla-i386-pc-solaris2.8-1.6.pkg.tar
# cd mozilla-1.6-x86
# pkgadd -d MOZmozilla.pkg
# gzip -d flash_player_6_solaris_intel.tar.gz
# tar vxf flash_player_6_solaris_intel.tar
# cd install_flash_player_6_solaris
# cp * /usr/local/lib/mozilla-1.6/plugins
# cd /usr/local/lib/mozilla-1.6/plugins
# ln –s /usr/j2se/jre/plugin/i386/ns610/libjavaplugin_oji.so
# /usr/local/bin/mozilla

OTHERS:
# pkgadd -d expat-1.95.5-sol9-intel-local
# pkgadd -d gdbm-1.8.3-sol9-intel-local
# pkgadd -d openssl-0.9.7d-sol9-intel-local
# pkgadd -d libgcc-3.3-sol9-intel-local
# pkgadd -d libpcap-0.8.1-sol9-intel-local
# pkgadd -d tcp_wrappers-7.6-sol9-intel-local
# pkgadd -d tcpdump-3.8.1-sol9-intel-local
# pkgadd -d zlib-1.2.1-sol9-intel-local
# pkgadd -d lsof-4.68-sol9-intel-local

6.安装APACHE-2.0.49

# pkgrm SUNWapchd SUNWapchr SUNWapchu
# gzip -d apache-2.0.49-sol9-intel-local.gz
# pkgadd -d apache-2.0.49-sol9-intel-local
# cp /usr/local/apache2/bin/apachectl /etc/rc3.d/S50apache
# chmod 744 /etc/rc3.d/S50apache
# chown root:sys /etc/rc3.d/S50apache
# 配置/usr/local/apache2/conf/httpd.conf过程略。
# SMCapach2

7.安装OPENSSH-3.8

# pkgrm SUNWsshcu SUNWsshdr SUNWsshdu SUNWsshr SUNWsshu
# gzip -d openssh-3.8p1-sol9-intel-local.gz
# pkgadd -d openssh-3.8p1-sol9-intel-local
# mkdir /var/empty
# chown root:sys /var/empty
# chmod 755 /var/empty
# groupadd sshd
# useradd -g sshd -c "arthur sshd privsep" -d /var/empty -s /bin/false sshd
# ssh-keygen -t rsa1 -f /usr/local/etc/ssh_host_key -N ""
# ssh-keygen -t dsa -f /usr/local/etc/ssh_host_dsa_key -N ""
# ssh-keygen -t rsa -f /usr/local/etc/ssh_host_rsa_key -N ""
# vi /etc/init.d/sshd
===========================sshd============================
#!/sbin/sh
#
# Copyright (c) 2001 by Sun Microsystems, Inc
# All rights reserved.
#
#ident "@(#)sshd 1.1 01/09/24 SMI"

case "$1" in
start)
/usr/local/sbin/sshd
;;
stop)
pkill sshd
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
===========================sshd============================
# chmod 750 /etc/init.d/sshd
# chown root:sys /etc/init.d/sshd
# ln –s /etc/init.d/sshd /etc/rc2.d/S98sshd
# vi /etc/hosts.deny
sshd:ALL
# vi /etc/hosts.allow
sshd:192.168.0.15
# rm /.ssh/*

8.安装SAMBA-3

# cp /etc/rc3.d/S90samba bak.S90samba
# pkgrm SUNWsmbac SUNWsmbar SUNWsmbau
# gzip -d samba-3.0.2a-sol9-intel-local.gz
# gzip -d popt-1.7-sol9-intel-local.gz
# pkgadd -d popt-1.7-sol9-intel-local
# pkgadd -d samba-3.0.2a-sol9-intel-local
# cd /usr/local/samba/doc/samba/examples/
# cp smb.conf.default /usr/local/samba/lib/smb.conf
# 设置smb.conf文件过程略
# mv /etc/rc3.d/bak.S90samba S90samba
# chown root:sys /etc/rc3.d/S90samba
# vim /etc/rc3.d/S90samba
=======================S90samba========================
#!/sbin/sh
#
# Copyright (c) 2001 by Sun Microsystems, Inc
# All rights reserved.
#
#ident "@(#)samba 1.1 01/09/24 SMI"

case "$1" in
start)
[ -f /usr/local/samba/lib/smb.conf ] || exit 0

/usr/local/samba/sbin/smbd -D
/usr/local/samba/sbin/nmbd -D
;;
stop)
pkill smbd
pkill nmbd
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
=======================S90samba========================

9.初步的系统安全设置

为安全起见在/etc/inetd.conf中注释掉除下列服务的所有服务

ftp
echo
echo
discard
discard
rstatd/2-4
fs
100083/1

在只需要不多图形操作的服务器或是要保证相当的安全,你也许应该关掉字体服务fs,也可以关掉系统性能监视器rstatd和tooltalk服务器ttdbserverd(100083/1),查找剩下需要关闭的端口的进程用这个命令:
# /usr/local/bin/lsof -i | grep port

为安全起见在防止堆栈溢出

# cp /etc/system /etc/system.BACKUP
# vi /etc/system
在文件的最后,加上以下两行:
set noexec_user_stack=1
set noexec_user_stack_log=1

禁用自动启动DESKTOP

# /usr/dt/bin/dtconfig –d

为安全起见停掉几个系统服务:

卸载SENDMAIL:
# pkgrm SUNWsndmr SUNWsndmu
卸载TELNET:
# pkgrm SUNWtnetc SUNWtnetd SUNWtnetr
# cd /etc/rc2.d
# mv S71ldap.client _S71ldap.client
# mv S72inetsvc _S72inetsvc
# mv S74autofs _S74autofs
# mv S74xntpd _S74xntpd
# mv S80lp _S80lp
# mv S71rpc _S71rpc
# mv S73nfs.client _S73nfs.client

# cd /etc/rc3.d
  • 21:14
  • 浏览 (180)
  • 评论 (0)
  • 分类:

If you need to manage a Solaris 10 box with a minimal install, and SSH is not available, you can install it off of the 2nd CD. Rather than figure out the path to your CDROM , it was easier in our case to just tar up the needed packages and FTP them to our Solaris box:

root@srv-3 Product # cp -R SUNWsshcu SUNWsshdr SUNWsshdu SUNWsshr 
SUNWsshu /home/srv-1/sshpkg/
root@srv-3 Product # cd /home/srv-1/sshpkg/
root@srv-3 sshpkg # ls
SUNWsshcu  SUNWsshdr  SUNWsshdu  SUNWsshr  SUNWsshu
root@srv-3 sshpkg # tar -cf ../ssh.tar *
root@srv-3 sshpkg # tar -tf ../ssh.tar
SUNWsshcu/
SUNWsshcu/archive/
.
.
.
SUNWsshu/reloc/
SUNWsshu/reloc/usr/
SUNWsshu/reloc/usr/bin/
SUNWsshu/reloc/usr/lib/
SUNWsshu/reloc/usr/lib/ssh/
root@srv-3 sshpkg # 

On the Solaris side, FTP these to /tmp, then from tmp:

tar -xf ssh.tar
pkgadd -d .
svcadm enable ssh
svcadm restart ssh

 

vi /etc/ssh/sshd_config

....

# Are root logins permitted using sshd.
# Note that sshd uses pam_authenticate(3PAM) so the root (or any other) user
# maybe denied access by a PAM module regardless of this setting.
# Valid options are yes, without-password, no.
PermitRootLogin yes
....

Install sis900 on solaris 10 i386

1. download from :

file name: sfe-1.0.9.tar.gz

2. burn a cd
3. unzip the file
4. cd sfe-1.0.9
   cp i386/* /kernel/drv/
   ./adddrv.sh
5. Testing:
   modload obj/sfe
    devfsadm -i sfe
   ifconfig sfe0 plumb
   ifconfig -a
   ifconfig sfe0 hostname
   ifconfig sfe0 dhcp start
   ifconfig sfe0 up
6. Take effect on next bootup:
sys-unconfig
# sys-unconfig
                        WARNING

This program will unconfigure your system.  It will cause it
to revert to a "blank" system - it will not have a name or know
about other systems or networks.

This program will also halt the system.

Do you want to continue (y/n) ? y
updating /platform/i86pc/boot_archive...this may take a minute
 
1. export dir:
root@nwtgz # cat /etc/dfs/dfstab

#       Place share(1M) commands here for automatic execution
#       on entering init state 3.
#
#       Issue the command '/etc/init.d/nfs.server start' to run the NFS
#       daemon processes and the share commands, after adding the very
#       first entry to this file.
#
#       share [-F fstype] [ -o options] [-d ""] [resource]
#       .e.g,
#       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2

share -d "smsweb" -o rw /usr/local/tomcat/jakarta-tomcat-4.1.31/webapps/SMS

2. start up:                          
root@nwtgz # /etc/init.d/nfs.server start

3. check:

root@nwtgz # showmount -e 127.0.0.1
export list for 127.0.0.1:
/usr/local/tomcat/jakarta-tomcat-4.1.31/webapps/SMS (everyone)

关于Linux的NFS与Solaris不同点:

1. Solaris的目录共享设置文件是/etc/dfs/dfstab, 而RadHat Linux共享目录设置文件是/etc/exports
2. Solaris开机自动mount设置文件是/etc/vfstab, 而RadHat Linux开机自动mount设置文件是/etc/fstab
 
Normally installation of guest systems under qemu isn't that difficult, but with solaris 10 I had some problems to get it going, I succeeded at last and wrote a small howto:

First of all you need a litle patience: the installation of solaris 10 on my system went slow, sometimes it seems to "hang" and nothing happens for several minutes, but if you wait enough the installation wil proceed.
First you have to get Solaris, go to the Sun website and download the separate dvd.iso's and after you completed that step join them to one dvd.iso file  (named for example sol.iso)and put it let's say in /home/foo/solaris (everything well explained on Sun's site)
When I first tried to install solaris 10 on my linux box I found out booting the installed Solaris that I didn't had network. Seems that Solaris 10 has no support for the  NE2000 NIC that is emulated by qemu, although this is a very common nic.
Luckilly some one has wrote a driver for Solaris:

download the driver update floppy and unpack it also to /home/foo/solaris.
after that you have a file that's called DU.img in that map.

Ok, let's start installation
First we create the image file for Solris installation:

qemu-img create -f qcow sol.qcow 15G

Then we start the installation with this command:
qemu -hda /home/foo/sol.qcow -fda /home/foo/solaris/DU.img    -cdrom /home/foo/solaris/sol.iso -enable-audio  -m 384   -boot d
Immediately at the boot screen push "Esc", now you get a blue screen " The Solaris Device Configuration Assistent"
From the menu we choose to " add driver", this is done by: "Esc" + "4"
Then "Esc" + "2" to continue
next screen we select our version of Solaris (Solaris 10)
"Esc" + "2"
You wil see that the additonal drivers are loaded
Next we choose done by  "Esc" + "4", and in the next screen look if the driver "ni" is present, that's the driver for our nic.
Again "Esc" + "2" (two times)
Now you should see the drivers that are loaded, look especially at the presnece of:

ISA: ADS Soundblaster
PCI: Realtek 8029

Proceed with "Esc" + "2" (2x) (be sure to choose you cdrom as boot medium)
You will notice that the configuration of device ni0 (network) is skipped, no problem that will be arranged later during the install.
As I said before be patient when nothing seems to happen. (various minutes)
After a while wou will be presented with a scren with the found configuration, accept it.
Select language (used here: English: 0)
Now we have the graphical install screen: choos : next.
Then we select: networked
And "dhcp for ni0"  "Yes" next
Enable "ipv6"  (I put "no")  next
Enable "kerberos"  "no"  next
Name Service: "none"  next
Specify time zone --> by  Geographic continent next
Make you choice     next
Date and time  next
choose root password and confirm  next
confirm information   confirm

Now  will start the installation of solaris on your "harddisk"  next
You can leave the proposed options about reboot and ejecting cd/dvd  next
then OK
for "media leave" the selection at CD/DVD and next
Then the system in initialized
Then you have to accept the sun licensce agreement  next
I choose in the next screen for a custom install  next
next (2x)
Select products: I selected all 4. next
Additional Products: none next
Select Sloaris Software Group : "Entire Group"  next
Disk Selection (leave as proposed)  next (3x)
Lay Out File Systems   next
Ready to install: "Install now"

Now the system is installed, You can do something else meanwile because this takes quite a while and with various packages again it seems that nothing happens anymore, but again: be patient.
After installation it's tim to reboot,this time from harddisk:



qemu -hda /home/foo/sol.qcow  -enable-audio  -m 384   -boot c

First boot takes a long time because of  this step:
"loading smf (5) service descriptions"


Don't log in when the console login appears on the screen, it takes again a while until the graphical login pops up automatically (after some error messages)

Enjoy your Solaris 10 for intel under qemu!

通过pkg-get在Solaris上通过互联网安装软件

1. 安装CSWpkggeg (Install CSWpkgget)

以root权限运行命令:pkgadd -d
Run following command as root: pkgadd -d

该命令会安装CSWpkgget,这是从BlastWave(最大的Solaris自由软件下载网站之一)上下载并安装软件所需要的包。
This command will install the CSWpkgget package, which is required to automatically download and install packages from BlastWave (one of biggest free software service for Solaris).

当出现提示询问是否继续处理时,输入all,并按回车进行安装。
Type 'all' and enter when asking whether to process.

当询问是否创建目录和安装包时,输入y,按回车继续。
Type 'y' and enter when asking whether to create a directory and install the package.

当安装完成后,会提示:Installation of was successful.
It would print the following words when installation completes: Installation of was successful.

2. 配置pkg-get (Configure pkg-get)

编辑配置文件/opt/csw/etc/pkg-get.conf,将其预设站点url=改为和你位置最近的镜像站点。镜像可以在处查询。
Edit the configuration file /opt/csw/etc/pkg-get.conf, change its default site url= to the one nearest. The mirrors can be found at .

将pkg-get所在的路径/opt/csw/bin/添加到PATH变量中去,重新登录,并使用echo $PATH命令确认添加成功。
Add the direcroty "/opt/csw/bin/" of command pkg-get to the PATH env variable, relogin, and use the "echo $PATH" to confirm the change.

3. 使用pkg-get命令 (use the pkg-get command)

3.1 安装 (install)

pkg-get install

3.2 升级 (upgrade)

pkg-get upgrage

3.3 删除 (remove)

pkg-get remove

3.4 列出所有已安装软件 (list all installed packages)

pkg-get list

3.5 列出所有可安装软件 (list all available packages)

pkg-get available
 

This page describes the installation of the July 2007 update of OpenSolaris on a domU running under a Linux dom0. It has all been written based on my experiences with Debian GNU/Linux 4.0 as the dom0 so some details might not match your system and others might just be wrong. If you have any corrections or additions, please email me here:

 

[] Getting the Installation Media

The installer is available as DVD image from Sun's Download Centre . It is distributed as an ISO file, which has been split into six parts and where each part has been zipped.

I downloaded each file, verified them using the supplied md5sums, and then ran the following from bash to unzip and recombine them:

mkdir /usr/lib/xen-solaris/
for foo in `ls 66-0624-nd-iso-[a-f].zip`; do
    unzip -p $foo;
done >/usr/lib/xen-solaris/66-0624-nd.iso
] Extracting the Kernel and Initial ramdisk

To boot OpenSolaris under you need both a kernel and initial ramdisk available on your dom0. The documentation seems to assume that you are running an OpenSolaris dom0 and so will already have a copy of the kernel and ramdisk available. In our case, with a Linux dom0, we will need to extract the kernel and ramdisk from the ISO image like so:

mkdir /mnt/tmp
mount -o loop,ro 66-0624-nd.iso /mnt/tmp
cp /mnt/tmp/boot/x86.miniroot /usr/lib/xen-solaris/x86.miniroot-66-0624-nd
cp /mnt/tmp/boot/platform/i86xpv/kernel/unix /usr/lib/xen-solaris/unix-66-0624-nd
umount /mnt/tmp
] Configuring Xen for the Installation

Before you can boot OpenSolaris to begin the installation you will need to create a configuration file defining the virtual disk, virtual DVD drive, kernel, ramdisk, memory size and kernel parameters. Here's an example:

name = 'argolin'
memory = '1024'
disk = [ 'file:/mnt/tmp/66-0624-nd.iso,6:cdrom,r', 'phy:/dev/xenvg/argolin.disk,0,w' ]
vif = [ '' ]
on_shutdown = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'
kernel = '/usr/lib/xen-solaris/unix-66-0624-nd'
ramdisk = '/usr/lib/xen-solaris/x86.miniroot-66-0624-nd'
extra = '/platform/i86xpv/kernel/unix - nowin -B install_media=cdrom'

This creates a domU called argolin with 1024MB of RAM, a virtual DVD drive from the image in '/mnt/tmp/66-0624-nd.iso', a virtual disk from the device '/dev/xenvg/argolin.disk', the default virtual network interface and the kernel and ramdisk extracted earlier. This configuration file should be saved in '/etc/xen/' and given a name like 'argolin.conf' but this is up to you.

] SMP-related IO Hang (part 1)

My first tries at booting OpenSolaris as a domU resulted in the installer hanging at some point during the main package installation process. After much help from the kind folk of #solaris-xen on irc.oftc.net we found that this was an IO hang which is only seen on SMP systems. A work-around for this bug exists in the kernel but has to be enabled manually using the kernel's built in debugger. The '-kd' kernel parameter, shown below, causes the kernel to open the debugger as soon as possible after boot.

extra = '/platform/i86xpv/kernel/unix -kd - nowin -B install_media=cdrom'
] Booting the Installer

Once you have the DVD image, have extracted the kernel and ramdisk, and have created the configuration file you can boot the installer like so:

xm create -c argolin.conf

The last argument to the command is the name of the configuration file created above.

You should then see:

Using config file "/etc/xen/argolin.conf".
Started domain argolin
SunOS Release 5.11 Version xen-nv66-2007-06-24 32-bit
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
WARNING: Found xen v3.0.3-1 but need xen v3.0.4-1-sun
WARNING: The kernel may not function correctly
Configuring /dev
Solaris Interactive Text (Console session)
Using install cd in /dev/dsk/c0d6p0
...
...

The warnings about the Xen version mismatch may be ignored as these apparently only apply to 64bit systems (thanks again #solaris-xen).

] SMP-related IO Hang (part 2)

Following a boot with the '-kd' parameter you should see the following:

Using config file "/etc/xen/argolin.conf".
Started domain argolin
Loading kmdb...

Welcome to kmdb
Loaded modules: [ unix krtld genunix ]
[0]> 

You type:

workaround_6557577?W 1

It shows:

workaround_6557577:             0               =       0x1
[0]>

You type:

:c

It shows:

SunOS Release 5.11 Version xen-nv66-2007-06-24 32-bit
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
WARNING: Found xen v3.0.3-1 but need xen v3.0.4-1-sun
WARNING: The kernel may not function correctly
Configuring /dev
...
...
] The Installation

Once OpenSolaris has booted the installer will ask you for details of your location and terminal. Make sure you are using a standard 80x25 terminal and select option 6 (PC console). You should then see a shiny, coloured installer. Make sure you say no to the automatic reboot as we need to transfer the kernel and ramdisk to the dom0 after the install.

] SMP-related IO Hang (part 3)

You'll be glad to hear that this is the last section dealing with the SMP-related IO hang. To avoid having to use kmdb to enable the workaround during each boot, I added the following line to '/etc/system':

set workaround_6557577 = 1
] TCP/UDP Checksum Problem

I also had a problem with the OpenSolaris kernel not generating checksums for TCP and UDP packets. The fix for this is another addition to '/etc/system':

set xnf:xnf_cksum_offload = 0
] Finishing up and Rebooting into the Installed System

Unfortunately we need to update the ramdisk after editing '/etc/system' so:

bootadm update-archive -R /a

As mentioned above, we need to make the OpenSolaris kernel and ramdisk available inside the dom0. It is not strictly necessary to transfer the kernel from the domU to the dom0 as it is identical to the installer's kernel but I have shown the scp for both kernel and ramdisk because this may be necessary if the kernel is upgraded at a later point. I chose a full install so that I could use scp to do this but if you have an ftp server handy you should be OK with a more minimal install. At the post-install console I did the following:

/a/usr/bin/scp -S /a/usr/bin/ssh /a/platform/i86xpv/kernel/unix /a/platform/i86pc/boot_archive \
        10.0.0.1:/usr/lib/xen-solaris/

I didn't really know how to shut down the system so I did:

umount /a
shutdown -y -g0 -i0

Once back at your dom0's prompt you need to edit the domU's configuration file to look something like this:

name = 'argolin'
memory = '1024'
disk = [ 'phy:/dev/xenvg/argolin.disk,0,w' ]
vif = [ '' ]
on_shutdown = 'destroy'
on_reboot = 'destroy'
on_crash = 'destroy'
kernel = '/usr/lib/xen-solaris/unix'
ramdisk = '/usr/lib/xen-solaris/boot_archive'
extra = '/platform/i86xpv/kernel/unix'
root = '/dev/dsk/c0d0s0'

Then fire up the domU again and you're away:

xm create -c argolin.conf
Using config file "/etc/xen/argolin.conf".
Started domain argolin
SunOS Release 5.11 Version xen-nv66-2007-06-24 32-bit
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
WARNING: Found xen v3.0.3-1 but need xen v3.0.4-1-sun
WARNING: The kernel may not function correctly
ip: joining multicasts failed (4) on xnf0 - will use link layer broadcasts for multicast
Hostname: argolin.xen.tardis.ed.ac.uk
...
...
argolin.xen.tardis.ed.ac.uk console login:

One final note: I was unable to login to the system as root via ssh by default. I only mention this because most Linux distributions now allow ssh root login by default.

Retrieved from ""
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 




Solaries 系统维护命令

root@nwtgz # showrev
Hostname: nwtgz
Hostid: 83a0ea91
Release: 5.8
Kernel architecture: sun4u
Application architecture: sparc
Hardware provider: Sun_Microsystems
Domain:
Kernel version: SunOS 5.8 Generic 117350-14 Oct 2004

 

root@nwtgz # prtconf
System Configuration:  Sun Microsystems  sun4u
Memory size: 2048 Megabytes
System Peripherals (Software Nodes):

SUNW,Sun-Fire-V240
    packages (driver not attached)
        SUNW,builtin-drivers (driver not attached)
        deblocker (driver not attached)
        disk-label (driver not attached)
        terminal-emulator (driver not attached)
        dropins (driver not attached)
        kbd-translator (driver not attached)
        obp-tftp (driver not attached)
        SUNW,i2c-ram-device (driver not attached)
        SUNW,fru-device (driver not attached)
        SUNW,asr (driver not attached)
        ufs-file-system (driver not attached)
    chosen (driver not attached)
    openprom (driver not attached)
        client-services (driver not attached)
    options, instance #0
    aliases (driver not attached)
    memory (driver not attached)
    virtual-memory (driver not attached)
    SUNW,UltraSPARC-IIIi (driver not attached)
    memory-controller, instance #0
    SUNW,UltraSPARC-IIIi (driver not attached)
    memory-controller, instance #1
    pci, instance #0
        network, instance #0
        network, instance #1
    pci, instance #1
        isa, instance #0
            flashprom (driver not attached)
            rtc (driver not attached)
            i2c, instance #0
                i2c-bridge (driver not attached)
                i2c-bridge (driver not attached)
                motherboard-fru-prom (driver not attached)
                chassis-fru-prom (driver not attached)
                power-supply-fru-prom (driver not attached)
                power-supply-fru-prom (driver not attached)
                dimm-spd (driver not attached)
                dimm-spd (driver not attached)
                dimm-spd (driver not attached)
                dimm-spd (driver not attached)
                rscrtc (driver not attached)
                nvram (driver not attached)
                idprom (driver not attached)
                gpio (driver not attached)
                gpio (driver not attached)
                gpio (driver not attached)
                gpio (driver not attached)
                gpio (driver not attached)
                gpio (driver not attached)
            power, instance #0
            serial, instance #0
            serial, instance #1
            rmc-comm, instance #0
        pmu, instance #0
            i2c (driver not attached)
            gpio, instance #0
        usb, instance #0
        ide, instance #0
            disk (driver not attached)
            cdrom (driver not attached)
            sd, instance #30
    pci, instance #2
        scsi, instance #0
            disk (driver not attached)
            tape (driver not attached)
            sd, instance #0
            sd, instance #1
            sd, instance #2
            sd, instance #3
            sd, instance #4 (driver not attached)
            sd, instance #5 (driver not attached)
            sd, instance #6 (driver not attached)
            sd, instance #7 (driver not attached)
            sd, instance #8 (driver not attached)
            sd, instance #9 (driver not attached)
            sd, instance #10 (driver not attached)
            sd, instance #11 (driver not attached)
            sd, instance #12 (driver not attached)
            sd, instance #13 (driver not attached)
            sd, instance #14 (driver not attached)
        scsi, instance #1
            disk (driver not attached)
            tape (driver not attached)
            sd, instance #15 (driver not attached)
            sd, instance #16 (driver not attached)
            sd, instance #17 (driver not attached)
            sd, instance #18 (driver not attached)
            sd, instance #19 (driver not attached)
            sd, instance #20 (driver not attached)
            sd, instance #21 (driver not attached)
            sd, instance #22 (driver not attached)
            sd, instance #23 (driver not attached)
            sd, instance #24 (driver not attached)
            sd, instance #25 (driver not attached)
            sd, instance #26 (driver not attached)
            sd, instance #27 (driver not attached)
            sd, instance #28 (driver not attached)
            sd, instance #29 (driver not attached)
    pci, instance #3
        network, instance #2
        network, instance #3
    pseudo, instance #0

 

root@nwtgz # mpstat
CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
  0    1   0   18     8    3  174    0   11    4    0   180    0   1   5  94
  1    1   0   17   416  312  212    0   11    2    0   143    0   0   5  95
 

root@nwtgz # iostat -En
c1t0d0          Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: SEAGATE  Product: ST373307LSUN72G  Revision: 0507 Serial No: 3HZ9KV2N00007518
Size: 73.40GB <73400057856 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
c1t1d0          Soft Errors: 7716 Hard Errors: 34 Transport Errors: 0
Vendor: SEAGATE  Product: ST373307LSUN72G  Revision: 0507 Serial No: 3HZ9KD9600007518
Size: 73.40GB <73400057856 bytes>
Media Error: 32 Device Not Ready: 0 No Device: 0 Recoverable: 7716
Illegal Request: 0 Predictive Failure Analysis: 0
c1t2d0          Soft Errors: 1637 Hard Errors: 26 Transport Errors: 1
Vendor: SEAGATE  Product: ST373307LSUN72G  Revision: 0507 Serial No: 3HZ9Q91Q00007522
Size: 73.40GB <73400057856 bytes>
Media Error: 24 Device Not Ready: 0 No Device: 1 Recoverable: 1637
Illegal Request: 0 Predictive Failure Analysis: 0
c1t3d0          Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: SEAGATE  Product: ST373307LSUN72G  Revision: 0507 Serial No: 3HZ9Q7KH00007522
Size: 73.40GB <73400057856 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0
c0t0d0          Soft Errors: 0 Hard Errors: 2 Transport Errors: 0
Vendor: TEAC     Product: DV-28E-C         Revision: 1.4B Serial No:  
Size: 18446744073.71GB <-1 bytes>
Media Error: 0 Device Not Ready: 2 No Device: 0 Recoverable: 0
Illegal Request: 0 Predictive Failure Analysis: 0

root@nwtgz # swap -s
total: 582016k bytes allocated + 72672k reserved = 654688k used, 5180784k available

 

root@nwtgz # pkginfo -l SUNWypu
   PKGINST:  SUNWypu
      NAME:  NIS Server for Solaris (usr)
  CATEGORY:  system
      ARCH:  sparc
   VERSION:  11.8.0,REV=2000.01.08.18.12
   BASEDIR:  /
    VENDOR:  Sun Microsystems, Inc.
      DESC:  NIS Server for Solaris 2.6 and up
    PSTAMP:  on28-patch20040727125011
  INSTDATE:  Dec 28 2004 15:14
   HOTLINE:  Please contact your local service provider
    STATUS:  completely installed
     FILES:       21 installed pathnames
                   5 shared pathnames
                   5 directories
                  16 executables
                 299 blocks used (approx)
 

 

/export/home/pas52mon>  psrinfo -v
Status of virtual processor 1 as of: 02/27/08 11:55:03
  on-line since 02/26/08 08:57:06.
  The sparcv9 processor operates at 1350 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 3 as of: 02/27/08 11:55:03
  on-line since 02/26/08 08:57:05.
  The sparcv9 processor operates at 1350 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 17 as of: 02/27/08 11:55:03
  on-line since 02/26/08 08:57:06.
  The sparcv9 processor operates at 1350 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 19 as of: 02/27/08 11:55:03
  on-line since 02/26/08 08:57:06.
  The sparcv9 processor operates at 1350 MHz,
        and has a sparcv9 floating point processor.

 

/ue21/as5prog/script> psrinfo -v
Status of processor 0 as of: 02/27/08 11:58:30
  Processor has been on-line since 07/13/07 03:38:04.
  The sparcv9 processor operates at 450 MHz,
        and has a sparcv9 floating point processor.

 

# psrinfo -v
Status of virtual processor 0 as of: 02/27/08 11:58:08
  on-line since 02/13/08 11:28:57.
  The sparcv9 processor operates at 1280 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: 02/27/08 11:58:08
  on-line since 02/13/08 11:28:56.
  The sparcv9 processor operates at 1280 MHz,
        and has a sparcv9 floating point processor.

 

 

/export/home/pas52mon> psrinfo -pv
The UltraSPARC-IV physical processor has 2 virtual processors (1, 17)
The UltraSPARC-IV physical processor has 2 virtual processors (3, 19)

 

root@nwtgz # route add default 192.168.198.254
add net default: gateway 192.168.198.254
root@nwtgz # netstat -rn     
Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.198.0        192.168.198.222       U        1   1493  bge0
224.0.0.0            192.168.198.222       U        1      0  bge0
default              192.168.198.254       UG       1      3 
127.0.0.1            127.0.0.1             UH       5    323  lo0
 

 

1. 分区简介:(以我的硬盘为例,只做参考)

  第一主分区   10G   C盘  NTFS格式  安装Windows XP

  第二主分区   15G   空闲未分配  准备留给Solaris 10

  扩展分区分为三个逻辑盘:

      D盘     24G   NTFS格式

      E盘     26G   FAT32格式

      F盘     3G    FAT32格式

2. 准备过程:

  在E盘建一个solaris的文件夹,然后用WinRAR或者虚拟光驱打开sol-10-u2-ga-x86-dvd.iso,将里面boot目录下的
multiboot和x86.miniroot这两个文件提取出来,放在solaris文件夹中,然后把sol-10-u2-ga-x86-dvd.iso镜
像文件也放在solaris文件夹中。(其实这三个文件放在任何地方都可以,但必须是在FAT32分区中)

3. 用grub引导:

  用grub或grub for dos引导,在命令提示符下键入以下命令:

  find /solaris/multiboot

  会显示hd(0,5),这里的hd(0,5)即我的E盘。注意,你的硬盘分区可能和我的不同,因此显示也会不同,请参考grub
的相关资料。

  然后再键入以下命令进行引导:

  kernel hd(0,5)/solaris/multiboot kernel/unix -B install_media=dsk

  module hd(0,5)/solaris/x86.miniroot

  boot

  如果一切顺利的话,应该就可以进入引导画面。

4. 利用安装过程中出现的shell进行虚拟光驱

  正确引导以后,首先会出现6个安装模式选项,选择1或者等待超时(默认是1)。这时屏幕上会出现类似的如下提示:

  NOTICE: rtls0 -- link down

  ERROR: Unbale to configure network inteface

         Exiting to shell

  # NOTICE: rtls0 -- link up 100Mbps Full_puplex

  这时候安装程序会停止,光标会停止不动。这时敲一下回车,会出现shell提示符 #

  这个shell是可以用的,敲几个简单的命令试试。

  有了这个shell就好办了,我们可以用它进行虚拟光驱。

  首先要知道E盘在Solaris中是怎么表示的:

  cd /dev/dsk

  然后ls看一下,里面有类似c0d0p0,c0d0p1,c0d0p2,c0d0p3,c0d0p4的设备。这里c0d0p0对应我的硬盘,c0d0p1
至c0d0p4分别对应4个主分区,可是,Solaris没有设备符号用来对应扩展分区中的逻辑分区。我们该如何mount扩展分区中
的E盘、F盘呢?Solaris用了一种很奇怪的设备符号来表示硬盘中的FAT32分区:c0d0p0:x,这儿x的取值为:1,2,3...,
分别表示硬盘中的第1个、第2个、第3个FAT32分区,依此类推。即我的硬盘中的第1个FAT32分区(E盘)可以表示为
c0d0p0:1、第2个FAT32分区(F盘)可以表示为c0d0p0:2。

  注意,不要用诸如c0d0p3:x(这儿c0d0p3对应我的扩展分区,x表示扩展分区中的第x个FAT32分区)这种方式来表示扩
展分区中的FAT32分区,当扩展分区的最后一个分区是FAT32、以c0d0p3:x这种设备符号mount它时会出错,使用c0d0p0:x
这种方式表示FAT32分区则没有任何问题。

  赶紧把E盘mount上去吧:

  mount -F pcfs /dev/dsk/c0d0p0:1 /mnt

  然后进入mnt目录下去看看吧,应该可以看到E盘的文件了。这时候就可以用Solaris的DVD镜像做虚拟光驱了。

  lofiadm -a /mnt/solaris/sol-10-u2-ga-x86-dvd.iso

  mount -F hsfs /dev/lofi/1 /cdrom (必须mount在/cdrom目录中)

  再进入cdrom里面去看看吧,应该成功了。这时系统会认为光驱里面有光盘了。

  等这一切做完之后,然后键入 exit ,就会退出shell,安装程序会自动继续进行下去。

将/etc/ssh/sshd_config文件中的PermitRootLogin的值改为yes,重启ssh服务,就可以用root远程telnet本机。

重启命令:

# svcadm restart network/ssh
 
. 使用串口线连接两台机器A和B, 使用A做为监视用的机器,获取从B的输出;

2. 修改机器A的/etc/remote文件:

hardwire:\

       :dv=/dev/term/X:br#9600...
把上面的"X"改成实际使用的串口标识,第一个串口是"a",第二个是"b"

3. 在机器A上运行"tip hardwire"

4. 在机器B上运行

eeprom console=ttyX

上面的"X"应该是实际使用的串口标识,第一个串口是"a",第二个是"b"

5. 重启机器B, 就可以在机器A上获得机器B的控制台输出

取自"%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8%E4%B8%B2%E5%8F%A3%E5%81%9A%E7%B3%BB%E7%BB%9F%E6%8E%A7%E5%88%B6%E5%8F%B0%EF%BC%9F"

来自feel2008, , 有修正

 

硬盘安装Solaris 10

1. 分区简介:(以我的硬盘为例,只做参考)

  第一主分区   10G   C盘  NTFS格式  安装Windows XP
  第二主分区   15G   空闲未分配  准备留给Solaris 10
  扩展分区分为三个逻辑盘:
      D盘     24G   NTFS格式
      E盘     26G   FAT32格式
      F盘     3G    FAT32格式

2. 准备过程:

  在E盘建一个solaris的文件夹,然后用WinRAR或者虚拟光驱打开sol-10-u2-ga-x86-dvd.iso,将里面boot目录下的
multiboot和x86.miniroot这两个文件提取出来,放在solaris文件夹中,然后把sol-10-u2-ga-x86-dvd.iso镜
像文件也放在solaris文件夹中。(其实这三个文件放在任何地方都可以,但必须是在FAT32分区中)

3. 用grub引导:

  用grub或grub for dos引导,在命令提示符下键入以下命令:
  find /solaris/multiboot
  会显示hd(0,5),这里的hd(0,5)即我的E盘。注意,你的硬盘分区可能和我的不同,因此显示也会不同,请参考grub
的相关资料。
  然后再键入以下命令进行引导:
  kernel hd(0,5)/solaris/multiboot kernel/unix -B install_media=dsk
  module hd(0,5)/solaris/x86.miniroot
  boot
  如果一切顺利的话,应该就可以进入引导画面。

4. 利用安装过程中出现的shell进行虚拟光驱

  正确引导以后,首先会出现6个安装模式选项,选择1或者等待超时(默认是1)。这时屏幕上会出现类似的如下提示:
  NOTICE: rtls0 -- link down
  ERROR: Unbale to configure network inteface
         Exiting to shell
  # NOTICE: rtls0 -- link up 100Mbps Full_puplex
  这时候安装程序会停止,光标会停止不动。这时敲一下回车,会出现shell提示符 #
  这个shell是可以用的,敲几个简单的命令试试。
  有了这个shell就好办了,我们可以用它进行虚拟光驱。
  首先要知道E盘在Solaris中是怎么表示的:
  cd /dev/dsk
  然后ls看一下,里面有类似c0d0p0,c0d0p1,c0d0p2,c0d0p3,c0d0p4的设备。这里c0d0p0对应我的硬盘,c0d0p1
至c0d0p4分别对应4个主分区,可是,Solaris没有设备符号用来对应扩展分区中的逻辑分区。我们该如何mount扩展分区中
的E盘、F盘呢?Solaris用了一种很奇怪的设备符号来表示硬盘中的FAT32分区:c0d0p0:x,这儿x的取值为:1,2,3...,
分别表示硬盘中的第1个、第2个、第3个FAT32分区,依此类推。即我的硬盘中的第1个FAT32分区(E盘)可以表示为
c0d0p0:1、第2个FAT32分区(F盘)可以表示为c0d0p0:2。
  注意,不要用诸如c0d0p3:x(这儿c0d0p3对应我的扩展分区,x表示扩展分区中的第x个FAT32分区)这种方式来表示扩
展分区中的FAT32分区,当扩展分区的最后一个分区是FAT32、以c0d0p3:x这种设备符号mount它时会出错,使用c0d0p0:x
这种方式表示FAT32分区则没有任何问题。
  赶紧把E盘mount上去吧:
  mount -F pcfs /dev/dsk/c0d0p0:1 /mnt
  然后进入mnt目录下去看看吧,应该可以看到E盘的文件了。这时候就可以用Solaris的DVD镜像做虚拟光驱了。
  lofiadm -a /mnt/solaris/sol-10-u2-ga-x86-dvd.iso
  mount -F hsfs /dev/lofi/1 /cdrom (必须mount在/cdrom目录中)
  再进入cdrom里面去看看吧,应该成功了。这时系统会认为光驱里面有光盘了。
  等这一切做完之后,然后键入 exit ,就会退出shell,安装程序会自动继续进行下去。

5. 进入图形化安装界面后,我就不再多说了吧........ ^_^

Solaris 10是完全免费,而且开源的:免费下载;免费使用, 不管你是开发还是商业应用,也没有什么CPU使用限制。

当你从Sun官方网站上免费注册,将会获得Entitlement(授权书),就可以免费使用Solaris。该Entitlement含有Solaris OS Software License Agreement (SLA for Solaris 10) and Solaris OS Binary Code License (BCL for Solaris 8 and 9),免费获得。

如果没有Entitlement,则可以使用Solaris 10自带的Evalucation License完全免费,可以使用90天。

详细请看该网址:

取自"Solaris%E6%98%AF%E5%85%8D%E8%B4%B9%E7%9A%84%E5%90%97%EF%BC%9F"
简单得说,Sun OS是Solaris的其中一个部分。
Solaris是SOE - Solaris Operating Environment的缩写,它包括以下主要部件:

1.SunOS - 系统内核 (版本号是5.x)
2.Windowing - 桌面环境JDS/CDE
Solaris最新正式版本是11。以前的还有2.5/2.6/7/8/9/10等。


类似于Windows的Service pack,Sun还会定期推出基于主版本之上的Update版本。例如,Solaris 10的第一个Update版本是Solaris 10 update 1。

Solaris按支持平台可分为x86和Sparc版本,其中x86版本支持32位和64位。Sparc也有32(较早的机器)和64位之分。

Sun公司还推出Solaris Enterprise System。Solaris Enterprise System是一个免费企业级解决方案套件:除了包含Solaris 10,还有Java Enterprise System,开发工具(Sun Studio, Netbeans, Sun Java Studio Creator, Sun Java Studio Enterprise), 桌面软件和N1管理软件。

目前Solaris开发版本是11,项目代号是Nevada,(美国西部内陆州-内华达州)。

每月5号,Sun会发布一个当前Solaris开发版本叫做Solaris Express。目前的Solaris Express来自于Solaris 11最新的较稳定的版本,其中包含了Solaris最新的功能和特性。该产品主要针对合作伙伴、开发者和希望使用最新技术的用户。Sun公司也对该产品提供一定支持。


Solaris Nevada的核心部分,ON(即OS&Network)和JDS(Java Desktop System)也作为OpenSolaris开放,目前OpenSolaris和Nevada的代码保持同步。

OpenSolaris也出现了很多衍生版本,如Polaris、Nexenta、Schillix和Belenix。其中Polaris已经支持了IBM的PowerPC平台。
简单说,所谓OpenSolaris是一个Sun的开源项目,而Solaris是Sun公司的基于OpenSolaris推出的一个自己的产品。

Solaris和OpenSolaris的关系与Redhat和Fedora的关系是类似的。

OpenSolaris是一个开源项目包括了以CDDL为License的OpenSolaris代码,OpenSolaris开发组织,还有OpenSolaris网站。而Solaris操作系统是Sun公司的一个产品,Solaris从Solaris 10(2005)后的以后版本都将基于OpenSolaris的代码和技术。Solaris也是免费下载,Sun公司提供相应的service packages和regular updates。

# format


Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c1t0d0
          /pci@1c,600000/scsi@2/sd@0,0
       1. c1t1d0
          /pci@1c,600000/scsi@2/sd@1,0
       2. c1t2d0
          /pci@1c,600000/scsi@2/sd@2,0
       3. c1t3d0
          /pci@1c,600000/scsi@2/sd@3,0

如何查看系统内核是32位的还是64位的?

isainfo -b

  

# isainfo -b
64
 

如何查看系统中CPU的数目?

Wikipedia,自由的百科全书

用psrinfo(1M)就可以查看。由于多内核/多线程技术的广泛采用,要查出物理CPU的数目可以使用-vp参数,例如:

# psrinfo -vp
The physical processor has 32 virtual processors (0-31)
UltraSPARC-T1 (cpuid 0 clock 1000 MHz)

UltraSPARC-T1的CPU共有8内核,每内核4个线程,因此如果单用-v参数看到的CPU数目是32个,而不是1个。

 

# psrinfo -vp
The UltraSPARC-IIIi physical processor has 1 virtual processor (0)

阅读(3154) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~