Acessando o terminal no Lubuntu entrei como superusuario, com
sudo su, listei as particoes com
fdisk -l que me retornou
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xa6990f63
Device Boot Start End Blocks Id System
/dev/sda1 1 976773167 488386583+ ee GPT
Partition 1 does not start on physical sector boundary.
Como o HD se mostrou ter uma tabela GPT, usei o comando
parted -l /dev/sda que retornou:
Model: ATA ST500LT012-1DG14 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 420MB 419MB ntfs Basic data partition hidden, diag
2 420MB 693MB 273MB fat32 EFI system partition boot
3 693MB 827MB 134MB Microsoft reserved partition msftres
4 827MB 251GB 250GB ntfs Basic data partition msftdata
5 251GB 254GB 2745MB ntfs Basic data partition msftdata
6 254GB 254GB 472MB ntfs hidden, diag
8 254GB 255GB 325MB ext4
9 255GB 257GB 2000MB linux-swap(v1)
10 257GB 289GB 32.2GB ntfs msftdata
12 289GB 468GB 179GB ext4
14 468GB 470GB 2048MB ext4
13 470GB 470GB 106MB ext4
11 470GB 481GB 10.8GB ntfs msftdata
7 481GB 500GB 19.2GB ntfs Basic data partition hidden, msftdata
Após verificar que a partição /dev/sda12 possuia 179 GB e era aonde tinha instalado a "/" do meu sistema, resolvi criar um ponto de montagem e monta-la com os comandos:
mkdir /media/DESTINO e
mount /dev/sda12 /media/DESTINOVerifiquei se a partição montada era a partição correta, listando os seus arquivos com o comando
ls /media/DESTINO.
Como era a partição correta, consultei o arquivo /etc/fstab da partição montada, para verificar quais outras partições precisavam ser montadas, com o comando:
cat /media/DESTINO/etc/fstab.
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda12 during installation
UUID=0297fc42-988a-488f-a5e5-2ddd858bf06e / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda13 during installation
UUID=738de42d-ebd1-4dbc-b624-8f389b6ee43f /boot ext4 defaults 0 2
# /boot/efi was on /dev/sda2 during installation
UUID=8E73-800D /boot/efi vfat defaults 0 1
# /home was on /dev/sda14 during installation
UUID=34d93512-6ce5-4372-a61e-73a1f29e3eb2 /home ext4 defaults 0 2
# swap was on /dev/sda9 during installation
UUID=42c979dd-0cec-4df9-8602-2cbaf1ff962b none swap sw 0 0
Montei as partições que faltavam com:
mount /dev/sda13 /media/DESTINO/bootmount /dev/sda2 /media/DESTINO/boot/efimount /dev/sda14 /media/DESTINO/homeMontei os outros sistemas necessários para usar o sistema hospedeiro quando fosse modificar a raiz pra reparar o sistema danificado.
mount --bind /dev /media/DESTINO/devmount --bind /dev/pts /media/DESTINO/dev/ptsmount --bind /sys /media/DESTINO/sysmount --bind /proc /media/DESTINO/procModifiquei para a raiz do sitema danificado.
chroot /media/DESTINO su -Verifiquei as últimas 30 linhas do log do apt para verificar erros.
tail -n30 /var/log/apt/history.logStart-Date: 2016-08-18 14:48:37
Commandline: aptdaemon role='role-commit-packages' sender=':1.161'
Install: libsoxr0:amd64 (0.1.1-1, automatic), libportsmf0:amd64 (0.1~svn20101010-4, automatic), audacity:amd64 (2.0.5-1ubuntu3.2), libwxbase2.8-0:amd64 (2.8.12.1+dfsg-2ubuntu2, automatic), libid3tag0:amd64 (0.15.1b-10ubuntu1, automatic), audacity-data:amd64 (2.0.5-1ubuntu3.2, automatic), libvamp-hostsdk3:amd64 (2.5+repack0-2, automatic), libsbsms10:amd64 (2.0.1-1, automatic), libwxgtk2.8-0:amd64 (2.8.12.1+dfsg-2ubuntu2, automatic)
End-Date: 2016-08-18 14:49:37
Start-Date: 2016-08-19 11:49:46
Commandline: aptdaemon role='role-commit-packages' sender=':1.92'
Install: tesseract-ocr-eng:amd64 (3.02-2, automatic), tesseract-ocr-equ:amd64 (3.02-2, automatic), tesseract-ocr-osd:amd64 (3.02-2, automatic), python-sane:amd64 (2.3.0-1ubuntu3, automatic), libgoocanvas3:amd64 (0.15-1.1ubuntu1, automatic), python-pygoocanvas:amd64 (0.14.1-1ubuntu8, automatic), unpaper:amd64 (0.4.2-1, automatic), libgoocanvas-common:amd64 (0.15-1.1ubuntu1, automatic), python-imaging-sane:amd64 (2.3.0-1ubuntu3, automatic), ocrfeeder:amd64 (0.7.11-3), python-enchant:amd64 (1.6.5-2build1, automatic), liblept4:amd64 (1.70.1-1, automatic), python-tk:amd64 (2.7.5-1ubuntu1, automatic), tesseract-ocr:amd64 (3.03.02-3, automatic), libtesseract3:amd64 (3.03.02-3, automatic)
End-Date: 2016-08-19 11:50:10
Start-Date: 2016-08-19 12:07:35
Commandline: aptdaemon role='role-commit-packages' sender=':1.90'
Install: xserver-xorg-video-mach64-lts-xenial:amd64 (6.9.5-1build2~trusty1, automatic), xserver-xorg-video-all-lts-xenial:amd64 (7.7+13ubuntu3~trusty2, automatic), xserver-xorg-video-amdgpu-lts-xenial:amd64 (1.1.0-1~trusty1, automatic), linux-signed-generic-lts-xenial:amd64 (4.4.0.34.24), xserver-xorg-video-cirrus-lts-xenial:amd64 (1.5.3-1ubuntu3~trusty1, automatic), linux-headers-4.4.0-34-generic:amd64 (4.4.0-34.53~14.04.1, automatic), xserver-xorg-video-radeon-lts-xenial:amd64 (7.7.0-1~trusty2, automatic), xserver-xorg-video-mga-lts-xenial:amd64 (1.6.4-1build2~trusty1, automatic), xserver-xorg-video-trident-lts-xenial:amd64 (1.3.7-1build2~trusty1, automatic), xserver-xorg-video-fbdev-lts-xenial:amd64 (0.4.4-1build5~trusty1, automatic), xserver-xorg-video-tdfx-lts-xenial:amd64 (1.4.6-1build2~trusty1, automatic), libglapi-mesa-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1, automatic), xserver-xorg-video-ati-lts-xenial:amd64 (7.7.0-1~trusty2, automatic), libwayland-egl1-mesa-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1), xserver-xorg-input-all-lts-xenial:amd64 (7.7+13ubuntu3~trusty2), linux-image-4.4.0-34-generic:amd64 (4.4.0-34.53~14.04.1, automatic), linux-headers-4.4.0-34:amd64 (4.4.0-34.53~14.04.1, automatic), xserver-xorg-video-neomagic-lts-xenial:amd64 (1.2.9-1build2~trusty1, automatic), xserver-xorg-video-savage-lts-xenial:amd64 (2.3.8-1ubuntu3~trusty1, automatic), linux-generic-lts-xenial:amd64 (4.4.0.34.24), libegl1-mesa-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1), xserver-xorg-input-vmmouse-lts-xenial:amd64 (13.1.0-1ubuntu2~trusty1, automatic), xserver-xorg-input-evdev-lts-xenial:amd64 (2.10.1-1ubuntu2~trusty1, automatic), libgles2-mesa-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1), linux-headers-generic-lts-xenial:amd64 (4.4.0.34.24, automatic), xserver-xorg-video-vesa-lts-xenial:amd64 (2.3.4-1build2~trusty1, automatic), linux-signed-image-generic-lts-xenial:amd64 (4.4.0.34.24, automatic), xserver-xorg-video-siliconmotion-lts-xenial:amd64 (1.7.8-1ubuntu6~trusty1, automatic), linux-signed-image-4.4.0-34-generic:amd64 (4.4.0-34.53~14.04.1, automatic), libxatracker2-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1), linux-image-extra-4.4.0-34-generic:amd64 (4.4.0-34.53~14.04.1, automatic), xserver-xorg-input-wacom-lts-xenial:amd64 (0.32.0-0ubuntu3~trusty1, automatic), xserver-xorg-video-nouveau-lts-xenial:amd64 (1.0.12-1build2~trusty1, automatic), xserver-xorg-video-openchrome-lts-xenial:amd64 (0.3.3+git20160310-1~trusty1, automatic), xserver-xorg-video-qxl-lts-xenial:amd64 (0.1.4-3ubuntu3~trusty1, automatic), libgbm1-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1, automatic), xserver-xorg-video-intel-lts-xenial:amd64 (2.99.917+git20160325-1ubuntu1~trusty1, automatic), xserver-xorg-video-sisusb-lts-xenial:amd64 (0.9.6-2build5~trusty1, automatic), libgl1-mesa-dri-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1, automatic), libgl1-mesa-glx-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1), linux-image-generic-lts-xenial:amd64 (4.4.0.34.24, automatic), xserver-xorg-video-vmware-lts-xenial:amd64 (13.1.0-2ubuntu3~trusty1, automatic), xserver-xorg-core-lts-xenial:amd64 (1.18.3-1ubuntu2.2~trusty2), xserver-xorg-video-r128-lts-xenial:amd64 (6.10.0-1build2~trusty1, automatic), libgles1-mesa-lts-xenial:amd64 (11.2.0-1ubuntu2~trusty1), xserver-xorg-lts-xenial:amd64 (7.7+13ubuntu3~trusty2), xserver-xorg-input-synaptics-lts-xenial:amd64 (1.8.2-1ubuntu3~trusty1, automatic), libllvm3.8v4:amd64 (3.8-2ubuntu3~trusty4, automatic)
Upgrade: gnupg:amd64 (1.4.16-1ubuntu2.3, 1.4.16-1ubuntu2.4), gpgv:amd64 (1.4.16-1ubuntu2.3, 1.4.16-1ubuntu2.4), libgcrypt11:amd64 (1.5.3-2ubuntu4.3, 1.5.3-2ubuntu4.4)
Remove: xserver-xorg-video-neomagic-lts-wily:amd64 (1.2.9-1~trusty1), xserver-xorg-input-wacom-lts-wily:amd64 (0.30.0-0ubuntu3~trusty1), xserver-xorg-video-radeon-lts-wily:amd64 (7.5.0+git20150819-0ubuntu1~trusty1), xserver-xorg-video-nouveau-lts-wily:amd64 (1.0.11-1ubuntu3~trusty1), xserver-xorg-video-vmware-lts-wily:amd64 (13.1.0-0ubuntu1build2~trusty1), xserver-xorg-core-lts-wily:amd64 (1.17.2-1ubuntu9.1~trusty1), xserver-xorg-lts-wily:amd64 (7.7+7ubuntu4~trusty1), xserver-xorg-input-vmmouse-lts-wily:amd64 (13.1.0-0ubuntu1~trusty1), xserver-xorg-video-openchrome-lts-wily:amd64 (0.3.3-1ubuntu1~trusty1), libgbm1-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1), libgl1-mesa-glx-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1), libglapi-mesa-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1), xserver-xorg-video-savage-lts-wily:amd64 (2.3.8-1ubuntu1~trusty1), xserver-xorg-video-sisusb-lts-wily:amd64 (0.9.6-2build3~trusty1), xserver-xorg-video-trident-lts-wily:amd64 (1.3.7-1~trusty1), libgl1-mesa-dri-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1), xserver-xorg-video-ati-lts-wily:amd64 (7.5.0+git20150819-0ubuntu1~trusty1), xserver-xorg-video-mach64-lts-wily:amd64 (6.9.5-1~trusty1), xserver-xorg-video-tdfx-lts-wily:amd64 (1.4.6-1~trusty1), xserver-xorg-video-r128-lts-wily:amd64 (6.10.0-1~trusty1), xserver-xorg-input-evdev-lts-wily:amd64 (2.9.2-1ubuntu1~trusty2), xserver-xorg-input-all-lts-wily:amd64 (7.7+7ubuntu4~trusty1), xserver-xorg-video-siliconmotion-lts-wily:amd64 (1.7.8-1ubuntu4~trusty1), libxatracker2-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1), xserver-xorg-input-synaptics-lts-wily:amd64 (1.8.2-1ubuntu1~trusty1), libegl1-mesa-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1), xserver-xorg-video-mga-lts-wily:amd64 (1.6.4-1~trusty1), xserver-xorg-video-qxl-lts-wily:amd64 (0.1.4-3ubuntu1~trusty1), libgles2-mesa-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1), xserver-xorg-video-all-lts-wily:amd64 (7.7+7ubuntu4~trusty1), xserver-xorg-input-mouse-lts-wily:amd64 (1.9.1-1~trusty1), libwayland-egl1-mesa-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1), xserver-xorg-video-cirrus-lts-wily:amd64 (1.5.3-1ubuntu1~trusty1), xserver-xorg-video-fbdev-lts-wily:amd64 (0.4.4-1build3~trusty1), xserver-xorg-video-vesa-lts-wily:amd64 (2.3.4-0ubuntu1~trusty1), xserver-xorg-video-intel-lts-wily:amd64 (2.99.917+git20150808-0ubuntu4~trusty2), libgles1-mesa-lts-wily:amd64 (11.0.2-1ubuntu4~trusty1)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2016-08-19 12:10:23
Start-Date: 2016-08-23 09:15:31
Commandline: aptdaemon role='role-commit-packages' sender=':1.95'
Upgrade: libupnp6:amd64 (1.6.17-1.2, 1.6.17-1.2+deb7u1build0.14.04.1)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2016-08-23 09:17:11
Start-Date: 2016-08-23 10:34:36
Commandline: apt-get -y purge linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic linux-headers-4.2.0-42 linux-headers-4.2.0-42-generic linux-image-4.2.0-27-generic linux-image-4.2.0-42-generic linux-image-extra-4.2.0-27-generic linux-image-extra-4.2.0-42-generic linux-libc-dev:amd64 linux-signed-image-4.2.0-42-generic
Purge: linux-image-extra-4.2.0-42-generic:amd64 (4.2.0-42.49~14.04.1), linux-image-4.2.0-42-generic:amd64 (4.2.0-42.49~14.04.1), linux-headers-4.2.0-27-generic:amd64 (4.2.0-27.32~14.04.1), linux-generic-lts-wily:amd64 (4.2.0.42.34), linux-image-extra-4.2.0-27-generic:amd64 (4.2.0-27.32~14.04.1), linux-image-4.2.0-27-generic:amd64 (4.2.0-27.32~14.04.1), linux-headers-generic-lts-wily:amd64 (4.2.0.42.34), linux-signed-image-generic-lts-wily:amd64 (4.2.0.42.34), linux-headers-4.2.0-27:amd64 (4.2.0-27.32~14.04.1), linux-headers-4.2.0-42:amd64 (4.2.0-42.49~14.04.1), linux-image-generic-lts-wily:amd64 (4.2.0.42.34), linux-signed-generic-lts-wily:amd64 (4.2.0.42.34), linux-headers-4.2.0-42-generic:amd64 (4.2.0-42.49~14.04.1), linux-libc-dev:amd64 (3.13.0-93.140), linux-signed-image-4.2.0-42-generic:amd64 (4.2.0-42.49~14.04.1), libc6-dev:amd64 (2.19-0ubuntu6.9)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2016-08-23 10:36:54
Foi verificado que no dia 2016-08-19 às 12:10:23 o dpkg terminou voltando uma mensagem de erro de code (1)
O uso do comando abaixo é recomendável para o apt voltar a instalação de onde parou.
dpkg --configure -aConfigurando linux-signed-image-4.4.0-34-generic (4.4.0-34.53~14.04.1) ...
Generating grub configuration file ...
Encontrado imagem linux: /boot/vmlinuz-4.4.0-34-generic
Encontrado imagem initrd: /boot/initrd.img-4.4.0-34-generic
Adding boot menu entry for EFI firmware configuration
concluído
Configurando linux-image-extra-4.4.0-34-generic (4.4.0-34.53~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
Generating grub configuration file ...
Encontrado imagem linux: /boot/vmlinuz-4.4.0-34-generic
Encontrado imagem initrd: /boot/initrd.img-4.4.0-34-generic
Adding boot menu entry for EFI firmware configuration
concluído
Configurando linux-image-generic-lts-xenial (4.4.0.34.24) ...
Configurando linux-signed-image-generic-lts-xenial (4.4.0.34.24) ...
Configurando linux-generic-lts-xenial (4.4.0.34.24) ...
Configurando linux-signed-generic-lts-xenial (4.4.0.34.24) ...
FOi usado o comando:
apt -f installLendo listas de pacotes... Pronto
Construindo árvore de dependências
Lendo informação de estado... Pronto
Os seguintes pacotes foram instalados automaticamente e já não são necessários:
libc-dev-bin libgcj-common libgcj14 libgcj14-awt libllvm3.6
Utilize 'apt-get autoremove' para os remover.
Os pacotes a seguir serão REMOVIDOS:
linux-image-extra-4.2.0-27-generic
0 pacotes atualizados, 0 pacotes novos instalados, 1 a serem removidos e 7 não atualizados.
1 pacotes não totalmente instalados ou removidos.
Depois desta operação, 161 MB de espaço em disco serão liberados.
Você quer continuar? [S/n] s
(Lendo banco de dados ... 196649 ficheiros e directórios actualmente instalados.)
A remover linux-image-extra-4.2.0-27-generic (4.2.0-27.32~14.04.1) ...
depmod: FATAL: could not load /boot/System.map-4.2.0-27-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
update-initramfs: Generating /boot/initrd.img-4.2.0-27-generic
grep: /boot/config-4.2.0-27-generic: Arquivo ou diretório não encontrado
WARNING: missing /lib/modules/4.2.0-27-generic
Device driver support needs thus be built-in linux image!
depmod: ERROR: could not open directory /lib/modules/4.2.0-27-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_oIHVPY/lib/modules/4.2.0-27-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_oIHVPY/lib/modules/4.2.0-27-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.2.0-27-generic /boot/vmlinuz-4.2.0-27-generic
Generating grub configuration file ...
Encontrado imagem linux: /boot/vmlinuz-4.4.0-34-generic
Encontrado imagem initrd: /boot/initrd.img-4.4.0-34-generic
Adding boot menu entry for EFI firmware configuration
Neste ponto o sistema já se encontrava corrigido. Faltava reiniciar com os comandos:
exitrebootAo reiniciar, o Ubuntu entrou e foi feita a atualização do Sistema.
Placar do dia:
Leandro99 1 x 1 selvaking
Esse placar só nós dois entendemos.