opensolaris FAQ

本文解答了关于自动化安装系统的常见问题,包括如何切换到静态IP系统、如何检查SPARC客户端是否支持WAN启动、如何下载AI ISO镜像、如何修改清单文件指向所需的仓库等。

Frequently Asked Questions

1. How do I Switch to a Static IP System if I Don't Have Access to the System's Desktop?

The following steps can be used to configure a wired network interface to have a static IP address.

  1. Run the following series of commands:

    # svcadm disable network/physical:nwam
    
    
    # svcadm enable network/physical:default
    
    
    # echo <IP_addr> > /etc/hostname.<ifname>
    
    
    # echo <hostname> > /etc/nodename
    
    
  2. Run the following command:

    # vi /etc/hosts
    
    

    And, append this line to the file:

    <IP_addr> <hostname> <hostname>.local loghost
    

    Then, edit the entries for the loopback addresses, so that these entries contain only 'localhost' as the alias. In other words, edit the line for the '::1' entry to show the following:

    ::1 localhost

    And, edit the line for the 127.0.0.1 entry to show the following:

    127.0.0.1 localhost
  3. Run the following command:

    # vi /etc/netmasks
    
    

    And, append this line to the file:

    <network> <netmask>
    
  4. Run the following commands:

    # ifconfig <ifname> plumb
    
    
    # ifconfig <ifname> <IP_addr> netmask <netmask> up
    
    
  5. If you use DNS to resolve hostnames, perform these additional steps:

    1. Configure the file, /etc/resolv.conf(4) , to work with the DNS servers for your network. You may need to consult your network administrator for this information.

      An example of the /etc/resolv.conf file may look like this:

      domain mycompany.com
             nameserver 192.168.1.118
             nameserver 192.168.2.220 
    2. Run the following command:

      # cp /etc/nsswitch.dns
       /etc/nsswitch.conf
      
      
  6. Configure a default route:

    If your network does not have a discoverable default router, you need to set a static default route on your system. You may need to consult your network administrator for this information.

    To set up a static default route, add your network's default router IP address to the /etc/defaultrouter(4) file as shown in the following commands:

    # echo <default_route_IP_addr> >> /etc/defaultrouter
    
    
    # route add default <default_route_IP_addr>
    
    

2. Does my SPARC Client Support WAN boot?

The automated installer requires WAN boot support for SPARC clients. You can check whether your client open boot prompt supports WAN boot by checking whether network-boot-arguments is a valid variable that can be set in the eeprom. If the variable network-boot-arguments is displayed, or if it returns the output network-boot-arguments: data not available , the open boot prompt supports WAN boot installations.

# eeprom | grep network-boot-arguments


network-boot-arguments: data not available

If there is no output to the above command, then WAN Boot is not supported.

3. Where do I find the AI ISO Image that I Need?

Download an AI ISO image for x86 clients or for SPARC clients from http://www.opensolaris.com/get/ . The automated installer will use this AI ISO image to install the OpenSolaris OS to your client systems.

Store the AI ISO image on your local file system. For example, store the image at /export/aiimages/osol-0906-ai-x86.iso .

4. How do I Modify the Manifest File to Point to Repository of my Choice?

You can modify the following default repository information in the manifest file:

<ai_pkg_repo_default_authority>
     <main url="http://pkg.opensolaris.org" authname="opensolaris.org"/>
</ai_pkg_repo_default_authority>

If your IPS repository is pkg.mycompany.com and the authorization is mycompany.com , change pkg.opensolaris.org to pkg.mycompany.com and opensolaris.org to mycompany.com .

<ai_pkg_repo_default_authority>
     <main url="http://pkg.mycompany.com" authname="mycompany.com"/>
</ai_pkg_repo_default_authority>

5. How do I Install a Particular OpenSolaris Development Build?

Development builds of the OpenSolaris operating system are available in-between releases. See http://www.opensolaris.org/os/downloads/ .

The build number or release of the AI ISO image that you specify in the installadm create-service command with the -s option must be the same build number or release of the OpenSolaris operating system that you specify in the AI manifest.

Check the build number or release for the AI ISO image when you download the image.

In the AI manifest, if you want to install a specific version of the OpenSolaris OS, you can specify the version in the package entire . The IPS repositories include the full FMRI for each version of a package. Use the FMRI string to specify a specific version of the package, entire , in the AI manifest.

The following example specifies that OpenSolaris build 111 be installed to the client.

<ai_manifest name="ai_packages">
     <ai_install_packages>
         <pkg name="entire@0.5.11-0.111"/>
         <pkg name="SUNWcsd"/>
         <pkg name="SUNWcs"/>
         <pkg name="babel_install"/>
         <pkg name="openoffice"/>
         <pkg name="SUNWTcl"/>
     </ai_install_packages>
     <ai_uninstall_packages>
         <pkg name="babel_install"/>
         <pkg name="slim_install"/>
     </ai_uninstall_packages>
</ai_manifest>

6. How do I Locate the Default AI Manifest for an Install Service?

The default AI manifest for each install service is called default.xml . This file is located at /var/ai/<port>/AI_data , where <port> is the port number of the install service. You can use the following procedure to locate this file.

  1. Find the name of the install service that has the default manifest that you want to modify.

    The name of the install service is the name that you provided in the installadm create-service command when you created the install service. If you didn't provide an install service name, the installadm create-service assigned a service name for your service.

    You can view a the list of enabled install services on your subnet by using the following command:

    # /usr/sbin/installadm list
    
  2. Find the port number where this install service is running. You can get your port number using the following command, where <svc_name> is the service name.

    # svccfg svc:/system/install/server:default
     listprop
     AI<svc_name>
    
    

    For example, if the service name is 0906sparc , you can run the following command to get the properties of the 0906sparc :

    # svccfg svc:/system/install/server:default
     listprop
    
     AI0906sparc
    

    Extract the port number from the value, txt_record .


Note - Do not modify the default AI manifest file. You can, however, copy this file and create a new default manifest for an install ervice. For instructions, see How to Replace the Default AI Manifest .


7. How Can I Cleanup a Failed Service?

If installadm create-service fails to create an install service, use the following procedures to clean up.

  1. Run installadm delete-service to remove the failed install service:

    # installadm delete-service [-x
    ] svcname
    
    
  2. If that command fails with the following message:

    The specified service does not exist: <svcname>

    Try the following procedure:

    1. Check if the automated installer webserver had been started for the service.

      First, search for the port number used for the webserver by finding the dns-sd process associated with webserver. An example of how to do this search by using the ps(1) command, and the resulting output, is as follows:

      # ps -ef | grep dns-sd | grep " svc2 "
       \
      root 11216 1 0 Apr 15 pts/2 0:00
       \
      /usr/bin/dns-sd -R svc2 _OSInstall._tcp local
       \
      46502 aiwebserver=192.168.2.1
      
    2. Kill this process, as in this example:

      # kill -9
       11216
      
      

      The example output shows that the webserver for the serivce, svc2 , is being served off of port 46502.

    3. Now search for the webserver process that's associated with this port number, and kill that process. See the following example:

      # ps -ef | grep installadm/webserver | grep 46502
       \
      root 11026 1 1 Apr 15 pts/2 71:35
       \
      /usr/bin/python2.4
       \
      /usr/lib/installadm/webserver -p 46502 /var/ai/46502
      
      # kill -9 11026
      
    4. Now, remove the data directory for the install service, which also has that port number found above, 4652, it its path:

      # rm -rf
       /var/ai/46502
      
      
  3. If you want to delete the target image path directory that was specified for the failed install service, remove the <targetdir> that you use in the installadm create-service command:

    # rm -rf
     targetdir
    
    

As a further step, see 8. How do I Cleanup DHCP Configurations for a SPARC Install Service?

8. How do I Cleanup DHCP Configurations for a SPARC Install Service?

When you run the installadm create-service command with the -i and -c options, the DHCP server is configured . To cleanup the DHCP configurations for a failed or deleted SPARC install service, log into the DHCP Manager and manually remove the DHCP macros for the install service. And, remove any IP addresses that were configured when you created the install service.

For more information, see the dhcpmgr(1M) man page.

9. How do I Run Automated Installations in Debug Verbose Mode?

You can run the installer in verbose debug mode, in order to capture more information about the installation in the install_log file.

When you use the installadm create-service command to create an install service, or you use the installadm create-client command to set up a custom client, these commands populate the install configuration file. For x86 systems, this file is the GRUB menu.lst file. For SPARC systems, this file is the install.conf file. In order to enable debug mode, you need to set the install_debug option to enable in this install configuration file, as per the following instructions.

  • For x86 systems, the menu.lst configuration file is created in the /tftpboot/ directory with one of the following filename formats:

    • If you used the installadm create-service -n <service_name> command, the filename is menu.lst.<service_name> .

    • If you used the installadm create-client -e <mac> command, the filename is menu.lst.01<mac> .

    In this file, the options are provided as kernel parameters, such as the following:

    kernel$ ... -B install_media=...,livessh=enable,install_debug=enable

    Since the install_debug option in the above example is set to enable , the installer will run in verbose debug mode.

  • For SPARC systems, the install.conf file is populated in the ai_image_dest directory when an install service is created by using an installadm create-service command, such as the following:

    # installadm create-service [-n
     svc_name
    ] [-s
     ai_iso_image
    ] ai_image_dest
    
    

    In the install.conf file, the options are defined as name-value pairs, such as the following:

    $ cat <ai_image_dest>/install.conf
    
    
    ...
    install_debug=enable
    
    
    ...

    Since the install_debug option in the above example is set to enable , the installer will run in verbose debug mode.

10. How do I Enable Remote Access to an AI Client by Using ssh ?

You can enable network access to an automated install client by using ssh . You can use this access to remotely observe an installation process.

Enable this access by setting the option, livessh , to enable in the installation configuration file. When this access is enabled, you can log in to the AI client by using the username and password, “jack/jack”.

  • For x86 systems, the menu.lst configuration file is created in the /tftpboot/ directory with one of the following filename formats:

    • If you used the installadm create-service -n <service_name> command, the filename is menu.lst.<service_name> .

    • If you used the installadm create-client -e <mac> command, the filename is menu.lst.01<mac> .

    In this file, the options are provided as kernel parameters, such as the following:

    kernel$ ... -B install_media=...,livessh=enable,install_debug=enable
    

    The livessh option is this excerpt is set to enable .

  • For SPARC systems, the install.conf file is populated in the ai_image_dest directory when an install service is created by using an installadm create-service command such as the following:

    # installadm create-service [-n <service_name>] [-s <ai_iso_image>] <ai_image_dest>

    In the install.conf file, the options are defined as name-value pairs, such as:

    $ cat <ai_image_dest>/install.conf
    
    
    ...
    livessh=enable
    
    
    ...

    The livessh option is this excerpt is set to enable .

11. How do I Boot the Install Environment Without Starting an Installation?

You can boot to single-user mode using -s as an option to the kernel. Use the following instructions:


Caution - Make sure to use the -s option so that an installation will not begin.


  1. Specify the -s option as follows:

    • For a SPARC system, use the following command:

      OK boot net:dhcp -s
      
      
    • For an x86 system, edit the GRUB menu and add the -s option to the kernel line.

  2. Login as root and run the following command:

    svcadm disable auto-installer
    
    

12. How do I Generate Encrypted Passwords?

One method of generating encrypted passwords for the OpenSolaris OS is to create a user of the intended name and password on the OpenSolaris OS, copy the password from the /etc/shadow file between the 1st and 2nd colons of the user's record, and add that information into the 'userpass' or 'rootpass' values in the SC manifest.

See How to Create Custom SC Manifest Files .

13. Is the Automated Installer Backwards Compatible?

No, the OpenSolaris 2009.06 automated installer is not backward compatible with ISO images or automated installer tools from earlier OpenSolaris releases. Use OpenSolaris 2009.06 automated installer tools and procedures with the OpenSolaris 2009.06 operating system and 2009.06 ISO images only.

14. How is the default target disk selected?

You can use the <ai_target_device> tag to specify a particular target disk on which to install the OpenSolaris OS. See Defining an Install Target . If you do not specify a target disk, the automated installer chooses a default target for installing the OpenSolaris OS.

The default target disk is selected as follows:

  1. The installer gets the recommended size for installing the OpenSolaris OS from the AI libraries. Currently, the recommended size is 12 GB.

  2. The installer searches for available disks on the client.


    Note - The installer selects only the following types of disks:

    • For SPARC clients, the installer searches for disks with a VTOC label.

    • For x86 clients, the installer searches for Solaris partitions.


  3. When the first disk is found, the installer checks the size of that disk.

    • If the size is greater than or equal to the recommended size, the installer selects the disk and returns to the installation procedure.

    • If the size is less than the recommended size, the installer goes to the next disk to check the size.

  4. If there is no match, the automated installation fails.

基于51单片机,实现对直流电机的调速、测速以及正反转控制。项目包含完整的仿真文件、源程序、原理图和PCB设计文件,适合学习和实践51单片机在电机控制方面的应用。 功能特点 调速控制:通过按键调整PWM占空比,实现电机的速度调节。 测速功能:采用霍尔传感器非接触式测速,实时显示电机转速。 正反转控制:通过按键切换电机的正转和反转状态。 LCD显示:使用LCD1602液晶显示屏,显示当前的转速和PWM占空比。 硬件组成 主控制器:STC89C51/52单片机(与AT89S51/52、AT89C51/52通用)。 测速传感器:霍尔传感器,用于非接触式测速。 显示模块:LCD1602液晶显示屏,显示转速和占空比。 电机驱动:采用双H桥电路,控制电机的正反转和调速。 软件设计 编程语言:C语言。 开发环境:Keil uVision。 仿真工具:Proteus。 使用说明 液晶屏显示: 第一行显示电机转速(单位:转/分)。 第二行显示PWM占空比(0~100%)。 按键功能: 1键:加速键,短按占空比加1,长按连续加。 2键:减速键,短按占空比减1,长按连续减。 3键:反转切换键,按下后电机反转。 4键:正转切换键,按下后电机正转。 5键:开始暂停键,按一下开始,再按一下暂停。 注意事项 磁铁和霍尔元件的距离应保持在2mm左右,过近可能会在电机转动时碰到霍尔元件,过远则可能导致霍尔元件无法检测到磁铁。 资源文件 仿真文件:Proteus仿真文件,用于模拟电机控制系统的运行。 源程序:Keil uVision项目文件,包含完整的C语言源代码。 原理图:电路设计原理图,详细展示了各模块的连接方式。 PCB设计:PCB布局文件,可用于实际电路板的制作。
【四旋翼无人机】具备螺旋桨倾斜机构的全驱动四旋翼无人机:建模与控制研究(Matlab代码、Simulink仿真实现)内容概要:本文围绕具备螺旋桨倾斜机构的全驱动四旋翼无人机展开研究,重点进行了系统建模与控制策略的设计与仿真验证。通过引入螺旋桨倾斜机构,该无人机能够实现全向力矢量控制,从而具备更强的姿态调节能力和六自由度全驱动特性,克服传统四旋翼欠驱动限制。研究内容涵盖动力学建模、控制系统设计(如PID、MPC等)、Matlab/Simulink环境下的仿真验证,并可能涉及轨迹跟踪、抗干扰能力及稳定性分析,旨在提升无人机在复杂环境下的机动性与控制精度。; 适合人群:具备一定控制理论基础和Matlab/Simulink仿真能力的研究生、科研人员及从事无人机系统开发的工程师,尤其适合研究先进无人机控制算法的技术人员。; 使用场景及目标:①深入理解全驱动四旋翼无人机的动力学建模方法;②掌握基于Matlab/Simulink的无人机控制系统设计与仿真流程;③复现硕士论文级别的研究成果,为科研项目或学术论文提供技术支持与参考。; 阅读建议:建议结合提供的Matlab代码与Simulink模型进行实践操作,重点关注建模推导过程与控制器参数调优,同时可扩展研究不同控制算法的性能对比,以深化对全驱动系统控制机制的理解。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值