Debian 安装之 CPU频率和无线网卡

本文提供了解决Debian操作系统中英特尔无线网卡驱动安装与配置的详细步骤,包括添加仓库、更新包、安装驱动、验证设备、激活无线电及配置无线接口等关键操作,帮助用户解决常见安装问题。

OS: Debian 5.05

Notebook : 东芝 M333 T6600 / Intel Wireless WiFi Link 5100

 


1. 查看内核版本号的方法是:
打印一个终端,输入命令uname -r
2.6.26-2-686

=================================================================================================
2. CPU 降频   [OK]

http://www.linux-wiki.cn/index.php/CPU%E9%A2%91%E7%8E%87%E8%B0%83%E8%8A%82(SpeedStep%2C_PowerNow)
acpi-cpufreq.ko      如果所有的都不行,试试这个,(但2.6.20或以上的内核推荐优先使用该项)

#modprobe acpi-cpufreq

# cd /sys/devices/system/cpu/cpu0
# ls -l



$ cat /proc/cpuinfo | grep MHz

 选择适当的调节器

调节器即Governor,用它来控制CPU频率。可选的有
内核模块     调节器名称     功能
cpufreq_ondemand     ondemand     按需调节,内核提供的功能,不是很强大,但有效实现了动态频率调节
cpufreq_powersave     powersave     省电模式,通常以最低频率运行,
cpufreq_userspace     userspace     用户模式,一些调频工具软件需要在此模式下才能运行
cpufreq_conservative     conservative     “保守”模式,类似于ondemand,但调整相对较缓
N/A     performance     不降频

查看当前的调节器:

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

更改使用的调节器,需要加载相应的内核模块,再更改scaling_governor文件,例如:

# modprobe cpufreq_conservative
# echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor


编辑 /etc/modules ,加入刚才modprobe挂载的内核模块

cpufreq_userspace
cpufreq_ondemand
cpufreq_powersave
cpufreq_conservative
acpi-cpufreq  #请修改为相应的频率调节模块

=================================================================================================

3. Intel Wireless WiFi Link 4965, 5100, 5300, 5350, 5150, 1000, 6000 devices (iwlagn)

[Pending]


http://wiki.debian.org/iwlagn
http://wiki.debian.org/WiFi/HowToUse

Installation

Lenny

   1.

      Add the Debian Backports repository to /etc/apt/sources.list, also including the "non-free" component. For example:

      # Backported packages for Debian Lenny
      deb http://www.backports.org/debian lenny-backports main contrib non-free

   2.

      Update the list of available packages and install the lenny-backports/debian-backports-keyring package:

      # aptitude update
      # aptitude -t lenny-backports install debian-backports-keyring

      As your system does not yet have the GnuPG archive key of the backports.org repository installed, you will be asked to confirm installation of a package from an untrusted repository. Enter Yes when prompted.
   3.

      Install a 2.6.32 kernel image appropriate for your system, along with the lenny-backports/firmware-iwlwifi and wireless-tools packages. For example:

      # aptitude update
      # aptitude -t lenny-backports install linux-image-2.6-$(uname -r | sed 's,.*-,,') firmware-iwlwifi wireless-tools

   4. Restart your system and boot with the newly installed kernel.
   5.

      The necessary kernel module should be automatically loaded. If necessary, it can be manually loaded via:

      $ su
      # modprobe iwlagn

   6.

      Verify your device has an available interface:

      # iwconfig

   7.

      Raise the interface to activate the radio, for example:

      # ifconfig wlan0 up

   8.

      Configure your wireless interface as appropriate.

Squeeze

   1.

      Add a "non-free" component to /etc/apt/sources.list, for example:

      # Debian Squeeze
      deb http://ftp.us.debian.org/debian squeeze main contrib non-free

   2.

      Update the list of available packages and install the firmware-iwlwifi and wireless-tools packages:

      # aptitude update
      # aptitude install firmware-iwlwifi wireless-tools

   3.

      The necessary kernel module should be automatically loaded. If necessary, it can be manually loaded via:

      # modprobe iwlagn

   4.

      Verify your device has an available interface:

      # iwconfig

   5.

      Raise the interface to activate the radio, for example:

      # ifconfig wlan0 up

   6.

      Configure your wireless interface as appropriate.
=====================================================================================
http://wireless.kernel.org/en/users/Download
http://www.linuxidc.com/Linux/2008-10/16308.htm

Requirements for bleeding edge

You need two things:

    *

      A Kernel >= 2.6.25
    * Your kernel headers installed

Please be very sure you have your kernel headers installed before reporting any sort of build issues with this package. This usually will mean having this symlink point to a valid directory with kernel headers in it:

/lib/modules/`uname -r`/build

The exception to this is if you are building the package targeting a kernel you are not running. Users doing this should read the Building for external kernels section.

Additionally, the kernel you're building for needs a valid ".config" file, if it isn't present compat will assume you have PCI, USB and PCMCIA built into your kernel and if not, fail building.

// error
http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2

//error
http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.30/compat-wireless-2.6.30-rc1.tar.bz2

http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/12/compat-wireless-old-2009-12-11.tar.bz2

修改config.mk文件,打开5100无线wifi的支持
CONFIG_IWL5000=y
CONFIG_IWLWIFI_RFKILL=y
编译compat-wireless,并安装和使用make load加载.
make
make install
make load

debian-anne:~# modprobe iwlagn
WARNING: Error inserting iwl4965 (/lib/modules/2.6.26-2-686/kernel/drivers/net/wireless/iwlwifi/iwl4965.ko): Unknown symbol in module, or unknown parameter (see dmesg)
FATAL: Error inserting iwlagn (/lib/modules/2.6.26-2-686/updates/drivers/net/wireless/iwlwifi/iwlagn.ko): Unknown symbol in module, or unknown parameter (see dmesg)

 

dmesg

[  452.369490] iwl4965: disagrees about version of symbol iwl_send_cmd_pdu_async
[  452.369490] iwl4965: Unknown symbol iwl_send_cmd_pdu_async
[  452.369490] iwl4965: disagrees about version of symbol iwl_leds_unregister
[  452.369490] iwl4965: Unknown symbol iwl_leds_unregister
[  452.369490] iwl4965: disagrees about version of symbol ieee80211_beacon_get
[  452.369490] iwl4965: Unknown symbol ieee80211_beacon_get
[  452.369490] iwl4965: Unknown symbol iwl_setup
[  452.369490] iwl4965: disagrees about version of symbol iwl_leds_background
[  452.369490] iwl4965: Unknown symbol iwl_leds_background
[  452.369490] iwl4965: disagrees about version of symbol iwlcore_eeprom_verify_signature
[  452.369490] iwl4965: Unknown symbol iwlcore_eeprom_verify_signature
[  452.369490] iwl4965: disagrees about version of symbol ieee80211_rx_irqsafe
[  452.369490] iwl4965: Unknown symbol ieee80211_rx_irqsafe
[  452.377488] iwlagn: Unknown symbol iwl4965_agn_cfg

======================

 

唉,暂时告一段落,弄根长一点的网线算了。

 

### 获取系统信息的详细方法 为了收集系统信息,包括操作系统版本、内核版本、系统架构、CPU信息、内存大小、硬盘信息、网卡型号、主机名、IP地址、网关、DNS配置、已安装包数量、软件源地址以及待安装MariaDB的版本信息,可以参考以下方法。 #### 操作系统版本内核版本 在Linux系统中,可以通过以下命令获取操作系统的版本内核版本: ```bash uname -r # 获取内核版本 lsb_release -a # 获取发行版详细信息 cat /etc/os-release # 查看操作系统版本信息 ``` 这些命令能够提供关于操作系统的基本信息[^2]。 #### 系统架构 系统架构可以通过以下命令获取: ```bash uname -m # 或者 arch ``` 此命令将返回系统的硬件架构,例如x86_64或arm64[^2]。 #### CPU信息 CPU的详细信息可以通过以下命令查看: ```bash lscpu ``` 此命令会显示CPU的核心数、频率、缓存大小等详细信息。 #### 内存大小 内存使用情况可以通过以下命令获取: ```bash free -h ``` `-h`参数以人类可读的格式显示内存大小。此外,也可以通过Sigar库获取内存信息[^1]。 #### 硬盘信息 硬盘分区磁盘使用情况可以通过以下命令查看: ```bash df -h # 查看磁盘使用情况 fdisk -l # 查看磁盘分区详情 ``` 对于更详细的硬件信息,可以使用`dmidecode`命令[^2]。 #### 网卡型号网络参数 网卡型号可以通过以下命令获取: ```bash lspci | grep -i net ``` 网络接口的基本信息统计信息可以通过以下命令查看: ```bash ifconfig # 或 ip addr show ``` 对于无线网络接口,可以使用以下命令: ```bash iwconfig ``` IP地址、子网掩码广播地址等信息可以通过`ifconfig`或`ip addr`命令获取。网关信息可以通过以下命令查看: ```bash ip route | grep default ``` DNS配置可以通过以下文件查看: ```bash cat /etc/resolv.conf ``` #### 主机名 主机名可以通过以下命令获取: ```bash hostname ``` #### 已安装包数量 在基于Debian的系统中,可以通过以下命令获取已安装包的数量: ```bash dpkg --get-selections | wc -l ``` 在基于RPM的系统中,可以使用以下命令: ```bash rpm -qa | wc -l ``` #### 软件源地址 软件源地址可以在以下文件中找到: ```bash cat /etc/apt/sources.list # Debian/Ubuntu系统 cat /etc/yum.repos.d/*.repo # CentOS/RHEL系统 ``` #### 待安装MariaDB的版本信息 MariaDB的版本信息可以通过其官方网站或软件源中的包名获取。例如,在基于Debian的系统中,可以运行以下命令: ```bash apt-cache policy mariadb-server ``` 在基于RPM的系统中,可以运行以下命令: ```bash yum list mariadb-server ``` ### 使用Java获取系统信息 如果需要通过Java程序获取上述信息,可以使用Sigar库。确保将对应的DLL或SO文件添加到系统目录中[^3]。例如,在Windows系统中,将`sigar-x86-winnt.dll`添加到`C:\WINDOWS\system32`或JDK的`bin`目录中。 ```java import org.hyperic.sigar.Sigar; import org.hyperic.sigar.SigarException; public class SystemInfo { public static void main(String[] args) throws SigarException { Sigar sigar = new Sigar(); System.out.println("OS Name: " + sigar.getOsInfo().getName()); System.out.println("CPU Info: " + sigar.getCpuInfoList()[0].getModel()); System.out.println("Memory Total: " + sigar.getMem().getTotal()); } } ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值