Showing posts with label Arch Linux. Show all posts
Showing posts with label Arch Linux. Show all posts

Friday, September 8, 2023

Arch Linux 2023.09 Brazilian language - Install UEFI or Not

Install Arch Linux 2023.09 x86_64 UEFI (or Not) for Brazilian language.

#loadkeys br-abnt2

#pacman -Syy


Set time:

#timedatectl set-ntp true

If you want to use UEFI, create a disk:

  # fdisk /dev/sda

    Create a GPT partition (option g)

    Create new partitions (option n) with the following specifications:

sda1 - 300MB - Type EFI File System (option 1)
sda2 - 16GB - Type SWAP (option 19)
sda3 - the rest of the disk space - Type Linux Filesystem (root partition) (option 20)

    Finish with (option w)

  # mkfs.fat -F32 /dev/sda1

If you don't want to use UEFI, create a disk:

 # cfdisk /dev/sda

sda1 - 16GB - Type SWAP
sda2 - the rest of the disk space - Type EXT4 (root partition)

  Set sda2 bootable

  save

Regardless of your choice, execute:


# mkswap /dev/<partition of swap>
# swapon /dev/
<partition of swap>

# mkfs.ext4 /dev/<root partition>

# mount /dev/<root partition> /mnt

# pacman-key --init

# pacman-key --populate

 

edit /etc/pacman.conf and uncomment ParallelDownloads = 5

# nano /etc/pacman.conf 

 

ParallelDownloads = 5

 

and Save

# pacstrap -K /mnt linux linux-firmware base base-devel nano

# genfstab -U -p /mnt >> /mnt/etc/fstab

# arch-chroot /mnt

# nano /etc/locale.gen


uncomment a line that you need. ie. pt_BR.UTF-8 UTF-8 and en_US.UTF-8 UTF-8

save

# locale-gen

# ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime

 

# echo LANG=pt_BR.UTF-8 > /etc/locale.conf

# echo KEYMAP=br-abnt2 > /etc/vconsole.conf

# echo FONT=lat1-16 >> /etc/vconsole.conf

# echo FONT_MAP=8859-1 >> /etc/vconsole.conf

# hwclock --systohc

# echo ArchLinux >> /etc/hostname


#passwd

 
# nano /etc/hosts

127.0.0.1  localhost
127.0.1.1  ArchLinux
::1        localhost

save

#pacman -S dhcpcd

#systemctl enable dhcpcd

# mkinitcpio -P
 

If appear WARNING, after finish this tutorial, you need to install firmware modules. Search in AUR.

Microcode Install:
For AMD processors, install the amd-ucode package.
#pacman -S amd-ucode

For Intel processors, install the intel-ucode package.

#pacman -S intel-ucode

#pacman -S grub dosfstools os-prober mtools ntfs-3g freetype2

#nano /etc/default/grub

insert or uncomment

GRUB_DISABLE_OS_PROBER=false

save
 
(in UEFI case)
   #pacman -S efibootmgr

   #mkdir /boot/EFI
 
       #mount /dev/sda1 /boot/EFI #Mount FAT32 EFI partition
 
   #grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck /dev/sda

(NOT in UEFI case)
    #grub-install /dev/sda
 
Regardless of your choice, execute:
 
#grub-mkconfig -o /boot/grub/grub.cfg

#exit

#umount -R /mnt
#reboot


# pacman -S bash-completion openssh rsync exfat-utils mc p7zip zip unrar unarj net-tools

# nano /etc/sudoers

uncomment this line # %wheel ALL=(ALL) ALL

save


User

# useradd -mg users -G wheel -s /bin/bash thiago
# passwd thiago

Install Grafical User Interface - GUI (KDE)

$ sudo pacman -Syu

$ sudo pacman -S xorg

$ sudo pacman -S plasma-meta

$ sudo pacman -S kde-applications-meta

$ sudo systemctl enable sddm

$ sudo systemctl enable NetworkManager

 
Others

$ sudo pacman -S vlc hunspell hunspell-en_GB gimp libreoffice chromium firefox dialog nmap git

For Bluetooth:

# pacman -S blueman
# pacman -S bluez
# pacman -S bluez-hid2hci
# systemctl enable bluetooth.service
# systemctl start bluetooth.service

Tips:
Some programs need to resolve DNS with a limited time and show a timeout error. To resolve this, activate the local DNS resolver.

systemctl enable systemd-resolved.service

Wednesday, February 8, 2023

Arch Linux 'consolefont' build hook warning

 If appears this error in mkinitcpio -P or when you install something:

 
-> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
 

For Brazilian language change /etc/vconsole.conf

KEYMAP=br-abnt2

FONT=lat1-16

FONT_MAP=8859-1


Source: IEC_8859, MAN Arch Linux

Monday, February 14, 2022

Arch Linux Retore Grub - UEFI or Not

ArchLinux Retore Grub - UEFI or Not

#loadkeys br-abnt2

# mount /dev/<root partition> /mnt

#arch-chroot /mnt

#nano /etc/default/grub

insert or uncomment

GRUB_DISABLE_OS_PROBER=false

save

(in UEFI case)

  #mount /dev/sda1 /boot/EFI #Mount FAT32 EFI partition


  #grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck /dev/sda
 

 (NOT in UEFI case)

    #grub-install /dev/sda
 
Regardless of your choice, execute:
 

#grub-mkconfig -o /boot/grub/grub.cfg

#umount -R /boot/EFI

#exit
#umount -R /mnt
#reboot

Friday, January 14, 2022

To clear the package cache in Arch Linux

 To clear the package cache in Arch Linux

  • Check how many cached packages are available in your cache folder and the occupied size:
$ sudo ls /var/cache/pacman/pkg/ | wc -l
$ du -sh /var/cache/pacman/pkg/ 
  •  Use the pacman command to remove all uninstalled packages that are still in cache:
$ sudo pacman -Sc
  • To completely remove all packages (whether they are installed or uninstalled) from the cache:
$ sudo pacman -Scc
 
Font: OSTechNix

Thursday, November 11, 2021

Touchpad Problems Arch Linux

Touchpad without clicking in Arch Linux

Check that xf86-input-synaptics has been installed:

# pacman -Ss xf86-input-synaptics

otherwise, install it:

# pacman -S xf86-input-synaptics

But if you included the package and it didn't work:

Edit file /etc/default/grub

# nano /etc/default/grub

add in line GRUB_CMDLINE_LINUX_DEFAULT: pci=nocrs

save

Execute: # update-grub

reboot

pci=nocrs => Discard pci ACPI information. May fix boot problems.

Monday, August 16, 2021

Proxy to Command-line

These proxy server settings are used by the almost all Linux command-line utilities: ftp, wget, curl, ssh, apt, pacman, yum and others.

 

Edit the file /etc/profile and add this lines:


# vi /etc/profile

http_proxy="http://myproxy.com:port"
HTTP_PROXY="http://myproxy.com:port"
https_proxy="http://myproxy.com:port"
HTTPS_PROXY="http://myproxy.com:port"
ftp_proxy="http://myproxy.com:port"
FTP_PROXY="http://myproxy.com:port"


Save.


Edit the file /etc/environment and add this lines:

# vi /etc/enviroment

http_proxy="http://myproxy.com:port"
HTTP_PROXY="http://myproxy.com:port"
https_proxy="http://myproxy.com:port"
HTTPS_PROXY="http://myproxy.com:port"
ftp_proxy="http://myproxy.com:port"
FTP_PROXY="http://myproxy.com:port"


Save.

Restart the system.

Thursday, March 4, 2021

Onedrive-Abraunegg "Cannot connect to Microsoft OneDrive Service - Network Connection Issue"

 I use the onedrive-abraunegg in my ArchLinux, and sometime I get the message:

Cannot connect to Microsoft OneDrive Service - Network Connection Issue


To resolve this, make sure that your local DNS cache is enabled on your system.

$ sudo systemctl is-active systemd-resolved.service


To active:

$ sudo systemctl enable systemd-resolved.service

$ sudo systemctl start systemd-resolved.service



To clear the Systemd Resolved DNS cache:

sudo systemd-resolve --flush-caches



Font: GeekFlare, Linuxize

Wednesday, November 22, 2017

Fix EXT4-fs error loading journal

If occurs an  EXT4 filesystem error to loading journal, use the e2fsck to solve an inodes problems.

e2fsck is used to check the ext2/ext3/ext4 family of file systems. For ext3 and ext4 filesystems that use a journal, if the system has been shut down uncleanly without any errors, normally, after replaying the committed transactions in the journal, the file system should be marked as clean. Hence, for filesystems that use journalling, e2fsck will normally replay the journal and exit, unless its superblock indicates that further checking is required.

change X for the number os partition (i.e. /dev/sda2)

# e2fsck -C0 -p -f -v /dev/sdaX

used options:

-C fd


This option causes e2fsck to write completion information to the specified file descriptor so that the progress of the filesystem check can be monitored. This option is typically used by programs which are running e2fsck. If the file descriptor number is negative, then absolute value of the file descriptor will be used, and the progress information will be suppressed initially. It can later be enabled by sending the e2fsck process a SIGUSR1 signal. If the file descriptor specified is 0, e2fsck will print a completion bar as it goes about its business. This requires that e2fsck is running on a video console or terminal.

-p


Automatically repair ("preen") the file system. This option will cause e2fsck to automatically fix any filesystem problems that can be safely fixed without human intervention. If e2fsck discovers a problem which may require the system administrator to take additional corrective action, e2fsck will print a description of the problem and then exit with the value 4 logically or'ed into the exit code. (See the EXIT CODE section.) This option is normally used by the system's boot scripts. It may not be specified at the same time as the -n or -y options.

-f


Force checking even if the file system seems clean.

-v


Verbose mode.

Font: e2fsck(8) - Linux man page

Tuesday, January 26, 2010

HP Laserjet 1020 - Arch Linux

Após instalar o Arch Linux em meu Vostro 1310, tentei utilizar minha impressora HP Laserjet 1020, porém não foi possível. Não reconheceu direto.

Instalei o CUPS:

pacman -S cups cups-pdf

e os drivers da hplip:

pacman -S hplip

Feito!

Monday, January 25, 2010

Pacman - Arch Linux

O pacman ajuda muito na hora de instalar algum programa no Arch Linux, do mesmo jeito que o slackpkg me ajudou muito no Slackware.

Abaixo alguns itens mais utilizados no pacman.

pacman -Syu
> atualizar o sistema operacional como um todo.

pacman -Ss abcd
> procura se o pacote abcd existe nos repositórios.

pacman -Sy
> sincroniza a lista local com a lista de pacotes dos repositórios

pacman -R abcd
> remove o pacote abcd e deixa as dependências instaladas

pacman -Rs abcd
>remove o pacote abcd e remove as dependências que não estão sendo utilizadas por outros pacotes

pacman -Rd abcd
>remove o pacote abcd sem verificar as dependências.

Monday, January 4, 2010

Arch Linux 2009.08 em um Vostro 1310

Instalando o Arch Linux 2009.08 em um 
Dell Vostro 1310

Reuni nesse post alguns pontos para a instalçao do Arch Linux em um Vostro 1310. Na maioria dos sites pesquisados não havia nada completo... espero ajudar mais pessoas.

O CD de instalção pode ser baixado em: http://www.archlinux.org/download/. Baixei o core que não precisará de net para instalar o básico.

Ao dar boot pelo CD, entrar na 1a opção (Boot Arch Linux Live CD).
Ao concluir o boot, log-se como root e digite:

/arch/setup

isso iniciará o setup para a instalação.

1 - Selecionar a origem dos dados no caso escolha cd.

2. Set Clock para acertar o relógio

3. Prepare Hard Drive(s)

Eu sempre prefiro particionar o HD e com isso escolhi a opção 2.

Após alguns Oks... aparecerá a tela do cfdisk que é um particinador de disco.

Crie pelo menos 3 partições:

swap do tipo swap com uns 512MB
/boot do tipo ext2 com 32MB
/ pode ser do tipo reiserfs com 8GB
/home pode ser do tipo reiserfs o restante.

Caso queira, pode ser criado um /tmp.

depois na opção 3. Manually Configure block... deverão ser marcados cada partição com seu respectivo sistema de arquivo

PackagesApós a formatção, retorna-se para o Main Menu e na opção 4. Select Packages, deixei marcado somente o base.

Nesse momento, você poderá escolher quais outros "softwares" quer instalar.

Feito isso, na opção 5. Install Packages, irá instalar os pacotes selecionados...

em 6. Configure System, começa escolhendo o editor padrão do seu sistema (nano para os menos experientes em linux)

Aparecerá uma lista de arquivos para serem configurados edite:

/etc/rc.conf e altere:
LOCALE="pt_BR.ISO-8859-1"
KEYMAP="br-abnt2"

HOSTNAME="nome da sua máquina"


/etc/pacman.d/mirrorlist

descomente uma das linhas; Eu utilizo o Server FTP da Belnet (Belgium), porém os da Unicamp ou UFPR são bons também.

Root-Password irá definir uma senha para o usuário root (administrador)

em 7. Install Bootloader irá instalar o gerenciador de boot que por padrão é o GRUB.

em 8. Exit Install termirá a instalação.

Após o término da instalação, reinicie o micro (crtl+alt+del).

Ao voltar da reinicialização, log-se como root e crie um usuário (xyz):

useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash xyz

Crie uma senha para o usuário criado:

passwd xyz

>>>USB

verifique no /etc/rc.conf em MODULES se tem o hal, senão insira.

MODULES=(... hal ...)

>>>Teclado

Para seu teclado funcionar como ABNT2, copie o arquivo 10-keymap.fdi

cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/

edite o arquivo /etc/hal/fdi/policy/10-keymap.fdi alterando o seguinte:

<merge key="input.xkb.layout" type="string">br</merge>
<merge key="input.xkb.model" type="string">abnt2</merge>

Salve e feche o arquivo.

Edite o arquivo /etc/PolicyKit/PolicyKit.conf e insira:

<match action="org.freedesktop.hal.power-management.shutdown">
<return result="yes">
</match>

<match action="org.freedesktop.hal.power-management.reboot">
<return result="yes">
</match>


>>>SOM

Insira em /etc/rc.local

modprobe -r snd-hda-intel
modprobe snd-hda-intel model=dell

>>> Wireless

Editar /etc/rc.conf e inserir no MODULES:

MODULES=(... r8169 ...)

para Wireless (Broadcom BCM4328 802.11b/g) instalar o yaourt:

editar /etc/pacman.conf e ao final do arquivo adicione o seguinte

[archlinuxfr]
Server = http://repo.archlinux.fr/x86_64

Salve e rode:

pacman -Sy base-devel yaourt

Editar /etc/pacman.conf e ao final do arquivo comente o seguinte

#[archlinuxfr]
#Server = http://repo.archlinux.fr/x86_64

Salve e rode:

yaourt -S wireless_tools broadcom-wl

rmmod br43

depmod -a

Finalmente, editar o /etc/rc.conf e colocar nos modules o wl. Ficará algo como :

MODULES=(lib80211_crypt_tkip wl !b43 !ssb ...

obs.: as ! são para não ativar os módulos

>>>Configurar Wireless

Edite/crie o arquivo /etc/wpa_supplicant.conf com:

ctrl_interface=/var/run/wpa_supplicant
eapol_version=1
ap_scan=1
fast_reauth=1

network={
        ssid="minharede"
        scan_ssid=0
        bssid=00:00:
00:00:00:00
        proto=WPA RSN
        key_mgmt=WPA-PSK WPA-EAP
        pairwise=CCMP TKIP
        group=CCMP TKIP
        psk=123456zxcvbnm
        priority=1
}

network={
        key_mgmt=NONE
}



em bssid coloque o mac address do seu ap wireless e em psk, coloque a senha, mas faça conforme abaixo:

wpa_passphrase minharede 123456zxcvbnm

o resultado será o apresentado abaixo. Aí é só copiar o psk para o arquivo

network={
        ssid="minharede"
        #psk="123456zxcvbnm"
        psk=7c160d069c768c22009f0fead9d41e52f4471e4a4e43f4bd2eecd24f0dcc2439
}

Salve as configurações e execute:

wpa_supplicant -Dwext -c /etc/wpa_supplicant.conf -ieth1 -B

iwconfig eth1 essid

dhcpd eth1


Nesse momento você deve estar conectado via wireless... Ah, não se esqueça de ligar o botão da wireless do lado direito do micro.

>>>Bluetooth
O bluetooth já é instalado por default e para utilizar no KDE, instale o kbluetooth...

pacman -S kbluetooth

>>Audio

pacman -S alsa-utils alsa-oss

su -xyz

alsamixer


coloque tudo acima de 90... ESC para sair.

para testar o som...

aplay /usr/share/sounds/alsa/Front_Center.wav

digite:

exit
alsactl store

para salvar as configurações.

pronto... configurações salvas.

>>>Modo Gráfico

pacman -Sy xorg

>>>Placa de Vídeo - nVidia

pacman -S nvidia

nvidia-xconfig

acrescentar em /etc/X11/xorg.conf dentro do Section Device:

       Option  "RenderAccel" "True"
       Option  "TripleBuffer" "True"
       Option  "NoLogo" "True"
       Option  "AGPFastWrite" "True"
       Option  "EnablePageFlip" "True"

>>>Fontes e KDE

pacman -S zlib shared-mime-info ttf-ms-fonts ttf-dejavu

pacman -S kde kde-l10n-pt_br

baixará quase 700MB.

>> Touchpad (Model: AlpsPS/2 ALPS GlidePoint)

pacman -S xf86-input-synaptics

>>>Softwares

=> VirtualBox

Baixar o tar.gz de http://aur.archlinux.org/packages.php?ID=9753

tar -xzf virtualbox_bin.tar.gz
cd virtualbox_bin
makepkg

pacman -U PACKAGE-NAME.pkg.tar.gz

em /etc/rc.conf adicione vboxdrv na lista MODULES

MODULES=(... vboxdrv vboxnetflt vboxnetadp ...)

edite o /etc/fstab insira a linha abaixo para o guest acessar a USB:

none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0

=> Firefox
pacman -S firefox flashplugin

=> OpenOffice em Protuguês Brasil
pacman -S openoffice-base openoffice-pt_br

=>Players de Audio e Video
pacman -S mplayer amarok

=> Gravador de CD/DVD
pacman -S k3b dvd+rw-tools libdvdcss

=> Editor de Imagens (similar ao Photoshop, só que melhor)
pacman -S gimp

=> Editor para arquivos .tex
pacman -S kile texlive-most

=> Java
pacman -S jre

=> Netbeans
pacman -S netbeans

=> Skype
yaourt -S aur/bin32-skype

obs.: a utilização do yaourt é problemática, pois ele baixa, compila, instala e executa comandos que estão dentro do arquivo baixado. Por isso, verifique os arquivos antes de continuar a instalação.