wiki:jazz/08-09-25

Version 14 (modified by jazz, 16 years ago) (diff)

--

2008-09-25

  • [課程] DRBL/Clonezilla 進階課程
    • [小問題] 顯示卡自動偵測到解析度是 1280x768 但是接到 4:3 的螢幕
      00:02.0 VGA compatible controller: Intel Corporation 82Q963/Q965 Integrated Graphics Controller (rev 02)
      
  • Ubuntu 8.04 常見 DRBL 安裝問題
    • 修改 patch
      • /opt/drbl/sbin/drblsrv

        old new  
        34403440    if [ $rc_get_kernel -gt 0 ]; then
        34413441      [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
        34423442      echo "$latest_drbl_kernel_in_rep can NOT be downloaded!!! Something went wrong!"
        3443       echo "Maybe you should check /etc/sources.list or remove the unnecessary kernel block in /var/lib/dpkg/status so that "apt-cache pkgnames $kernel_img_name" can get the downloadable kernel! Then try to run this program again."
         3443      echo "Maybe you should check /etc/apt/sources.list or remove the unnecessary kernel block in /var/lib/dpkg/status so that "apt-cache pkgnames $kernel_img_name" can get the downloadable kernel! Then try to run this program again."
        34443444      echo "Program terminated!!!"
        34453445      [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
        34463446      exit 1
         
        40144014      if [ $RC -gt 0 ]; then
        40154015        [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
        40164016        echo "$latest_drbl_kernel_in_rep can NOT be downloaded!!! Something went wrong!"
        4017         echo "Maybe you should check /etc/sources.list so that "apt-cache pkgnames $kernel_img_name" can get the downloadable kernel! Then try to run this program again."
         4017        echo "Maybe you should check /etc/apt/sources.list so that "apt-cache pkgnames $kernel_img_name" can get the downloadable kernel! Then try to run this program again."
        40184018        echo "Program terminated!!!"
        40194019        [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
        40204020        exit 1
  • [備忘] Ubuntu 沒有 root 預設密碼,雖然有 sudo ,但 sudo 有兩個的困擾:
    • (1) 時間問題(sudo timeout): NTP更新或手動改時間的時候會造成
    • (2) hostname 問題: 如果有改 hostname, sudo 也會失效
  • [小問題] Windows XP 是 FAT32 格式必須轉換到 NTFS 格式
    convert d: /FS:NTFS 
    convert c: /FS:NTFS
    
  • [備忘] 本機加完使用者之後,必須手動跑 YP 的帳號更新
    # make -C /var/yp
    
  • [備忘] 更新 Netboot Image
    # /opt/drbl/sbin/mknic-nbi
    
    • [密技] 如果想要自己加東西到 pxe-initrd 的 initial RAMDisk 的話,可以改 /usr/lib/mkpxeinitrd-net/initrd-skel 的內容,例如想要加 NFSv4 或者把 Lustre、AoE、iSCSI 的網路硬碟,可以改 /usr/lib/mkpxeinitrd-net/initrd-skel/sbin/udhcpc-post 這些程序。
  • [備忘] 為什麼 DRBL Client 的 /root 與 DRBL Server 的 /root 是各自獨立的呢?
    • DRBL Client 的 /root : /tftpboot/nodes/$IP/root
  • [備忘] dcs re-deploy 就是跑 drblpush -c /etc/drbl/drblpush.conf
  • [備忘] DRBL 的更新原則: 如果是 df 顯示出來的目錄讀寫權限是 RW,請重新跑 drblpush (re-deploy) 或用 drbl-cp-host 強制複製到每一台 DRBL Client。drblpush 更新方法包含 rsync 跟直接覆蓋兩種。
  • [備忘] 在 Linux 底下查 BIOS 裡面的 UUID 可以用 dmidecode 套件的 dmidecode 指令,這個 UUID 就可以給 /tftpboot/nbi_img/pxelinux.cfg/ 指定特定機器的 pxelinux 設定用
  • [小技巧] 要查 TFTP Server 的互動要求,可以把 /etc/default/tftpd-hpa 裡的 OPTIONS 加上 -v 參數
    • etc/default/tftpd-hpa

       
      2  OPTIONS="-l -s /tftpboot/nbi_img"
       2 OPTIONS="-v -v -v -l -s /tftpboot/nbi_img"
    • 打開 logging verbosity 之後,重新啟動
      # /etc/init.d/tftpd-hpa restart
      
    • 從/var/log/daemon.log 可以看到 DRBL Client 送過來的 UUID
  • [小技巧] 把 /etc/dhcp3/dhcpd.conf 裡的 log 設定前的 mark 拿掉,就可以在 /var/log/daemon.log 裡看到 DHCP Server 與 DHCP Client 互動的過程
    • etc/dhcp3/dhcpd.conf

       
      37  #log(info, concat("Client ",
      38  #        binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
      39  #        " requests ",
      40  #        binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list),
      41  #        " - ",
      42  #        pick-first-value(option vendor-class-identifier, "no vendor-id"),
      43  #        " - ",
      44  #        pick-first-value(option dhcp-client-identifier, "no dhcp-client-id"))
      45  #   );
       37 log(info, concat("Client ",
       38         binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
       39         " requests ",
       40         binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list),
       41         " - ",
       42         pick-first-value(option vendor-class-identifier, "no vendor-id"),
       43         " - ",
       44         pick-first-value(option dhcp-client-identifier, "no dhcp-client-id"))
       45    );

Attachments (4)

Download all attachments as: .zip