oneiric: progress status during boot-time fsck?

Waleed Hamra kubuntu-users at whamra.com
Fri Apr 13 17:35:16 UTC 2012


On 04/13/2012 07:20 PM, Nils Kassube wrote:
> D. R. Evans wrote:
>> Nils Kassube said the following at 04/13/2012 09:01 AM :
>>> sudo grep -lire fsck /etc
>>>
>>> The relevant file is "/etc/init/mountall.conf". The fsck program
>>> isn't called directly from the script but by the program
>>> /sbin/mountall and that's why I suggested to change that program.
>>> I think you should generate a new initrd with the command
>>>
>>> sudo update-initramfs -c -k $(uname -r)
>>>
>>> after changing the program to make it work at the next boot.
>>
>> Still confused :-(
>>
>> /sbin/mountall is a binary; so are you saying that I need to find the
>> source for mountall, figure out how to change it so that is calls
>> fsck differently, build it, then replace the official version?
> 
> Yepp - that's what I suggested. BTW: You can download the source with 
> the command
> 
> apt-get source mountall
> 
> but I didn't check how to proceed after that.
> 
> 
> Nils
> 

well i can think of 2 possibilities for this situation.
checking mountall, it seems to accept the "--verbose" parameter, but i
am not sure if that has the desired effect.
if you look into /etc/init/mountall.conf, there's an exec line that
contains the mountall command, with few parameters, add --verbose to the
end of the command, and see if that bring satisfying verbosity, if not,
you can safely remove the parameter.
the other option is not as straightforward, but certainly much easier
than hacking source code. rename /sbin/fsck into /sbin/fsck.orig

sudo mv -v /sbin/fsck{,.orig}

then create a script that calls it with the C parameter, so the script
can be:

#!/bin/bash
fsck.orig $@ -C 0

the only complication i see here, is that it may not be fsck that is
called, but rather a specialized fsck.ext3 or fsck.ext4, in which case,
you'll need to do a similar replacement to each of them.
in a standard system, you're supposed to call fsck, and let it decide
which specialized helper to call, along with the parameters passed to
it, but you never know.

just make sure to set appropriate permissions:

sudo chown root:root /sbin/fsck
sudo chmod 755 /sbin/fsck

hope this helps
and note, the mountall.conf mentions there will be a future
implementation in which there's a status bar, but it seems not there out
of laziness :P

-- 
Waleed K. Hamra
Manager of Hamra Information Systems

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kubuntu-users/attachments/20120413/6b37f51f/attachment.sig>


More information about the kubuntu-users mailing list