Technical Anshu
Tutorials Blog
🐧 Setup Recovery

Server Setup Failed Halfway Read the Log Fix It and Rerun Safely

An automated setup that stops halfway feels worse than a manual install failing — the machine did it, not you, so where do you even look? This page gives the calm order: find where it stopped, fix the cause, then decide between continuing and rebuilding.

✍️ Technical Anshu🐧 Linux Server⏱️ 9 minute read
🎥 If the setup in the video ever stops mid-run on your machine, this page is the recovery routine to follow

Automated installs fail for boring reasons: a network cable that was not seated, a mirror that was down, a disk name that differed, an answer file with one wrong line. The good news is that the installer writes down what it was doing when it stopped. Your job is to read that record instead of guessing, because guessing at a half-built server creates a machine nobody fully understands.

Setup log — reading the failure (example)
$ tail -n 30 /var/log/cloud-init.log ... packages installed successfully ... configuring network ... done ERROR: could not reach the package mirror Temporary failure resolving archive host ... setup stopped at stage: software install
A log tail shows the last successful stages and the exact failing one. Your file and wording will differ — read yours, not this example.
1

Step 1 — Find Where It Stopped, Not Why Yet

Every automated setup keeps a log. On cloud-style and first-boot setups it is commonly /var/log/cloud-init.log and the matching output log; installer-based setups keep their log on the install console and in the installer’s log directory. If the machine will not boot at all, boot the install media again and read the log from there.

  1. Read the last 30 lines first: tail -n 30 /var/log/cloud-init.log
  2. Note the last stage that completed and the first error after it — that boundary is where your problem lives
  3. Write the error down word for word; exact wording is what makes a search or a question answerable
2

Step 2 — Match the Failure to Its Usual Cause

Most half-finished setups stop at one of a handful of stages, and each has a short list of usual suspects.

  1. Disk stage: wrong disk name in the answers, a disk smaller than the layout expects, or a leftover partition table — the fix is in the answer file, not on the machine
  2. Network stage: cable or Wi-Fi not up, wrong fixed-IP details, or the router not handing out addresses
  3. Software stage: the package mirror was unreachable or one package name in your list does not exist
  4. Account stage: a malformed key or an illegal character in a username or password field
3

Step 3 — The Honest Truth About Rerunning

Good setup tools are written to be idempotent — running them again skips what is already done and only does what is missing. Package installs and service enables behave this way. But not everything does: a step that creates a user will complain the user already exists; a step that appends a line to a file may append it twice. A rerun is safe when the failing stage and everything after it is all that runs again, or when the recipe is known to check before it acts.

4

Step 4 — Continue, or Rebuild Cleanly

Choose with this rule. Continue when the failure was external (network, mirror, power) and the stages before it are verifiably complete. Rebuild when the failure was in your answers about the disk, accounts or core design — a clean rerun with corrected answers takes minutes on an automated setup, and it gives you a machine whose history you fully know. A patched-up half-install is a debt every future problem will collect on.

🔴 Never fix a half-finished setup by hand-performing the missing stages from memory. Either let the corrected recipe finish the job, or rebuild with it. A server that is half recipe and half improvisation cannot be rebuilt, backed up or debugged with confidence.

🎥 Watch the Full Setup in the Video

Keep this routine beside you the first time you run any automated setup — including the one in the video — and a failure becomes a ten-minute detour instead of a lost evening.

▶️ Watch Full Video
❓ Common Questions (FAQ)

The setup failed before any login existed. How do I read the log?

Boot the machine from the install media again and choose its rescue or shell option, or attach the disk to another Linux machine. The log files sit on the half-installed disk exactly where they would be on a finished system, and they can be read without the server booting.

Can I just run the whole setup again over the half-finished one?

Often yes, and for answer-file installers that is the designed path — the disk stage wipes and starts clean anyway. For first-boot script setups, check whether the steps tolerate a second run. When in doubt, the clean rebuild is the honest answer.

How do I stop the same failure happening on the next machine?

Fix the answer file, not just the machine. If the mirror was down, that is weather; but if a package name was wrong or a disk name differed, the recipe itself needs the correction, plus a note in your own words beside it.

This guide is based on the Technical Anshu video linked above • Stuck on a step? Ask in the video comments — answers come there 🙏