#[FIXED] Accidentally corrupt GPT partition table, but already reinstalled but not boot..?
129 messages · Page 1 of 1 (latest)
grub-install --target=x86_64-efi --efi-directory=/mnt/boot/efi --bootloader-id=debian --removable
--removable? Is internal and primary disk.
mv /boot/efi/EFI/debian/grubx64.efi /boot/efi/EFI/boot/bootx64.efi
efibootmgr -c -l \\EFI\\debian\\shimx64.efi -L "Linux Boot"
¿Por qué estás usando el editor de archivos Dolphin y no una terminal para editar grub?
I only needed to mount the EFI partition to better show my current configuration, but not edit anything to show the grub.cfg wtf
And I don't mind showing the debian grub configuration because it's a test system, but I'm worried because it's my main disk :/
¿Por qué no estás usando una terminal? En primer lugar, debe regenerar la configuración de grub para su disco principal y posiblemente reinstalar grub en esa partición EFI en su disco principal.
tu eres estupido si?
That's what I did.-.
and what happened?
It's just that I don't speak English well, that's why it gets confusing X"D
Does not start
it's not funny when I don't understand you, it's more annoying than funny
be more specific
I'm wondering the same
In the boot menu there is no entry to start grub on my main disk. Despite having reinstalled the efi, grub (including configuration), kernels etc.
I don't have a camera :'v
entonces tienes dos opciones, puedes montar tanto la partición de arranque como la partición raíz y hacer grub-install y grub-mkconfig o puedes reformatear la partición efi por completo y reinstalar grub, así como reconstruir la imagen del kernel y tu initramfs. si eso no funciona
It also stresses me out not being able to speak English correctly, and they think it's a joke or something like that.
Ellos se burlan de ti solo queriendo hacerte saber
I DID THAT, and it doesn't start, I don't understand why, it should start WTF
Ok
explicame como lo hiciste? Quiero decir, ¿podrías borrar tus entradas de EFI por completo y luego hacerlo de esa manera? Quiero decir que también debes especificar la ruta del directorio EFI al realizar la instalación de grub.
I explained it here, I guess it's clear, right?
um
ejecutó dd, su disco está preparado, es mejor que use e2fsck para intentar reparar el disco en sí, pero ¿se puede montar su partición raíz?
I don't usually ask anything because I fix my things myself, unless I definitely can't/know how to fix it. Like right now.
Yes, I can use it normally, however it does not boot, or simply my UEFI does not detect that it is bootable (even though the EFI partition does have the boot flag)
así que ingrese a un liveCD y haga una copia de seguridad de sus datos o borre la partición de inicio por completo, formatee la partición y luego reinstale grub a través de una imagen ISO como la arch iso y monte correctamente. Parece que no sabes lo que estás haciendo porque lo que te estoy explicando funcionará al 100%.
It was only 40MB, so it only damaged the boot and partition table, my data is completely fine.
I booted the debian 12 rescue mode via pendrive, I chrooted the sda4 and from there I rebuilt the entire boot as I already mentioned
but it can't start WTF
your partition table is corrupted
you need to move your data
either you can do e2fsck
like I said
if your root is saved than that's great
but
you need to reinstall
also why are you using debian
debian is ass
Servers, arch would be unstable in the long term due to rolling release.
oh it's a server
Yes, arch is very good, in fact I'm using it right now to write here XD
you need to make a copy of the root data and move it over, your partition table would need to be detected and rewritten with a software but you messed it up
e2fsck``` might be able to fix it like I said
but
what you need to do is make a .img of the data you can save
using dd
and make a new install of debian and transfer that data over
comprendo
Likewise, I already have the most important thing backed up (servers), but it would be great for me to avoid reinstalling and back up more than 250GB._.
Usando TestDisk
TestDisk es una potente herramienta de código abierto para recuperar tablas de particiones4
. Aquí se explica cómo usarlo:
Descargue y ejecute TestDisk.
Cree un nuevo archivo de registro.
Seleccione la unidad afectada.
Elija "Analizar" para examinar la estructura de partición actual.
Seleccione "Búsqueda rápida" para comenzar a escanear.
Una vez que TestDisk enumere las particiones reconocidas, revíselas detenidamente.
Si la estructura de la partición parece correcta, seleccione "Escribir" para recuperarla.
Confirme los cambios cuando se le solicite.
I can't help you as you don't want to take my advice
The partition table is fine, I think maybe it is the boot sector, but since it is GPT it shouldn't be that.
In GPT there is no MBR as such.
I was going to try e2fsck just now
format the boot partition, reinstall your kernel and initramfs and do grub-install and grub-mkconfig
Which I already did :V
But in what??
Since only 40MB of data was overwritten, primarily affecting the boot sector and partition table, your data is likely intact. To repair the partition table, you can follow these steps:
Using TestDisk
TestDisk is a powerful open-source tool for recovering partition tables. Here's how to use it:
- Download and run TestDisk.
- Create a new log file.
- Select the affected drive.
- Choose "Analyze" to examine the current partition structure.
- Select "Quick Search" to begin scanning.
- Once TestDisk lists the recognized partitions, review them carefully.
- If the partition structure looks correct, select "Write" to recover it.
- Confirm the changes when prompted.
Using DMDE
DMDE is another effective tool for partition recovery:
- Download and run DMDE.
- Select the affected drive.
- Right-click the partition and select "Advanced Mode".
- Use the partition recovery features to restore the partition table.
Manual GPT Recovery
If you're dealing with a GPT partition table, you can try this method:
- Boot from a live Linux distribution.
- Use a tool like gdisk to read the backup GPT at the end of the disk.
- Restore the primary GPT using the backup data.
Important Considerations
- Avoid writing new data to the drive before attempting recovery.
- If possible, work on a copy of the drive to prevent further data loss.
- After recovering the partition table, you may need to rebuild the boot sector and reinstall the bootloader (e.g., GRUB).
Remember, while these methods can often recover the partition table, it's crucial to have backups of important data to prevent loss in such situations.
I told you a solution
but you don't want to
because you're lazy
I'm done helping lo siento
you can backup and fix it
it's a server
you should do it the right way
WHAT?
that server is already not healthy
the partition table is damaged
and DD doesn't work from byte to byte
I already told you, I was going to try e2fsck but you're still here talking disparagingly :V
That's what I'm going for
sudo e2fsk /dev/sda```
My problem here is that it is corrupted more than I thought, it is not enough to simply reinstall efi, grub, .....
No wonder nothing like that worked.
I just wanted to know this, the superblock is corrupt.
And I can think of 3 solutions
I'm very sorry for the discussion/debate in that tone, but oh well.
@sonic wedge
hoi.. i am a @azure geode friend and long story short, i think it was a very big mis-understandig from all parts, @steady wave you were nice and tried to be friendly but in the way you expressed yourself was very rough towards maj, and i think the situation escalated from there, i dont know who else was involved but, yeah, there are better ways to express, without being disrespectful, and it is important to understand that there is a level of understanding and confidence to talk that way with an unknown person,
thank you for helping and, wish that something like this dont happen in the future,
and a little reminder that. this is a big community, and you have to understand that you should be welcoming of newbs, and that everyone work in a different way, if you want to recommend a different way to do something, you are "RECOMMENDING" and not forcing, you can explain why it might be a better way, but never dumb down another for not seeing things like you do,
have a nice day you all
majhrs16, and coleonwii received a thank you cookie!
I expressed that I was fine, but I got agitated when I gave him a form of resolution and wasn't taking it. I told him I had given him a resolution and waited, but he didn't listen. I've been in this community 5x as long as you, and again, if you all got offended by me saying a way to solve a problem and him not wanting to do so, then that's on you. I've dealt with this before, this particular issue, and they were egotistical at first, assuming that they knew of a better solution when especially that server was already unhealthy because of what he did with dd and his best course of action as an admin would either roll back to a backup (if he has any) or backup the preservable root partition and then transfer the data over to a clean installation once again. The way he was trying to do things was not how server architecture should be managed, and not having a backup, at least for the central node in his cluster, would be catastrophic like it was in this instance. If someone is to come in asking for help and yet not take a persons advice, why ask for help?
There were multiple people in vc that were being offensive and I was the only one listening for your information but where I drew the line is where I wasn't going to help because I gave a resolution
Then he realizes that's the only way to fix it after 2 hours of me saying it over and over and over
Nana i am nof offended. He and everything is good now, and the last part was ment for the other people involved. Ans again. Thank you so much bro
And yeah, it sometimes happens to me that i have the answer in my face and i domt see that, but if after frustration
He was fighting with that topic for days
And also, nice to meet you
It’s better off long term having backups
🙂
I had this same thing happen to me years ago
But the whole drive instead
Yeah haha i have to learn that
Daang. I hope that this doesnt happen to me
Nice to meet you too
I will try to back up my drive soon
At least he didn't lose data
True
He should be grateful
And he is
It could have been a lot worse
And I mean that
Especially that being his main system
Without a backup
True, (that is knocking my door too)
I made a server for that sole reason haha. Gotta use it now
English: Sorry but... Just because I'm new to this Discord and asking a technical question, and you don't know me yet, doesn't necessarily mean I'm completely wrong just because I said: I already tried 5 other times!.
Español: Lo siento pero... Solo porque soy nuevo en este Discord y haga una pregunta técnica, y aún no me conozcas, no necesariamente implica que esté completamente equivocado solo porque dije: ¡Ya lo intenté otras 5 veces!!
[FIXED] Accidentally corrupt GPT partition table, but already reinstalled but not boot..?