2018年2月5日

ubuntu 執行 apt full-upgrade 後出現錯誤訊息的處理方法

執行apt full-upgrade後出現以下的訊息,雖然不影響系統,但是每次有image install時都會出現,覺得有點礙眼,所以就找了一下解決的辦法。
WARNING: missing /lib/modules/4.4.0-87-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-87-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_BSmOjQ/lib/modules/4.4.0-87-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_BSmOjQ/lib/modules/4.4.0-87-generic/modules.builtin: No such file or directory
解決的方法有以下兩種:
  1. 直接去刪除 /var/lib/initramfs-tools 目錄下出問題的initramfs腳本,本例是4.4.0-87-generic,所以就直接刪除4.4.0-87-generic這個檔案。
  2. 執行update-initramfs指令,例如: update-initramfs -d -k 4.4.0-87-generic

2011年5月25日

500 Internal Server Error

今天在Youtube上看影片,突然出現下面這個畫面
原來YouTube是一群猴子在維護的。


2011年5月3日

T1/E1 Pinout (RJ-48C)

T1/E1 wiring may use either a RJ45, DB15 or BNC connectors. The pinout shown uses RJ45 connectors - its formal name is USOC RJ-48C and is defined in ANSI T1-403-1989. T1 is a North America (primarily) digital service providing 1.544 Mbps. E1 is a European/Rest of World standard providing digital service at 2.048 Mbps. CATegory 5(e) cabling is used to provide balanced pairs. The color coding for Cat 5(e) cabling may be 568A or 568B.

RJ45 PinSignalNotes
1RX1 (Ring - negative)
2RX2 (TIP - positive)
3FGND (RX GND)Ground/Shield
4TX1 (Ring - negative)
5TX2 (TIP - positive)
6FGND (TX GND)Ground/Shield
7NCUnused
8NCUnused

2010年10月13日

收到附件檔名為winmail.dat檔時的處理方法

我想有在收信的網友們應該對 "winmail.dat" 檔案不陌生吧?當對方是使用outlook寄信時,往往會收到這個附加檔案,但是這個檔案應該怎麼轉換成Linux能處理的檔案類型呢?Linux裡面有一隻小程式名叫 "tnef",利用這隻小程式就可以把原始的附加檔案給還原回來了。
原來winmail.dat的檔案格式是 Transport Neutral Encapsulation Format 。

2009年10月5日

Cisco Config Class

最近在忙ISMS的事情,對於每週要備份一次全校的Switch Configure總覺得很不耐煩,在萬般無奈下寫了一個Class,之後就可以透過這個Class來自動備份了,有興趣的人也可以到OpenFoundry去下載下來玩玩。內含範例程式及文件說明。

svn co http://svn.openfoundry.org/ciscoconfig ciscoconfig

2008年12月8日

DHCP OPTION 43 for Lightweight Cisco Aironet Access Points Configuration Example

authoritative;
ddns-update-style none;

option time-offset 28800;
option domain-name-servers 140.127.198.1;

#Define Space
option space Cisco_LWAPP_AP;
option Cisco_LWAPP_AP.server-address code 43 = string;

class "Vendor-Identifier" {
match option vendor-class-identifier;
}

subnet 172.17.0.0 netmask 255.255.255.0 {

option routers 172.17.0.254;
option subnet-mask 255.255.255.0;
option domain-name "AP.Example.com";
option broadcast-address 172.17.0.255;

#Wireless Controler IP Address Configure Option
subclass "Vendor-Identifier" "Airespace.AP1200" {
option vendor-class-identifier "Airespace 1200";
vendor-option-space Cisco_LWAPP_AP;
option Cisco_LWAPP_AP.server-address "172.17.10.1";
}

subclass "Vendor-Identifier" "Cisco AP c1500" {
option vendor-class-identifier "Cisco AP c1500";
vendor-option-space Cisco_LWAPP_AP;
option Cisco_LWAPP_AP.server-address "172.17.10.2";
}

subclass "Vendor-Identifier" "Cisco AP c1200" {
option vendor-class-identifier "Cisco AP c1200";
vendor-option-space Cisco_LWAPP_AP;
option Cisco_LWAPP_AP.server-address "172.17.10.3";
}

range dynamic-bootp 172.17.0.1 172.17.0.200;

default-lease-time 43200;
max-lease-time 86400;
}

2008年12月2日

Install Two HP FC1142SR 4Gb PCI-e HBA Card Using QLogic Fibre Channel HBA Driver (qla2xxx-8.02.21) in Ubuntu 8.04.1

Make Provision Driver Building Environment
  1. apt-get install build-essential
  2. apt-get install kernel-package
  3. make sure that can find linux-source tarball (ex: linux-source-2.6.24.tar.bz2) in path: /usr/src
  4. extract and decompress linux-source tarball (ex: tar -xvjf linux-source-2.6.24.tar.bz2)
  5. change directory to /lib/modules/{kernel version} (ex: cd /lib/modules/`uname -r`)
  6. create a link to linux-headers path with the name build. (ex: ln -s /usr/src/`uname -r` build)
  7. create a link to linux-source path with the name build. (ex: ln -s /usr/src/linux-source-2.6.24 source)
Download QLogic Fibre Channel HBA Driver Source Code
  1. change to your home directory
  2. wget ftp://ftp.qlogic.com/outgoing/linux/beta/8.x/qla2xxx-src-v8.02.21.tar.gz
  3. extract and decompress source code tarball file (ex: tar -xvzf qla2xxx-src-v8.02.21.tar.gz)
Modify The Driver Source Code
  1. edit file extras/build.sh at first line "#!/bin/sh" to "#!/bin/bash"
    in Ubuntu Linux the default "sh" had been symbolic linking to "dash", there are some functions can't be executable in build.sh scrip.
  2. edit file qla_def.h, remark line 33 ~ 35.
  3. edit file qla_isr.c,. replace "SA_INTERRUPT|SA_SHIRQ" with "IRQF_DISABLED|IRQF_SHARED" at line 2100.
  4. edit file qla_os.c, add "struct" in front of "kmem_cache *srb_cachep;" at line 40.
  5. remove ones of NULL at line 5723 in file qla_os.c
  6. replace "pci_module_init" with "pci_register_driver" at line 5759 in file qla_os.c
Get ready to build Driver
  1. change user to root.
  2. execute "extras/build.sh" in qla2xxx-8.02.21 directory.
Now You Can Install this Driver, If Everything is O Kay.
  1. execute "extras/build.sh install" to install Driver.
  2. execute "update-initramfs -v -u -k `uname -r`" to update initramfs image.
Reboot System to Test New Initial Ramdisk and Pray It Can Work..... just kindling ^_^

If this Document can help you,
Please
me. Thanks a lot.

精選文章

Ubuntu 20.04 LTS VM syslog 出現 multipathd 錯誤時的處置措施

在 VM 上安裝完 Ubuntu 20.04 LTS 版本後在一次例行性檢查中發現 syslog 中發現一直跳出 multipathd 的錯誤,如下圖 這問題產生的原因是 ESXi 不會產生 udev 必要的資訊,所以 udev 就無法產生出相對應的 /dev/disk/by-i...