• Ubuntu 14.04 Desktop: Configure Ethernet Without NetworkManager and MAC Address Binding
    Copilot said:

    Ubuntu 14.04 Desktop: Configure Ethernet Without NetworkManager and MAC Address Binding

    In environments where Ubuntu systems are frequently cloned, migrated, or deployed on different hardware, it can be beneficial to manage networking without NetworkManager and avoid binding network interface names to specific MAC addresses.

    This guide explains how to configure networking using the traditional /etc/network/interfaces method while ensuring that Ethernet interfaces remain flexible and hardware-independent.


    Step 1: Remove NetworkManager

    The first step is to uninstall NetworkManager and its associated graphical components. After removal, clean up any unnecessary packages that remain on the system.


    Step 2: Disable MAC-Based Network Interface Binding

    Ubuntu 14.04 uses udev rules to associate network interface names with specific MAC addresses. While this can provide consistency on a single system, it may cause issues when cloning disks or moving systems between different machines.

    Disable the Persistent Network Rule Generator

    Prevent udev from automatically creating MAC-based network interface rules.

    Remove Existing Persistent Network Rules

    Delete any existing network interface mapping rules as well as the cached generator rules. This ensures the system no longer remembers previous MAC-to-interface assignments.


    Step 3: Configure Network Interfaces Manually

    Edit the /etc/network/interfaces file and define the required network interfaces.

    Example configuration:

    auto lo
    iface lo inet loopback

    allow-hotplug eth0
    iface eth0 inet static
        address 192.168.10.90
        netmask 255.255.0.0

    allow-hotplug eth1
    iface eth1 inet static
        address 172.16.8.210
        netmask 255.255.0.0

    This method uses the traditional eth0 and eth1 interface naming convention without requiring MAC address assignments.


    Step 4: Reboot the System

    Restart the system to apply all configuration changes and allow the networking service to initialize using the new settings.


    Step 5: Verify Network Interface Status

    After the reboot, verify that the network interfaces have been detected correctly and that the assigned IP addresses are active.

    You can use either the traditional networking tools or newer Linux networking utilities to check interface status.


    Expected Results

    After completing the configuration:

    • NetworkManager is no longer used for network management.
    • Network interfaces are not tied to specific MAC addresses.
    • Interface names remain in the familiar eth0, eth1, and similar format.
    • The operating system can be cloned or migrated to different hardware without requiring network reconfiguration.
    • Network connectivity becomes available immediately after startup.

    Conclusion

    By disabling MAC-based interface persistence and managing networking through /etc/network/interfaces, Ubuntu 14.04 becomes more portable and easier to maintain across different hardware platforms. This approach is especially useful for virtual machine templates, cloned systems, laboratory environments, and appliance-style deployments where predictable interface names and simplified network configuration are preferred.

    Suggested Post Titles

    • Ubuntu 14.04: Configure Ethernet Without NetworkManager or MAC-Based NIC Binding
    • How to Disable MAC Address NIC Binding in Ubuntu 14.04
    • Ubuntu 14.04 Network Configuration Using Traditional Ethernet Interfaces
    • Keeping eth0 and eth1 in Ubuntu 14.04 Without NetworkManager
    • Preparing Ubuntu 14.04 for Hardware Cloning and Migration
  • Day 1 – Failed Attempt: In‑Place Legacy to UEFI Conversion

    On the first day, I attempted to convert the existing legacy BIOS disk to a UEFI disk in place.

    First, I used GParted to shrink the boot partition and created an EFI System Partition (ESP) behind the boot partition. Then, I used the gdisk command to convert the partition table from MBR to GPT (UEFI). After the conversion, I ran grub2-install and grub2-mkconfig to reinstall GRUB and generate the grub2.cfg file.

    However, this attempt was not successful, and the legacy disk could not be converted into a bootable UEFI disk.


    Day 2 – Successful Method: Migrating Legacy OS to a UEFI Disk

    On the second day, I used a GParted Live USB stick as a rescue live system to migrate the legacy OS to a UEFI-based CentOS disk. Instead of performing an in-place conversion, I copied all files from the legacy system’s root directory (/) to the UEFI system’s root directory (/).

    This method successfully converted the legacy system into a UEFI system.


    Environment Preparation

    Required Items

    • A GParted Live USB stick
    • A UEFI CentOS 7.9 disk (kernel version 3.10.0-1160.el7.x86_64)
    • A Legacy BIOS CentOS 7.9 disk (kernel version 3.10.0-1160.el7.x86_64)

    Migration Procedure (Commands Shown as Indented Steps)

    The system was booted using the GParted Live USB, and a terminal was opened to perform the migration.

    Step 1: Create mount directories

    sudo mkdir /mnt/legacy_root
    sudo mkdir /mnt/uefi_root


    Step 2: Mount legacy and UEFI root filesystems

    sudo mount /dev/sda2 /mnt/legacy_root
    (where sda is the legacy CentOS disk)

    sudo mount /dev/sdb2 /mnt/uefi_root
    (where sdb is the UEFI CentOS disk)


    Step 3: Back up the UEFI system fstab

    The UEFI CentOS fstab must be preserved because it already contains the correct UEFI partition layout.

    sudo cp /mnt/uefi_root/etc/fstab /mnt/legacy_root/etc/fstab.bk


    Step 4: Clean the UEFI root directory

    All existing files under the UEFI root directory are removed to prepare for migration.

    sudo rm -rf /mnt/uefi_root/*


    Step 5: Migrate legacy system files to the UEFI disk

    All files from the legacy CentOS root directory are copied to the UEFI root directory while preserving ownership, permissions, ACLs, and extended attributes.

    sudo rsync -aAXv /mnt/legacy_root/ /mnt/uefi_root/


    Step 6: Restore the correct fstab on the UEFI system

    The legacy fstab is renamed for reference, and the original UEFI fstab is restored.

    sudo mv /mnt/uefi_root/etc/fstab /mnt/uefi_root/etc/fstab.legacy
    sudo mv /mnt/uefi_root/etc/fstab.bk /mnt/uefi_root/etc/fstab


    Step 7: Reboot and finalize

    sudo reboot

    After rebooting:

    • Remove the legacy CentOS disk
    • Remove the GParted Live USB

    Result

    The migrated UEFI CentOS system booted successfully, confirming that the legacy BIOS system was successfully converted to a UEFI-based system via file-level migration.

  • 日前有台 Win2000 的舊電腦,因為機板壞了所以將硬碟換到另一台備用舊電腦上面。處理完更換機板後無法開機的問題後,也順利的開機裝完所有的驅動程式。當下測試網路連線是正常的,但是搬回原來的工作地點接上網路線。連上網路芳鄰分享資料夾,但卻遲遲沒有回應!!

    接著,Ping 測試網路發現回應不是很快,且有封包丟失的狀況。於是我先去找這條網路線是否有問題。發現這條網路線線材材質不是很好而且線太長了。這條線在要接到 Switch 之前還留了兩團線在天花板上,應該是當時施工的人怕線太短不夠用所留的吧!但…也留的太長了吧~.~

    正當我要去拿工具來將網路線多出來的部份剪掉重接時,有人用NB測試接上這條網路線連線卻都正常,但換把線接回 PC 同樣仍出現封包遺失的問題。

    最後理出個結論:

    因PC使用的是僅有10/100M的內建網路卡,加上網路線太長造成訊號衰減。因舊式網卡對訊號衰減的封包無法接收處理,所以才會有封包移失問題。

    而NB的網卡較新,所以推測它可正常處理訊號衰減的網路封包。因此連線才沒有出錯!

    最後把PC上內建的網卡停用,換上一張PCI擴充的網卡才解決「網路卡卡」的問題。

  • 出至:http://blogger.liaohaha.tw/2013/04/windows-live-mail.html

    最近發現幾台PC上的 windows live mail 突然間都無法正常的收發信件,但其他網路功能都很正常。

    既使點選連線依然沒有效果,只會反覆的出現「您目前是在離線工作的狀況,您現在要連線?」。

    搞了很久才發現問題出在IE上! 打開你的IE瀏覽器,先按一下alt鍵,讓IE上方的功能表出現,接著應該可以看到「IE是處於離線工作的狀態」。

    將離線工作的勾選取消,再回去看你的windows live mail,應該可以正常收發信件了!

    沒事 livemail 幹嘛和 IE 綁那麼近呀!雖然 livemail 需要依存 IE 核心運作,但 livemail 都提示要連線了也按了連線。怎麼還要去管IE到底是不是離線工作 @@"

  • 剛把一台主機版故障的電腦上 Win2000 系統移到另一台備用電腦上,所有的驅動設定都已經抓到了。也設定上去先前的IP位址,關機完後把機子送回去給使用者,他過了一回打電話給我說。IP設定好了之後,只要重開機又會變回去 DHCP 模式!!

    開始找問題,發現 reltek 8139 已沒有此網卡了(在壞掉的舊電腦上),但裝置管理員裏卻還看的到它的存在。而且無法正常移除這個裝置!!

    最後發現,Win2000 安裝了 reltek 8139 的網卡驅動程式與軟體。且對於 Windows2000 來說它是屬於系統開機必要的裝置無法從裝置管理員中移除。須先由新增移除軟體中將reltek的網卡驅動程式先移除之後,才能把已不存在的reltek網卡從裝置管理員中移除。

    在這之後,重開機網卡IP位址就不會再跳回DHCP了。

  • 出至:http://forum8.hkgolden.com/view.aspx?message=4823251&highlight_id=342776

    適用症狀:
    用Chrome播Youtube會有雜音或頓頓的、聲音跟不上畫面的不同步情況等等,或者是瀏覽Flash網頁的時候會很卡、很頓。並且以上症狀換另外一個瀏覽器就沒事。

    解法:
    步驟1. 網址列輸入chrome://plugins/,開啟詳細資訊
    步驟2. 停用chrome內建的flash播放元件

    ## 看來是 chrome 自帶的 flashplayer 搞鬼。

  • Windows 8.1 RTM 的 IE 11,遇到需要安裝 ActiveX 的網站 (例如:公家機關的網站),完全沒辦法安裝,按了安裝也沒反應,加入信任網站也沒辦法,請教應該如何是好??

    Activex 無法在 IE11 上正確執行,需降級為 IE10 ActiveX 才又復活。

    更多問題請見:http://answers.microsoft.com/zh-hant/ie/forum/ie11_pr-windows8_1_pr/windows-81-rtm-%E7%9A%84-ie-11/f5c0b136-acf6-4edb-8f8c-a2604fc01887

  • From: http://stackoverflow.com/questions/14449968/find-string-inside-pdf-with-shell

    Find string inside pdf with shell

    As nicely pointed by Simon, you can simply convert the pdf to plain text using pdftotext, and then, just search for what you’re looking for.

    After conversion, you may use grep, bash regex, or any variation you want:

    while read line; do
    
        if [[ ${line} =~ [0-9]{4}(-[0-9]{2}){2} ]]; then
            echo ">>> Found date;";
        fi
    
    done <<(pdftotext infile.pdf -)
    
  • 出至:http://neo2124.pixnet.net/blog/post/24215272-%E5%8D%B0%E8%A1%A8%E6%A9%9F-%E8%87%AA%E5%AE%9A%E7%9A%84%E7%B4%99%E5%BC%B5%E6%A0%BC%E5%BC%8F%E8%A8%AD%E5%AE%9A-%E5%A6%82%E4%BD%95%E5%82%99%E4%BB%BD%3F

    有時候 user 的電腦掛了,在還原後總是需要重新設定特殊的印表機紙張格式。

    之前處理方式是每次印表機更動一次就Ghost一次,可是負責印表機業務的同事三不五時就要更換新機種,實在是很受不了,而且每Ghost一次就要花個半小時多…實在太累人了啦!!!洋蔥頭動漫-翻桌

    上網 Google了很久終於發現只要將下列機碼中的內容匯出就 ok 了,日後新電腦只要重新匯入 3 秒鐘就可搞定。

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Forms

    匯出:點選 Froms 資料夾,按下右鍵選擇匯出。會匯出紙張自訂格式的註冊檔。

    匯入:將此註冊檔在要加入自訂紙張格式的電腦上執行匯入的動作(直接點兩下註冊檔),將該電腦重新開機後,就能在印表機伺服器設定中,看到這些自訂紙張格式存在裏頭了。減少手工新增這些格式的時間。

    已試過由 WinXP 匯出自訂紙張格式,然後匯入至它台的 WinXP 或 Win7 都沒問題。

  • 參考:http://www.mobile01.com/topicdetail.php?f=300&t=2298156

    win7 x64 網際網路存取打叉,但是可以上網

    有些是藍芽的區網沒連線,或者你有其他的網路裝置或虛擬網卡沒連時,都會有沒在用就把它「停用」就不會出現了。

    今天就是因為 office2013 無法插入線上圖片,原因是一直出現網際網路無法連線,但是電腦又可以上網。只有網際網路存取是打叉的狀態。果然,一停用VirtualPC 所建立的 HostOnly 網路介面卡後,上述兩個問題就一並解決了。同時也解決,先前IE開首頁一直很慢的問題(首頁是google首頁)。

    後記:沒多久,同一台電腦又出現同樣的問題。這次的發現是因為,在 Win7 上不宜直接將 squid 代理伺服器:通透式代理(Transparent Proxy) 設為預設閘道,最好是在IE上設定其為代理伺服器。才不會出現無網路連線的狀態(網際網路打叉的問題)。

在 WordPress.com 上免費建立自己的網站。建立你自己的網站。
免費開始使用