I am in the process of fucking up, how to unfuck?

Yes, i accidentally zeroed 209MB of my main hard drive. Thankfully i cloned it to the second one, so i ghess i should be fine. But how do i recover that? Do i just dd if=/dev/sdb of=/dev/sda count=209453568 ?

Comments

  • i suppose you pressed ctrl+c while its zeroing. try to mount sdb and see if you see your files? if so then your oky, otherwise others might suggest recovery.

  • @ehab said:
    i suppose you pressed ctrl+c while its zeroing. try to mount sdb and see if you see your files? if so then your oky, otherwise others might suggest recovery.

    Yes, i pressed ^C while recovering. It looks like sda and sdb are identical (as well as the partition table and various UUIDs), and since it didn't touch the raid i just copied sdb1 over sda1

  • MasonMason AdministratorOG

    @foxone said:

    @ehab said:
    i suppose you pressed ctrl+c while its zeroing. try to mount sdb and see if you see your files? if so then your oky, otherwise others might suggest recovery.

    Yes, i pressed ^C while recovering. It looks like sda and sdb are identical (as well as the partition table and various UUIDs), and since it didn't touch the raid i just copied sdb1 over sda1

    Boot to rescue, dd /dev/sdb to /dev/sda, reboot with fingers crossed. That's my guess at least, but wait for a second opinion.

    Head Janitor @ LES • AboutRulesSupport

  • ClouviderClouvider Hosting ProviderOG

    I’d say backup while it’s live if you can access files on sdb

    Thanked by (1)vimalware
  • InceptionHostingInceptionHosting Hosting ProviderOG

    @Mason said:

    @foxone said:

    @ehab said:
    i suppose you pressed ctrl+c while its zeroing. try to mount sdb and see if you see your files? if so then your oky, otherwise others might suggest recovery.

    Yes, i pressed ^C while recovering. It looks like sda and sdb are identical (as well as the partition table and various UUIDs), and since it didn't touch the raid i just copied sdb1 over sda1

    Boot to rescue, dd /dev/sdb to /dev/sda, reboot with fingers crossed. That's my guess at least, but wait for a second opinion.

    ^ seconded.

    https://inceptionhosting.com
    Please do not use the PM system here for Inception Hosting support issues.

  • @AnthonySmith said:

    @Mason said:

    @foxone said:

    @ehab said:
    i suppose you pressed ctrl+c while its zeroing. try to mount sdb and see if you see your files? if so then your oky, otherwise others might suggest recovery.

    Yes, i pressed ^C while recovering. It looks like sda and sdb are identical (as well as the partition table and various UUIDs), and since it didn't touch the raid i just copied sdb1 over sda1

    Boot to rescue, dd /dev/sdb to /dev/sda, reboot with fingers crossed. That's my guess at least, but wait for a second opinion.

    ^ seconded.

    Done.. And it's dead!

  • InceptionHostingInceptionHosting Hosting ProviderOG
    edited July 2020

    @foxone said:

    @AnthonySmith said:

    @Mason said:

    @foxone said:

    @ehab said:
    i suppose you pressed ctrl+c while its zeroing. try to mount sdb and see if you see your files? if so then your oky, otherwise others might suggest recovery.

    Yes, i pressed ^C while recovering. It looks like sda and sdb are identical (as well as the partition table and various UUIDs), and since it didn't touch the raid i just copied sdb1 over sda1

    Boot to rescue, dd /dev/sdb to /dev/sda, reboot with fingers crossed. That's my guess at least, but wait for a second opinion.

    ^ seconded.

    Done.. And it's dead!

    What exactly did you do, exactly?

    My guess is you just never installed grub on sdb, boot it with supergrubdisk find the OS, boot it, install grub.

    https://inceptionhosting.com
    Please do not use the PM system here for Inception Hosting support issues.

  • Subergrubdisk doesn't detect any system for some reason

  • you zeroed the mbr and need to create a new one. If you know the configuration then just boot in rescue and --- use fdisk or parted to create same EXACTLY the same map and remount.

  • FYI, i used testdisk to undelete files ... i am fedora , sudo dnf install testdisk

  • foxonefoxone OG
    edited July 2020

    Apparently the entire /boot partition is gone. The raid is untouched and I can mount it fine (so the /) is fine

    Edit: it also looks like the raid contains /boot with all the kernels and stuff.

  • thats good news... istn't it?

    Thanked by (1)Janevski
  • @ehab said:
    thats good news... istn't it?

    Now I just gotta understand how to move that boot folder to the boot partition and install grub on it.

  • i suggest you backup what you want first ... the rest is easy.

  • foxonefoxone OG
    edited July 2020

    :)

    Edit: don't ask me why that weird ass configuration where i have two swap partitions and two boot partitions. Debian did that with the automatic installed when i set the drives as raid - i guess it's trash but it saved my ass today, so i really cannot complain.

    Thanked by (2)InceptionHosting mikho
Sign In or Register to comment.