Restore grub on Fedora

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
[Read More]
grub  fedora 

Resize LVM partition

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]

Configure proxy for docker

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)


Flush change and restart service

$ sudo systemctl daemon-reload
$ sudo systemctl restart docker

Configure proxy for ssh

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
[Read More]
ssh  proxy 

Debian repository for EOL version

Update file /etc/apt/sources.list

deb <code_name> main contrib non-free

# For example
# deb 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
debian  apt 

Get md5sum of lines in a file

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
sed  md5sum