WorkingTipsOnfooocusMRE

Steps

Install steps:

git clone https://github.com/MoonRide303/Fooocus-MRE.git
cd Fooocus-MRE
python3 -m venv fooocus_env
source fooocus_env/bin/activate
pip install pygit2==1.12.2
pip install --upgrade pip
pip3 install packaging
source fooocus_env/bin/activate
python entry_with_update.py --listen

OpenWRTWorkingTips2023Nov23

1. release space

disk is almost full:

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.5M      2.5M         0 100% /rom
tmpfs                    60.8M     92.0K     60.8M   0% /tmp
/dev/mtdblock3            3.9M      3.5M    396.0K  90% /overlay
overlayfs:/overlay        3.9M      3.5M    396.0K  90% /

Use following command for getting the size of installed app:

# cat /tmp/list.sh
#!/bin/sh
 
packagelist=$(ls /usr/lib/opkg/info/*.list)
 
for packagelistpath in $packagelist
do
        packagefiles=$(cat $packagelistpath)
        packagename=$(echo $packagelistpath | sed 's/\/usr\/lib\/opkg\/info\///g' | sed 's/\.list//g')
        if [[ -z "$packagefiles" ]]
        then
                packagesizeb=$(opkg info $packagename | grep Size\: | sed 's/Size\:\ //g')
                if [[ -z $packagesizeb ]]
                then
                        echo -e "-.- KB \t\t$packagename"
                else
                        packagesizekb=$(opkg info $packagename | grep Size\: | sed 's/Size\:\ //g' | awk 'END {printf "%.02f\n", $1/1024}')
                        printf '%-16s' "$packagesizekb KB"; printf '%s\n' "$packagename"
                fi
        else
                packagesizekb=$(for file in $packagefiles; do if [[ -f $file ]]; then du -k $file | cut -f1; fi; done | awk '{s+=$1} END {printf "%.02f\n", s}')
                printf '%-16s' "$packagesizekb KB"; printf '%s\n' "$packagename"
        fi
done | sort -n
# /tmp/list.sh
.....

551.00 KB       kmod-fs-ext4
# opkg remove kmod-fs-ext4
Removing package kmod-fs-ext4 from root...
# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.5M      2.5M         0 100% /rom
tmpfs                    60.8M     92.0K     60.8M   0% /tmp
/dev/mtdblock3            3.9M      3.2M    684.0K  83% /overlay
overlayfs:/overlay        3.9M      3.2M    684.0K  83% /
tmpfs                   512.0K         0    512.0K   0% /dev
.....

2. Install zerotier(Router)

Install zerotier:

# opkg update
# opkg install zerotier
Installing zerotier (1.6.5-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.7/packages/mips_24kc/packages/zerotier_1.6.5-1_mips_24kc.ipk
......
# uci commit zerotier

Didn’t configure the network transferring.

3. Install zerotier(vps)

vps is debian, install via:

curl -s https://install.zerotier.com | sudo bash
zerotier-cli  join xxxxxxxxx

4. Install zerotier(company computer)

ArchLinux, install via:

sudo pacman -S zerotier-one
sudo systemctl start zerotier-one
sudo systemctl enable zerotier-one
sudo zerotier-cli join xxxxxx

5. Install zerotier(company workstation)

Ubuntu 22.04, install via:

curl -s https://install.zerotier.com | sudo bash
sudo zerotier-cli join xxxxxx

Then change the config.json’s ip address from ipv6 to zero-tier’s ip address.

WorkingTipsOnBackportOnUbuntu

Steps:

git clone https://github.com/intel-gpu/intel-gpu-i915-backports.git
cd intel-gpu-i915-backports/
git checkout backport/main

Switch to hwe kernel:

$ sudo apt install linux-generic-hwe-22.04
$ uname -r
6.2.0-36-generic

Install packages:

sudo apt install dkms make debhelper devscripts build-essential flex bison mawk

WorkingTipsOnBackPortKernel

Configure repository and install packages:

yum install -y make glibc-devel rpm-build bison flex gawk
dnf config-manager --set-enabled crb
dnf install epel-release
yum install -y dkms

Set the default boot kernel:

# grubby --set-default /boot/vmlinuz-5.14.0-284.30.1.el9_2.x86_64 
# reboot

verification
# uname -r
5.14.0-284.30.1.el9_2.x86_64

Make dkms packages:

cd /root/intel-gpu-i915-backports
vim versions
...
RHEL_9.2_KERNEL_VERSION="5.14.284-1_rc1"
...
make i915dkmsrpm-pkg OS_DISTRIBUTION=RHEL_9.2
ls -l -h /root/rpmbuild/RPMS/x86_64/intel-i915-dkms-1.23.7.17.230608.25.5.14.284.1_rc1-1.x86_64.rpm
-rw-r--r--. 1 root root 2.7M Nov 15 03:02 /root/rpmbuild/RPMS/x86_64/intel-i915-dkms-1.23.7.17.230608.25.5.14.284.1_rc1-1.x86_64.rpm

vagranttips

Vagrantfile definition:

Vagrant.configure("2") do |config|
  config.vm.box = "rockylinux/9"
config.disksize.size = '80GB'

config.vm.provider "virtualbox" do |v|
  v.memory = 81920
  v.cpus = 6
end

end

Should install following plugins:

$ vagrant plugin list
vagrant-disksize (0.1.3, global)
vagrant-libvirt (0.7.0, system)
vagrant-vbguest (0.31.0, global)

Install via vagrant plugin install xxxxxxxxxx
Resize in vm:

cfdisk /dev/sda
xfs_growfs /dev/sda5

On Ubuntu lvm, if you resize the disk, do following:

lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv 
resize2fs /dev/ubuntu-vg/ubuntu-lv