Skip to content

Instantly share code, notes, and snippets.

@Ste74
Ste74 / set-chroot.sh
Created June 19, 2024 09:11 — forked from Tamal/set-chroot.sh
Setting up chroot from a live image in Fedora. Regenerate grub2 for Fedora.
$ # Use Live CD to boot
$ sudo su # Switch to root
$ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid
$ mount /dev/mapper/fedora_localhost--live-root /mnt # mount root partition
$ cat /mnt/etc/fedora-release
Fedora release 31 (Thirty One)
$ mount /dev/nvme0n1p2 /mnt/boot # mount boot partition
$ mount /dev/nvme0n1p1 /mnt/boot/efi # mount EFI partition
# Note: If you are not able to mount EFI partition ('Input/Output error'),
# You may have to repair ESP file system or format ESP.
@Ste74
Ste74 / Creating an AUR Package.md
Created January 27, 2022 17:32 — forked from keilmillerjr/Creating an AUR Package.md
How to create and manage an AUR package. #AUR #ARCH #makepkg #PKGBUILD
@Ste74
Ste74 / removeOlderThanDays.sh
Created August 23, 2019 21:04 — forked from hatifnatt/removeOlderThanDays.sh
Simple script to delete files older than specific number of days from FTP
#!/bin/bash
# Simple script to delete files older than specific number of days from FTP. Provided AS IS without any warranty.
# This script use 'lftp'. And 'date' with '-d' option which is not POSIX compatible.
# FTP credentials and path
FTP_HOST="ftp.host.tld"
FTP_USER="usename"
FTP_PASS="password"
FTP_PATH="/ftp/path"
# Full path to lftp executable
@Ste74
Ste74 / Makefile
Created April 17, 2018 16:59 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.