rockedge wrote: Tue Oct 22, 2024 11:16 pm
@JusGellin,
KLV can't use the Puppy Linux kernel command line parameter and options like pfix=fsck
. The initrd is different.
There is a list of the KLV parameters I'll dig out the link for
I'll consult @wiak if we can manage an additional command line option for a something similar in KLV
A somewhat major reason I didn't include auto-fsck support (not yet or as priority anyway):
FR initrd was designed to be generic meaning it doesn't care what the root filesystem contains, which is why it is so useful in booting most anything.
Likeliest time an fsck 'may' be needed is sudden power failure or holding off button. However to account for that would need a flag or similar in the root filesystem that gets set as unclean until proper shutdown marks it as clean. If unclean that signifies to possibly do an automatic fsck on next boot. Puppy probably has this flag in its main root filesystem. The Puppy initrd is not generic so no doubt looks for that. Other distro's will name and set such facility differently - likely therefore need at least somewhat non-generic initrd to thus handle such fsck facility.
Second point is that it is excessive in my opinion to force an fsck regularly in other circumstances. Crazy idea to me. You can always manually check partitions (or save image file if using save file rather than a save folder) when you want to or suspect issues. But let's imagine we want to force fsck on boot - aside from that flag situation, could it simply be forced anyway by extra code in FR initrd. Well, yes. Really it is just a matter prior to mounting partition to fsck it... or if a .ucimg savefile is detected (e.g. for use booting from ntfs or vfat) then just arrange to fsck that prior to mounting.
Needs a check format type function so correct fsck routine is used, but FR initrd already has one (though its 'case' statement would likely need slightly expanded to account for other filesystem types).
And of course is simple indeed to add new kernel line option to signify fsck force - one line FR initrd/init code addition.
In fact, savefile is easiest - just everytime prior to mounting one of these just make fsck of raw file happen...
But what about save folder, which is what most all prefer to use? Problem there is - where is the upper_changes being stored? Answer is usually the bootfrom partition, so that would need fsck'd. However if w_changes says to put upper_changes elsewhere then that alternative partition would need fsck'd. I'd argue that bootfrom partition should also be fsck'd in that case too since other components being used from there anyway.
All in all that is not difficult to arrange (though the flexibility of FR initrd alternative locations for everything does mean several related code lines would need to be added in several initrd/init code places.
One last thing, it seems to me, is that the FR initrd would have to have an fsck binary included (presumably with dependencies or static compiled).
Will I be doing this? Maybe one day, but then again... is not at all a soon priority and especially since it is always easy to boot a live system (or any distro, including KL, on a different partition or usb stick) and use that to fsck away at whatever you suspect or want to fsck anytimg (my own preferred simple approach; keeping FR build components as simple as possible to use and understand was an original part of the design idea in fact, so using different system utility for special purpose is to be expected).
Perhaps I have the wrong idea about what needs fsck'd such that I should lose sleep at night till I incorporate the facility, but five years since FR was created I can't say the omission matters to me personally since it isn't something I'd likely force on my grub kernel line anyway. Main thing though is I have other ideas I want to get on with that really interest me whereas auto use of fsck is not essential to me at all. Nice Puppy has that for non-technical users to get an fsck done automatically without them knowing anything about it. However I really don't feel that permanent pfix=fsck is a great thing to use.