404 After Unattended Install

Ref: 403 forbidden, first install - #13 by shanix

I have similar symptoms. Only I get a 404 iso 403.
Uninstalling and re-installing seems to work. However, as OP I too would like to run the install unattended.

While re-installing I noticed Cloning https://github.com/pi-hole/AdminLTE.git flying passed.
Could that be the problem?

My first install was using the basic-install.sh --unattended from git clone https://github.com/pi-hole/pi-hole.git.
That doesn't pull in the AdminLTE.git or does it?

It all goes belly up over here
The additional repo(s) need to be cloned here, but when the --unattended option is passed the variable useUpdateVars is made false and in line 1412 it gets decided that the repos don't need cloning.

Unfortunately.

It is part of the installation process to clone the AdminLTE repo (it's the web interface).
An unattended install assumes you have already specified installation options in /etc/pihole/setupVars.conf. It is not possible to install without prompts unless you either have already chosen settings or we choose settings for you.

My use case is as follows:

I Install the OS on a clean SD-card using an unattended installer on a headless Raspberry Pi
I then have several scripts that run automagically at first boot and post-install various packages (also unattended). Part of the unattended installation is to mkdir -p /etc/pihole and scp my version of setupVars from local network storage.
Next, the script git clones the Pi-hole repo.
At this point I would like to also be able to do an unattended installation of Pi-hole on my headless Pi.

So, it would be extremely nice if the entire installation could be done unattended on a virgin headless system.

Are you sure about that?

I've not actually run the unattended install for a while, but you should just be able to pre-populate a setupvars.conf and go from there... BRB, trying it...

Oops typo. should have said "true"

OK, steps I followed:

  1. Start with fresh Pi
  2. sudo mkdir /etc/pihole (no real reason for sudo here other than the installer uses sudo)
  3. Copied setupVars.conf from my production Pi-hole into /etc/pihole on the new Pi.
  4. Tweaked setupVars.conf to suit the new Pi, (Changed IP addresses, disabled DHCP etc)
  5. sudo git clone https://github.com/pi-hole/pi-hole /etc/.pihole
  6. cd /etc/.pihole
  7. sudo bash automated\ install/basic-install.sh --unattended
  8. ???
  9. Profit.

Pi-hole is now installed on my new pi without having to enter any information into whiptail dialogs.

Yep.
Have you tried accessing the http://<pihole-ip>/admin from a browser near you?

::: Checking for existing repository...
:::    Cloning https://github.com/pi-hole/AdminLTE.git into /var/www/html/admin... done!

:flushed:

But line 1435 is skipped.
What is your definition of a "fresh Pi" then? Did it have lighttpd pre-installed?

Freshly flashed SD card, sudo raspi-config run to expand the filesystem, and not a lot else. Maybe an apt-get update && apt-get upgrade chucked in there for good measure.

If useUpdateVars is true (as it is in this case) it will hit L1450 instead.

Remarkable.

I apologize for erroneously blaming Pi-hole.
Will have to investigate further what caused my initial problem.

Everything is running now though and I don't wish to bother the family with another internet outage right now, while dad run's some tests. :wink:

Thanks for your time!

:slight_smile: No problem! Always good to check these things ourselves just in case we've broken something without realising!

1 Like