Looking at the manual for e2fsck, there are two options that appear very similar:
e2fsck -y (which answers 'yes' to any question answered)
e2fsck -p (which does not ask any questions, and just goes ahead and does whatever it thinks best)
I found this older thread which seems to confirm the above:
Whilst I can see the difference, I don't understand the practical impact it might have.
Can someone give me an example of where an Ubuntu system (assume Ubuntu 20.04 LTS if it makes a difference) would do something different if using the -y versus -p options?
The reason for asking is that I have a system that I am trying to bring up a disk on (to copy data off) and I am trying to run:
fsck -pvcf /dev/id
The system is telling me that it cannot run automatically, and needs to be run 'manually' without the -p option. The problem is that this generated thousands of confirmations (I gave up holding down the 'enter' key and did a Ctrl-C), so I figured I would see if:
e2fsck -yvcf /dev/id
would work, but then wondered what the difference might be, and would there be a downside.
For the avoidance of doubt, I have a ddrescue 'image' of the drive already (I told it to ignore errors and do the best it can), so no real risk of making things any worse - I am mainly just playing around to learn and see what I can achieve with fsck at this point.
Thanks,
Alan.
0 Answers