15
Wombat
4y

😵 help - I totally fucked up.

I managed to delete my /dev/sda1 partition with gparted while trying to format an USB-Stick...

Now my laptop not even trys to boot. It only opens BIOS without any boot options. I absolutely have no idea how to fix that shit. 😣😰

Comments
  • 9
    Linux Life CD with gparted and try recovering the partition.
  • 1
    @iiii it has no cd drive and the linux usb stick I created is not booting. Not even a single boot option in bios.
  • 3
    There's nothing important on sda1 anyway, only the EFI stuff.

    Try hitting F8 for a boot menu. Also, the boot order is maybe not under boot in the bios, but under devices.
  • 1
    @Fast-Nop yea sure. But it shows no boot option. I tried that. I also cant create new boot options in bios or change order or smth.
  • 3
    When I hit esc on startup
  • 1
    When I enter bios
  • 1
    Maybe your hard disk is just fucked? Or the board
  • 2
    @ZeldaFan69-2 In the first image, what happens if you do what it says, using cursor up/down to select something?

    In the second image, what's behind "delete boot options"?
  • 1
  • 0
    When i hit delete boot option it shows an empty list
  • 0
  • 2
    Is that with the USB stick put in?

    Oh and under "Security", maybe you need to disable secure boot if it's enabled.
  • 2
    @Fast-Nop the usb stick is plugged in. Secure boot is disabled already. 😉
  • 1
    @ZeldaFan69-2 What about UEFI vs. CSM? Not all Linux ISOs can deal with both.
  • 1
  • 0
    @Fast-Nop I had Linux Ubuntu installed on it before and actually I downloaded the same iso which was installed before.
  • 2
    The BIOS can be set to either UEFI, which is the modern way (and required to use secure boot), or the old way via CSM, which is classic Bios behaviour.

    And maybe there's also something like "legacy USB" to activate.
  • 0
    @Fast-Nop I don't know wich bios is installed. I bought the laptop a few weeks ago... So probably the uefi one.
  • 1
    @ZeldaFan69-2 For sure it supports UEFI because it also can do secure boot, yeah, but many Bios can also do stuff the old way if you select that option, that's what CSM is for. Compatibility Something More.

    On the other hand, you must have booted from USB stick before with these Bios settings to get Ubuntu installed in the first place, so that must have worked.

    Maybe the USB stick hasn't been prepared properly, that's why it can't boot from that.
  • 1
    @ZeldaFan69-2 But a Linux distribution is on the USB stick you are trying to boot from?
  • 1
    @Fast-Nop I google a little and found this question. It looks like my problem.

    https://superuser.com/questions/...

    How do I create an ubuntu stick in uefi mode?
  • 0
    @sbiewald yes. I created it after this shit happened.
  • 1
    @ZeldaFan69-2 The ISO should already support that if you just use dd for throwing the ISO on the stick. The problem is that you need a working Linux computer for that.
  • 1
    @Fast-Nop i have a working (second) linux computer. After i killed my new notebook i dd-created a bootable USB device as you said.
  • 1
    @ZeldaFan69-2 And can you boot the second computer from that USB stick? Just to check whether it works in general.
  • 1
    @Fast-Nop I am recreating it right now. Will test that next.
  • 2
    @ZeldaFan69-2 And while you're at it, Mint-Cinnamon is the better Ubuntu anyway. ^^
  • 1
    It's booting now... 🤷
  • 0
    So I start trying to restore the boot/efi. Any suggestions?
  • 0
    What is this?
  • 2
    @ZeldaFan69-2 Should be in FAT32 because the Bios won't read ext4. And bootable. And GPT partition, not MBR, because MBR won't work with UEFI.
  • 0
    @Fast-Nop do I have to recreate with dd? Are there any flags or options I missed?
  • 2
    @ZeldaFan69-2 Don't use dd for the SSD because that might even cost you the data partitions. I'd use gpartd.
  • 0
    @Fast-Nop on the USB-Stick? I was unable to create a bootable stick witj gparted... 😬

    I like the command line...
  • 1
    For the boot error, try the kernel option "iommu=soft".
  • 2
    @ZeldaFan69-2 No - first, you boot from the USB stick into the live system where you should have gpartd, and then you partition sda1 which will probably be sdb1 now because you boot from USB which will be sda.
  • 2
    And if that works, I mean booting into the live system, then Debian has a guide for reinstalling grub:

    https://wiki.debian.org/GrubEFIRein...
  • 3
    Simple! Just restore it from a backup.
  • 2
  • 0
    @ZeldaFan69-2 glad to be of help 😊
  • 0
    I’ve seen the avatar and I thought it was @rememberme. I refused to believe my eyes.

    Ah, it’s not. Everything is okay.
  • 1
    I don’t know how to recover a partition table. I’d plugged that hard drive in some other computer and tried to recover some files with analyzers, you know that apps that can recover deleted files.
  • 1
    My debug actions for this kind of stuff which hopefully could help you:

    On another PC, download Rufus and Ubuntu (20.04 is what I use)
    Use Rufus to make the USB bootable with the Ubunti ISO (make sure to select legacy options and MBR)
    Boot the PC from the stick and select Try ubuntu, when it is up, open Gparted and you can find out how to recover the partition from there

    Once you have Gparted running and you can see the drive which has the deleted partition, a bit of Google and you should be able to recover it
  • 1
    I have a decent amount of experience with losing and saving data:
    https://devrant.com/rants/3487008/...
  • 3
    @frogstair Nah, you get a veeeeery clear warning before being able to format with gparted and you can't run it without root access so for your normal users, this would never happen even close to easily.
  • 2
    @linuxxx exactly. I was just very ignorant... 🙄
  • 4
    @ZeldaFan69-2 @frogstair for the record, the "ARE YOU SURE YOU WANT TO ERASE THIS MEDIUM, ALL DATA ON IT WILL BE LOST" message from gparted has saved me a few times from fucking up already 😅
  • 1
    Well this shit is wasting my whole sunday.

    Protip: Read before format.
  • 6
    I managed to rescue the important data and reinstalled the os afterwards.

    I want to say thank you to all people involved and especially to @Fast-Nop.

    Thank you guys. I was pretty hopeless
  • 0
    @ZeldaFan69-2 as I said, I'm glad to be of help 😊
  • 1
Add Comment