Run with QEMU
-
Download
kernel-qemu-4.14.79-stretch
andversatile-pb.dtb
at dhruvvyas90/qemu-rpi-kernel . -
Download Raspbian Stretch at the official site. I use ’lite’ version, but other version should be fine.
Download kernel-qemu-4.14.79-stretch
and versatile-pb.dtb
at dhruvvyas90/qemu-rpi-kernel
.
Download Raspbian Stretch at the official site. I use ’lite’ version, but other version should be fine.
Create a Debian chroot
$ sudo debootstrap <code name> <chroot folder> <apt repo URL>
# Example
$ sudo debootstrap buster ./chroot-buster http://deb.debian.org/debian
Boot to live USB
Mount the partition we want to restore grub (assume /dev/sda1)
sudo mount /dev/sda1 /mnt
# If /boot folder in another partition (assume /dev/sda2)
# you need to mount it too
# sudo mount /dev/sda2 /mnt/boot
This post is obsolete. Please check the new manual at this post
Add negativo17’s repo
$ sudo dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo
Install NVIDIA driver
$ sudo dnf install nvidia-driver nvidia-driver-libs.i686
Create a script file night_mode
#!/bin/sh
night_mode() {
xrandr --output VGA-1 --gamma $1 --brightness $2
}
case $1 in
off) night_mode 1:1:1 1.0 ;;
*) night_mode 1:0.85:0.6 1.0 ;;
esac
Assume we have 2 partitions: /dev/fedora/root
and /dev/fedora/home
, want to reduce the size of root and give it for home.
Boot to live boot USB.
Ensure that partitions are not mounted.
[Read More]Create a systemd drop-in directory for the docker service
$ sudo mkdir -p /etc/systemd/system/docker.service.d
Add proxy configuration into /etc/systemd/system/docker.service.d/http-proxy.conf
(create if not exist)
[Service]
Environment="HTTP_PROXY=<your_proxy>"
Environment="HTTPS_PROXY=<your_proxy>/"
Environment="NO_PROXY=localhost,127.0.0.1"
Flush change and restart service
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
Install ncat
# For Debian 8
$ sudo apt-get install nmap
# For Debian 10
$ sudo apt install ncat
# For Redhat based OS
$ sudo yum install nmap-ncat
# or
$ sudo dnf install nmap-ncat
Update file /etc/apt/sources.list
deb http://archive.debian.org/debian <code_name> main contrib non-free
# For example
# deb http://archive.debian.org/debian squeeze main contrib non-free
Ignore check Release file expired
$ echo 'Acquire::Check-Valid-Until "false";' | sudo tee /etc/apt/apt.conf.d/90ignore-release-date
Use sed
and md5sum
$ sed -n <begin_line>,<end_line>p <file_name> | md5sum
For example, to get checksum from line 2 to line 15 in a file sample.txt
$ sed -n 2,15p sample.txt | md5sum