Linux PMS 1.28.1.6018-c1f308c6a Install Error

The issue is here in this line:

...
if [ "$(grep -zi '^container=.\+$' /proc/1/environ )" != "" ]; then
...

If you go to /var/lib/dpkg/info, you can find the script itself.

My concern is container detection is long-stable code. I don’t understand why it would suddenly change.

[chuck@lizum ~.1999]$ cd /var/lib/dpkg/info/
[chuck@lizum info.2000]$ ls plex*
plexmediaserver.list     plexmediaserver.postinst*  plexmediaserver.preinst*
plexmediaserver.md5sums  plexmediaserver.postrm*    plexmediaserver.prerm*
[chuck@lizum info.2001]$
# Independently,  evaluate if in a LXC.  This is used later in installation to avoid UDEV trigger bug
# Look only for a the prefix 'container='.  No further refinement needed as docker already handled above.
if [ "$(grep -zi '^container=.\+$' /proc/1/environ )" != "" ]; then
  LinuxContainer=1
fi

I just opened a LXC. I found it but not sure why yet.

root@media:~# LinuxContainer=0
root@media:~# if [ "$(grep -zi '^container=.\+$' /proc/1/environ )" != "" ]; then
>   LinuxContainer=1
> fi
bash: warning: command substitution: ignored null byte in input
root@media:~# if [ "$(grep -Zi '^container=.\+$' /proc/1/environ )" != "" ]; then   LinuxContainer=1; fi
root@media:~# 


I’m more than rusted about regex, but I think you are trying to find out if there is a variable starts with ā€œcontainer=ā€ ignoring lower or upper cases.
This is how the file looks like in my LXC:

TERM=linuxcontainer=lxccontainer_ttys=pts/1 pts/2

And here is the reason, why there is this warning here:
https://lists.gnu.org/archive/html/bug-bash/2016-09/msg00015.html

here’s what you get from cat /proc/1/environ

root@media:~# cat /proc/1/environ
container=lxcroot@media:~# 

Notice it’s null terminated.

I’m looking for container=.

Reading – Wonderful. Bash changed.

Isn’t this better?

# grep -zq "container=lxc" /proc/1/environ && echo LXC || echo notLXC
LXC

Because in my proc/1/environ (see previous comment) the line with container begins with ā€œlinuxcontainerā€.

I have this LXC on proxmox 7-2.7.

Are the choices Zi or zq ?

Proxmox is its own beast. It’s a BEAR to support and why we can’t

q is just for quiet. i is for ignore upper or lower case. I’m not sure about z…

If you generlize the line, it should just for proxmox LXCs also. nothing to support proxmox specific here.

Do you know a way for me to get Proxmox into a standard (ESXi) VM?

Yeah, just create a normal VM or a VM in Virtualbox.

Here are some links for you:
https://pve.proxmox.com/wiki/Proxmox_VE_inside_VirtualBox

I have VMware Workstation and ESXi (on the big machine). Proxmox is too smart for Workstation.

It should be similar, just create a VM with a minimal storage (1 virtual drive) and install it over a BIOS (or EFI, as it supports it too).

Edit: One more link for ESXi

Any licensing required?

No, you can use community license and the community repositories.

Thanks. I will try this again. Last I tried it was Proxmox 6.

1 Like

It’s even better now. Let me know, if you need something with your proxmox setup.

For the LXC, I used the default debian11 image:
image

I will. I’ll also setup a Ubuntu LXC because that is another common one