I need to resize2fs the root partition of an embedded device. Since it doesn't have an alternate boot option, I used an tmpfs, moved and restated everything until I finally was able to umount /dev/mmcblk0p1. But bad luck:
$ umount /dev/mmcblk0p1
umount: /dev/mmcblk0p1: not mounted
$ resize2fs /dev/mmcblk0p1
resize2fs 1.42.12 (29-Aug-2014)
resize2fs: Device or resource busy while trying to open /dev/mmcblk0p1
Couldn't find valid filesystem superblock.
$ fsck /dev/mmcblk0p1
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
/dev/mmcblk0p1 is in use.
e2fsck: Cannot continue, aborting.
Strange! A busy unmounted file system. It seems to me, that the journal still has it's hands on the device:
root 112 0.0 0.0 0 0 ? S 14:13 0:00 [jbd2/mmcblk0p1-]
Turn journaling off, you say? Here comes the hen-and-egg-game:
$ tune2fs -O ^has_journal /dev/mmcblk0p1
tune2fs 1.42.12 (29-Aug-2014)
The needs_recovery flag is set. Please run e2fsck before clearing
the has_journal flag.
So how to stop that? It's still running in rescue mode, can't be kill -9ed. How to get rid of it?
(I'm on Debian Jessie)