Posts in category “Linux”

Running xUbuntu on a SDCard

Finally, I decided to install xUbuntu on a 256GB SDCard as the 16GB built-in emmc drive on a chromebook (Dell P22T) is too small for a desktop system.

Undoubtly, SDCard is slow and easier to be broken. So I took the following actions to the file system and hope they can help solve both issues:

  1. Turning off atime.
  2. Disabling the journal feature.

My New Productivity Hacks

Muscle Memory Makeover

Docker just streamlined Docker Compose by integrating it as a plugin. Great news, but it means us old hats need to retrain our fingers. Here's a quick fix for your .bashrc to keep things smooth:

alias docker-compose='docker compose'

MySQL in a Flash

As a programmer and Linux admin, I juggle multiple MySQL servers with different group suffixes. Typing --defaults-group-suffix every time was a drag. This handy bash function saves the day:

m() {
  mysql --defaults-group-suffix=$1
}

Now, connecting to a database is as easy as:

m specific-suffix

This keeps your workflow concise and saves you precious keystrokes. Put them into you .bashrc or .zshrc now and let our life easier!

Chromebook / Macbook Pro (mid 2010) setup xubuntu 22.04 note

  1. Download xubuntu 22.04 iso
  2. insert usb stick
  3. sudo fdisk -l to check usb stick device name /dev/sdx
  4. Make a bootable usb drive by running
    • dd if=xubuntu.iso of=/dev/sdx bs=1M status=progress
  5. booting from the usb stick and install
  6. Booting into recovery and disable Journal feature if you use a SDCard as your hard disk (important!)
  7. Adding noatime option to disk partitions to improve performance & save your disk's life
  8. Changing font size to 11
  9. Setting the touchpad: disable touchpad while typing
  10. Installing the following packages (use wired network)
    1. sudo apt install firmware-b43-installer curl git vim htop autojump ncdu fonts-inconsolata fonts-ricty-diminished fcitx fcitx-rime
    2. fc-cache -f -v # let new fonts available immediately for applications
    3. install tailscale
    4. install brave browser # the fastest browser on low memory laptop
    5. install neofetch
    6. install Rider Rider can run but it runs so slowly on this aged laptop.
    7. rustdesk

水星/TL-WR703N LEDE 系统配置 shadowsocks + kcptun 全站翻墙备忘

多年前在淘宝买了这个小盒子,只是几十块钱的东西,卖家不但给解了锁,扩了ROM和内存,还给焊了一个USB口。我买它原意是当个旅行路由器,不管到哪个旅店,只要接上网线就能瞬间得到一个无墙的网络, 多好。当初也确实配好了,但因为那时还没有kcptun加速,当时用的vps网络连接也差,总是差强人意。更重要的, 在国内工作这么多年,旅行的次数实在有限,一个手的手指头都用不完, 更不用提很多旅店根本不提供以太网接口了。

不意外,这个小东西就一直闲置了。然而,我又有了要配好它的理由:我近期就要回国一趟,虽然手机可以装翻墙软件,但iOS上我一直没有配好kcptun加速,而 iPhone 是我的主力机,这会不爽。所以,

我今天就搞定了家里这台小破路由器openwrt 的翻墙!为了避免忘掉,在这里记个笔记:

  1. 干净 LEDE 系统,
  2. 因为剩余空间不够(主要是kcptun客户端体积比较大),参考这篇文章搞定了系统 overley 文件系统用U盘扩容。
  3. 用到这些软件包。(如果你也是这款机器,可以从这里 下载我打好包的以下所有软件)
    • kcptun-client_20200409-1_mips_24kc.ipk
    • luci-app-kcptun_1.4.3-1_all.ipk
    • luci-app-kcptun_1.5.3_all.ipk
    • luci-app-shadowsocks_1.9.1-1_all.ipk
    • luci-i18n-kcptun-zh-cn_1.4.3-1_all.ipk
    • luci-i18n-kcptun-zh-cn_git-20.109.30409-d04c89b_all.ipk
    • shadowsocks-libev_3.2.1-1_mips_24kc.ipk
  4. 下载这些软件主要参考了这个仓库 里的 这个链接
  5. 具体配置主要参考了同一他库的README

又, 2022-07-18, 参照 这个仓库 在这个小小的路由器上安装了 tailscale,从此我能自由的访问这个小盒子。我还顺便给它安装了 git,vim 和 python。

Switch Debian from legacy to UEFI boot mode

I updated the Sea BIOS for my DELL Chromebook today, which only supports UEFI boot mode. I don't want to reinstall the system, I thought there must be a way I could convert the legacy mode to UEFI mode. Yes, I found it. this article and this answer helped me out.