The translation is temporarily closed for contributions due to maintenance, please come back later.
Context English Portuguese (Brazil) State
_ translator-credits Edson Brandi, ebrandi@FreeBSD.org, 2018
Mauro Risonho de Paula Assumpção, mauro.risonho@gmail.com, 2018
Silvio Ap Silva, contato@kanazuchi.com, 2018
Danilo G. Baio, dbaio@FreeBSD.org, 2018
<personname> <firstname>John</firstname> <surname>Kozubik</surname> </personname> <affiliation> <_:address-1/> </affiliation> <personname> <firstname>John</firstname> <surname>Kozubik</surname> </personname> <affiliation> <_:address-1/> </affiliation>
FreeBSD is a registered trademark of the FreeBSD Foundation. FreeBSD is a registered trademark of the FreeBSD Foundation.
Redistribution and use in source (XML DocBook) and 'compiled' forms (XML, HTML, PDF, PostScript, RTF and so forth) with or without modification, are permitted provided that the following conditions are met: Redistribution and use in source (XML DocBook) and 'compiled' forms (XML, HTML, PDF, PostScript, RTF and so forth) with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code (XML DocBook) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified. Redistributions of source code (XML DocBook) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified.
Redistributions in compiled form (transformed to other DTDs, converted to PDF, PostScript, RTF and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Redistributions in compiled form (transformed to other DTDs, converted to PDF, PostScript, RTF and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
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</filename> and <filename>/var</filename> 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. Todos os sistemas embarcados FreeBSD que usam memória flash como disco para o sistema estarão interessados ​​em usar 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 tais como <filename>/tmp</filename> e <filename>/var</filename> são montados como sistemas de arquivos em memória para permitir que o sistema crie logs e atualize contadores e arquivos temporários. Os sistemas de arquivos em memória são um componente crítico para uma implementação bem-sucedida do FreeBSD em dispositivos de estado sólido.
options MFS # Memory Filesystem
options MD_ROOT # md device usable as a potential root device
pseudo-device md # memory disk
options MFS # Memory Filesystem
options MD_ROOT # md device usable as a potential root device
pseudo-device md # memory disk
varsize=8192 varsize=8192
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s1a / ufs ro 1 1
# Device Mountpoint FStype Options Dump Pass#
/dev/ad0s1a / ufs ro 1 1
An important thing to remember is that a filesystem that was mounted read-only with <filename>/etc/fstab</filename> can be made read-write at any time by issuing the command: Uma coisa importante para lembrar é que um sistema de arquivos que foi montado como read-only com o <filename>/etc/fstab</filename> pode ser colocado em modo read-write a qualquer momento, executando o comando:
<prompt>#</prompt> <userinput>disklabel -e /dev/ad0c</userinput> <prompt>#</prompt> <userinput>disklabel -e /dev/ad0c</userinput>
<prompt>#</prompt> <userinput>disklabel -B -r /dev/ad0c</userinput>
<prompt>#</prompt> <userinput>newfs /dev/ad0a</userinput>
<prompt>#</prompt> <userinput>disklabel -B -r /dev/ad0c</userinput>
<prompt>#</prompt> <userinput>newfs /dev/ad0a</userinput>
<prompt>#</prompt> <userinput>ifconfig xl0 192.168.0.10 netmask 255.255.255.0</userinput>
<prompt>#</prompt> <userinput>route add default 192.168.0.1</userinput>
<prompt>#</prompt> <userinput>ifconfig xl0 192.168.0.10 netmask 255.255.255.0</userinput>
<prompt>#</prompt> <userinput>route add default 192.168.0.1</userinput>
<prompt>ftp&gt;</prompt> <userinput>get tarfile.tar "| tar xvf -"</userinput> <prompt>ftp&gt;</prompt> <userinput>get tarfile.tar "| tar xvf -"</userinput>
<prompt>ftp&gt;</prompt> <userinput>get tarfile.tar "| zcat | tar xvf -"</userinput> <prompt>ftp&gt;</prompt> <userinput>get tarfile.tar "| zcat | tar xvf -"</userinput>
<prompt>#</prompt> <userinput>cd /</userinput>
<prompt>#</prompt> <userinput>umount /flash</userinput>
<prompt>#</prompt> <userinput>exit</userinput>
<prompt>#</prompt> <userinput>cd /</userinput>
<prompt>#</prompt> <userinput>umount /flash</userinput>
<prompt>#</prompt> <userinput>exit</userinput>
In <xref linkend="ro-fs"/>, it was pointed out that the <filename>/var</filename> filesystem constructed by <filename>/etc/rc.d/var</filename> 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. Em <xref linkend="ro-fs"/>, foi apontado que o sistema de arquivos <filename>/var</filename> construído pelo <filename>/etc/rc.d/var</filename> 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.
Cron Cron
However, this does not solve the problem of maintaining cron tabs across reboots. When the system reboots, the <filename>/var</filename> 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>/</filename> filesystem as read-write and copy those cron tabs to somewhere safe, like <filename>/etc/tabs</filename>, then add a line to the end of <filename>/etc/rc.initdiskless</filename> that copies those crontabs into <filename>/var/cron/tabs</filename> 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</filename>. 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</filename> 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>/</filename> como read-write e copiar estas crontabs para algum lugar seguro, como <filename>/etc/tabs</filename>, em seguida, adicione uma linha ao final do <filename>/etc/rc.initdiskless</filename> que copie estes crontabs para <filename>/var/cron/tabs</filename> 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</filename>.