DEV Community

Jan Silva
Jan Silva

Posted on

how to fix cryptographed ubuntu gdm3

# tentou montar normalmente e não conseguiu por que era crytografado
     sudo mount /dev/sda1 sda1 -o uid=1000,gid=1000
     sudo umount sda1

# instalou o cryptsetup
   1  sudo apt-get install cryptsetup 

# encontrar sua partição crytografada
   2  blkid | grep "crypto_LUKS"

# abrir partição cryptografada, vai pedir senha
   3  sudo cryptsetup luksOpen /dev/nvme0n1p3 mypartition


# descobrir o nome da partição vg
   4  sudo vgscan 
   5  sudo lvdisplay 

# montar partição vg
   6  sudo mount /dev/vgubuntu/root sda1


# processo de chroot
   7  sudo mount --bind /proc/ /mnt/sda1/proc/
   8  sudo mount --bind /dev/ /mnt/sda1/dev/
   9  sudo mount --bind /sys/ /mnt/sda1/sys/
  10  sudo mount --bind /dev/pts/ /mnt/sda1/dev/pts
  11  sudo cp -L /etc/resolv.conf /mnt/sda1/etc/resolv.conf 
  12  sudo chroot /mnt/sda1 /bin/bash

# agora dentro da máquina, reinstalar o gdm
  13  sudo apt-get reinstall gdm3

# volte pra a máquina do pendrive
  14  exit

# desfaça as montagens e feche o hd novamente com a crpytografia
  15  sudo umount /mnt/sda1/proc 
  16  sudo umount /mnt/sda1/sys
  18  sudo umount /mnt/sda1/dev/pts 
  19  sudo umount /mnt/sda1/dev

# listar as partições vg
  20  sudo dmsetup info -C

# mudar para a vgroot do pendrive
  21  sudo vgchange -a n vgubuntu

# fechar partição novamente
  22  sudo cryptsetup close mypartition

# reiniciar e ser feliz
Enter fullscreen mode Exit fullscreen mode

Postmark Image

The email service that speaks your language

Whether you code in Ruby, PHP, Python, C#, or Rails, Postmark's robust API libraries make integration a breeze. Plus, bootstrapping your startup? Get 20% off your first three months!

Start free

Top comments (0)

Postmark Image

"Please fix this..."

Focus on creating stellar experiences without email headaches. Postmark's reliable API and detailed analytics make your transactional emails as polished as your product.

Start free

👋 Kindness is contagious

Explore a trove of insights in this engaging article, celebrated within our welcoming DEV Community. Developers from every background are invited to join and enhance our shared wisdom.

A genuine "thank you" can truly uplift someone’s day. Feel free to express your gratitude in the comments below!

On DEV, our collective exchange of knowledge lightens the road ahead and strengthens our community bonds. Found something valuable here? A small thank you to the author can make a big difference.

Okay