[qubes-users] trouble with apt-get on dabian

I have a somewhat confusing issue with debian-10 updates and would like any suggestions on where to look.

All my fedora templates update just fine. Dom0 updates but it gives some errors through the return pipe.

can’t get terminal type, defaulting to vt100.
please set the TERM env variable.
can’t get terminal type, defaulting to vt100.
please set the TERM env variable.

Debian-10 does not update and gives even more errors:
sudo apt-get update
Err:1 https://deb.debian.org/debian buster InRelease
Invalid response from proxy: can’t get terminal type, defaulting to vt100. please set the TERM env variable. HTTP/1.0 200 Connection established Proxy-agent: tinyproxy/1.10.0 [IP: 127.0.0.1 8082]
Err:2 https://deb.qubes-os.org/r4.0/vm buster InRelease
Invalid response from proxy: can’t get terminal type, defaulting to vt100. please set the TERM env variable. HTTP/1.0 200 Connection established Proxy-agent: tinyproxy/1.10.0 [IP: 127.0.0.1 8082]
Err:3 https://deb.debian.org/debian-security buster/updates InRelease
Invalid response from proxy: can’t get terminal type, defaulting to vt100. please set the TERM env variable. HTTP/1.0 200 Connection established Proxy-agent: tinyproxy/1.10.0 [IP: 127.0.0.1 8082]
Reading package lists… Done
W: Failed to fetch https://deb.debian.org/debian/dists/buster/InRelease Invalid response from proxy: can’t get terminal type, defaulting to vt100. please set the TERM env variable. HTTP/1.0 200 Connection established Proxy-agent: tinyproxy/1.10.0 [IP: 127.0.0.1 8082]
W: Failed to fetch https://deb.debian.org/debian-security/dists/buster/updates/InRelease Invalid response from proxy: can’t get terminal type, defaulting to vt100. please set the TERM env variable. HTTP/1.0 200 Connection established Proxy-agent: tinyproxy/1.10.0 [IP: 127.0.0.1 8082]
W: Failed to fetch https://deb.qubes-os.org/r4.0/vm/dists/buster/InRelease Invalid response from proxy: can’t get terminal type, defaulting to vt100. please set the TERM env variable. HTTP/1.0 200 Connection established Proxy-agent: tinyproxy/1.10.0 [IP: 127.0.0.1 8082]
W: Some index files failed to download. They have been ignored, or old ones used instead.

And whonix updates without any warnings, which is based on debian but uses a different gateway for its downloads, so my suspicion is that somehow sys-firewall is to blame. But what exactly is wrong I am not sure, because fedora uses the same proxy doesn’t it?

Any clues?

Steve

Steve Coleman:

I have a somewhat confusing issue with debian-10 updates and would like any
suggestions on where to look.

All my fedora templates update just fine. Dom0 updates but it gives some
errors through the return pipe.

can't get terminal type, defaulting to vt100.
please set the TERM env variable.

I wonder if your Debian template is messed up somehow, and/or your Updatevm (can be determined by looking at qubes-prefs). If you open a regular terminal session on either, do you get that same warning? If so, you could temporarily switch your UpdateVM's template to Fedora and attempt an update. If the issue still occurs and it's with the template itself, there's probably a more subtle fix but I would switch my AppVMs over to Fedora, delete & reinstall a fresh copy of the Debian template, then switch them back.

Steve Coleman:

I have a somewhat confusing issue with debian-10 updates and would like any
suggestions on where to look.

All my fedora templates update just fine. Dom0 updates but it gives some
errors through the return pipe.

can’t get terminal type, defaulting to vt100.
please set the TERM env variable.

I wonder if your Debian template is messed up somehow, and/or your
Updatevm (can be determined by looking at qubes-prefs). If you open a
regular terminal session on either, do you get that same warning?

It gives this warning/failure from both the qubes manager update and from the command line in the template.

If so,
you could temporarily switch your UpdateVM’s template to Fedora and
attempt an update.

It’s already using the default Fedora temolate, and all the Fedora templates work just fine using the exact same update VM (sys-firewall)

itself, there’s probably a more subtle fix but I would switch my AppVMs
over to Fedora, delete & reinstall a fresh copy of the Debian template,
then switch them back.

I installed the stock Debian-10 rpm yesterday and it also fails to update using the default proxy. The whonix templates based on Debian work because they are using a different update vm.

I really don’t have a clue how all the Fedora templates work using the exact same default update proxy while the Debian ones do not. I have not made any deliberate custom modifications to any of the update settings, but something obviously changed.

My suspicion is on the receiving side proxy configuration in sys-firewall but I don’t know how to debug that. With the TERM setting being complained about I am wondering how this proxy is being launched without a full set of environment variables. This error text is in red, as coming through the pipe, so its on the other side, not in the template itself. The update pipe is not a terminal afaik so I don’t know why the proxy would be complaining it doesn’t know the terminal type. But then why does the Fedora update still work and Debian not using the exact same update gateway. Very odd.

Steve Coleman:

I installed the stock Debian-10 rpm yesterday and it also fails to update
using the default proxy. The whonix templates based on Debian work because
they are using a different update vm.

I really don't have a clue how all the Fedora templates work using the
exact same default update proxy while the Debian ones do not. I have not
made any deliberate custom modifications to any of the update settings, but
something obviously changed.

My suspicion is on the receiving side proxy configuration in sys-firewall
but I don't know how to debug that. With the TERM setting being complained
about I am wondering how this proxy is being launched without a full set of
environment variables. This error text is in red, as coming through the
pipe, so its on the other side, not in the template itself. The update pipe
is not a terminal afaik so I don't know why the proxy would be complaining
it doesn't know the terminal type. But then why does the Fedora update
still work and Debian not using the exact same update gateway. Very odd.

I agree, sounds like something broken in sys-firewall given your other UpdateVM is working. You could change your templates to use the same UpdateVM as Whonix if you wanted to confirm. Otherwise, there's nothing special about the sys-firewall AppVM. If you don't mind recreating any firewall rules, try creating a new AppVM and confirm you don't get that TERM warning at the terminal. Next, change anything that points to sys-firewall for networking to the new one, and make it your new UpdateVM?

There is a package in the Fedora distribution that is causing this problem. I switched both my sys-net and sys-firewall to use the new fedora-33 template that was just released and suddenly my Debian-10 could update again. Then I started installing all the packages that I previously had in my fedora-32 template and suddenly my Debian-10 update is broken again.

I then tried to revert back by switching both sys-net/sys-firewall vm’s to the fedora-33-minimal I had available but sys-net would not even boot up using minimal. Switching it again to a default fedora-32 allowed it to boot again. And sys-firewall blocked all network traffic using fedora-33-minimal so again I needed to revert that back to a default fedora-32 to get back online just to write this email.

Apparently, I need to reinstall a new fedora-33 template baseline and painstakingly install all these packages one at a time while restarting Debian-10 to try an ‘apt-get update’ between package installs. Somewhere along the way, it will break and whatever I just installed will be the culprit. I think I’ll be doing a lot of cloning of templates creating checkpoints along the way.

Steve

HI,

Just a "me too" I'm afraid. I installed Fedora 33, and used it for all
the sys-vms, and my sys-net would not connect to wifi - kept displaying
the prompt for the wifi password, even though the password was correct.

Switched back to Fedora 32 on sys-net, and it works OK again.

(I also had my screen freeze at one point - might be due to the i915
driver update. Had this problem a long time ago when using the Arch
distro, but never on Qubes before.)

Just monitoring things for now.

Mike.

The trouble you might be having (Mike) is that the switch possibly led to Network manager thinking that you had a whole other network connection (look for existing network connection & there is often simple fix) that is considered WiFi. The device is best set to the more generic MAC instead of the device name which can become different at the change (drop of a hat) of a template. However the default is often to grab the MAC plus the existing device name which leads to the problem.

Did an update and now it works fine. Silly me.

Mike.

Steve Coleman:

Apparently, I need to reinstall a new fedora-33 template baseline and
painstakingly install all these packages one at a time while restarting
Debian-10 to try an 'apt-get update' between package installs. Somewhere
along the way, it will break and whatever I just installed will be the
culprit. I think I'll be doing a lot of cloning of templates creating
checkpoints along the way.

Good find. Hope my suggestions didn't cost you too much time.

Depending how many packages you're talking about, a binary search might help- install half of them recursively.