[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to get a log of fsck on boot partition when using systemd-sysv



On 05/10/2014 06:32 PM, Brandon Vincent wrote:
On Sat, May 10, 2014 at 2:49 PM, Jape Person <japers@comcast.net> wrote:

Hi,

I just used

# apt-get install systemd-sysv

on several Debian testing systems (fully up-to-date).

It has been my habit to use

# touch /forcefsck

to force a file system check at reboot once per week on each system and to
keep track of the results by copying the contents of
/var/log/fsck/checkroot into a sort of diary I keep on system maintenance.

In various logs on these systems I see an indication that "touch
/forcefsck" doesn't work with systemd running the show, and that adding

fsck.mode=force

to the linux boot line in Grub is now the proper way to force fsck to run
at boot time.

However, though I see that fsck is running when I boot the system after
altering the boot process, there is still no output from the operation
written to the checkroot file. I presume this is part of the rhubarb I've
noticed on various lists concerning the logging of the boot process when
using systemd.

This is hardly a huge problem for me, but I'd like to keep practicing this
slightly OCD behavior if I can on a couple of the more critical machines.

Would anyone have thoughts on how I can get a record of the file system
check on the boot drive when using systemd?

If there's something about this in the man pages, I'm certainly not
finding it.

Thanks for any pointers you can provide.

> Jape,
>
> It sounds like the fsck is being conducted while the initramfs is loaded
> and thus no log is being saved. Ideally, there would be a way to have the
> console dumped to dmesg.
>
> Brandon Vincent
>

Hi, Brandon.

I hope you'll excuse me for moving your response to the bottom and then replying to it there. I think this list prefers bottom posting or, better yet, interleaved posting.

Thank you for your response.

Yes, I think you're right, though I wasn't bright enough to go in that direction on my own -- perhaps because the previous system startup method accomplished the file system check and then wrote the results after the disk was mounted. Or maybe I'm taking too much for granted in assuming how it accomplished that. I wonder if there's some reason why systemd-sysv couldn't do the same thing?

This looks like an oversight to me, but maybe it's deliberate.

I suppose I could boot these systems with a live disc of some type, and then perform a file system check on the systems' primary disks. That would be a bit of trouble to go through on the systems that sit in front of me, and not really practical at all on the remote systems.

I'll mull it over and see if I can figure it out.

Again, thank you for your insight.

Jape


Reply to: