I’m using Endeavor OS. My computer lost power during system update. Now I can boot into it.

  • take6056 ( take6056@feddit.nl ) 
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    I’ve had this exact error a couple of weeks ago. You have to clear the replay log (and lose potentially 30 seconds of disk writes). Let’s see if I can find exact instructions before the end of my commute.

    • take6056 ( take6056@feddit.nl ) 
      link
      fedilink
      arrow-up
      14
      ·
      1 year ago

      This is the command I used after unlocking the luks device in a rescue environment and confirming it not mounting further:

      sudo btrfs rescue zero-log /dev/mapper/luksroot
      

      After that, I could mount again and boot.

      Here’s more info on the command, to verify advice is sound: https://manpages.debian.org/testing/btrfs-progs/btrfs-zero-log.8.en.html#zero

      EDIT: For me it didn’t happen during an update, btw. You might still need the chroot approach to make the system bootable again.

      • dudesss ( dudesss@lemmy.ca ) OP
        link
        fedilink
        arrow-up
        6
        ·
        edit-2
        1 year ago

        Thanks. I tried this, was able to get into my system. After playing around with WPA_supplicant and IP link, I was able to get internet and run the updates with pacman.

        But I’m getting a similar problem as I was having at some point before, where I boot into a black screen, I can change the terminal with CTL + Alt + F1, then my login screen shows up, put my password, and the login freezes.

        When I booted into my system earlier to do the updates, I used init=/bin/bash, but SystemD didn’t auto start then, hence why I used WPA_supplicant. Perhaps SystemD is still not starting, hence why I’m not able to log in or open other terminal window.

      • This worked for me. Thankfully, I didn’t have a hard crash during an update, so my system proceeded to boot normally.

        The craziest part is that I didn’t google this. My computer crashed, I rebooted it via magic sysrq keys, and then booted to an error.

        I went on Lemmy on my phone out of frustration and by sheer chance one of the first things I saw was a solution.

  • jaxxed ( jaxxed@lemmy.ml ) 
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    Some ppl are missing the point. Ignore any instructions that are telling you to repeat any upgrades - you clearly have a btrfs (filesystem) corruption that needs to be sorted out. I don’t use btrfs in a while but if you’re lucky then a ‘btrfs-check’ should be able to fix it. You need to boot from an install/live disk, and run the command on your disk, without installing, nor mounting the disk.

    • dudesss ( dudesss@lemmy.ca ) OP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      No errors came up when I tried that.

      My system was also freezing with message “Starting Flush Journal to Persistent”.

      Adding the following to /etc/systemd/journald.conf made the error go away. Storage=persistent

      Then the system was freezing with message “Create files and directories.” Doing the following made the message go away.

      mv /tmp /old.tmp mkdir /tmp chmod 777 /tmp

      But now I’m system freezes with message “Starting D-Bus System Message Bus”

  • Are you using BTRFS as your file structure? If so, this is the little dirty secret the BTRFS fans don’t like to discuss. It is well documented in the BTRFS wiki, that during power-outages/power fails, even OS errors, files become corrupt under BTRFS. I finally had enough of this happening to me (lots of power outages where I live,) and switched back to ext4, never had this issue again.

      • It did it first on my PC, then it happened again on my laptop. That is when I investigated the cause and found out BTRFS corrupts on hard shutdowns/failures. Beyond maybe a UPS battery backup that will allow you to MAYBE have some extra time to shut down properly before the battery fails, no. I would highly recommend backing up your data and reformatting to ext4.

        • I have several (at least 5) BTRFS filesystems, on SSDs and HDDs of varying speeds, with somewhat longer cache writeback and commit times, AND some wire problems that trip my apartment breakers once or twice every month;
          I’ve been using BTRFS for about a year and a half, and at worst I suffered loss of newer data.

          • The BTRFS users are relying on backup systems, so make sure you have extensive backups as power failures can happen at any moment, etc. For me personally, a files system that so easily corrupts files, especially when power failures occur frequently, is not what I want. I will stick with ext4, a log file system, which is more stable.

  • dudesss ( dudesss@lemmy.ca ) OP
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 year ago

    This just happened on another one of my computers with BTRFS. I didn’t run pacman or manually run any other installations or updates. This is on a vanilla ArchLinux machine I’ve installed KDE using archinstall a few months ago. I use this machine often and its the first time it happened on this machine. Perhaps Discovery or Flatpak ran an update in the background. I’m not aware of automatic updates being enabled though.

    I have a problem when my computer where when I put it in sleep, or press the power bottom once, it automatically turns back on after sleeping / shutting down. I get frustrated with this sometimes and force shutdown my computer, either by holding the power button or pulling the cable. I know I shouldn’t do this. Turning on my monitor, going into the UI, safely shutting down my computer can become very time consuming on my busy schedule. Its rare it happens, but life happens and I sometimes don’t have time to wait a minute for my computer.

    May I note when going through archinstall and choosing a filesystem, do we want BTRFS or EXT4 to be shown as the default option? Currently BTFS is shown. And there is no way these errors are happening this easy for me, and not across the board.

    The backup time machine aspect as BTFS is what drawn me. Except now I strongly agree with @CrankyRebel to stay away from BTRFS, at least for personal out-of-the-box Desktop filesystems.