# SOME DESCRIPTIVE TITLE # Copyright (C) YEAR The FreeBSD Project # This file is distributed under the same license as the FreeBSD Documentation package. # Danilo G. Baio , 2021. # Edson Brandi , 2023. # "Danilo G. Baio" , 2023. msgid "" msgstr "" "Project-Id-Version: FreeBSD Documentation VERSION\n" "POT-Creation-Date: 2022-02-01 09:21-0300\n" "PO-Revision-Date: 2023-04-29 13:34+0000\n" "Last-Translator: Edson Brandi \n" "Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.17\n" #. type: YAML Front Matter: description #: documentation/content/en/articles/solid-state/_index.adoc:1 #, no-wrap msgid "The use of solid state disk devices in FreeBSD" msgstr "O uso de dispositivos de disco de estado sólido no FreeBSD" #. type: Title = #: documentation/content/en/articles/solid-state/_index.adoc:1 #: documentation/content/en/articles/solid-state/_index.adoc:12 #, no-wrap msgid "FreeBSD and Solid State Devices" msgstr "FreeBSD e Dispositivos de Estado Sólido" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:45 msgid "Abstract" msgstr "Resumo" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:47 msgid "" "This article covers the use of solid state disk devices in FreeBSD to create " "embedded systems." msgstr "" "Este artigo aborda o uso de dispositivos de disco de estado sólido no " "FreeBSD para criar sistemas embarcados." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:50 msgid "" "Embedded systems have the advantage of increased stability due to the lack " "of integral moving parts (hard drives). Account must be taken, however, for " "the generally low disk space available in the system and the durability of " "the storage medium." msgstr "" "Os sistemas embarcados têm a vantagem de maior estabilidade devido à falta " "de partes móveis integradas (discos rígidos). No entanto, é preciso levar em " "conta o espaço disponível no sistema que geralmente é baixo e a durabilidade " "do meio de armazenamento." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:53 msgid "" "Specific topics to be covered include the types and attributes of solid " "state media suitable for disk use in FreeBSD, kernel options that are of " "interest in such an environment, the [.filename]#rc.initdiskless# mechanisms " "that automate the initialization of such systems and the need for read-only " "filesystems, and building filesystems from scratch. The article will " "conclude with some general strategies for small and read-only FreeBSD " "environments." msgstr "" "Tópicos específicos a serem abordados incluem os tipos e atributos das mídia " "de estado sólido adequadas para uso como disco no FreeBSD, opções de kernel " "que são de interesse em tal ambiente, os mecanismos [.filename]#rc." "initdiskless# que automatizam a inicialização de tais sistemas e a " "necessidade de sistemas de arquivos read-only e a construção de sistemas de " "arquivos a partir do zero. O artigo será concluído com algumas estratégias " "gerais para ambientes FreeBSD pequenos e read-only ." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:55 msgid "'''" msgstr "'''" #. type: Title == #: documentation/content/en/articles/solid-state/_index.adoc:59 #, no-wrap msgid "Solid State Disk Devices" msgstr "Dispositivos de Disco de Estado Sólido" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:69 msgid "" "The scope of this article will be limited to solid state disk devices made " "from flash memory. Flash memory is a solid state memory (no moving parts) " "that is non-volatile (the memory maintains data even after all power sources " "have been disconnected). Flash memory can withstand tremendous physical " "shock and is reasonably fast (the flash memory solutions covered in this " "article are slightly slower than a EIDE hard disk for write operations, and " "much faster for read operations). One very important aspect of flash " "memory, the ramifications of which will be discussed later in this article, " "is that each sector has a limited rewrite capacity. You can only write, " "erase, and write again to a sector of flash memory a certain number of times " "before the sector becomes permanently unusable. Although many flash memory " "products automatically map bad blocks, and although some even distribute " "write operations evenly throughout the unit, the fact remains that there " "exists a limit to the amount of writing that can be done to the device. " "Competitive units have between 1,000,000 and 10,000,000 writes per sector in " "their specification. This figure varies due to the temperature of the " "environment." msgstr "" "O escopo deste artigo será limitado a dispositivos de disco de estado sólido " "feitos de memória flash. A memória flash é uma memória de estado sólido (sem " "partes móveis) que é não volátil (a memória mantém os dados mesmo depois de " "todas as fontes de energia terem sido desconectadas). A memória flash pode " "suportar um enorme choque físico e é razoavelmente rápida (as soluções de " "memória flash abordadas neste artigo são um pouco mais lentas que um disco " "rígido EIDE para operações de gravação e muito mais rápidas para operações " "de leitura). Um aspecto muito importante da memória flash, cujas " "ramificações serão discutidas mais adiante neste artigo, é que cada setor " "tem uma capacidade limitada de reescrita. Você só pode gravar, apagar e " "gravar novamente em um setor de memória flash um certo número de vezes antes " "que o setor fique permanentemente inutilizável. Embora muitos produtos de " "memória flash mapeiam automaticamente os blocos defeituosos, e embora alguns " "até distribuam operações de gravação uniformemente por toda a unidade, a " "verdade é que existe um limite para a quantidade de escrita que pode ser " "feita no dispositivo. Unidades competitivas possuem entre 1.000.000 e " "10.000.000 gravações por setor em suas especificações. Este valor varia com " "à temperatura do ambiente." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:74 msgid "" "Specifically, we will be discussing ATA compatible compact-flash units, " "which are quite popular as storage media for digital cameras. Of particular " "interest is the fact that they pin out directly to the IDE bus and are " "compatible with the ATA command set. Therefore, with a very simple and low-" "cost adaptor, these devices can be attached directly to an IDE bus in a " "computer. Once implemented in this manner, operating systems such as " "FreeBSD see the device as a normal hard disk (albeit small)." msgstr "" "Especificamente, estaremos discutindo unidades compact-flash compatíveis com " "ATA, as quais são bastante populares como mídia de armazenamento para " "câmeras digitais. De particular interesse é o fato de que eles são fixados " "diretamente no barramento IDE e são compatíveis com o conjunto de comandos " "ATA. Portanto, com um adaptador muito simples e de baixo custo, esses " "dispositivos podem ser conectados diretamente a um barramento IDE em um " "computador. Uma vez implementado desta maneira, sistemas operacionais como o " "FreeBSD vêem o dispositivo como um disco rígido normal (embora pequeno)." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:76 msgid "" "Other solid state disk solutions do exist, but their expense, obscurity, and " "relative unease of use places them beyond the scope of this article." msgstr "" "Outras soluções de disco de estado sólido existem, mas seu custo, " "obscuridade e relativa dificuldade de uso os colocam além do escopo deste " "artigo." #. type: Title == #: documentation/content/en/articles/solid-state/_index.adoc:78 #, no-wrap msgid "Kernel Options" msgstr "Opções do Kernel" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:81 msgid "" "A few kernel options are of specific interest to those creating an embedded " "FreeBSD system." msgstr "" "Algumas opções do kernel são de interesse específico para aqueles que criam " "sistemas FreeBSD embarcados." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:86 msgid "" "All embedded FreeBSD systems that use flash memory as system disk will be " "interested in memory disks and memory filesystems. As a result of the " "limited number of writes that can be done to flash memory, the disk and the " "filesystems on the disk will most likely be mounted read-only. In this " "environment, filesystems such as [.filename]#/tmp# and [.filename]#/var# are " "mounted as memory filesystems to allow the system to create logs and update " "counters and temporary files. Memory filesystems are a critical component " "to a successful solid state FreeBSD implementation." msgstr "" "Todos os sistemas FreeBSD embarcados que utilizam memória flash como disco " "do sistema terão interesse em discos em memória e sistemas de arquivos em " "memória. Devido ao número limitado de gravações que podem ser feitas na " "memória flash, o disco e os sistemas de arquivos no disco provavelmente " "serão montados como read-only. Nesse ambiente, sistemas de arquivos como [." "filename]#/tmp# e [.filename]#/var# são montados como sistemas de arquivos " "em memória para permitir que o sistema crie logs e atualize contadores e " "arquivos temporários. Sistemas de arquivos em memória são um componente " "crítico para uma implementação bem-sucedida do FreeBSD usandp discos de " "estado sólido." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:88 msgid "" "You should make sure the following lines exist in your kernel configuration " "file:" msgstr "" "Você deve ter certeza de que as seguintes linhas existem no seu arquivo de " "configuração do kernel:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:94 #, no-wrap msgid "" "options MFS # Memory Filesystem\n" "options MD_ROOT # md device usable as a potential root device\n" "pseudo-device md # memory disk\n" msgstr "" "options MFS # Memory Filesystem\n" "options MD_ROOT # md device usable as a potential root " "device\n" "pseudo-device md # memory disk\n" #. type: Title == #: documentation/content/en/articles/solid-state/_index.adoc:97 #, no-wrap msgid "The `rc` Subsystem and Read-Only Filesystems" msgstr "O Subsistema `rc` e Sistemas de ArquivosRead-Only" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:100 msgid "" "The post-boot initialization of an embedded FreeBSD system is controlled by " "[.filename]#/etc/rc.initdiskless#." msgstr "" "A inicialização pós-boot de um sistema FreeBSD embarcado é controlada por [." "filename]#/etc/rc.initdiskless#." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:104 msgid "" "[.filename]#/etc/rc.d/var# mounts [.filename]#/var# as a memory filesystem, " "makes a configurable list of directories in [.filename]#/var# with the man:" "mkdir[1] command, and changes modes on some of those directories. In the " "execution of [.filename]#/etc/rc.d/var#, one other [.filename]#rc.conf# " "variable comes into play - `varsize`. A [.filename]#/var# partition is " "created by [.filename]#/etc/rc.d/var# based on the value of this variable in " "[.filename]#rc.conf#:" msgstr "" "O [.filename]#/etc/rc.d/var# monta o [.filename]#/var# como um sistema de " "arquivos em memória, cria uma lista configurável de diretórios em [." "filename]#/var# com o comando man:mkdir[1] e altera modos em alguns desses " "diretórios. Na execução do [.filename]#/etc/rc.d/var#, outra variável [." "filename]#rc.conf# entra em ação - `varsize`. Uma partição [.filename]#/var# " "é criada por [.filename]#/etc/rc.d/var# com base no valor dessa variável em [" ".filename]#rc.conf#:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:108 #, no-wrap msgid "varsize=8192\n" msgstr "varsize=8192\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:111 msgid "Remember that this value is in sectors by default." msgstr "Lembre-se de que esse valor é informado em setores, por padrão." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:118 msgid "" "The fact that [.filename]#/var# is a read-write filesystem is an important " "distinction, as the [.filename]#/# partition (and any other partitions you " "may have on your flash media) should be mounted read-only. Remember that in " "<> we detailed the limitations of flash memory - specifically the " "limited write capability. The importance of not mounting filesystems on " "flash media read-write, and the importance of not using a swap file, cannot " "be overstated. A swap file on a busy system can burn through a piece of " "flash media in less than one year. Heavy logging or temporary file creation " "and destruction can do the same. Therefore, in addition to removing the " "`swap` entry from your [.filename]#/etc/fstab#, you should also change the " "Options field for each filesystem to `ro` as follows:" msgstr "" "O fato do [.filename]#/var# ser um sistema de arquivos read-write é uma " "distinção importante, pois a partição [.filename]#/# (e quaisquer outras " "partições que você possa ter em sua mídia flash) deve ser montada como read-" "only. Lembre-se que em <> detalhamos as limitações da memória flash - " "especificamente a capacidade de gravação limitada. A importância de não " "montar sistemas de arquivos em mídia flash em modo read-write, e a " "importância de não usar um arquivo de swap, não pode ser exagerado. Um " "arquivo de swap em um sistema ocupado pode inutilizar uma mídia flash em " "menos de um ano. Criação de log pesado ou criação e destruição de arquivos " "temporários podem fazer o mesmo. Portanto, além de remover a entrada `swap` " "do seu [.filename]#/etc/fstab#, você também deve alterar o campo Options " "para cada sistema de arquivos para `ro` como segue:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:123 #, no-wrap msgid "" "# Device Mountpoint FStype Options Dump Pass#\n" "/dev/ad0s1a / ufs ro 1 1\n" msgstr "" "# Device Mountpoint FStype Options Dump Pass#" "\n" "/dev/ad0s1a / ufs ro 1 1\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:128 msgid "" "A few applications in the average system will immediately begin to fail as a " "result of this change. For instance, cron will not run properly as a result " "of missing cron tabs in the [.filename]#/var# created by [.filename]#/etc/rc." "d/var#, and syslog and dhcp will encounter problems as well as a result of " "the read-only filesystem and missing items in the [.filename]#/var# that [." "filename]#/etc/rc.d/var# has created. These are only temporary problems " "though, and are addressed, along with solutions to the execution of other " "common software packages in <>." msgstr "" "Alguns aplicativos no sistema começarão a falhar imediatamente como " "resultado desta alteração. Por exemplo, o cron não será executado " "corretamente como resultado da falta de crontabs no [.filename]#/var# criado " "pelo [.filename]#/etc/rc.d/var#, o syslog e o dhcp também irão encontrar " "problemas como resultado do sistema de arquivos estar em modo read-only e " "dos itens ausentes no [.filename]#/var# que o [.filename]#/etc/rc.d/var# " "criou. Estes são apenas problemas temporários, embora sejam abordados, " "juntamente com soluções para a execução de outros pacotes de software comuns " "em <>." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:130 msgid "" "An important thing to remember is that a filesystem that was mounted read-" "only with [.filename]#/etc/fstab# can be made read-write at any time by " "issuing the command:" msgstr "" "Uma coisa importante para lembrar é que um sistema de arquivos que foi " "montado como read-only com o [.filename]#/etc/fstab# pode ser colocado em " "modo read-write a qualquer momento, executando o comando:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:134 #, no-wrap msgid "# /sbin/mount -uw partition\n" msgstr "# /sbin/mount -uw partition\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:137 msgid "and can be toggled back to read-only with the command:" msgstr "e pode ser alternado de volta para read-only com o comando:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:141 #, no-wrap msgid "# /sbin/mount -ur partition\n" msgstr "# /sbin/mount -ur partition\n" #. type: Title == #: documentation/content/en/articles/solid-state/_index.adoc:143 #, no-wrap msgid "Building a File System from Scratch" msgstr "Construindo um sistema de arquivos a partir do zero" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:146 msgid "" "Since ATA compatible compact-flash cards are seen by FreeBSD as normal IDE " "hard drives, you could theoretically install FreeBSD from the network using " "the kern and mfsroot floppies or from a CD." msgstr "" "Como os cartões compact-flash compatíveis com ATA são vistos pelo FreeBSD " "como discos rígidos IDE normais, você poderia teoricamente instalar o " "FreeBSD a partir da rede usando os disquetes kern e mfsroot ou a partir de " "um CD." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:149 msgid "" "However, even a small installation of FreeBSD using normal installation " "procedures can produce a system in size of greater than 200 megabytes. Most " "people will be using smaller flash memory devices (128 megabytes is " "considered fairly large - 32 or even 16 megabytes is common), so an " "installation using normal mechanisms is not possible-there is simply not " "enough disk space for even the smallest of conventional installations." msgstr "" "No entanto, mesmo uma pequena instalação do FreeBSD usando procedimentos " "normais de instalação pode resultar em um sistema de tamanho superior a 200 " "megabytes. A maioria das pessoas estará usando dispositivos de memória flash " "menores (128 megabytes é considerado bastante grande - 32 ou até 16 " "megabytes são comuns), então uma instalação usando mecanismos normais não é " "possível - simplesmente não há espaço em disco suficiente nem mesmo para a " "menor das instalações convencionais." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:155 msgid "" "The easiest way to overcome this space limitation is to install FreeBSD " "using conventional means to a normal hard disk. After the installation is " "complete, pare down the operating system to a size that will fit onto your " "flash media, then tar the entire filesystem. The following steps will guide " "you through the process of preparing a piece of flash memory for your tarred " "filesystem. Remember, because a normal installation is not being performed, " "operations such as partitioning, labeling, file-system creation, etc. need " "to be performed by hand. In addition to the kern and mfsroot floppy disks, " "you will also need to use the fixit floppy." msgstr "" "A maneira mais fácil de superar essa limitação de espaço é instalar o " "FreeBSD usando meios convencionais em um disco rígido normal. Após a " "conclusão da instalação, reduza o sistema operacional para um tamanho que " "caiba na mídia flash e compacte o sistema de arquivos inteiro com o tar. Os " "passos seguintes irão guiá-lo através do processo de preparação de uma parte " "da memória flash para o seu sistema de arquivos compactado com o tar. Lembre-" "se de que não estamos executando uma instalação normal, logo as operações " "como particionamento, criação dos labels, criação do sistema de arquivos, " "etc. precisam ser executadas manualmente. Além dos disquetes do kern e " "mfsroot, você também precisará usar o disquete do fixit." #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:159 msgid "Partitioning Your Flash Media Device" msgstr "Particionando seu Dispositivo de Mídia Flash" #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:169 msgid "" "After booting with the kern and mfsroot floppies, choose `custom` from the " "installation menu. In the custom installation menu, choose `partition`. In " "the partition menu, you should delete all existing partitions using kbd:" "[d]. After deleting all existing partitions, create a partition using kbd:" "[c] and accept the default value for the size of the partition. When asked " "for the type of the partition, make sure the value is set to `165`. Now " "write this partition table to the disk by pressing kbd:[w] (this is a hidden " "option on this screen). If you are using an ATA compatible compact flash " "card, you should choose the FreeBSD Boot Manager. Now press kbd:[q] to quit " "the partition menu. You will be shown the boot manager menu once more - " "repeat the choice you made earlier." msgstr "" "Após inicializar com os disquetes kern e mfsroot, escolha `custom` no menu " "de instalação. No menu de instalação personalizada, escolha `partition`. No " "menu de partição, você deve excluir todas as partições existentes usando " "kbd:[d]. Após excluir todas as partições existentes, crie uma partição " "usando kbd:[c] e aceite o valor padrão para o tamanho da partição. Quando " "questionado sobre o tipo da partição, certifique-se de que o valor esteja " "definido como `165`. Agora, escreva essa tabela de partição no disco " "pressionando kbd:[w] (esta é uma opção oculta nesta tela). Se você estiver " "usando um cartão compact flash compatível com ATA, escolha o Gerenciador de " "Inicialização do FreeBSD. Agora pressione kbd:[q] para sair do menu de " "partição. O menu do gerenciador de inicialização será exibido novamente - " "repita a escolha que fez anteriormente." #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:170 msgid "Creating Filesystems on Your Flash Memory Device" msgstr "Criando Sistemas de Arquivos em seu Dispositivo de Memória Flash" #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:173 msgid "" "Exit the custom installation menu, and from the main installation menu " "choose the `fixit` option. After entering the fixit environment, enter the " "following command:" msgstr "" "Saia do menu de instalação personalizada e, no menu principal de instalação, " "escolha a opção `fixit`. Depois de entrar no ambiente fixit, insira o " "seguinte comando:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:177 #, no-wrap msgid "# disklabel -e /dev/ad0c\n" msgstr "# disklabel -e /dev/ad0c\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:181 msgid "" "At this point you will have entered the vi editor under the auspices of the " "disklabel command. Next, you need to add an `a:` line at the end of the " "file. This `a:` line should look like:" msgstr "" "Neste ponto, você terá entrado no editor vi sob os auspícios do comando " "disklabel. Em seguida, você precisa adicionar uma linha `a:` no final do " "arquivo. Esta linha `a:` deve ser semelhante a linha abaixo:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:185 #, no-wrap msgid "a: 123456 0 4.2BSD 0 0\n" msgstr "a: 123456 0 4.2BSD 0 0\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:190 msgid "" "Where _123456_ is a number that is exactly the same as the number in the " "existing `c:` entry for size. Basically you are duplicating the existing `c:" "` line as an `a:` line, making sure that fstype is `4.2BSD`. Save the file " "and exit." msgstr "" "Onde _123456_ é um número exatamente igual ao número na entrada `c:` " "existente para o tamanho. Basicamente, você está duplicando a linha `c:` " "existente como uma linha `a:`, certificando-se de que o fstype seja `4.2BSD`" ". Salve o arquivo e saia." #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:195 #, no-wrap msgid "" "# disklabel -B -r /dev/ad0c\n" "# newfs /dev/ad0a\n" msgstr "" "# disklabel -B -r /dev/ad0c\n" "# newfs /dev/ad0a\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:198 msgid "Placing Your Filesystem on the Flash Media" msgstr "Colocando seu Sistema de Arquivos na Mídia Flash" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:200 msgid "Mount the newly prepared flash media:" msgstr "Monte a mídia flash recém-preparada:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:204 #, no-wrap msgid "# mount /dev/ad0a /flash\n" msgstr "# mount /dev/ad0a /flash\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:208 msgid "" "Bring this machine up on the network so we may transfer our tar file and " "explode it onto our flash media filesystem. One example of how to do this " "is:" msgstr "" "Coloque esta máquina na rede para que possamos transferir nosso arquivo tar " "e extrai-lo em nosso sistema de arquivos de mídia flash. Um exemplo de como " "fazer isso é:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:213 #, no-wrap msgid "" "# ifconfig xl0 192.168.0.10 netmask 255.255.255.0\n" "# route add default 192.168.0.1\n" msgstr "" "# ifconfig xl0 192.168.0.10 netmask 255.255.255.0\n" "# route add default 192.168.0.1\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:219 msgid "" "Now that the machine is on the network, transfer your tar file. You may be " "faced with a bit of a dilemma at this point - if your flash memory part is " "128 megabytes, for instance, and your tar file is larger than 64 megabytes, " "you cannot have your tar file on the flash media at the same time as you " "explode it - you will run out of space. One solution to this problem, if " "you are using FTP, is to untar the file while it is transferred over FTP. " "If you perform your transfer in this manner, you will never have the tar " "file and the tar contents on your disk at the same time:" msgstr "" "Agora que a máquina está na rede, transfira seu arquivo tar. Você pode se " "deparar com um pequeno dilema neste ponto - se a sua memória flash tiver por " "exemplo 128 megabytes, e seu arquivo tar for maior que 64 megabytes, você " "não poderá ter o seu arquivo tar na mídia flash ao mesmo tempo em que " "realiza a descompressão - você ficará sem espaço. Uma solução para esse " "problema, se você estiver usando FTP, é descompactar o arquivo enquanto ele " "é transferido por FTP. Se você realizar sua transferência desta maneira, " "você nunca terá o arquivo tar e o conteúdo do tar em seu disco ao mesmo " "tempo:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:223 #, no-wrap msgid "ftp> get tarfile.tar \"| tar xvf -\"\n" msgstr "ftp> get tarfile.tar \"| tar xvf -\"\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:226 msgid "If your tarfile is gzipped, you can accomplish this as well:" msgstr "Se o seu arquivo tar estiver gzipado, você pode fazer isso também:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:230 #, no-wrap msgid "ftp> get tarfile.tar \"| zcat | tar xvf -\"\n" msgstr "ftp> get tarfile.tar \"| zcat | tar xvf -\"\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:233 msgid "" "After the contents of your tarred filesystem are on your flash memory " "filesystem, you can unmount the flash memory and reboot:" msgstr "" "Depois que o conteúdo do seu sistema de arquivos compactado pelo tar estiver " "no sistema de arquivos da sua memória flash, você poderá desmontar a memória " "flash e reinicializar:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:239 #, no-wrap msgid "" "# cd /\n" "# umount /flash\n" "# exit\n" msgstr "" "# cd /\n" "# umount /flash\n" "# exit\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:242 msgid "" "Assuming that you configured your filesystem correctly when it was built on " "the normal hard disk (with your filesystems mounted read-only, and with the " "necessary options compiled into the kernel) you should now be successfully " "booting your FreeBSD embedded system." msgstr "" "Assumindo que você configurou seu sistema de arquivos corretamente quando " "ele foi construído no disco rígido normal (com seus sistemas de arquivos " "montado como read-only, e com as opções necessárias compiladas no kernel) " "você agora deve inicializar com sucesso seu sistema embarcado FreeBSD." #. type: Title == #: documentation/content/en/articles/solid-state/_index.adoc:245 #, no-wrap msgid "System Strategies for Small and Read Only Environments" msgstr "Estratégias do Sistema para Ambientes Pequenos e Read-Only" #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:249 msgid "" "In <>, it was pointed out that the [.filename]#/var# filesystem " "constructed by [.filename]#/etc/rc.d/var# and the presence of a read-only " "root filesystem causes problems with many common software packages used with " "FreeBSD. In this article, suggestions for successfully running cron, " "syslog, ports installations, and the Apache web server will be provided." msgstr "" "Em <>, foi apontado que o sistema de arquivos [.filename]#/var# " "construído pelo [.filename]#/etc/rc.d/var# e a presença de um sistema de " "arquivos raiz read-only causa problemas com muitos pacotes de software " "comuns usados com o FreeBSD. Neste artigo, serão fornecidas sugestões para a " "execução bem-sucedida do cron, do syslog, instalações de ports e do servidor " "Web Apache." #. type: Title === #: documentation/content/en/articles/solid-state/_index.adoc:250 #, no-wrap msgid "Cron" msgstr "Cron" #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:253 msgid "" "Upon boot, [.filename]#/var# gets populated by [.filename]#/etc/rc.d/var# " "using the list from [.filename]#/etc/mtree/BSD.var.dist#, so the [." "filename]#cron#, [.filename]#cron/tabs#, [.filename]#at#, and a few other " "standard directories get created." msgstr "" "Ao inicializar, o [.filename]#/var# é preenchido por [.filename]#/etc/rc.d/" "var# usando a lista de [.filename]#/etc/mtree/BSD.var.dist#, então os " "diretórios [.filename]#cron#, [.filename]#cron/tabs#, [.filename]#at# e " "alguns outros diretórios padrões são criados." #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:258 msgid "" "However, this does not solve the problem of maintaining cron tabs across " "reboots. When the system reboots, the [.filename]#/var# filesystem that is " "in memory will disappear and any cron tabs you may have had in it will also " "disappear. Therefore, one solution would be to create cron tabs for the " "users that need them, mount your [.filename]#/# filesystem as read-write and " "copy those cron tabs to somewhere safe, like [.filename]#/etc/tabs#, then " "add a line to the end of [.filename]#/etc/rc.initdiskless# that copies those " "crontabs into [.filename]#/var/cron/tabs# after that directory has been " "created during system initialization. You may also need to add a line that " "changes modes and permissions on the directories you create and the files " "you copy with [.filename]#/etc/rc.initdiskless#." msgstr "" "No entanto, isso não resolve o problema de manter as crontabs entre nas " "reinicializações. Quando o sistema for reinicializado, o sistema de arquivos " "[.filename]#/var# que está na memória desaparecerá e todas as crontabs que " "você tenha nele também desaparecerão. Portanto, uma solução seria criar " "crontabs para os usuários que precisam delas, montar seu sistema de arquivos " "[.filename]#/# como read-write e copiar estas crontabs para algum lugar " "seguro, como [.filename]#/etc/tabs#, em seguida, adicione uma linha ao final " "do [.filename]#/etc/rc.initdiskless# que copie estes crontabs para [." "filename]#/var/cron/tabs# depois que o diretório for criado durante " "inicialização do sistema. Você também pode precisar adicionar uma linha que " "altere modos e permissões nos diretórios criados e nos arquivos copiados com " "[.filename]#/etc/rc.initdiskless#." #. type: Title === #: documentation/content/en/articles/solid-state/_index.adoc:259 #, no-wrap msgid "Syslog" msgstr "Syslog" #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:264 msgid "" "[.filename]#syslog.conf# specifies the locations of certain log files that " "exist in [.filename]#/var/log#. These files are not created by [.filename]#/" "etc/rc.d/var# upon system initialization. Therefore, somewhere in [." "filename]#/etc/rc.d/var#, after the section that creates the directories in " "[.filename]#/var#, you will need to add something like this:" msgstr "" "O [.filename]#syslog.conf# especifica os locais de certos arquivos de log " "que existem em [.filename]#/var/log#. Esses arquivos não são criados pelo [." "filename]#/etc/rc.d/var# na inicialização do sistema. Portanto, em algum " "lugar do [.filename]#/etc/rc.d/var#, logo após a seção que cria os " "diretórios em [.filename]#/var#, você precisará adicionar algo como isto:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:269 #, no-wrap msgid "" "# touch /var/log/security /var/log/maillog /var/log/cron /var/log/messages\n" "# chmod 0644 /var/log/*\n" msgstr "" "# touch /var/log/security /var/log/maillog /var/log/cron /var/log/messages\n" "# chmod 0644 /var/log/*\n" #. type: Title === #: documentation/content/en/articles/solid-state/_index.adoc:271 #, no-wrap msgid "Ports Installation" msgstr "Instalação de Ports" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:276 msgid "" "Before discussing the changes necessary to successfully use the ports tree, " "a reminder is necessary regarding the read-only nature of your filesystems " "on the flash media. Since they are read-only, you will need to temporarily " "mount them read-write using the mount syntax shown in <>. You should " "always remount those filesystems read-only when you are done with any " "maintenance - unnecessary writes to the flash media could considerably " "shorten its lifespan." msgstr "" "Antes de discutir as alterações necessárias para usar com êxito a árvore de " "ports, é necessário um lembrete sobre a natureza read-only dos seus sistemas " "de arquivos na mídia flash. Como eles são read-only, você precisará montá-" "los temporariamente para read-write usando a sintaxe de montagem mostrada em " "<>. Você sempre deve remontar esses sistemas de arquivos no modo read-" "only quando tiver terminado qualquer manutenção - gravações desnecessárias " "na mídia flash podem reduzir consideravelmente sua vida útil." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:279 msgid "" "To make it possible to enter a ports directory and successfully run `make " "install`, we must create a packages directory on a non-memory filesystem " "that will keep track of our packages across reboots. As it is necessary to " "mount your filesystems as read-write for the installation of a package " "anyway, it is sensible to assume that an area on the flash media can also be " "used for package information to be written to." msgstr "" "Para tornar possível entrar em um diretório do ports e executar com sucesso " "o comando `make install`, devemos criar um diretório de pacotes em um " "sistema de arquivos que não seja de memória e que acompanhe nossos pacotes " "entre as reinicializações. Como é necessário montar seus sistemas de " "arquivos como leitura-gravação para a instalação de um pacote de qualquer " "maneira, é sensato supor que uma área na mídia flash também possa ser usada " "para gravar informações do pacote." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:282 msgid "" "First, create a package database directory. This is normally in [." "filename]#/var/db/pkg#, but we cannot place it there as it will disappear " "every time the system is booted." msgstr "" "Primeiro, crie o diretório do banco de dados de pacotes. Ele fica " "normalmente em [.filename]#/var/db/pkg#, mas não podemos colocá-lo lá, pois " "ele irá desaparecer toda vez que o sistema for inicializado." #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:286 #, no-wrap msgid "# mkdir /etc/pkg\n" msgstr "# mkdir /etc/pkg\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:289 msgid "" "Now, add a line to [.filename]#/etc/rc.d/var# that links the [.filename]#/" "etc/pkg# directory to [.filename]#/var/db/pkg#. An example:" msgstr "" "Agora, adicione uma linha em [.filename]#/etc/rc.d/var# que vincule o " "diretório [.filename]#/etc/pkg# a [.filename]#/var/db/pkg#. Um exemplo:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:293 #, no-wrap msgid "# ln -s /etc/pkg /var/db/pkg\n" msgstr "# ln -s /etc/pkg /var/db/pkg\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:296 msgid "" "Now, any time that you mount your filesystems as read-write and install a " "package, the `make install` will work, and package information will be " "written successfully to [.filename]#/etc/pkg# (because the filesystem will, " "at that time, be mounted read-write) which will always be available to the " "operating system as [.filename]#/var/db/pkg#." msgstr "" "Agora, sempre que você montar seus sistemas de arquivos como leitura-" "gravação e instalar um pacote, o `make install` funcionará, e as informações " "do pacote serão gravadas com sucesso em [.filename]#/etc/pkg# (porque o " "sistema de arquivos estará, naquele momento, montado como leitura-gravação), " "que sempre estará disponível para o sistema operacional como [.filename]#/" "var/db/pkg#." #. type: Title === #: documentation/content/en/articles/solid-state/_index.adoc:297 #, no-wrap msgid "Apache Web Server" msgstr "Servidor Web Apache" #. type: delimited block = 4 #: documentation/content/en/articles/solid-state/_index.adoc:303 msgid "" "The steps in this section are only necessary if Apache is set up to write " "its pid or log information outside of [.filename]#/var#. By default, Apache " "keeps its pid file in [.filename]#/var/run/httpd.pid# and its log files in [." "filename]#/var/log#." msgstr "" "As etapas nesta seção são necessárias apenas se o Apache estiver configurado " "para gravar suas informações de pid ou log fora do [.filename]#/var#. Por " "padrão, o Apache mantém seu arquivo pid em [.filename]#/var/run/httpd.pid# e " "seus arquivos de log em [.filename]#/var/log#." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:309 msgid "" "It is now assumed that Apache keeps its log files in a directory [." "filename]#apache_log_dir# outside of [.filename]#/var#. When this directory " "lives on a read-only filesystem, Apache will not be able to save any log " "files, and may have problems working. If so, it is necessary to add a new " "directory to the list of directories in [.filename]#/etc/rc.d/var# to create " "in [.filename]#/var#, and to link [.filename]#apache_log_dir# to [." "filename]#/var/log/apache#. It is also necessary to set permissions and " "ownership on this new directory." msgstr "" "Agora, supõe-se que o Apache mantém seus arquivos de log em um diretório [." "filename]#apache_log_dir# fora do [.filename]#/var#. Quando esse diretório " "está em um sistema de arquivos somente leitura, o Apache não poderá salvar " "nenhum arquivo de log e pode ter problemas para funcionar. Se for o caso, é " "necessário adicionar um novo diretório à lista de diretórios em [.filename]#/" "etc/rc.d/var# para criar em [.filename]#/var# e vincular o [." "filename]#apache_log_dir# ao [.filename]#/var/log/apache#. Também é " "necessário definir as permissões e o proprietário deste novo diretório." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:311 msgid "" "First, add the directory `log/apache` to the list of directories to be " "created in [.filename]#/etc/rc.d/var#." msgstr "" "Primeiro, adicione o diretório `log/apache` à lista de diretórios a serem " "criados em [.filename]#/etc/rc.d/var#." #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:313 msgid "" "Second, add these commands to [.filename]#/etc/rc.d/var# after the directory " "creation section:" msgstr "" "Segundo, adicione estes comandos ao [.filename]#/etc/rc.d/var# após a seção " "de criação do diretório:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:318 #, no-wrap msgid "" "# chmod 0774 /var/log/apache\n" "# chown nobody:nobody /var/log/apache\n" msgstr "" "# chmod 0774 /var/log/apache\n" "# chown nobody:nobody /var/log/apache\n" #. type: Plain text #: documentation/content/en/articles/solid-state/_index.adoc:321 msgid "" "Finally, remove the existing [.filename]#apache_log_dir# directory, and " "replace it with a link:" msgstr "" "Por fim, remova o diretório existente [.filename]#apache_log_dir# e " "substitua-o por um link:" #. type: delimited block . 4 #: documentation/content/en/articles/solid-state/_index.adoc:326 #, no-wrap msgid "" "# rm -rf apache_log_dir\n" "# ln -s /var/log/apache apache_log_dir\n" msgstr "" "# rm -rf apache_log_dir\n" "# ln -s /var/log/apache apache_log_dir\n" #~ msgid "" #~ "include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/" #~ "{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists." #~ "adoc[] include::shared/{{% lang %}}/urls.adoc[]" #~ msgstr "" #~ "include::shared/attributes/attributes-{{% lang %}}.adoc[] include::shared/" #~ "{{% lang %}}/teams.adoc[] include::shared/{{% lang %}}/mailing-lists." #~ "adoc[] include::shared/{{% lang %}}/urls.adoc[]"