Stories
Slash Boxes
Comments

SoylentNews is people

posted by LaminatorX on Sunday December 21 2014, @02:05AM   Printer-friendly
from the fsking-pid0 dept.

A Debian user has recently discovered that systemd prevents the skipping of fsck while booting:

With init, skipping a scheduled fsck during boot was easy, you just pressed Ctrl+c, it was obvious! Today I was late for an online conference. I got home, turned on my computer, and systemd decided it was time to run fsck on my 1TB hard drive. Ok, I just skip it, right? Well, Ctrl+c does not work, ESC does not work, nothing seems to work. I Googled for an answer on my phone but nothing. So, is there a mysterious set of commands they came up with to skip an fsck or is it yet another flaw?

One user chimed in with a hack to work around the flaw, but it involved specifying an argument on the kernel command line. Another user described this so-called "fix" as being "Pretty damn inconvenient and un-discoverable", while yet another pointed out that the "fix" merely prevents "systemd from running fsck in the first place", and it "does not let you cancel a systemd-initiated boot-time fsck which is already in progress."

Further investigation showed that this is a known bug with systemd that was first reported in mid-2011, and remains unfixed as of late December 2014. At least one other user has also fallen victim to this bug.

How could a severe bug of this nature even happen in the first place? How can it remain unfixed over three years after it was first reported?

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 1) by Arik on Sunday December 21 2014, @05:12AM

    by Arik (4543) on Sunday December 21 2014, @05:12AM (#127926) Journal
    First off partition your disk. You dont need 1tb in a single slice, and it's a disaster waiting to happen. Partition it out with generous allowances for /boot /home /var and /usr and stagger the auto-fscks and kill a flock of birds with one stone. It's insanity to use a terabyte slice for anything - even if you really truly NEED one you should make 10 100gb slices instead, then hand them over to your LVM to make the terabyte slice back out of them.

    Second, quit turning your dang laptop off. Suspend to disk. It's not the 90s anymore, we've had it for years, it works like a dream, use it.

    Lastly, systemd. Of course it isnt going to let you interrupt it once it decides to do something, you grubby luser.

    That really seems to be their attitude. And it's one that will be self-fulfilling, I feel. People that accept that categorization of themselves will be happy to have less responsibility and less to think about as they are given fewer choices to make.

    And those that disagree, will simply avoid the systemd infection. There are still great Linux based systems without them - Slackware and Gentoo are the largest. There are still BSDs too if it comes to that.

    So in summary, in order to find yourself dealing with this problem as described, you have to have made 3 big mistakes - single slice partitioning, shutting your laptop down instead of suspending work, AND using systemd.

    Three strikes and you are out.

    --
    If laughter is the best medicine, who are the best doctors?
    Starting Score:    1  point
    Moderation   -1  
       Overrated=1, Total=1
    Karma-Bonus Modifier   +1  

    Total Score:   1  
  • (Score: 0) by Anonymous Coward on Sunday December 21 2014, @08:58AM

    by Anonymous Coward on Sunday December 21 2014, @08:58AM (#127967)
    > Second, quit turning your dang laptop off. Suspend to disk. It's not the 90s anymore, we've had it for years, it works like a dream, use it.

    No, it doesn't work! Suspend on laptops, even older ones, is one thing you expect NOT to work with Linux.

    > So in summary, in order to find yourself dealing with this problem as described, you have to have made 3 big mistakes - single > slice partitioning, shutting your laptop down instead of suspending work, AND using systemd. Three strikes and you are out.

    You should remove BACKSPACE key in your keyboard, since you never need to correct yourself.
    • (Score: -1, Flamebait) by Anonymous Coward on Sunday December 21 2014, @09:57AM

      by Anonymous Coward on Sunday December 21 2014, @09:57AM (#127979)

      You should remove BACKSPACE key in your keyboard, since you never need to correct yourself.

      He can't -- the dumb-ass appears to be using a fucking typewriter.

      What a twat; would ya look at that font choice?

    • (Score: 1) by dweezil-n0xad on Sunday December 21 2014, @01:58PM

      by dweezil-n0xad (275) on Sunday December 21 2014, @01:58PM (#128013)

      No, it doesn't work! Suspend on laptops, even older ones, is one thing you expect NOT to work with Linux.

      Suspend in Linux works fine in my experience.

      • (Score: 0) by Anonymous Coward on Sunday December 21 2014, @03:16PM

        by Anonymous Coward on Sunday December 21 2014, @03:16PM (#128029)

        You must have that one specific early-2000s-era Thinkbook model where suspend isn't a total disaster. The rest of us happen to use other laptops and desktops that aren't that one specific early-2000s-era Thinkbook model where suspend isn't a total disaster. So for us, suspend is a total disaster!

        • (Score: 1) by dweezil-n0xad on Monday December 22 2014, @11:52AM

          by dweezil-n0xad (275) on Monday December 22 2014, @11:52AM (#128291)
          My laptop is an Asus N56 from the end of 2013. Very fast suspend and resume, no problems at all. OS is Gentoo Linux (without systemd).
          I remember having hangs after a resume when I was using Ubuntu on a cheap Lenovo laptop in 2010. Those problems disappeared when I switched that laptop to Arch Linux. Ubuntu is known for problems with suspend.
    • (Score: 2) by Arik on Sunday December 21 2014, @04:15PM

      by Arik (4543) on Sunday December 21 2014, @04:15PM (#128036) Journal
      "No, it doesn't work! Suspend on laptops, even older ones, is one thing you expect NOT to work with Linux."

      1996 called, they would like their FUD back.
      --
      If laughter is the best medicine, who are the best doctors?
      • (Score: 0) by Anonymous Coward on Sunday December 21 2014, @04:49PM

        by Anonymous Coward on Sunday December 21 2014, @04:49PM (#128042)

        I don't think it's FUD. I've never had suspend or hibernate work out-of-the-box on any Linux system I've ever used, regardless of the distro, regardless of whether it was a desktop a laptop, and regardless of who manufactured the hardware. I've gotten it to work, but only after doing lots of reading online, lots of fiddling, and ultimately wasting far too much of my time.

  • (Score: 1) by linuxrocks123 on Sunday December 21 2014, @09:01AM

    by linuxrocks123 (2557) on Sunday December 21 2014, @09:01AM (#127968) Journal

    Why should my default behavior be to split my disk into multiple data partitions, and how is using a single partition for data a disaster waiting to happen? Disks typically fail for mechanical reasons; partitioning will not save you there. I consider it best practice to have a single root partition and a single swap partition, unless I have good reasons to do otherwise. Needlessly splitting of /usr or /home is just setting yourself up for pain when you discover you need more space for /home and less space for /usr than you expected, or vice versa. If you're using NFS or something then yeah by all means slice up your FS, but otherwise ... what's the point?

    • (Score: 1) by neleai on Sunday December 21 2014, @09:28AM

      by neleai (4923) on Sunday December 21 2014, @09:28AM (#127974)

      Why should my default behavior be to split my disk into multiple data partitions, and how is using a single partition for data a disaster waiting to happen? Disks typically fail for mechanical reasons; partitioning will not save you there. I consider it best practice to have a single root partition and a single swap partition, unless I have good reasons to do otherwise. Needlessly splitting of /usr or /home is just setting yourself up for pain when you discover you need more space for /home and less space for /usr than you expected, or vice versa. If you're using NFS or something then yeah by all means slice up your FS, but otherwise ... what's the point?

      It is also used when you have different distros then you use separate / and common /home partions.

    • (Score: 2) by Marand on Sunday December 21 2014, @12:10PM

      by Marand (1081) on Sunday December 21 2014, @12:10PM (#127996) Journal

      If you're using NFS or something then yeah by all means slice up your FS, but otherwise ... what's the point?

      I don't agree with going batshit-crazy and making dozens of partitions, but having /home on its own apart from / isn't a bad idea. If you have to do a reinstall or decide to change distros it's a lot easier because you can just wipe and reinstall /, and your data (the stuff you actually care about) can be left alone. You can also have multiple distros installed on their own root partitions, all using the same home dir. Good for experimentation or just having an emergency backup install in case something goes horribly wrong with your normal install.

      It also lets you have a much smaller root partition, since the bulk of your storage use will usually be in /home. That means you can get to a usable system faster even when you need (or want) to fsck, and afterward you can remount /home read-only and fsck it while in a mostly-usable system.

      TL;DR: Separating /home from the root has saved me a fair amount of frustration in the past, though I find further separation to be overkill for most situations.

      • (Score: 2) by cafebabe on Thursday December 25 2014, @01:55PM

        by cafebabe (894) on Thursday December 25 2014, @01:55PM (#129093) Journal

        It was standard practice on the Amiga to have a boot/application partition and a data partition. If the data partition was screwed, it was possible to boot and attempt recovery. If the boot partition was screwed, data was safe and re-installation could proceed from floppy disks.

        For desktop Unix systems, a variation of this arrangement is to include a partition for dedicated swap-space. If one wishes to minimize harddisk head seek time, the swap-space partition should be arranged between the system and data partitions.

        I've tried more complicated arrangements but they are only worthwhile if you wish to purge large quantities of data on a regular basis.

        --
        1702845791×2
        • (Score: 2) by Marand on Friday December 26 2014, @01:12AM

          by Marand (1081) on Friday December 26 2014, @01:12AM (#129193) Journal

          That's basically what my setup is -- partitions for /, /home, and swap -- except I think the swap partition's at the end instead of in the middle. I don't actually use swap that much so it's largely irrelevant where it is, but I still prefer having it on its own partition instead of using swap files. I just didn't think to mention swap since the discussion seemed to be more about partitioning the actual file stuff. If you have a lot of RAM, there's also the niche case of using ramdisks for certain parts of the filesystem, but that's getting even farther away from disk storage and partitioning...

          You have the same experience with over-partitioning that I do, basically. Too much becomes annoying to deal with eventually, but keeping the system stuff separate from the user stuff just tends to be good sense for a lot of reasons. Something else I didn't think to mention is that SSDs add another reason to do that kind of split, because you can put your OS and apps on the SSD and have the user data on the spinning disk, so that you have lots of space for data while getting the SSD speed increase.

          You can even do it in Windows, at least with Windows 7! It's a bit harder to get set up that way, but it can be done and it's worth it IMO because OS problems won't wipe out your files and settings. It should really be the default setup, but I get why it isn't. User space needs differ so it's not a one-size-fits-all solution the same way that dumping everything onto the same partition is.

          • (Score: 2) by cafebabe on Monday December 29 2014, @05:57PM

            by cafebabe (894) on Monday December 29 2014, @05:57PM (#129998) Journal

            Putting your swap space at the end is possibly more efficient if you have a perpetually full disk.

            Regardless, if you wish to reduce the volume of writes to your SSD boot and application disk (and further increase access speed), add the noatime option in /etc/fstab. For each volume, this eliminates filing system writes to update access times. (This option is also useful for databases and high volume SMTP servers.)

            --
            1702845791×2
    • (Score: 2) by Arik on Sunday December 21 2014, @02:16PM

      by Arik (4543) on Sunday December 21 2014, @02:16PM (#128015) Journal
      "Disks typically fail for mechanical reasons; partitioning will not save you there"

      It's no magic bullet but it does make dealing with it a bit easier.

      "I consider it best practice to have a single root partition and a single swap partition, unless I have good reasons to do otherwise."

      So first off, with that setup, any process can fill the hard disk with temp files and cause all kinds of problems here. It's a pretty big deal when that happens on the root partition.

      Put /var on it's own partition, and make /tmp a link to /var/tmp, and the same occurrence becomes a trivial annoyance instead.

      You should put /home on its own partition for the same reasons. Lots of stuff gets to write to the home directory, if any of it ever goes berserk, for any reason, having /home on its own slice saves lots of toil and trouble.

      And /usr is where post-boot software is installed - in many systems the majority of the disk space is used for this. Giving this its own slice is done simply to reduce the total size of /. Because the larger a slice is the longer it takes to fsck it - and it's not a linear scale. A very small / partition will fsck before you can notice it and hit ctrl-c - which is exactly the behaviour we want here. A very large slice can take hours. It's always faster to fsck 10 100gb disks than to fsck the same disk in a single terabyte slice.

      "Needlessly splitting of /usr or /home is just setting yourself up for pain when you discover you need more space for /home and less space for /usr than you expected, or vice versa."

      That's why man invented the LVM. Your physical slices and logical system-facing slices are two totally different beasts now, and if you need more room on /var and /usr but less on /home than you expected (or vice versa) you just adjust the numbers and make it so without disturbing the physical partitioning in the slightest.

      --
      If laughter is the best medicine, who are the best doctors?
      • (Score: 1) by linuxrocks123 on Monday December 22 2014, @12:22AM

        by linuxrocks123 (2557) on Monday December 22 2014, @12:22AM (#128169) Journal

        The "a poorly-behaved process can fill the whole hard disk" thing is not a good argument, imo, because the default settings for the ext filesystems is to only let root write to the disk when it's 95% full. I agree with the /home thing if you want to use multiple distros on the same machine, but I typically don't. "It makes fsck run faster" is a poor argument IMO because I have terabyte and larger filesystems and fsck still doesn't take an unreasonable amount of time to run on those. You can also just disable fsck entirely and rely on the journaling to fix any problems if you want.

        I'm not sure what your point is about LVM; if you combine a bunch of slices with LVM, you still have a single filesystem on a large virtual device, so you'll still need to either periodically fsck or rely on journaling.

  • (Score: 1) by Wrong Turn Ahead on Sunday December 21 2014, @09:08AM

    by Wrong Turn Ahead (3650) on Sunday December 21 2014, @09:08AM (#127971)

    Preach it! I remember when it was insane to use an entire 20MB hard drive for a single partition. Of course, I remember much further back than that but twenty is just such a nice number...

  • (Score: 0) by Anonymous Coward on Sunday December 21 2014, @10:27AM

    by Anonymous Coward on Sunday December 21 2014, @10:27AM (#127988)

    > Second, quit turning your dang laptop off. Suspend to disk. It's not the
    > 90s anymore, we've had it for years, it works like a dream, use it.

    I would, but systemd FUCKING BROKE THAT TOO on my laptop.

  • (Score: 0) by Anonymous Coward on Monday December 22 2014, @11:25AM

    by Anonymous Coward on Monday December 22 2014, @11:25AM (#128283)

    > Second, quit turning your dang laptop off. Suspend to disk. It's not the 90s anymore, we've had it for years, it works like a dream, use it.

    Doesn't work for my ThinkPad since upgrading (haha) to latest Mint LTS. A few other things got worse then actually, and I didn't notice anything getting better. User experience degraded with a software upgrade and after three months I haven't figure fixes => fail