PVE Post install script just quits #1705

Closed
opened 2026-02-05 02:00:46 +03:00 by OVERLORD · 21 comments
Owner

Originally created by @Stooovie on GitHub (Oct 1, 2025).

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

PVE Post install

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

No response

📈 Which Proxmox version are you on?

pve-manager/9.0.10/deb1ca707ec72a89 (running kernel: 6.14.11-2-pve)

📝 Provide a clear and concise description of the issue.

Running the PVE Post Install script just quits without any error or other text after answering Yes to "Start the Proxmox VE Post Install Script (y/n)?"

Running with bash -x -e -u -o pipefail <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.sh)

results in (as a screenshot as it just flashes on screen for half a second)

Image

and then

+ find /etc/apt/sources.list.d/ -maxdepth 1 -name '*.sources'
+ grep -q .
+ check_and_disable_legacy_sources
+ local LEGACY_COUNT=0
+ local listfile=/etc/apt/sources.list
+ [[ -f /etc/apt/sources.list ]]
+ grep -qE '^\s*deb ' /etc/apt/sources.list
+ (( LEGACY_COUNT++ ))

I don't have any other issues with PVE, works and updates just fine.

🔄 Steps to reproduce the issue.

  1. run the script in PVE shell

Paste the full error output (if available).

  • find /etc/apt/sources.list.d/ -maxdepth 1 -name '*.sources'
  • grep -q .
  • check_and_disable_legacy_sources
  • local LEGACY_COUNT=0
  • local listfile=/etc/apt/sources.list
  • -f /etc/apt/sources.list
  • grep -qE '^\s*deb ' /etc/apt/sources.list
  • (( LEGACY_COUNT++ ))

🖼️ Additional context (optional).

No response

Originally created by @Stooovie on GitHub (Oct 1, 2025). ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? PVE Post install ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.sh)" ### ⚙️ What settings are you using? - [ ] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? _No response_ ### 📈 Which Proxmox version are you on? pve-manager/9.0.10/deb1ca707ec72a89 (running kernel: 6.14.11-2-pve) ### 📝 Provide a clear and concise description of the issue. Running the PVE Post Install script just quits without any error or other text after answering Yes to "Start the Proxmox VE Post Install Script (y/n)?" Running with `bash -x -e -u -o pipefail <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/post-pve-install.sh)` results in (as a screenshot as it just flashes on screen for half a second) ![Image](https://github.com/user-attachments/assets/375e159d-f855-401e-95f7-784fa6ca236c) and then ``` + find /etc/apt/sources.list.d/ -maxdepth 1 -name '*.sources' + grep -q . + check_and_disable_legacy_sources + local LEGACY_COUNT=0 + local listfile=/etc/apt/sources.list + [[ -f /etc/apt/sources.list ]] + grep -qE '^\s*deb ' /etc/apt/sources.list + (( LEGACY_COUNT++ )) ``` I don't have any other issues with PVE, works and updates just fine. ### 🔄 Steps to reproduce the issue. 1. run the script in PVE shell ### ❌ Paste the full error output (if available). + find /etc/apt/sources.list.d/ -maxdepth 1 -name '*.sources' + grep -q . + check_and_disable_legacy_sources + local LEGACY_COUNT=0 + local listfile=/etc/apt/sources.list + [[ -f /etc/apt/sources.list ]] + grep -qE '^\s*deb ' /etc/apt/sources.list + (( LEGACY_COUNT++ )) ### 🖼️ Additional context (optional). _No response_
OVERLORD added the bugImplemented in VED waiting push to Main labels 2026-02-05 02:00:46 +03:00
Author
Owner

@MickLesk commented on GitHub (Oct 1, 2025):

dpkg -l whiptail


echo $TERM
=> if dumb or empty: export TERM=xterm-256color


echo "[DEBUG] Running: grep -qE '^\s*deb ' /etc/apt/sources.list"
if grep -qE '^\s*deb ' /etc/apt/sources.list; then
  echo "[DEBUG] Result: found"
else
  echo "[DEBUG] Result: not found"
fi
@MickLesk commented on GitHub (Oct 1, 2025): dpkg -l whiptail --- echo $TERM => if dumb or empty: export TERM=xterm-256color --- ```bash echo "[DEBUG] Running: grep -qE '^\s*deb ' /etc/apt/sources.list" if grep -qE '^\s*deb ' /etc/apt/sources.list; then echo "[DEBUG] Result: found" else echo "[DEBUG] Result: not found" fi ```
Author
Owner

@Stooovie commented on GitHub (Oct 1, 2025):

dpkg -l whiptail

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-======================================================
ii  whiptail       0.52.25-1    amd64        Displays user-friendly dialog boxes from shell scripts


[root@pve ~]# echo $TERM

xterm-256color


[root@pve ~]# echo "[DEBUG] Running: grep -qE '^\s*deb ' /etc/apt/sources.list"
if grep -qE '^\s*deb ' /etc/apt/sources.list; then
  echo "[DEBUG] Result: found"
else
  echo "[DEBUG] Result: not found"
fi
[DEBUG] Running: grep -qE '^\s*deb ' /etc/apt/sources.list
[DEBUG] Result: found

Just to add: I have no issues running other Helper scripts, nor did I have with this one prior to upgrading to PVE 9.

@Stooovie commented on GitHub (Oct 1, 2025): ``` dpkg -l whiptail Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-====================================================== ii whiptail 0.52.25-1 amd64 Displays user-friendly dialog boxes from shell scripts [root@pve ~]# echo $TERM xterm-256color [root@pve ~]# echo "[DEBUG] Running: grep -qE '^\s*deb ' /etc/apt/sources.list" if grep -qE '^\s*deb ' /etc/apt/sources.list; then echo "[DEBUG] Result: found" else echo "[DEBUG] Result: not found" fi [DEBUG] Running: grep -qE '^\s*deb ' /etc/apt/sources.list [DEBUG] Result: found ``` Just to add: I have no issues running other Helper scripts, nor did I have with this one prior to upgrading to PVE 9.
Author
Owner

@MickLesk commented on GitHub (Oct 1, 2025):

What console did you Run?

Have you try the websession?

I See no Issue. The Script Runs and starts

@MickLesk commented on GitHub (Oct 1, 2025): What console did you Run? Have you try the websession? I See no Issue. The Script Runs and starts
Author
Owner

@Stooovie commented on GitHub (Oct 1, 2025):

normally in the PVE shell in the PVE web gui, as always. Weird. I can't use this script. I can use any other just fine.

@Stooovie commented on GitHub (Oct 1, 2025): normally in the PVE shell in the PVE web gui, as always. Weird. I can't use this script. I can use any other just fine.
Author
Owner

@MickLesk commented on GitHub (Oct 1, 2025):

I can build tomorrow another Version in VED, patience

@MickLesk commented on GitHub (Oct 1, 2025): I can build tomorrow another Version in VED, patience
Author
Owner

@MickLesk commented on GitHub (Oct 2, 2025):

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/tools/pve/post-pve-install.sh)"

@MickLesk commented on GitHub (Oct 2, 2025): bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/tools/pve/post-pve-install.sh)"
Author
Owner

@Stooovie commented on GitHub (Oct 2, 2025):

Sadly, the exact same behavior - after answering Yes, it just quits. Super weird. Thanks anyway :)

@Stooovie commented on GitHub (Oct 2, 2025): Sadly, the exact same behavior - after answering Yes, it just quits. Super weird. Thanks anyway :)
Author
Owner

@MickLesk commented on GitHub (Oct 2, 2025):

How you answer?

@MickLesk commented on GitHub (Oct 2, 2025): How you answer?
Author
Owner
@Stooovie commented on GitHub (Oct 2, 2025): https://github.com/user-attachments/assets/835955ac-f4dd-47e7-a290-b5a4dd5c2743
Author
Owner

@MickLesk commented on GitHub (Oct 2, 2025):

whiptail --msgbox "Test message" 10 60
echo "Exit code: $?"

@MickLesk commented on GitHub (Oct 2, 2025): whiptail --msgbox "Test message" 10 60 echo "Exit code: $?"
Author
Owner

@Stooovie commented on GitHub (Oct 2, 2025):

That does display a text box and waits for Enter, yes.

@Stooovie commented on GitHub (Oct 2, 2025): That does display a text box and waits for Enter, yes.
Author
Owner

@MickLesk commented on GitHub (Oct 3, 2025):

Its the Same call but only shorten :D idk, why it exist at your system

@MickLesk commented on GitHub (Oct 3, 2025): Its the Same call but only shorten :D idk, why it exist at your system
Author
Owner

@free-pmx commented on GitHub (Oct 3, 2025):

set -ex

(( i++ ))

echo "Never comes here"
$ bash script
+ ((  i++  ))

$ echo $?
1

This exits at non-zero (outer, so zero inside) (( expr )) simply due to set -e, that's its side effect. There are workarounds like ! (( expr )) or (( expr )) || :, but on its own it will always exit. In this case also (( ++i )) is possible.

@free-pmx commented on GitHub (Oct 3, 2025): ```bash set -ex (( i++ )) echo "Never comes here" ``` ``` $ bash script + (( i++ )) $ echo $? 1 ``` This exits at non-zero (*outer*, so zero *inside*) `(( expr ))` simply due to `set -e`, that's its side effect. There are workarounds like `! (( expr ))` or `(( expr )) || :`, but on its own it will always exit. In this case also `(( ++i ))` is possible.
Author
Owner

@Stooovie commented on GitHub (Oct 3, 2025):

This for some reason closes the connection to the PVE Webgui shell:

TASK ERROR: command '/usr/bin/termproxy 5900 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1

@Stooovie commented on GitHub (Oct 3, 2025): This for some reason closes the connection to the PVE Webgui shell: TASK ERROR: command '/usr/bin/termproxy 5900 --path /nodes/pve --perm Sys.Console -- /bin/login -f root' failed: exit code 1
Author
Owner

@free-pmx commented on GitHub (Oct 3, 2025):

This for some reason closes the connection to the PVE Webgui shell:

That's expected if executed as copy & paste within the interactive shell. I quickly dropped it here, it was meant to represent a script (literally first block put into file named script) then getting invoked explicitly from command-line with bash script.

It's a note for the developer, not testing. :)

If you want to test the amended script, look for the line with:

(( LEGACY_COUNT++ ))

And change it to:

(( ++LEGACY_COUNT ))
@free-pmx commented on GitHub (Oct 3, 2025): > This for some reason closes the connection to the PVE Webgui shell: That's expected if executed as copy & paste within the interactive shell. I quickly dropped it here, it was meant to represent a script (literally first block put into file named `script`) then getting invoked explicitly from command-line with `bash script`. It's a note for the developer, not testing. :) If you want to test the amended script, look for the line with: ``` (( LEGACY_COUNT++ )) ``` And change it to: ``` (( ++LEGACY_COUNT )) ```
Author
Owner

@MickLesk commented on GitHub (Oct 3, 2025):

Thx for hint, ive updated the VED Script. Can you Run again @Stooovie ?

@MickLesk commented on GitHub (Oct 3, 2025): Thx for hint, ive updated the VED Script. Can you Run again @Stooovie ?
Author
Owner

@Stooovie commented on GitHub (Oct 3, 2025):

Perfect! Working now. Thanks guys!

(If you have time, I'd like to know the culprit and why did the script seem to work for everyone else, but absolutely no pressure :) )

@Stooovie commented on GitHub (Oct 3, 2025): Perfect! Working now. Thanks guys! (If you have time, I'd like to know the culprit and why did the script seem to work for everyone else, but absolutely no pressure :) )
Author
Owner

@MickLesk commented on GitHub (Oct 3, 2025):

@michelroegl-brunner can you Push the Change? Im Not an PC (Public Holiday)

@MickLesk commented on GitHub (Oct 3, 2025): @michelroegl-brunner can you Push the Change? Im Not an PC (Public Holiday)
Author
Owner

@michelroegl-brunner commented on GitHub (Oct 3, 2025):

i can.

@michelroegl-brunner commented on GitHub (Oct 3, 2025): i can.
Author
Owner

@free-pmx commented on GitHub (Oct 3, 2025):

@Stooovie

(If you have time, I'd like to know the culprit

https://mywiki.wooledge.org/BashFAQ/105

and why did the script seem to work for everyone else, but absolutely no pressure :) )

It was exiting on the said line, it would exit for everyone, but you would have been the first to have /etc/apt/sources.list file present and report it.

Yours is an upgraded (from PVE8) system and you never ran: apt apt modernize-sources - see here.

This should be reported to Proxmox as they mention it as optional step.

@free-pmx commented on GitHub (Oct 3, 2025): @Stooovie > (If you have time, I'd like to know the culprit https://mywiki.wooledge.org/BashFAQ/105 > and why did the script seem to work for everyone else, but absolutely no pressure :) ) It was exiting on the [said line](https://github.com/community-scripts/ProxmoxVE/blob/ac120510578d4a9595be00deb6d26081a03a6c93/tools/pve/post-pve-install.sh#L200), it would exit for everyone, but you would have been the first to have `/etc/apt/sources.list` file present and report it. Yours is an upgraded (from PVE8) system and you never ran: `apt apt modernize-sources` - see [here](https://wiki.debian.org/SourcesList#Upgrading_to_the_new_format). This should be reported to Proxmox as they mention it as [optional step](https://pve.proxmox.com/wiki/Upgrade_from_8_to_9#Optional:_Modernize_apt_Repository_Sources).
Author
Owner

@Stooovie commented on GitHub (Oct 3, 2025):

thank you so much!

@Stooovie commented on GitHub (Oct 3, 2025): thank you so much!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#1705