Manutenção básica em partições Linux
Publicado por SuporteTecnicoID (última atualização em 09/04/2017)
[ Hits: 1.954 ]
Homepage: http://www.linux-kdu.com.br
Este simples script usa recursos de verificações e correções de possíveis blocos ruins nas partições Linux, inclusive da possibilidade de abrir partições quando aparece um erro de abertura porque estão com erro em blocos, fazendo com que seja possível seu acesso na maioria dos casos.
#!/bin/bash #************************************************* #*Acesso as partições do HD no GNU/Linux KDu4 * #*Elaborado pelo SuporteTecnicoID em 2014 * #************************************************* sudo umount -a && echo "" > /tmp/findLin echo "" >> /tmp/findLin echo " Partições Localizados nas HDs " >> /tmp/findLin echo " xxxxxxxxxxxxxxxxxxxxxx " >> /tmp/findLin echo " xxxxxxxxxxxxxxxxxxxxxx " >> /tmp/findLin blkid >> /tmp/findLin echo "" >> /tmp/findLin fdisk -l >> /tmp/findLin echo "" >> /tmp/findLin gmessage -geometry 690x400 -file /tmp/findLin -center -title 'Lista das Partições Linux Localizadas no KDu4' rm /tmp/findLin & PartLin=`gmessage -center -entry " Copie e cole no espaço abaixo a identificação da Partição a corrigir." -title "Partição a corrigir"` sleep 1 echo " Partições Localizados e sendo corrigidos no disco $PartLin " > /tmp/findLin echo "" >> /tmp/findLin echo "" >> /tmp/findLin xterm -bg darkblue -fg yellow -title "Verificando e corrindo erros na Partição $PartLin ....!" -e " clear echo . echo .. echo ... echo Verificando e corrigindo erros na estrutura da Partição $PartLin echo . echo .. echo ... sudo badblocks -sv -c 1024 /dev/$PartLin >> /tmp/findLin echo . echo .. echo ... sudo fsck -f -c -y -v /dev/$PartLin >> /tmp/findLin clear sleep 1" gmessage -geometry 690x400 -timeout 15 -file /tmp/findLin -center -title 'Correções Check nas Partições Linux Localizadas no KDu4' xterm -bg darkblue -fg yellow -title "Verificando e corrindo erros na Partição $PartLin ....!" -e " clear echo . echo .. echo ... echo Verificando e corrigindo erros na estrutura da Partição $PartLin echo . echo .. echo ... sudo badblocks -sv -c 1024 /dev/$PartLin >> /tmp/findLin echo . echo .. echo ... sudo fsck -f -c -y -v /dev/$PartLin >> /tmp/findLin clear sleep 1" gmessage -geometry 690x400 -timeout 15 -file /tmp/findLin -center -title 'Correções Check nas Partições Linux Localizadas no KDu4' xterm -bg darkblue -fg yellow -title "Verificando e corrindo erros na Partição $PartLin ....!" -e " clear echo . echo .. echo ... echo Verificando e corrigindo erros na estrutura da Partição $PartLin echo . echo .. echo ... sudo badblocks -sv -c 1024 /dev/$PartLin >> /tmp/findLin echo . echo .. echo ... sudo fsck -f -c -y -v /dev/$PartLin >> /tmp/findLin clear sleep 1" gmessage -geometry 690x400 -timeout 15 -file /tmp/findLin -center -title 'Correções Fix nas Partições Linux Localizadas no KDu4' rm /tmp/findLin & gdialog --title "Executando novamente o procedimento de correção!." --yesno 'Deseja executar novamente?' if [ $? = "0" ]; then sh /opt/Scripts/Progs/Painel_de_Acoes/PartLcorrect cd elif [ $? = "1" ]; then nemo & gmessage -timeout 10 -center -title "ok! A correção na Partição $PartLin foi finalizada!" " Obrigado por usar nosso Corretor! A www.indexdata.com.br e o SuporteTecnicoID - agradecem! Tente acessar agora a partição do Linux." fi
Autenticação automática no Speedy Home
Script de Instalação de Layer7 no CentOS 6.0
Nenhum comentário foi encontrado.
Como gerar um podcast a partir de um livro em PDF
Automatizando digitação de códigos 2FA no browser
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Como Instalar o Microsoft Teams no Linux Ubuntu
Músicas de Andrew Hulshult no DOOM (WAD)
Instalar o Apache, MySQL e PHP no Oracle Linux 8
Bloqueando telemetria no Deepin 23.1
Como converter imagens PNG/JPEG para SVG em linha de comando