8 ms·
Skipping fsck during boot with systemd?
- chimeracoder 12y agoThis answer totally sucks, I agree. And I have run into this annoyance myself (I've been using systemd for almost three years). But just so everyone knows, and so nobody finds themselves in this position, there is an easier way. By default, I believe systemd will skip the fsck if running on battery power (this is the case on Arch, at least). So if you know you are in a hurry but haven't added this to your GRUB config, the easiest thing to do is just boot the laptop and wait about ten seconds before plugging in the power cord (the fsck check happens early enough, so it'll have been skipped by that point). This doesn't help kill it if it's already in progress, but it has saved me many times. Brian's response is laughably rude and unhelpful, but hopefully this will be a bit easier and more helpful than telling people to edit their GRUB config before-the-fact.
- fsniper 12y agoWell, this answer is a workaround. And I'm sorry it's a ridiculous one. What if I'm not on a laptop? What if this is a server system?
- chimeracoder 12y ago> this answer is a workaround. And I'm sorry it's a ridiculous one. If you're trying to have an argument, you've picked the wrong person. I'm not defending Brian; I'm simply pointing out a relevant trick that I thought people reading this thread may find helpful.
- fsniper 12y agoYou make it clear that you are not backing Brian. I'm just trying to tell the shortcomings of your trick. Also in this case it also involves back in time travel or being prepared. If you want to be prepared tune2fs would be a better choice.
- mst 12y agoIt was incredibly obvious that he already understands those are shortcomings. You're just stating the obvious in a condescending fashion. Reddit is over there.
- Scramblejams 12y agoThat thread features a few participants I would never want talking to a customer.
- raverbashing 12y agoThis is a real problem. Really There are enough ironic/rude answers, failure to solve the problem or give a good workaround, etc Now imagine this with paying customers.
- ash 12y agoThe atmosphere on debian-users is… not very helpful.
- getsat 12y agoThat Brian guy in particular is a total cunt. Holy crap. Willful ignorance of specific issues being raised combined with smug superiority. I find people on IRC to be a lot more pleasant. I am never mailing a mailing list.
- papaf 12y agoI think he is being reasonable and helpful. Q. I can't stop fsck. Brian: You can add a parameter to kernel startup. Q. This does not help because I want to stop one that has started. I should raise a bug. Brian: Don't do that there is already a bug report at number ....
- nerderloo 12y agoDid you read the other branch of thread that contains 180 email conversations about why his initially wrong answer was justifiable? I've given up reading after 10 emails since it was fairly useless. I think that thread is why this is posted in HN.
- getsat 12y agoYeah, this is precisely what I meant by "willful ignorance of specific issues being raised". :/ I really hope Brian is not like that in real life interactions.
- vertex-four 12y ago> Remedial action is not needed because the right choice was made from the grub menu. If it wasn't, you get to live with the consequences and don't do it again. Is this polite or helpful in solving the issue? It's being preachy about the idea that nobody ever makes wrong choices, ever, and should definitely never be given the opportunity to fix their mistakes.
- olgeni 12y agoUhm. What does "decided it was time to run fsck on my 1TB hard drive" mean? Decided how?
- deleted 12y ago[deleted]
- mackwic 12y agoEvery n boot (n usually around 30) is scheduled a fsck at boot. It is more a legacy thing as ext4 is really robust. I remember checking my /home/lost+founds regularly in this time and often finding random stuff, music, documents where the i-node has been made orphan so that it doesn't belongs to any directory. Today, we have ntfs and ext4 with amazing journals which can replay most of the operation that has been made. So, when the Virtual-FS layer (the component of the kernel that map the bytes on your HDD to the logical file-tree in the exporer) detect an inconsistency it can replay and apply the correct state to the fs tree on the fly. Now that we have robust disks and robust fs, I think that this fsck at boot setting could be relaxed. However, think of the people needing saving their data with an fsck because their HDD wasn't as robust as yours. It's not an easy choice to do. You can't even base your decision on the SMART metrics as the worst HDD, the one you want to check regularly, lie to/don't implement correctly SMART.
- xorcist 12y agoThis value is configurable per file system. It is set at install time but you can change it at will. You can set it with tune2fs using -c count or -i interval. A machine that is often rebooted might do without the interval, and vice versa. You can turn it off completely but don't do that unless you have reason to. Running a fsck regularnly brings a bit of peace of mind, especially if your file system has been through a lot of upgrades.
- the_why_of_y 12y ago> You can turn it off completely but don't do that unless you have reason to. Running a fsck regularnly brings a bit of peace of mind, especially if your file system has been through a lot of upgrades. The filesystem maintainers seem to disagree: since 2011 mke2fs(8) creates new file systems without enforced fsck intervals. http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=3daf592646b668133079e2200c1e776085f2ffaf http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=...
- alaaibrahim 12y agoSo the solution to this, if you want to abort an fsck, go back in time, and pass fsck.mode=skip to the kernel parameters.
- uaygsfdbzf 12y agoThere was a more productive thread on a related topic on debian-devel recently: https://lists.debian.org/20141213135648.GA14679@fishbowl.rw.madduck.net https://lists.debian.org/20141213135648.GA14679@fishbowl.rw.... Basically it isn't possible to check at runtime if the next boot will require an fsck, so developer filed a bug asking for mechanism to do that: https://bugs.debian.org/773267 https://bugs.debian.org/773267
- jbk 12y agoWe should be very careful about fixing those kind of things, this is one of the biggest complaints against Windows, when you cannot shut down your machine, or boot wait a long time to boot it up, because it did the Windows Upgrade dance. What's worrisome in this discussion is that the bug was reported 3 years ago, and acknowledge as upstream TODO, 2 years ago, but nothing has changed!
- db48x 12y agoThe real answer is to use a filesystem that doesn't require off-line integrity checks, and to disable automatic fsck when you're stuck with something that does. I use ZFS, which does this sort of thing in the background while the system is live. In fact, every read from a ZFS filesystem does a complete integrity check of everything that read depends on. If it finds an error during that process it fixes it before returning data to the caller, or returns a read error if it cannot. Those errors get collected and logged, so that if they do occur (usually due to faulty hardware) you can recover the effected files from backup. This is much better than a surprise fsck when you're running late.
- watt 12y agoThe real story is the toxic attitude of some people on debian-users mailing list. If you use ZFS, you probably are on FreeBSD. Then you would not see the advocacy of systemd that sometimes borders on insane, as a problem.
- atoponce 12y agohttps://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/ https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux...
- VLM 12y agoBut then you're stuck with systemd, which you could avoid with Freebsd. Its kind of like upgrading an outdoor carpentry project, like a deck, from nails to deck screws, then just in case you miss the feeling of hitting your thumb with a hammer, someone helpfully finds a link to install deck screws using a hammer. That's impressive in its own way, but ... I think I'll continue moving everything to Freebsd instead.
- mbq 12y agoSame holds for btrfs.
- bensummers 12y ago
- Thetawaves 12y agoTIL there isn't much professionalism in the systemd camp.
- foxhill 12y agothese are debian developers, i believe.
- VLM 12y agoNot as far as I know. Most devs I know will post with their @debian.org address (or perhaps @ubuntu) when doing debian work in public. Mostly. Also most devs refuse to wallow in the filth that is the mailing lists. On -dev or -project or -private you'll find devs, not so much on -users. Maybe Maintainers or unofficial, or applicants, at most. Or not very proud of the participation so they semi-obfuscate their address.
- atoponce 12y agoOffline filesystem integrety checks should not be stopped.There is a reason they take place to begin with. From the OP, it sounds like Eduardo takes every opportunity to stop filesystems checks from happening when booting. So long as he has a policy of doing them manually, and understand why they take place, that's fine. So, instead, he should just: # tune2fs -c 0 /dev/sda1 Or whatever his filesystems are. Then again, this is risky, and the OP should understand why.
- foxhill 12y agoso your fix involves time travel, and you think that's reasonable?
- atoponce 12y agoTime travel? Huh? I'm only stating that if the OP does not want his filesystem checks taking place on boot, rather than Ctrl-C them on every boot, to just disable them completely. Who said anything about time travel?
- foxhill 12y agohis issue is not that fscks happen. his issue is that he cannot safely stop them when they happen. so, you've given some information about setting the fsck counter to 0, so that it never happens. the only way anyone in this situation could utilise that information, would be to go back in time, run this command, and then boot again.
- atoponce 12y agoNo. You missed it. The OP stops filesystem checks happening fairly regularly. The great thing about computers, is identifying when you are repeating a behavior, to either have the computer automate your behavior for you, or to change your behavior entirely. I am fully aware that the OP wants to cancel the fsck(8) in progress, and I am aware of both of the Debian and Systemd bugs in place to address the issue. Arguing on the Internet about whether or not he can or should Ctrl-C an active check, certainly when bugs already exist for both projects, is pointless. Instead, to prevent additional filesystem checks, there are tools to make this possible. Unless he likes getting frustrated that he cannot press Ctrl-C during a check on boot, which doesn't seem to be the case. His system is booted now, so he has some options available to him: * Do nothing, so the OP cannot press Ctrl-C on the next check. * Disable filesystem checks from future boots. * Switch from Systemd back to SysV Init. The concept of "going back in time" during an active check, to change a kernel parameter, so it doesn't start to begin with is a strange one. Bugs have been filed, it's even on the TODO for Systemd. So, why not discuss alternatives to the issue until it's fixed?
- dschiptsov 12y agoso, we need systemd-fsckd.
- retrogradeorbit 12y agoThat's some good irony. But on the other hand, just you watch...
- ultrafez 12y agoSome would already argue systemd is already fsckd.
- userbinator 12y agoThe way I interpreted his "solution" of "add a kernel boot parameter" was if you want to interrupt the fsck, you should hard-reset the machine to add it on the next boot, making it even more likely your filesystem will need fsck'ing. fsck itself is AFAIK safe with ctrl+c (i.e. it won't corrupt the filesystem further to interrupt it) so this change means users who really want to cancel a fsck have to take the route of possibly causing filesystem corruption themselves. Absolutely fscking insane.
- lclarkmichalek 12y agoIt's really not hard to add a kernel book param if you're booting via grub
- foxhill 12y agosigh i don't even.
- darklajid 12y agoNo, the discussion was mostly about the parameter as a way to suppress fsck if you know you're in a hurry at boot time. That argument was followed with other 'bad luck, if you want tonchange your choice' examples, like rm-ing a file. The argument sucks, but at no point a hard reset was part of the suggestion, really. More a "Yeah, so why didn't you pass the parameter and why do you complain about that afterwards" That said, both sides of the discussion became immature rather quickly (my favorite is the "I killed a Windows 8 laptop because only that stopped the updates") and the issue isn't all that big in the first place, because systemd might support fsck interruption in the future/it seems to be on the todo list and therefor accepted as a missing feature.
- asveikau 12y agoIs anyone else grossed out with the fact that systemd is parsing the kernel's command line? This is like if some program started reading unrelated crap from another program's command line, just because. Edit: I guess downvoters don't care about code smell. This is literally like an unrelated process pulling out someone else's argv and using it as their own. Ick.
- foxhill 12y ago> But remember our current slogan "Linux is all about choice". One can choose to boot with or without "fsck.mode=skip". .. > Remedial action is not needed because the right choice was made from the grub menu. If it wasn't, you get to live with the consequences and don't do it again. this discussion made me angry, and i wasn't even involved. someone has a reasonable request, and it's immediately brushed off in one of the most passive aggressive statements of the 21st century thus far. he advocates choice, and yet propagates dogma. idiot.
- mox1 12y agoI wonder if Mr/Mrs ad44@cityscape.co.uk talks to his friends and family like that, what an asshole. From an outsiders point of view, linux projects are filled with people like this. Linus, Ulrich Depper, etc. Really turns me off from ever contributing when these dudes (or girls I dunno) act like this.
- Jakuv2000 12y agoDon't forget Lennart. Just watch this video of him disrupting a talk: https://www.youtube.com/watch?v=ZTdUmlGxVo0 https://www.youtube.com/watch?v=ZTdUmlGxVo0 The shenanigans start around 12 minutes in, and continue throughout. The last few minutes are particularly weird. He even gets up on stage at around 53:40. It's unbelievable!
- the_why_of_y 12y agoYes it is quite unbelievable how much bullshit and mis-information the presenter is talking, luckily somebody who actually knows the stuff was in the audience to point out some of the actual requirements of modern desktops.
- digi_owl 12y agoThat "modern desktop" is why many stopped using Windows in the first place.
- 12y ago
- rasz_pl 12y agoI love trolling from Brian <ad44@cityscape.co.uk> Every single answer is "you are holding it wrong". And people wonder what is wrong with systemd and its proponents ....
- Aardwolf 12y agoCan someone explain why systemd which seems so hated (by me too due to wrong philosophical decisions), yet managed to convince almost all big distros (including the one I use) to use systemd by default? Thanks.
- the_why_of_y 12y agoThankfully mke2fs(8) has been changed not to enable enforced fsck intervals some years ago (in 2011), so it's no longer necessary to manually disable it with "tune2fs -i 0 -c 0" on new deployments.