Friday, October 1, 2021

Setting up a PiHole on an old Netbook

I used to run my Pi-Hole setup on a Raspberry Pi 3B+.  However I am about to pass the Pi to a family member, therefore I need something to run Pi-Hole on.


I have an old Netbook sitting around which I would like to make it useful again.  Unfortunately its processor is so old and is 32 bit only.  Many Linux distros are now being 64bit only so the options for running a modern OS on the this old computer seems getting slimmer and slimmer till I came around a web article said Debian is still distributing its 32bit version.

I get a copy of the 32bit version of the last Debian (Bullseye) from 

 


 

 http://debian.osuosl.org/debian-cdimage/11.0.0-live/i386/iso-hybrid/

 

After installed Debian, I install Pi-Hole as I would on my Pi using the instructions on the Pi-Hole website.

 https://github.com/pi-hole/pi-hole/#one-step-automated-install

 

Now, here are few things I have done to my install that I didn't do my my Pi before.


1) Disable the power saving features.  This is required to prevent the computer from falling into sleep expectively!

sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target



ref: https://www.unixtutorial.org/disable-sleep-on-ubuntu-server/

 

2) Add kernel parameter reboot=bios to fixed my reboot issue. My Netbook hangs at the stage just before the machine will reboot.   The reboot parameter fixes my problem, e.g.

sudo nano -e /etc/default/grub



Then run update-grub2 to apply the change.


ref: https://www.suse.com/support/kb/doc/?id=000017792

Situation

During a shutdown or reboot the system will shutdown appropriately but at the point where it should power off or begin the reboot it will hang.  The power must be manually turned off or cycled to boot the system back up.

Resolution

The kernel has a "reboot" parameter that will generally fix the problem.  Each of the options can be tested on bootup of the system by adding the parameter to the "Boot Options" in the GRUB menu.  Here is a list of all the options:

warm =  Don’t set the cold reboot flag
cold = Set the cold reboot flag
bios = Reboot by jumping through the BIOS (only for X86_32)
smp = Reboot by executing reset on BSP or other CPU (only for X86_32)
triple = Force a triple fault (init)
kbd = Use the keyboard controller. cold reset (this is the default)
acpi = Use the RESET_REG in the FADT
efi = Use efi reset_system runtime service
pci = Use the so-called “PCI reset register”, CF9
force = Avoid anything that could hang.

3) Edit the fstab to reduce the wear and tear to the SSD caused by EXT4 journal system.  See my another post at:

https://xpwithubuntu.blogspot.com/2020/05/linux-and-ssd.html

 

Hope you find this useful too.