f2fs should be recognized by casper as a supported fs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
casper (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu iso images bundle the f2fs driver in initrd since 20.04, but casper does not recognize f2fs as a supported fs even in 24.04. Hence, the images cant loop-boot from f2fs partitions.
A 2-lines change is all that's required since 20.04 (casper-helpers since 22.04, previously this code was in lupin-helpers)
--- casper-helpers
+++ casper-helpers.new
@@ -350,7 +350,7 @@
is_
[ -z "${1}" ] && return 1
case ${1} in
- ext2|ext3|
+ ext2|ext3|
;;
esac
@@ -370,6 +370,7 @@
modprobe reiserfs
modprobe xfs
modprobe jfs
+ modprobe f2fs
modprobe vfat
modprobe fuse
[ "$quiet" != "y" ] && log_end_msg "...devs loaded..."
With some efforts (copy f2fs and crc32 modules from the squashed filesystem into the initrd) it works down to 18.04 live server and 15.10 desktop.
With such patch it works in 14.04.3 .. 14.04.6 desktop as well
--- casper-helpers
+++ casper-helpers.new
@@ -46,7 +46,15 @@
echo $FSTYPE
return 0
fi
- /sbin/blkid -s TYPE -o value $1 2>/dev/null
+ /sbin/blkid -s TYPE -o value $1 2>/dev/null || {
+ # Check for f2fs
+ case "$(dd if="$1" skip=2 count=1 2>/dev/null)" in
+ "$(printf '\x10\x20\
+ echo f2fs
+ return 0 ;;
+ esac
+ return 1
+ }
}
where_
My script to apply the changes: https:/
description: | updated |
description: | updated |
description: | updated |
description: | updated |
The script from the post is deprecated now, I converted it into a generic "make casper aware of fs X, add kernel modules Y to the initrd" one.
You can get it here https:/ /github. com/slowpeek/ ubuntu- remaster- bbb and make 14.04+ images bootable from f2fs like this:
ubuntu- remaster- f2fs input.iso output.iso
or, without the f2fs shortcut:
ubuntu- remaster- bbb --fs f2fs --module f2fs,~crc32_ generic, ~crc32- pclmul input.iso output.iso
If using the docker image:
ubuntu- remaster- bbb.docker --fs f2fs --module f2fs,~crc32_ generic, ~crc32- pclmul -- input.iso output.iso