1

I have my Linux root on an F2FS USB flash drive. The kernel is on another device accessible by the bootloader. I'm trying to start it with the parameters root=/dev/sda1 rootwait rootfstype=f2fs, but I always end up with a kernel panic:

VFS: Cannot open root device "sda1" or unknown-block(8,1): error -19
Please append a correct "root=" boot option; here are the available partitions:
0100      8192 ram0 (driver?)
0101      8192 ram1 (driver?)
0800   3913728 sda  driver: sd
  0801 3913728 sda1 973c7215-01
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)

sda1 is the correct device, and I'm able to mount it with no problems to another computer running Arch Linux. I partitioned it using fdisk and formatted it using mkfs.f2fs from f2fs-tools.

Why does the kernel panic? Am I missing the F2FS module? If so, how can I load it at boot time?

5
  • 1
    If you're not using an initramfs, f2fs (and whatever else you need to mount rootfs) can't be a module. It must be built-in. Is it?
    – derobert
    Nov 24, 2015 at 18:30
  • @derobert I'm not sure. How can I find out? I have discovered an initrd is probably the way to go anyway
    – osvein
    Nov 24, 2015 at 19:27
  • 1
    It's an option when you built the kernel. Check .config inside your kernel source tree for CONFIG_F2FS_FS=y. (Or, if you didn't just build your own kernel, could you give the backstory here? E.g., what device is this, steps/instructions you were following to set it up, etc.)
    – derobert
    Nov 24, 2015 at 19:31
  • I'm trying to get Linux running on a TI-Nspire CX calculator. It has an ARM with the ARMv5 instruction set, so I just grabbed a nice-looking Arch Linux ARM release and put it on an F2FS USB flash drive. I grabbed a prebuilt kernel and device tree from here. The configs used to build it are here. I see the F2FS module is commented out. I'll try to build the kernel myself.
    – osvein
    Nov 24, 2015 at 19:42
  • 1
    If compiling your own kernel fixes it, please feel free (encouraged, actually) to post an answer including the steps to compile the kernel.
    – derobert
    Nov 25, 2015 at 3:19

1 Answer 1

1

As @derobert pointed out, you have to build the kernel with the F2FS module. In my case it wasn't even included as a loadable module.

To build the kernel yourself, grab it from kernel.org. Get the default kernel config for your platform. (I got mine from here for the TI-Nspire calculator series.) Modify it to include F2FS by setting CONFIG_F2FS_FS to y. Save it as .config on the root of the downloaded kernel source, and simply build it using make. You'll then find your fresh kernel stuff in arch/arm/boot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .