Web Title:112 學年度 台南市進學國小資訊組112 學年度 台南市進學國小資訊組

2017-09-21 Windows 10 畫面重新繪製的問題

網路管理

整理 Windows 10 這一系列的黑畫面,畫面閃爍的問題,參考以下方式暫時解決。


https://photos.app.goo.gl/CWp7FeSlaDBlgmKP2

2017-07-26 實作 Windows 原生開機虛擬硬碟 (Boot to VHD)

網路管理

實作 Windows 原生開機虛擬硬碟 (Boot to VHD)

目的:將原本位於 Linux 虛擬主機下的 VHD 虛擬硬碟(Windows 作業系統),改以實體方式直接開機,並實作差異硬碟。

  • 將位於 VirtualBox 虛擬主機下的 Windows 虛擬硬碟轉換為 Fixed VHD (固定大小的 VHD)
    $ vboxmanage clonehd 來源.vhd 目的.vhd --format VHD --variant Fixed
    $ vboxmanage clonehd Windows81.vhd 2.vhd --format VHD --variant Fixed
  • 於 Windows 中使用 Visual BCD Editor 編輯 BCD 開機組態資料庫,設定 VHD 開機相關選項。透過此工具修改 Boot\BCD 檔案,如下圖:

  • 準備 Windows 開機程式相關檔案 (bootmgr)

    準備以下相關檔案:
    目的.vhd (如2.vhd)
    Boot\*
    bootmgr
    BOOTNXT
    
  • 使用 GRUB2 啟動 bootmgr
    > insmod part_msdos
    > insmod ntldr
    > insmod ntfs
    > set root='(hd0, msdos6)' # 實際的 bootmgr 所在分割區
    > ntldr /bootmgr
    > boot
    
  • 於 Windows 中實作差異硬碟 (Differential VHD),之後改開機至「差異硬碟 3.vhd」
    > diskpart
    DISKPART> create vdisk file=差異硬碟 parent=基礎硬碟
    DISKPART> create vdisk file=D:\3.vhd parent=D:\2.vhd
    

參考文件:

2017-06-26 於 dcs.tn.edu.tw 安裝 Let's Encrypt 憑證設定

網路管理

於 dcs.tn.edu.tw 安裝 Let's Encrypt 憑證設定

概念上是透過可以執行網頁服務的主機,來處理 Let's Encrypt 的 challenge。使用 FTP 方式掛載 dcs.tn.edu.tw 的檔案系統,讓 dehydrated 程式可以寫入到 dcs.tn.edu.tw 主機的 .well-known 目錄,以利後續 challenge 動作。最後,將產出的私鑰與憑證相關檔案轉換成 *.pfx 格式,匯入至 cloud.tn.edu.tw 平台。

  1. curlftpfs 掛載 dcs.tn.edu.tw 目錄 (以下使用 autofs 自動掛載)

    # vim /etc/auto.misc
    chpsxoops       -fstype=fuse,rw,umask=002       :curlftpfs#ftp\://chpsxoops\\chpsadmin\:密碼\@ftp.dcs.tn.edu.tw
    
    
  2. 建立 .well-known 資料夾,提供放置 challenge 檔案
    # mkdir -p /misc/chpsxoops/site/wwwroot/.well-known/acme-challenge/
    
  3. 設定 .well-known 目錄下的檔案型態為純文字
    # vim /misc/chpsxoops/site/wwwroot/web.config
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <staticContent>
                <mimeMap fileExtension="." mimeType="text/plain" />
            </staticContent>
        </system.webServer>
    </configuration>
    
    
  4. 下載 dehydrated 工具 (原 letsencrypt.sh)
    # cd /etc
    # git clone https://github.com/lukas2511/letsencrypt.sh.git
    
  5. 編輯 config,指定 .well-known 資料夾,並執行 dehydrated 程式
    # vim /etc/letsencrypt.sh/dcs.config
    WELLKNOWN=/misc/chpsxoops/site/wwwroot/.well-known/acme-challenge
    
    # /etc/letsencrypt.sh/dehydrated -c -d chpsxoops.dcs.tn.edu.tw --config /etc/letsencrypt.sh/dcs.config
    # INFO: Using main config file /etc/letsencrypt.sh/dcs.config
    Processing chpsxoops.dcs.tn.edu.tw
     + Checking domain name(s) of existing cert... unchanged.
     + Checking expire date of existing cert...
     + Valid till Sep 24 02:17:00 2017 GMT (Longer than 30 days). Skipping renew!
    
  6. 轉換為 *.pfx 供匯入使用
    # cd /etc/letsencrypt.sh/certs/chpsxoops.dcs.tn.edu.tw
    
    # openssl pkcs12 -export -out /tmp/xoops.pfx -inkey privkey.pem -in cert.pem -certfile chain.pem
    
  7. 匯入憑證 xoops.pfx,包含輸入密碼
  8. 重新啟動 dcs.tn.edu.tw

2017-02-24 實作電腦教室 GNU/Linux 無硬碟系統

網路管理

使用 nbd (Network Block Device) 實作還原系統, 另外使用 NFS 進行更新模式。

實際開機影片:

 

2017-01-07 於 GNU/Linux 上使用 rclone 同步 Google Drive 資料

網路管理

於 GNU/Linux 上除了 grive2 工具以外,尚有 rclone 這個工具來同步 Google Drive 上的資料,使用上與 rsync 更為相近的操作方式,相當直覺也可靠。

定期將遠端資料備份回來進端也是個相當重要的工作。

於 Fedora 24 上,沒有常見的 rpm 或是 repository,則可以直接下載 precompiled binary。

http://rclone.org/install/

使用方式如下:

rclone config

rclone 遠端設定的名稱:/ 近端的目錄

rclone chps:/ /run/media/lyshie/zilla/Private/Google_Drive_CHPS
更多消息

搜尋

活動剪影秀

  • slider image 1
  • slider image 2
  • slider image 3
  • slider image 4
  • slider image 5
  • slider image 6
  • slider image 7
  • slider image 8
  • slider image 9
  • slider image 10
  • slider image 11
  • slider image 12
  • slider image 13
  • slider image 14

準備全國紫錐花盃反毒機器人競賽