Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pt:manual:beginners [2020/04/26 04:22]
i3_relativism Criação deste novo documento.
pt:manual:beginners [2024/11/08 15:13] (current)
luck02 [Post-installation]
Line 1: Line 1:
 ... (WIP) ... (WIP)
 +====== Guia de instalação ======
 +O Guia de Instalação da imagem do Live-CD do Hyperbola também pode ajudar os usuários GNU/Linux experiente na instalação do Hyperbola do sistema live inicializado com a imagem de instalação oficial. Esta página assume uma experiência de alto nível com sistemas e utilitários GNU/Linux, especialmente a linha de comando. Se você gostaria de um guia passo a passo mais detalhado através do processo de instalação, veja o [[:pt:hyperbola:beginners-guide|Guia do Iniciante]]. Antes de começar, recomendamos que você veja a nossa seção de [[pt:hyperbola:faq|perguntas frequentes]] e [[https://wiki.archlinux.org/index.php/Frequently_asked_questions|Arch FAQ]]. Usar o comando **man** para ler as páginas de manuais de comandos e ferramentas usadas durante o processo de instalação é de grande utilidade. A [[https://wiki.hyperbola.info/doku.php?id=pt:start|wiki do Hyperbola]] (conhecido como HyperWiki), bem como o [[https://www.archlinux.org/|ArchWiki]], devem ser as principais fontes de informações e seu primeiro recurso durante a resolução de problemas. 
 +
 +O guia **KISS** (keep it simple stupid) para se iniciar com o Hyperbola GNU/Linux-livre
 +
 +A Intenção deste guia é demostrar uma maneira simples de instalação
 +
 +... (WIP)
 +
 +====== The KISS guide to get started with Hyperbola GNU/Linux-libre. ======
 +
 +The intention with this guide is to show a very simple way of how to boot **Hyperbola GNU/Linux-libre** from an optical disk or a Live USB stick and then how to install it the easiest way possible onto your HDD. It will avoid controversies like **what desktop environment is the best?**, **how many partitions do I need?** and **how many GB should my swap partition be?** and so on. This guide will only provide the basic steps to get you started. 
 +
 +===== Download and verify the live image =====
 +
 +Once you have downloaded the [[en:project:downloads|Live image]] as described you should verify it following [[en:manual:verify_live_images|these guidelines]]. Make sure to change your BIOS settings so that your computer will boot from your optical disk or USB stick.
 +
 +==== Burn the image to your optical disk ====
 +
 +To create a disk to use as your install medium, insert a blank or re-writable disk, CD or DVD, into your disk drive. Next, you will need to mount the disk.
 +
 +<code bash>
 +# mount sr0
 +</code>
 +
 +Provided your computer has a disk drive. Sr0 should the first or only, if you only have one disk drive, mount point of disk drives. You will need to address the correct destination for the command to work.
 +
 +<code bash>
 +# dd if=~/hyperbola-milky-way-v0.2.1-dual.iso of=/dev/sr0 bs=2048 conv=noerror && sync
 +</code>
 +
 +==== Write the image to your USB ====
 +
 +If you don’t have an ISO writer, go (change directory) to the folder where you saved the downloaded Live image (probably the Downloads folder) and type the following into your terminal:
 +
 +<code bash>
 +# dd if=hyperbola-milky-way-v0.2.1-dual.iso of=/dev/sdb bs=2048 && sync
 +</code>
 +
 +<note>Usually works fine, even though I’ve seen other commands; feel free to modify it.</note>
 +
 +To find out what’s the name of the USB device, type <color #620BB9/#EEDDFF>fdisk -l</color>
 +
 +You’ll probably see something like this:
 +
 +<code>
 +Device             Boot    Start                  End              Sectors               Size        Id    Type
 +/dev/sda1                    2048                   8390655       8388608              4G           82    Linux swap /Solaris
 +/dev/sda2                8390656             976773167  968382512          461,8G   83    Linux
 +</code>
 +
 +<code>
 +Device             Boot    Start                 End              Sectors                Size        Id    Type
 +/dev/sdb1                                         1255423      1255424               613M      0     Empty
 +/dev/sdb2                     172                    63659           63488                   31M        ef    EFI (FAT-12/16/32)
 +</code>
 +
 +From the above, sda is your HDD, and the sdb is your USB device where you’re going to write your Live image. 
 +
 +Also take a note of your partitions, you will come to need it when you’re creating the file system and mounting the root partition during the installation.
 +
 +Once you’ve downloaded, verified and written the Live image to your USB device, you can move on to boot your computer from your USB.
 +
 +===== Boot and install Hyperbola =====
 +
 +Once your computer has successfully booted into the Live USB device, type the following into you terminal:
 +
 +<code bash>
 +# cfdisk /dev/sda
 +</code>
 +
 +This will bring up a graphical partitioning table, and will look somewhat like fig. 1 (see above). Use the Tab and arrow keys to navigate. This is assuming that you want Hyperbola installed on your HDD. 
 +
 +Delete all the partitions so that you only see Free Space.
 +
 +Then make a new partition by choosing New and then make it Primary. Make this first partition a Swap. 1/4 of you computer’s memory should be enough. So with 8 GB of memory, your Swap would then be 2 GB. Then choose the End flag.
 +
 +The rest of the space should be made Primary, then choose the Boot flag to make this partition bootable. Then choose Write and type ’yes’ to save your changes to disk. Then Quit.
 +
 +You will then have something like this:
 +
 +<code>
 +sda2 Boot  Primary  Linux
 +sda1             Primary  Linux  Swap / Solaris
 +</code>
 +
 +Take note of the fact that the root partition that you soon will mount, is the bootable one (in this example the sda2) that you made from the rest of the space after creating the Swap partition. 
 +
 +==== Create a file system ====
 +
 +If you’re not using an English keyboard, you can set your language by typing <color #620BB9/#EEDDFF>loadkeys</color> followed by you language. Available keymap files can be found in <color #0B71B9/#DDF1FF>/usr/share/kbd/keymaps/</color> (you can omit the keymap path and file extension when using <color #620BB9/#EEDDFF>loadkeys</color>). For Swedish users, type:
 +
 +<code bash>
 +# loadkeys se.
 +</code>
 +
 +To create the ext4 file system, type:
 +
 +<code bash>
 +# mkfs.ext4 /dev/sda2
 +</code>
 +
 +
 +==== Activate swap ====
 +
 +<code bash>
 +# mkswap /dev/sda1
 +</code>
 +
 +<code bash>
 +# swapon /dev/sda1
 +</code>
 +
 +==== Mount the root partition ====
 +
 +<code bash>
 +# mount /dev/sda2 /mnt
 +</code>
 +
 +==== Install the base system ====
 +
 +<code bash>
 +# pacstrap /mnt base
 +</code>
 +
 +<note>
 +If you face GPG errors, you can try to fix them with:
 +
 +<code bash>
 +# rm -r /etc/pacman.d/gnupg/*
 +</code>
 +
 +<code bash>
 +# pacman-key --init
 +</code>
 +
 +<code bash>
 +# pacman-key --populate hyperbola arch
 +</code>
 +
 +<code bash>
 +# pacman-key --refresh-keys
 +</code>
 +
 +</note>
 +
 +==== Generate an fstab ====
 +
 +<code bash>
 +# genfstab -U -p /mnt >> /mnt/etc/fstab
 +</code>
 +
 +==== Chroot and configure the base system ====
 +
 +<code bash>
 +# arch-chroot /mnt
 +</code>
 +
 +==== Locale ====
 +
 +Type:
 +
 +<code bash>
 +# nano /etc/locale.gen
 +</code>
 +
 +Now choose your locale from what language you’re using. All locales are commented out (preceded by #) by default. Uncomment (remove the #) for your choice of locale. For US English, it should look like this:
 +
 +<code bash>
 +# nano /etc/locale.gen
 +</code>
 +
 +<code>
 +...
 +#en_SG ISO-8859-1
 +en_US.UTF-8 UTF-8
 +#en_US ISO-8859-1
 +...
 +</code>
 +
 +After you’ve uncommented your language, run the command:
 +
 +<code bash>
 +# locale-gen
 +</code>
 +
 +Then create the <color #0B71B9/#DDF1FF>/etc/locale.conf</color>
 +
 +<code bash>
 +# echo LANG=en_US.UTF-8 > /etc/locale.conf 
 +</code>
 +
 +Then export your chosen locale
 +
 +<code bash>
 +# export LANG=en_US.UTF-8
 +</code>
 +
 +==== Keypmap ====
 +
 +As the locale, you need to setup the keymap in the file <color #0B71B9/#DDF1FF>/etc/conf.d/keymaps</color>: 
 +
 +<code>
 +keymap="us"
 +</code>
 +
 +If you have an advanced usage of your keymap, you can watch the other functionalities, documented in the comments. You can find all the available keymaps in <color #0B71B9/#DDF1FF>/usr/share/kbd/keymaps</color>. Then run:
 +
 +<code bash>
 +# rc-update add keymaps default
 +</code>
 +
 +<note>This only applies for CLI, is you are using X11, this won't affect your graphical environment.</note>
 +
 +==== Time zone ====
 +
 +Create a symbolic link <color #0B71B9/#DDF1FF>/etc/localtime</color> to your subzone file <color #0B71B9/#DDF1FF>/usr/share/zoneinfo/Zone/SubZone</color>:
 +
 +<code bash>
 +# ln -s /usr/share/zoneinfo/Zone/SubZone /etc/localtime
 +</code>
 +
 +Example:
 +
 +<code bash>
 +# ln -s /usr/share/zoneinfo/Europe/Oslo /etc/localtime
 +</code>
 +
 +If you get <color #620BB9/#EEDDFF>ln: failed to create symbolic link ’/etc/localtime’: File exists</color>, then run:
 +
 +<code bash>
 +# ln -s -f /usr/share/zoneinfo/Zone/SubZone /etc/localtime
 +</code>
 +
 +==== Hardware clock ====
 +
 +Set the hardware clock to UTC
 +
 +<code bash>
 +# hwclock --systohc --utc
 +</code>
 +
 +==== Hostname ====
 +
 +Usually it’s sufficient to set your hostname to localhost. 
 +
 +<code bash>
 +# echo localhost > /etc/hostname
 +</code>
 +
 +Add the same hostname, i.e. localhost, to <color #0B71B9/#DDF1FF>/etc/hosts</color>.
 +
 +Type:
 +
 +<code bash>
 +# nano /etc/hosts
 +</code>
 +
 +<code>
 +# <ip-address> <hostname.domain.org> <hostname>
 +127.0.0.1                localhost.localdomain     localhost localhost
 +::1                             localhost.localdomain     localhost localhost
 +</code>
 +
 +==== Root password ====
 +
 +Remember when you’re typing in your root password (as any password) into the terminal, it won’t show. Just carefully type in your chosen root password and repeat it when asked to.
 +
 +<code bash>
 +# passwd
 +</code>
 +
 +==== GRUB ====
 +
 +Finally follow these steps:
 +
 +<code bash>
 +# pacman -S grub
 +</code>
 +
 +<code bash>
 +# grub-install --target=i386-pc --recheck /dev/sda
 +</code>
 +
 +(Here do NOT append a partition number, i.e. <color #0B71B9/#DDF1FF>/dev/sdaX</color>)
 +
 +<code bash>
 +# grub-mkconfig -o /boot/grub/grub.cfg
 +</code>
 +
 +==== Unmount the partitions and reboot ====
 +
 +<code bash>
 +# exit
 +</code>
 +
 +<code bash>
 +# umount -R /mnt
 +</code>
 +
 +<code bash>
 +# reboot
 +</code>
 +
 +Remember to remove your installation medium (your USB stick) before you reboot into your system. To log in, you type root and your password.
 +
 +Congratulations! You have now installed **Hyperbola GNU/Linux-libre** onto you computer. 
 +
 +And now for the fun part! 
 +
 +===== Pós-instalação =====
 +
 +You will now have to create a user and get user privileges like sudo. And of course, you will have to install your favourite Desktop Environment (DE). 
 +
 +
 +----
 +=> [[https://forums.hyperbola.info/viewtopic.php?id=2|Talk about Beguinners guide]] <=
 +