ext4 support for save-file

01micko posted patches to add support for the ext4 filesystem in the save-file:

Thanks, I have implemented this, see commit (the relevant files are rc.shutdown and shutdownconfig):

Posted on 27 Apr 2012, 8:54


Posted on 27 Apr 2012, 8:12 by 01micko
Good to see you fixed the ext4 test, I was a bit lazy I guess.

Subsequently, I did test outside of X and had no problem.

Posted on 27 Apr 2012, 15:09 by Iguleder1
What about XFS? Seems like a great choice for save files - if support for it can be added the same way, why not?

Posted on 27 Apr 2012, 24:33 by K Godt
grep bug ?
|	334	[ -f /lib/modules/${KVER}/modules.builtin ] && [ "`grep 'fs/ext4`" != "" ] && HAVEEXT4='yes'

looks buggy to me
[ -f /lib/modules/${KVER}/modules.builtin ] && [ "`grep 'fs/ext4'`" != "" ] && HAVEEXT4='yes'

1)grep is missing a single quote and
2)grep without filename will wait for inputs; in shutdown funny .

I dont know where to grep fs/ext4 in a file or dir ?

grep ext4 /lib/modules/`uname -r`/*

ls /lib/modules/`uname -r`/kernel/fs

Posted on 28 Apr 2012, 5:18 by technosaurus
grep ext4 /proc/filesystems
That is really bad anyways - what if someday you decide to improve the kernel config to have builtin ext4(it would break)... a better method would be to use /proc/filesystems

my personal opinion is that if it is in the initramfs, it should be built in if at all possible

Posted on 28 Apr 2012, 7:20 by 01micko
ext4 test
Hmmm.. I shouldn't be so lazy..

Shinobar's way is probably the best.

which mkfs.ext4 &>/dev/null
if [ "$?" = "0" ];then
(and so on)

Posted on 28 Apr 2012, 8:42 by BarryK
ext4 fixed
K Godt,
Oh dear, a major lapse of attention on my part. Thanks, fixed.

The code does test for builtin ext4, using modules.builtin. And as a module using 'modinfo'.
Probably not in the most efficient way though.

Your suggestion to just test /proc/filesystems, yes, that is simplest, I will change to just that:

grep 'ext4$' /proc/filesystems

Posted on 28 Apr 2012, 15:55 by L18L
simpler than simplest:
# grep ext4$ /proc/filesystems 


(without quotes)