0

I've successfully installed u-boot and linux kernel on STM32F469-disco board but I still don't have a rootfs. my board has 16MB RAM and 16MB FLASH storage and 32GB SDCARD and the CPU core of it is ARM Cortex-M4 32bit processor. I want to know can I just copy my busybox rootfs to a fat32 partition and expect the linux kernel to read it?

when I try to copy it to an NTFS partition it throws this error:

enter image description here

PS C:\Users\mahya> copy -r z:\home\mahyar1284\my_projects\buildroot\buildroot-2020.08\output\target\ c:\users\mahya\desktop\target
Copy-Item: The name of the file cannot be resolved by the system. : 'Z:\home\mahyar1284\my_projects\buildroot\buildroot-2020.08\output\target\linuxrc'

UPDATE

tried it with tar command:

C:\Users\mahya>tar -cf -r z:\home\mahyar1284\my_projects\buildroot\buildroot-2020.08\output\target\*
tar: Couldn't open z:/home/mahyar1284/my_projects/buildroot/buildroot-2020.08/output/target/linuxrc: Invalid argument
tar: Error exit delayed from previous errors.
7
  • FAT32 doesn't support symbolic links, and ones such as /bin -> /usr/bin may exist in a typical Linux root directory.
    – DannyNiu
    Commented Feb 11, 2021 at 8:18
  • @DannyNiu what about NTFS or EXFAT? I need a format to be in common between linux and windows. Commented Feb 11, 2021 at 8:26
  • 1
    NTFS would work, as Windows used to have a subsystem for Unix, as well as currently a subsystem for Linux. ExFAT doesn't support symlink though.
    – DannyNiu
    Commented Feb 11, 2021 at 8:33
  • @DannyNiu it throws error when trying to copy symlink files to ntfs partition. (I've updated my question). what can I do to copy my rootfs? Commented Feb 11, 2021 at 8:42
  • If you're copying using Windows GUI, then the GUI shell may throw some errors. Try command line (DOS-style, or PowerShell).
    – DannyNiu
    Commented Feb 11, 2021 at 8:51

1 Answer 1

1

At the moment you can't use NTFS or FAT32/exFAT to host the root filesystem:

  • FAT32/ExFAT do not support permissions or symbolic/hard links
  • NTFS* works via the userspace fuse daemon, so an entire filesystem will belong to a single user which is again incompatible with most Linux distros

I'm now running Fedora 33, and I have a number of files not owned by root:

/usr/share/polkit-1/rules.d
/etc/polkit-1/rules.d
/var/log/ntpstats
/var/log/chrony
/var/lib/geoclue
/var/lib/chrony
/var/lib/chrony/drift
/var/lib/avahi-autoipd
/var/lib/avahi-autoipd/*
/var/lib/tpm2-tss/system/keystore
/var/lib/openvpn
/var/lib/ntp
/var/lib/unbound
/var/spool/mail/*

*Update: Starting with Linux 5.15, NTFS now has a proper kernel driver (module) which allows to use NTFS as a root FS.

9
  • 2
    I'm going to use busybox or buildroot for my filesystem and I don't care about the file permisions for now. I just need to boot my system. is there anyway to do it? Commented Feb 11, 2021 at 8:56
  • If you include fuse and mount.ntfs-3g in your initrd, it should probably work. Commented Feb 11, 2021 at 8:58
  • what should I do to copy my rootfs to that NTFS partition? it throws this The name of the file cannot be resolved by the system error Commented Feb 11, 2021 at 8:59
  • What file gives you this error? Commented Feb 11, 2021 at 9:01
  • 1
    Would be nice if people downvoting the answer at least left comments why they do that. Commented Nov 30, 2021 at 8:05

You must log in to answer this question.

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