this post was submitted on 04 Aug 2024
322 points (88.0% liked)

linuxmemes

21278 readers
1209 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] gaylord_fartmaster@lemmy.world 241 points 3 months ago (4 children)

    The power is out and my laptop has less than 10% battery left?

    It's pacman -Syu time.

    [–] 0x4E4F@sh.itjust.works 66 points 3 months ago (1 children)

    Exactly my thoughts as well.

    Why update on that little battery life left... the power will return sooner or later, going without updates even for a week or two is no real problem. Hell, I update like once every 3 weeks to a month, it's not that big of a deal.

    load more comments (1 replies)
    [–] PlexSheep@infosec.pub 20 points 3 months ago (8 children)

    Wait if the power is out, how do they have Internet to load new packages? Something doesn't make sense here

    [–] kolorafa@lemmy.world 17 points 3 months ago* (last edited 3 months ago) (3 children)

    It first downloads all packages from net, then it proceed totally offline starting by verifying downloaded files, signatures, extracting new packages and finally rebuilding initramfs.

    Because arch is replacing the kernel and inittamfs in-place there is a chance that it will not boot if interrupted.

    This issue was long resolved on other distro.

    One way to mitigate it is by having multiple kernels (like LTS or hardened) that you can always pick in grub if the main one fail.

    [–] superkret@feddit.org 7 points 3 months ago (1 children)

    This issue was solved on Slackware in 1993.
    It installs a "huge" kernel that contains all drivers to run on almost any hardware by default, alongside the "generic" kernel with only the modules you need. If the generic kernel fails to boot, you always have the backup, which is known to work, cause it's the kernel you first boot into after installation.

    [–] sukhmel@programming.dev 6 points 3 months ago (1 children)

    I'm not familiar with slackware but why is specific kernel called generic, while generic one is not called generic? I'm puzzled

    load more comments (1 replies)
    load more comments (2 replies)
    [–] Artyom@lemm.ee 11 points 3 months ago (1 children)

    Cable internet tends to stay online even if your power is out. You'd need a battery backup for your modem/router, but it is possible to stay online. Houses can be clever like that, almost all of your utilities will partially work, even when service is interrupted.

    [–] cmnybo@discuss.tchncs.de 7 points 3 months ago

    That depends on the ISP having backup batteries for their equipment. It will usually only last a couple of hours. 5G will usually stay up for a few days. For longer outages, you will need satellite internet and lots of fuel for your generator.

    load more comments (6 replies)
    [–] bitwaba@lemmy.world 19 points 3 months ago* (last edited 3 months ago) (1 children)

    I don't think I've had a pacman update take longer than 10 minutes before. Sounds like OP was updating all their AUR packages too.

    Still absolutely a terrible thing to do on 10% battery life. I bet there's an AUR package for "check battery level before update" out there somewhere though.

    OPs meme is "use distro whose model is 'give users enough rope to hang themselves' " and complaining he's at the gallows

    load more comments (1 replies)
    load more comments (1 replies)
    [–] riodoro1@lemmy.world 128 points 3 months ago (5 children)

    shutdown a computer when you shouldn’t computer breaks

    how could a computer do this

    [–] SaharaMaleikuhm@feddit.org 13 points 3 months ago (1 children)
    load more comments (1 replies)
    load more comments (4 replies)
    [–] FQQD@lemmy.ohaa.xyz 45 points 3 months ago (6 children)

    I think I didn't make it clear enough: My laptop was on the power during the update process, when the power randomly cut out - for the first time in about 6 years, it doesn't happen often. Of course you can interpret it as user error - but I think it's reasonable to update my system when plugged into, normally reliable power. The laptop battery is pretty much dead, so it would've shut itself down automatically anyway.

    [–] FiskFisk33@startrek.website 46 points 3 months ago (8 children)

    sure, but what os wouldn't break if you did this?

    [–] bjoern_tantau@swg-empire.de 30 points 3 months ago (1 children)

    Just about any Linux I've ever used keeps the previous kernel version and initrd around. And nowadays snapper makes a new snapshot before and after every package installation or update.

    So, I'd think there are a lot.

    [–] axum@lemmy.blahaj.zone 7 points 3 months ago

    So what I'm hearing is install Linux-LTS and pacsnap

    [–] gaylord_fartmaster@lemmy.world 15 points 3 months ago (1 children)

    Plus in Linux you can actually fix this with a live USB, while on Windows you can run startup repair and hope for the best.

    [–] superkret@feddit.org 6 points 3 months ago* (last edited 3 months ago)

    In Windows you can also fix this with a live Windows USB, manually.

    [–] MangoPenguin@lemmy.blahaj.zone 13 points 3 months ago (4 children)

    Windows doesn't in my experience, it's surprisingly robust.

    But also I thought Linux distros normally keep the old Kernel around after an update so stuff like this doesn't cause a boot failure?

    [–] 9point6@lemmy.world 7 points 3 months ago

    Yeah windows "cumulative update" upgrades for the past couple of years basically duplicate the whole system directory and apply the update to that leaving the existing one to roll back to if anything fails

    load more comments (3 replies)
    [–] superkret@feddit.org 11 points 3 months ago (6 children)

    Any immutable distro, Debian, Ubuntu, all their derivatives, Fedora, all its derivatives, OpenSUSE, Slackware, ...
    Basically, 95+% of installed Linux systems would retain the old or a backup kernel during an upgrade.

    load more comments (6 replies)
    load more comments (4 replies)
    [–] eldain@feddit.nl 24 points 3 months ago

    I still don't get the problem. Are you complaining you have to chroot into your system and finish the update because your power got interrupted? Is a 5 min detour into a live system making you unconfortable? This is how you would fix it in any distro except the image based ones and the arch wiki will guide you excellently how to do it. Good luck!

    [–] badloop@discuss.online 19 points 3 months ago (9 children)

    I mean any which way you try to frame this, saying that you won’t use Arch anymore because you didn’t take the precautions necessary based on your situation is gonna take some heat here.

    load more comments (9 replies)
    load more comments (3 replies)
    [–] SpaceCadet@feddit.nl 33 points 3 months ago* (last edited 3 months ago) (2 children)
    • Boot to usb
    • Mount your root filesystem
    • arch-chroot your mounted root filesystem
    • mount /boot
    • mkinitcpio -p linux

    Steps 1,2 and 3 are the entry way to solve all "unbootable Arch" problems by the way, presuming you know what needs to be changed to fix it of course.

    [–] FQQD@lemmy.ohaa.xyz 6 points 3 months ago (1 children)

    I'd gladly take an Arch wiki article

    load more comments (1 replies)
    [–] RootAccess@lemmynsfw.com 26 points 3 months ago (7 children)

    Out of curiosity: Which operating system(s) can you shutdown while the kernel is being overwritten? I wouldn't imagine that as a limitation of Arch Linux specifically.

    [–] technocat@lemmy.world 23 points 3 months ago (2 children)

    I think fedora would survive this abuse. It doesn't replace when you install kernels, but instead adds it.

    [–] TxzK@lemmy.zip 9 points 3 months ago (1 children)

    Also Fedora ships 3 kernels by default. If one breaks, maybe the others will keep working.

    [–] zloubida@lemmy.world 5 points 3 months ago (1 children)

    With Manjaro you choose how much kernels you want.

    [–] aniki@lemmy.zip 13 points 3 months ago (1 children)

    Arch let's you install kernels till /boot is full...

    load more comments (1 replies)
    [–] jonne@infosec.pub 5 points 3 months ago

    Ubuntu (and probably Debian too) will keep an old kernel in your grub list so you can boot off that one if needed.

    [–] chevy9294@monero.town 12 points 3 months ago

    Arch Linux with 2 kernels ;)

    [–] palordrolap@kbin.run 11 points 3 months ago

    Mint definitely keeps a couple of previous kernels around, so that might be a Debian and Ubuntu thing too.

    That said, there's always going to be a critical point of failure that a power loss could cause things to break, no matter your OS or distro.

    Writing the bootloader or updating a partition table for example.

    [–] themoonisacheese@sh.itjust.works 8 points 3 months ago

    Anything running on a copy-on-write filesystem can trivially rollback changes using a rescue partition.

    I also expect most immutable distros would be able to be especially good at tanking this.

    load more comments (3 replies)
    [–] axum@lemmy.blahaj.zone 12 points 3 months ago

    If you're planning for this type of failure, what you probably want instead is Aurora from the Universal Blue project. Since it's fedora silverblue underneath, your OS either updates all at once or doesn't.

    [–] possiblylinux127@lemmy.zip 11 points 3 months ago (4 children)

    It is! My Desktop hardly ever topples over!

    [–] ikidd@lemmy.world 10 points 3 months ago (1 children)

    So I'm trying to understand if you think that shutting down an update during regenerating the initramfs indicates that Arch isn't stable? Because that's a FAFO move and would crater any non-atomic update distro.

    load more comments (1 replies)
    [–] dan@upvote.au 7 points 3 months ago* (last edited 3 months ago)

    When talking about Linux, "stable" usually means "doesn't have major changes often", or in other words, "doesn't have lots of updates that break stuff". That's why "Debian stable" is called that. Arch is not that.

    load more comments (1 replies)
    [–] antihumanitarian@lemmy.world 10 points 3 months ago (1 children)

    I have LTS and zen kernels installed in addition to the default Arch one, that should prevent this yes?

    load more comments (1 replies)
    [–] muntedcrocodile@lemm.ee 8 points 3 months ago (1 children)

    Ive been here. U can use a bootable usb to boot. Then use switch root to change to ur actual filesystem (I'm glossing over a lot of complications here ask chatgpt) and update from here or just copy over the kernal.

    [–] bitwaba@lemmy.world 19 points 3 months ago (5 children)

    ask chatgpt

    You mean read the Arch wiki?

    load more comments (5 replies)
    [–] ReveredOxygen@sh.itjust.works 8 points 3 months ago

    This is why you keep a backup kernel

    [–] qjkxbmwvz@startrek.website 6 points 3 months ago (2 children)

    When I used Arch I updated once and it removed the running kernel and its modules. So when I plugged in a webcam it didn't work, since the module was gone.

    Not a catastrophe, but it was an off-putting user experience coming from Debian. Arch felt more like a desktop OS, Debian feels more like a server OS to me (updates generally warn/confirm when you need to restart services or the machine).

    To each their own! Having more up to date stuff was a nice perk of running Arch, certainly.

    load more comments (2 replies)
    load more comments
    view more: next ›