1

Using Debian 9.9 on a live USB, and try to mount a partition from de hdd

mount -t ext4 /dev/sda1 /mnt

I get

mount: unknown filesystem type 'ext4'

Well, the ext4, ext3, ext2 type are not in /proc/filesystem

I have e2fslibs and e2fsprogs installed.

  • If you reboot do you still not have any ext file systems listed in /proc/filesystem? – kemotep Jun 25 at 20:18
  • This seems impossible unless maybe your live USB image is corrupt? – teppic Jun 25 at 20:55
3
  1. Have a look at your kernel config. If ext4 is built as module, then it should output CONFIG_EXT4_FS=m and a few more lines:

    $ grep 'CONFIG_EXT4_FS' /boot/config-$(uname -r)
    CONFIG_EXT4_FS=m
    CONFIG_EXT4_FS_POSIX_ACL=y
    CONFIG_EXT4_FS_SECURITY=y
    CONFIG_EXT4_FS_ENCRYPTION=y
    


  2. Check that the module is present in your initrd image:

    $ zcat /boot/initrd.img-$(uname -r) | cpio -t | grep ext4
    lib/modules/4.9.0-4-amd64/kernel/fs/ext4
    lib/modules/4.9.0-4-amd64/kernel/fs/ext4/ext4.ko
    141243 blocks
    

    On my Debian Live 9.1 (bootet from USB with syslinux and persistence) the path of the loaded initrd is a bit different. The above file is the one present in the squashfs image. Just to make sure this is really the same file:

    $ dmesg | grep initrd
    [    0.000000] Command line: BOOT_IMAGE=/live/vmlinuz_4_9.0_4_amd64 initrd=/live/initrd_img_4_9.0_4_amd64 boot=live persistence components
    [    0.000000] Kernel command line: BOOT_IMAGE=/live/vmlinuz_4_9.0_4_amd64 initrd=/live/initrd_img_4_9.0_4_amd64 boot=live persistence components
    [    0.870136] Freeing initrd memory: 22792K
    

    The path to initrd is /live/initrd_img_4_9.0_4_amd64 and my boot files are mounted on /lib/live/mount/persistence/sdb1. Your path is probably different.

    With both paths merged together:

    $ zcat /lib/live/mount/persistence/sdb1/live/initrd_img_4_9.0_4_amd64 | cpio -t | grep ext4
    lib/modules/4.9.0-4-amd64/kernel/fs/ext4
    lib/modules/4.9.0-4-amd64/kernel/fs/ext4/ext4.ko
    141243 blocks
    $ diff /lib/live/mount/persistence/sdb1/live/initrd_img_4_9.0_4_amd64 /boot/initrd.img-$(uname -r)
    

    Confirmed, both files are the same.


  3. Then the module should have been loaded:

    $ lsmod|grep ext4
    ext4                  585728  1
    crc16                  16384  1 ext4
    jbd2                  106496  1 ext4
    fscrypto               28672  1 ext4
    mbcache                16384  2 ext4
    $ cat /proc/filesystems | grep ext4
        ext4
    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.