Pedra, Papel e Tesoura

17 de outubro de 2020

Instalando Windows 10 no computador de um amigo.

Filed under: Computadores e Internet, Passatempos — Tags:, , , — Yure @ 13:04

Então, eu tinha um notebook aqui que tava dando problema na BIOS. Levei ele nos técnicos e eles não conseguiram resolver o problema. Arrumei um computador novo e passei o antigo pra um amigo, que resolveu a BIOS. Ele então me mandou o PC antigo de volta, mas agora eu não tinha uso pra ele. Então o dei pra minha mãe, que sabe mexer em Linux sem maiores problemas, mas também ela não tinha uso pro computador antigo. Ela passou o notebook pra um amigo meu, que é completamente iniciante em Linux, que era o sistema operacional instalado na máquina.

Uma semana depois, o cara me pede socorro, dizendo que não tava se dando com o Linux. Eu já fui fanático por Linux, mas eu fiquei mais tolerante ao Windows e sugeri instalar Windows no PC do sujeito. Mas por que ele não estava se dando com Linux?

Antes de prosseguir, é preciso entender que Linux é um núcleo, não um sistema operacional completo, que imita as maneiras do Unix sem incorporar código diretamente do Unix. Assim, Linux é usado pra construir sistemas operacionais semelhantes a Unix. Um sistema desses tem quatro componentes fundamentais: o núcleo (no caso, o Linux), bibliotecas de código C, interpretador de comandos e programas. Os outros componentes que formarão o sistema completo junto com o Linux geralmente vêm do projeto GNU, daí os sistemas completos serem também chamados de GNU/Linux. Os que eu já usei foram Ubuntu, Tails (óbvio), Debian, Mint, Manjaro e MX.

A máquina que eu mandei pro sujeito estava com MX. Péssimo pra iniciante. A interface gráfica de usuário não é um componente fundamental de um sistema semelhante a Unix, podendo ser modificada, substituída e até completamente removida. Lembra dos tempos do DOS? Pois então, é a mesma mecânica por trás das primeiras três versões do Windows: antigamente, o Windows era simplesmente uma interface que poderia ser instalada no MS-DOS, PCDOS ou DR-DOS, não um sistema completo. Tanto que o Windows poderia ser instalado e depois removido do DOS sem prejuízo pro sistema. Por causa dessa mecânica, se você não gosta da interface do MX, chamada Xfce, você pode substituí-la por GNOME, KDE ou qualquer outra coisa.

O problema é que o iniciante frequentemente não sabe como fazer isso. No Brasil, o Windows 7 é ainda altamente popular, o que não é uma coisa boa. Por isso, a maioria das pessoas que vem do Windows 7 pro Linux não tem nenhuma noção do que seria um repositório de software, que é por onde administradores de sistemas Linux instalam o que precisam, inclusive interfaces. Então, ele eventualmente perdeu a cabeça e pediu arrego.

Não o culpo. O debate sobre o que é melhor, Linux ou Windows, é um concurso de mijo. O melhor sistema é aquele que melhor atende às suas necessidades como usuário. Se você está disposto a sacrificar estabilidade por personalização e facilidade, você usa Windows. Se você prefere sacrificar alguma facilidade em troca de personalização e estabilidade, você vai de Linux. Se você prefere sacrificar um pouco de personalização pra ter estabilidade e facilidade, vai de MacOS. Se você quer fazer algo completamente alienígena, vai de BSD. Ou aquele dos pôneis. E por aí vai.

Só que instalar Windows naquela máquina foi um pesadelo. Eu não imaginava que eu teria que fazer tanta coisa.

Baixando o Windows e preparando o pen drive.

A melhor parte do Windows 10 é que ele é disponível pra download gratuito no próprio site da Microsoft. Não há necessidade de chaves de ativação ou crack. E, realmente, uma das razões pelas quais eu mudei pra Linux foi que eu não estava disposto a fazer algo ilegal só pra ter um sistema funcional. Eu estava disposto a aprender um sistema novo se isso significasse não quebrar nenhuma lei. Isso, claro, porque eu não tinha dinheiro pra uma cópia legítima do Windows Vista Ultimate, que era o que eu usava na época (num Acer Aspire 5315, imagine só).

Baixar foi fácil. Difícil foi criar um dispositivo arrancável. Em Linux, é facinho criar um pen drive pronto pra uma sessão ao vivo… se o sistema no pen drive também for Linux… Eu tentei criar um pen drive arrancável com Windows da mesma forma que eu faço com Linux. Deu ruim. Não dava boot de jeito nenhum. Tirei a BIOS do modo legacy, botei UEFI. Nada. Habilitei e desabilitei secure boot. Nada com nada. Arre, égua! O que deu errado?

WoeUSB.

Eu não faço ideia de onde estava o problema. Enquanto eu tentava encontrar uma solução, eu achei o WoeUSB. É um programa (basicamente um script) que é feito pra preparar pen drives arrancáveis com Windows em uma máquina com Linux, desde que as dependências fossem satisfeitas. Mas eu só achava ele como código-fonte e através de um arquivo pessoal de pacotes, que é uma coisa do Ubuntu. Eu tô no MX, então não dava pra eu usar um arquivo desses. Procurei pelo WoeUSB nos meus repositórios e não achei. Certo… Continuei tentando de todos os outros jeitos, sem conseguir. Eu já tava preparando minha psique pra enfrentar uma compilação, caso eu tivesse que usar o código-fonte do WoeUSB. Quando tudo deu errado, eu vi que eu teria que usar o código-fonte do WoeUSB. Não tinha pra onde fugir.

Felizmente, eu não precisei compilar nada. O WoeUSB é simplesmente um script que opera programas preexistentes no sistema e, como todo script, basta ser executado pelo Terminal. E pensar que eu poderia ter feito isso desde o começo, me poupando uma tarde de trabalho.

woeusb –device /home/yure/windows /dev/sdb

Deu erro: “você não está executando WoeUSB como root!” Ah, é. Esqueci, desculpa.

sudo woeusb –device /home/yure/windows /dev/sdb

Deu outro erro. Aparentemente, meu pen drive (/dev/sdb) não era um “bloco”. Ou seja: nada podia ser escrito nele. Tá bom, vamos tentar formatá-lo… Formatei e tentei de novo. Mesmo problema. Arre, égua! Tá bom, vamos tentar apagar a tabela de partições do dispositivo. Abri o Gparted, pluguei o dispositivo, selecionei a aba “dispositivo” e apaguei a tabela de partições. Acabei com um grande espaço não alocado, o qual formatei como NTFS. Deixei por isso mesmo e tentei de novo. Desta vez, o negócio escreveu. Deu um erro no finalzinho, mas foi um erro meramente cosmético e que podia ser ignorado.

Reiniciei o computador com o pen drive, agora pronto, plugado no PC. Abriu o GRUB e, a partir do GRUB, o Windows 10 começou o processo de instalação. Pensei: “ah, essa é a gambiarra, então.” Por alguma razão, a minha BIOS não iniciava o Windows pelo pen drive, mas, se você tem Linux instalado na sua máquina, supõe-se que a BIOS pode iniciar o GRUB2, que é o carregador de boot de todos os sistemas Linux modernos. O truque é fazer a BIOS iniciar o GRUB, instalado no pen drive junto com o Windows pelo WoeUSB, e deixar que o GRUB inicie o instalador do Windows. Genial! E que aventura…

O que aprendemos hoje.

1) Nem todo o mundo se dá com Xfce, claro.

2) Métodos utilizados pra gravar Linux num pen drive podem não ser suficientes pra gravar Windows, requerendo métodos especiais.

O método utilizado, passo-a-passo.

1) Ligue o computador no qual você quer instalar o Windows e, enquanto ele liga, entre na BIOS (no meu computador, isso é feito apertando F2 enquanto o logotipo da Acer está na tela).

2) Na BIOS, configure boot de UEFI pra legacy e mude a ordem de boot pra que o USB venha em primeiro lugar.

3) Baixe o Windows 10 no site da MS.

4) Abra um Terminal e instale as dependências do WoeUSB (assumindo que você está usando MX Linux, use o comando sudo apt-get install bash coreutils util-linux grep gawk find grub gparted wget).

5) Baixe o WoeUSB (você baixa ele no Github pelo botão code).

6) Renomeie o Windows que você baixou pra windows.iso e o ponha no seu diretório pessoal, vizinho das outras pastas (Documentos e Downloads, por exemplo).

7) Extraia o conteúdo do zip no qual o WoeUSB veio.

8) Dentro do diretório do WoeUSB há uma pasta chamada sbin e, dentro dela, o script.

9) Abra um terminal nessa localização (botão direito do mouse > abrir terminal aqui).

10) Plugue o pen drive, abra o Gparted, selecione o dispositivo alvo (geralmente /dev/sdb) e, na aba “dispositivo”, crie uma tabela de partições do tipo GPT.

11) Ainda no Gparted, crie uma partição NTFS no espaço não alocado.

12) No terminal que você acabou de abrir, dê o comando sudo woeusb –device ~/windows.iso /dev/sdb (observe que o “/dev/sdb” deve ser substituído de acordo com o nome do seu dispositivo).

13) Espere terminar e reinicie o computador sem tirar o pen drive.

Tô esquecendo alguma coisa? Bom, deu certo, isso é o que importa…

26 de setembro de 2018

Is social justice a legitimate movement?

So these days, the Linux Foundation decided to adopt the Contributor Covenant , which caused great anger in the developer community. The news seem optimistic about it, while the community itself is furious. As the news seem to offer only one side of the story, I would like to offer a Brazilian insight into what is happening in a country that is not my own but that produces a lot of software that I use.

For developers, the code of conduct adopted by the foundation, based on a document produced elsewhere, represents a political intrusion into fully objective and functionality-driven business, in this case programming. The code would, a priori, be unnecessary, since many of its policies are already adopted without its presence. Finally, the code is highly relative and vague, allowing virtually anyone to expel another person from the Linux project with allegations of harassment or discrimination, which may have hurt only feelings. This is aggravated by the fact that the people who contribute most to the code are not minorities, so that people who contribute less can eliminate those who contribute the most. The community argues that this has happened in other large projects that have adopted similar policies, which they summarize as “diversity over skill”, causing deterioration of services provided. The response from the most active developers was threatening to remove the parts of the Linux code that were contributed by them from the project, which would hurt both clients (like me, as I use Manjaro, and Android users) and servers (since most of the popular sites today, even pornographic ones, are powered by Linux).

That is an extreme attitude, but, in my opinion, understandable. I have been thinking about this for some time and I published a short comment elsewhere in English about what is happening and I decided to put these ideas here for my six or so readers. But before going into detail, I have three trans friends and I go as far as referring to them using desired pronouns (although they themselves do not mind being referred to by their biological sex), and although I do not consider myself left, I am not right-leaning either. In fact, still lean left. And that is why I worry about social justice, but not because I think it is good: social justice does not cease to shame the left.

Let me explain: Contributor Covenant allows minority groups to attack major groups for small or even hypocritical reasons, which actually increases the majority’s hatred towards the minorities. This is because social justice has an original sin inherited from feminism, which is the quest for equality by the consideration of just one side of the scale. That is why it is called “feminism”: only women’s problems are taken into account. Everything for feminism is a women’s issue. Men and boys only enter these discourses as oppressive entities, even if real men and boys you meet on the streets are not oppressors. But to make an analogy, can we balance a scale without knowing the contents in the other side, especially when all we do is put more and more weight on the side we priorize? No, the tendency is that the side we pay attention to will become increasingly heavy, eventually tipping the scale to it’s side, rather than balancing it. Social justice is, perhaps inadvertently, the application of the same principle to all minorities. That is why there is no social justice for men, for example.

The point I want to make is that the social justice movement is ruining more and more things because it is not assessing the costs of its actions. Evergreen University lost three teachers, had a 40 percent drop in enrollment, and lost millions of dollars in funds because enraged students expelled a white teacher from the classroom during a special protest day in which no white people could enter the campus. This, of course, is just an example. But does not it seem strange that a movement that preaches equality and justice has approved and perhaps suggested a “special day” in the academic calendar in which no white person, whether student or teacher, could enter the campus? For me, this is hypocrisy, but it is also injustice . Thus, a movement that speaks of social justice gains hypocritical outlines. This legitimizes the reaction of the majority groups. But now comes the key question: How many people who are against these attitudes blame the movement as a political entity and how many people blame the minorities that such a movement claims to protect?

Again, the example of feminism: this movement claims to represent the best interest of all women, although most women are not feminist. Thus, an attack on feminism can be interpreted as an attack on women and is readily labeled as misogyny. The problem is that the use of such language and meanings reinforces the connection between feminism and women in general, giving rise to the emergence of true misogyny. The same is true for social justice. With a movement that behaves this way, the tendency is for more and more people to blame blacks, women, immigrants, trangenders and other minority groups for all the bad things that happen. They do not blame the movement or ideology, but their visible material causes, which are the ones that make up the movement, whose attitudes are generalized, because they claim to act in the best interest of the groups they represent. To check my theory, just look at voting intentions surveys in Brazil: Bolsonaro, leader of the far right, has a serious chance of winning. Thus, the social justice movement strengthens the right wing, because, by acting in a fundamentally unjust and hypocritical way, it feeds reactionary attitudes. And yes, the social justice movement was imported by the Brazilian media and inoculated into the general population, so much so that citizens in a nation where everyone is mixed are able to point out who is “black” and who is “white” when our very genes, which descend from Europeans, Africans and indigenous people, betray these labels. There are no “pure races” in Brazil. Yet, there has never been so much racism here.

Suppose that the protest of the developers takes place and a lot of lines of code are removed from the Linux kernel, we can prepare ourselves for the falency of the Internet. Linux is the safest kernel today, which is why many servers use it. Removing Linux code represents the removal of security from various sectors of the Internet. To illustrate how serious this is, do you remember shellshock ? Well, shellshock was a bug in the GNU Bourne Again Shell , better known as bash , which allowed arbitrary code execution from remote sources by using environment variables. In layman’s language, this means that anyone who discovers a way to pass environment variables to a server would take control of it. This would not have caused the panic it caused if most Internet servers did not run Linux, after all bash is shipped in distributions of that kernel. Imagine if the developers who solved this problem took back the solution they implemented. The vulnerability would return. Thus, with the damage caused by social justice and the rage accumulated against this movement, the population would stand on the side of developers. I would stand by their side, because one should not mix politics and science, politics and programming: that the most skilled be able to contribute, this does not harm diversity, but prioritizing diversity may exclude the skilled. This is meritocracy, but I am forced to admit that it is the meritocracy that made Linux suitable to power Tumblr.

To sum up: social justice as a radical movement acts against the interests of minorities that it claims to represent and, by claiming to act in the best interest of all these minorities, it increases hatred against those minorities at every clearly unjust or hypocritical act, fueling reactionary discourses and giving power to right wing, all because its fundamental premise, of considering only one side without assessing the costs of its actions, harms everyone. So the question I wanted to ask is: Is social justice a legitimate movement? I don’t think so. The social justice movement is likely to be a “false flag” operation. I know this sounds like a conspiracy theory, but just imagine: what if key people in social justice movements are actually proponents of the right, who instrumentalize people from the left to achieve their goals? Maybe I am wrong, but the fact is that social justice has been the right wing’s greatest ally in this decade.

I urge that minorities who stand against the extreme acts of the social justice movement to vocalize their displeasure at these actions, to publicly repudiate what is happening. Again, the example of feminism: more and more women and girls are leaving feminism upon realizing that it is unfair to men and boys, as well as harmful for their desires to build relationships (as more and more men are avoiding women ) . After all, if the public sees that not all minorities are in favor of extremism, the tendency to attack the ideology, not those that are “protected” by such ideology, will be greater, and there will be bilateral pressure against such ideology. It doesn’t mean that minorities should abandon hopes of acceptance, but that no attitude in that direction should be taken without regard to the other side of the scale or without considering the social damage that could be caused as consequence of such attitude (in this case, the implementation of Contributor Covenant by the Linux Foundation may put Linux users at risk with or without the developers’ protest). Second, I humbly ask to the Linux Foundation to create its own code of conduct, rather than adopting one that comes from outside, and that the creation of the code itself should be done in a democratic way, with the voices of the developers being heard in the process, aiming at the best interests of those who use the kernel. In the worst case scenario, fork the kernel. Finally, we all should appraise the consequences of our acts and also of the acts of others, so that we know which brands of activism are worth supporting and which are not. After all, if the consequence of an attitude is harmful even to the one who proposes the attitude, the person is either a fool… or a troll.

3 de janeiro de 2014

Linux Mint Debian Edition 64-bit Cinnamon Edition.

Eu percebi uma coisa: eu não conseguiria passar dez minutos ao lado do meu eu adolescente sem me sentir incomodado; eu falava muito mesmo de religião, mesmo em situações onde isso não cabia. Além do mais, muitas coisas que eu costumava pensar não mais fazem parte do meu sistema atual, então resolvi marcar as opiniões que eu descartei com a palavra-chave “adolescência”. Se você ver essa palavra-chave numa entrada aqui, saiba que já não penso mais da forma como a entrada descreve.

Hoje baixei o Linux Mint e resolvi que mudarei de sistema uma vez por ano, para não ficar muito tempo parado. No dia trinta e um de dezembro de cada ano, dou uma olhada no Distrowatch pra saber qual distribuição é mais popular e então a “testo” por um ano. Hoje não resisti à tentação e brinquei um pouco com o Mint na live session. É muito rápido e suave. Eu achei que Ubuntu era rápido, mas Mint vai muito mais além, especialmente porque estou usando a Debian Edition. Isso mesmo, a versão rolling-release. A principal razão pela qual eu optei pela Debian Edition foi o fato de que eu não preciso reinstalar o sistema a cada semestre porque a versão perderá o suporte; rolling-release é suportado até o projeto morrer. Eu não preciso esperar o novo lançamento da distribuição para obter as versões mais recentes dos programas que eu uso; as versões mais novas são constantemente enviadas. Bom, quase, já que o repositório do Linux Mint Debian Edition só é clonado do Debian Testing uma vez por mês, para que os desenvolvedores tenham tempo de testar tudo. Outra razão é que a versão padrão do Mint é baseada em Ubuntu, o que não é exatamente ruim, mas, no meu caso, é melhor eu evitar; os problemas de lentidão que experimento são muito específicos e podem ter sido herdados pela versão mais recente, Petra.

Mas me foi avisado que o Debian Edition não é tão fácil como o Petra. E de fato as primeiras atualizações quebraram o sistema. Mas isso é fácil de resolver. Se você ficou preso fora da sua conta de usuário porque o Cinnamon não quer mais iniciar depois das atualizações, faça o seguinte:

  1. Na tela em que você digita nome de usuário e senha, aperte Ctrl+Alt+F1 (isso te levará ao tty1, que é uma shell não-gráfica).
  2. Entre nome de usuário e, em seguida, senha do administrador.
  3. Digite sudo apt-get update, acerte enter e digite a senha (se necessário), em seguida enter.
  4. Digite sudo apt-get -f install, acerte enter e digite a senha (se necessário), em seguida enter (isso instalará as dependências faltantes).
  5. As atualizações provavelmente abortaram e não instalaram completamente antes do problema ocorrer, então conserte isso com sudo apt-get upgrade (acerte enter e digite a senha se necessário, em seguida enter).
  6. Finalize com sudo apt-get dist-upgrade, acerte enter e digite a senha (se necessário), em seguida enter.
  7. Limpe o sistema com sudo apt-get clean, sudo apt-get autoclean, sudo apt-get autoremove, que funcionam da mesma forma que as palavras mágicas supracitadas.
  8. sudo reboot.

Eu quebrei o sistema hoje quando ignorei o aviso de que o Linux Mint Debian Edition não é compatível com programas de Ubuntu. A instalação do Xdiagnose removeu um pacote chamado sysvinit, o que me trancou fora do sistema. Tive que formatar. Então, não instale programas para Ubuntu no LMDE, embora seja seguro instalar programas de Debian.

3 de dezembro de 2011

Sutilidade não é necessário.

Filed under: Computadores e Internet, Organizações — Tags:, , , — Yure @ 22:16

Debunking Wine Myths – The Official Wine Wiki.

Enquanto eu lia sobre o Wine na Internet, encontrei esta página que pretende desmascarar os mitos a respeito da tal aplicação. Quando você lê esse tipo de artigo, você espera uma aproximação amigável, que propõe paz e flores, mas aí eu li uma coisa que me rachou de rir:

No. The goal of Wine is a full reimplementation of the Windows API which will make Windows unnecessary.

Enquanto a maioria dos sites tenta usar sutilidade, eufemismos e todas as estratégias possíveis para parecerem amigáveis, o pessoal do Wine deixa claro que eles querem matar o Windows. Não que eu ache isso ridículo, o desejo de matar o Windows reside no fundo do coração de todo o ávido usuário de Linux (mesmo que disfarcemos isso embaixo de sutilidade, ha), mas eles não precisavam jogar assim na cara. Fez o meu dia.

%d blogueiros gostam disto: