A WSL não está funcionando desde a última atualização do Windows

1

Estou usando o bash no Ubuntu no Windows há aproximadamente 1 ano sem problemas. Esta semana, o meu Windows 10 foi atualizado automaticamente e notei o dia depois que todo o meu bash estava meio quebrado e não consigo descobrir o porquê. Normalmente, quando eu estava abrindo, alguns comandos eram executados automaticamente para facilitar minhas tarefas diárias. Aqui está o conteúdo do script que eu adicionei ao meu bashrc;

# Next lines of command are needed for the "history" command that I added in 
my bash
# so I can get a history of commands that I sent.
export HISTTIMEFORMAT="%d/%m/%y %T "

# Adding ssh-key to my keychain each time the terminal is open 
# Next lines are my variables declarations
datestring="Today is $(date)"
welcomestring="Welcome in your VIDERI-ready shell"
firstactionstring="* Adding ssh-key to your keyring..."
# Begin ssh-key adding script
echo "Setting up shell environment..."
sleep 1
clear
echo "Shell environment has been setup successfully"
sleep 1
clear
printf "%*s" $COLUMNS | tr " " "*"
printf "%*s\n" $(((${#welcomestring}+$COLUMNS) / 2)) "$welcomestring"
printf "%*s" $COLUMNS | tr " " "*"
# wanted to add bold effect to Videri string in the welcome string but dont 
know how to do it within
# a "printf" command
# echo -e "******* Welcome in your \e[1mVideri\e[0m-ready shell ********"
printf "%*s\n" $(((${#datestring}+$COLUMNS) / 2)) "$datestring"
echo ""
echo "$firstactionstring"
./xvx.exp

# Asking for a host each time the terminal is launched
./ask_host.sh

em que xvx.exp é:

#!/usr/bin/expect
set timeout 20
set passphrase "**HIDDEN**"
spawn "./keyadding.sh"
expect "Enter passphrase for /mnt/c/HIDDEN/HIDDEN_id_rsa:"
send "$passphrase\r";
interact

e keyadding.sh :

#!/bin/bash
ssh-add /mnt/c/HIDDEN/HIDDEN_id_rsa
exit 0

Então, quando abri meu terminal no dia seguinte à atualização do Win 10, recebi;

 * keychain 2.8.1 ~ http://www.funtoo.org
 * Starting ssh-agent...
 * Warning: can't find id_rsa; skipping

jpbegin@JPB-LENOVO:~$

O que eu acho muito estranho porque não há comando no meu bashrc para despertar o agente.

Então, um dia depois que eu notei o problema, tive a idéia de tentar atualizar o "sistema" no caso de ser um bug do keychain, mas sempre recebo erros ao tentar usar o apt-get upgrade / update;

jpbegin@JPB-LENOVO:~$ sudo apt-get upgrade
[sudo] password for jpbegin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
curl distro-info-data libcurl3-gnutls libgnutls-openssl27 libgnutls30 
libicu55 libmysqlclient20 libpam-systemd libsystemd0 libudev1 mysql-common 
systemd
systemd-sysv udev wget
15 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,163 kB/14.8 MB of archives.
After this operation, 44.0 kB disk space will be freed.
Do you want to continue? [Y/n] y
Err:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd-
sysv amd64 229-4ubuntu20
404  Not Found [IP: 91.189.88.162 80]
Err:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpam-
systemd amd64 229-4ubuntu20
404  Not Found [IP: 91.189.88.162 80]
Err:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libsystemd0 
amd64 229-4ubuntu20
404  Not Found [IP: 91.189.88.162 80]
Err:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd 
amd64 229-4ubuntu20
404  Not Found [IP: 91.189.88.162 80]
Err:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 udev amd64 
229-4ubuntu20
404  Not Found [IP: 91.189.88.162 80]
Err:6 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libudev1 
amd64 229-4ubuntu20
404  Not Found [IP: 91.189.88.162 80]
E: Failed to fetch 
http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd-sysv_229-
4ubuntu20_amd64.deb 404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch 
http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/libpam-systemd_229-
4ubuntu20_amd64.deb 404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch 
http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/libsystemd0_229-
4ubuntu20_amd64.deb 404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch 
http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/systemd_229-
4ubuntu20_amd64.deb 404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch 
http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/udev_229-
4ubuntu20_amd64.deb 404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch 
http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_229-
4ubuntu20_amd64.deb 404  Not Found [IP: 91.189.88.162 80]

E: Unable to fetch some archives, try running apt-get update or apt-get --
fix-missing.
jpbegin@JPB-LENOVO:~$

No dia em que notei o problema, tive que executar o Ubuntu em uma VM para refazer o particionamento de um "cartão SD do Linux". Ao mesmo tempo, abri o bash no Ubuntu e notei o problema. Infelizmente, não tenho habilidade suficiente para estabelecer se é relacionado ou não.

Editar da resposta Resposta:

@derHugo heres as fontes:

jpbegin@JPB-LENOVO:~$ cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe 
multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted 
universe multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted 
universe multiverse
deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial 
stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu 
xenial stable

Agora está funcionando (apt-get), então eu acho que eles tiveram problemas com seus servidores

@ user68186 Eu fiz o download da loja do Windows depois de ver o seu comentário, mas parece ser outro shell. O que estou usando veio desse procedimento; link mas isso é bom, quero dizer, eu posso usar o da loja do Windows e refazer toda a minha configuração. Estava apenas curioso para entender o que aconteceu, pois isso pode ajudar muito a minha compreensão.

UPDATE 2017-11-06 @ 14:34 EST : Então, consegui fazer com que os comandos "apt-get" voltassem a funcionar sem nenhuma ação. Mas notei que qualquer terminal (primeiro Ubuntu no terminal do Windows que eu instalei, o segundo da loja do Windows e Cygwin) eu uso agora, eu não consigo fazer o eval ssh-agent funcionar. Eu sempre recebo erros como:

Cygwin:

AzureAD+Jean-PhilippeBegin@JPB-LENOVO ~
$ eval ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-uQWXAWbVAif4/agent.16828; export SSH_AUTH_SOCK;
SSH_AGENT_PID=19756; export SSH_AGENT_PID;
echo Agent pid 19756;

Ubuntu no Windows (a partir do armazenamento do windows)

jpbegin@JPB-LENOVO:~$ eval ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-BWICekqIcWkE/agent.16; export SSH_AUTH_SOCK;
SSH_AGENT_PID=17; export SSH_AGENT_PID;
echo Agent pid 17;

Também percebi que toda vez que eu executo eval ssh-agent , vejo uma instância em execução no Gerenciador de tarefas do Windows. Duvido que isso seja normal, mas corrija-me se estiver errado.

UPDATE 2017-11-06 @ 14:52 EST : Também notei que não há mais id_rsa na minha pasta .ssh , mas não consigo entender o motivo.

Quando tentei usar ssh-add /path/of/key/key , estava sempre recebendo Could not open a connection to your authentication agent. A solução estava aqui: link , mas parece que o agente inteiro ainda não está se comportando como era antes.

    
por Jean-Philippe Bégin 03.11.2017 / 16:28

0 respostas