- Download OpenWRT images (squashfs-combined.img) from https://downloads.openwrt.org/releases/
- De-compress by using, "gzip -d <openwrt-xxx-img.gz>"
- Upload to PVE as iso image
- Follow this page for creating an OpenWRT VM, https://optimus-xs.github.io/posts/install-openwrt-in-pve/
- On PVE web UI, add a network interface for temporary WAN access
- On OpenWRT web UI, update software list
- Install quem-ga so that network info can be shown on PVE web UI
- On PVE UI, add LTE dongle to OpenWRT VM
- On OpenWRT, install usbutis for lsusb.
opkg install usbutils - On OpenWRT, install minicom.
opkg install minicom - On OpenWRT, install following packages for Huawei LTD dongle
opkg install comgt-ncm kmod-usb-net-huawei-cdc-ncm usb-modeswitch - Check there are ttyUSBx device nodes
- Follow this page to connect to mobile network, https://techship.com/faq/how-to-activate-the-data-connection-for-huawei-cellular-usb-sticks-ms2372-series-using-the-ncm-network-interface-in-linux/
- On openWRT UI, add a new WAN interface by selecting device as "wwan0" and protocol as "dhcp"
2023年12月28日 星期四
OpenWRT on PVE and using LET dongle for WAN6
2022年11月3日 星期四
Properly add 3rd party app repo to apt source list
wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | apt-key add -
echo "deb http://deb.anydesk.com/ all main" > /etc/apt/sources.list.d/anydesk-stable.list
apt update
apt install anydesk
wget -q0 - https://keys.anydesk.com/repos/DEB-GPG-KEY | gpg --dearmor | sudo tee /usr/share/keyrings/anydesk.gpg
echo "deb [signed-by=/usr/share/keyrings/anydesk.gpg] http://deb.anydesk.com/ all main" | sudo tee /etc/apt/source.list.d/anydesk.list
Reference:
2022年2月25日 星期五
RSYNC backup
Command line for local backup, no compression for faster transfer rate:
#rsync -avhP --verify-append source/folder dest/folder > xyz.log & disown
By using disown rsync process can still running when logout.
2021年2月1日 星期一
Run Zerotier on Ubuntu 20.04 desktop
- Use the following command to install zerotier-one:
sudo snap install zerotier-one
- Use the following command to install zerotier-one:
sudo snap connect zerotier-one:network-control
- Join zerotier virtual network:
sudo zerotier-one:zerotier-cli join <network-id>
2021年1月25日 星期一
Migrate Ubuntu 20.04 on ZFS from 1TB SSD to 2TB SDD
1. Use "gdisk -l /dev/nvme0n1" to list out current partitions.
2. Create an Ubuntu 20.04 LiveUSB and also create a Clonezilla LiveUSB.
3. Boot system from Clonezilla LiveUSB and use it to copy partitions on current 1TB SSD that needs to be preserved. For my case, they are nvme0n1p0 (EFI), nvme0n1p5 (bpool) & nvme0n1p6 (rpool).
4. Install new 2TB SSD into system (remember to disconnect battery while replacing SSD).
5. Boot system from Ubuntu LiveUSB and create partitions that listed from step 1.
6. Boot system from Clonezilla LiveUSB and restore the reserved partitions image.
7. Boot system from Ubuntu LiveUSB and open a Terminal session.
8. On Terminal, import rpool first, "sudo zpool import -d /dev/nvme0n1p6 -R /mnt rpool"
9. Then import bpool, "sudo zpool import -d /dev/nvme0n1p5 -R /mnt bpool"
2021年1月11日 星期一
如何在PVE上修改synoboot.img裡面的grub.conf
本篇是介紹如何在PVE上修改synoboot.img裡面的grub.conf,這樣可以避免DSM把開機USB碟當成外接設備。
synoboot.img的位置應該是在/var/lib/vz/images/{vm_id}/synoboot.img
- 找出可用的loop裝置號碼
# losetup -f - 使用losetup將synoboot.img指定到可用的loop裝置號碼
#losetup -P /dev/loop0 /var/lib/vz/images/{vm_id}/synoboot.img - 掛載第一個partition,就是EFI partition,也是grub.conf所在的位置
#mount /dev/loop0p1 tmp - 已nano編輯grub.conf,改動vid=0x
#nano tmp/grub/grub.conf
Useful References
Misc
- How to delete GRUB files from a Boot EFI partition in Windows 10
- How to install Pipenv & Virtual Environments
- ntfsclone(8) - Linux man page
- 软路由AIO(All In One)ESXi+iKuai+LEDE+黑群晖DSM笔记
ZFS related
- Ubuntu tutorial - Using ZFS Snapshots and Clones
- ZFS Administration, Part XIII- Sending and Receiving Filesystems
- Zrep documentation
- Fast & frequent incremental ZFS backups with zrep
- Automating snapshots with pyznap on Centos 7
- ArchLinux wiki -ZFS
- How to use snapshots, clones and replication in ZFS on Linux
- How to install pyznap
- yboetz/pyznap on github
Xpenology loader
Proxmox VE
- 讓 Proxmox VE 的 ZFS 儲存支援使用 QCOW2
- Proxmox bind mount for OpenVZ – mount storage in a container
- Convert dislocker-file to qcow2
qemu-img convert -f raw -O qcow2 /media/bitlocker/dislocker-file file.qcow2 - Converting between image formats