Tiny Core Linux

General TC => General TC Talk => Topic started by: candinico on July 18, 2013, 04:17:25 AM

Title: filesystems support
Post by: candinico on July 18, 2013, 04:17:25 AM
Hi,
how to mount tinycore in a filesystem not supported from the official iso ? e.g it's possible to flash a new installation with jffs2 or ZFS in a hard drive

Thanks in advance

Nico
Title: Re: filesystems support
Post by: theYinYeti on July 18, 2013, 05:29:21 AM
For this purpose, you need to change TinyCore's ramfs. See here for an example:
http://yeti.selfip.net/cms/index.php/post/2013/05/12/NTFS-and-modular-boot-for-TinyCore-Linux

This example is for adding support for booting TinyCore on NTFS (NTFS-3G).
Title: Re: filesystems support
Post by: Juanito on July 18, 2013, 05:33:52 AM
If you load the filesystems-3.0.21-tinycore extension, it contains jffs2, but not zfs.

As a general comment, you can use the "provides" function in the apps browser gui to search the extension repo.
Title: Re: filesystems support
Post by: theYinYeti on July 18, 2013, 05:40:58 AM
Also, for ZFS, you'll have to compile the ZFS kernel module for the exact version of TinyCore's kernel that you use, if you choose the kernel module solution. And you should: this version of ZFS is better than the Fuse-based one.
For documentation on how to compile the kernel module, you may want to look at Arch's Wiki.
Title: Re: filesystems support
Post by: tinypoodle on July 18, 2013, 06:34:01 AM
Also note that if you mean to boot from zfs or jffs2, not every common bootloader would just work out of the box.
Title: Re: filesystems support
Post by: theYinYeti on July 18, 2013, 06:58:40 AM
Upon further thinking, in order to boot from a ZFS partition, I think the ZFS "module" would have to be actually included into TinyCore's kernel, not be left as a separate module.
And tinypoodle is right: booting from "unusual" filesystems is not a given. The best bet would be Grub2, I guess; that's the bootloader I use, but I never looked into this topic…

[edit: Grub2 version 2.0 and up indeed have support for ZFS (http://lists.gnu.org/archive/html/grub-devel/2012-06/msg00093.html); apparently not JFFS2, though.]
Title: Re: filesystems support
Post by: bmarkus on July 18, 2013, 07:01:59 AM
You need a remastered version with the necessary fs kernel driver added.
Title: Re: filesystems support
Post by: candinico on July 18, 2013, 09:41:08 AM
in this moment , my focus is on a new installation with a jffs2 filesystem. The OS need to run ( and operate ) in a SD card or a DOM module.
Title: Re: filesystems support
Post by: Juanito on July 18, 2013, 11:10:13 AM
I think you'd need to remaster tinycore to do that.
Title: Re: filesystems support
Post by: tinypoodle on July 18, 2013, 11:15:10 AM
The OS always operates in rootfs (tmpfs), while extensions could optionally be mounted from a file system residing on persistent storage.

How you boot is exclusively a matter of bootloader, regardless of OS.
Title: Re: filesystems support
Post by: theYinYeti on July 18, 2013, 11:31:28 AM
That's right! I assumed the extensions would reside on the same partition where the boot files are, but tinypoodle is right: they need not be!
So:
1- Make sure your boot-loader has support for the kind of partition where the boot files are (core.gz and vmlinuz).
2- Make sure your kernel has support for the kind of partition where the extensions are.

Also, I think there's a directory inside the initramfs (don't remember where, though) where you can put extensions that will get pre-loaded before attempting to load "normal" extensions. IIRC, this pre-loading unfortunately happens before the /etc/fstab file is created.
Title: Re: filesystems support
Post by: candinico on July 18, 2013, 11:51:02 AM
 @theYinYeti: how to modify the script to import the jffs2 filesystem in tinycore? I talkin about the script that install tiny on a ntfs   partition: it's not trivial , i think: caus tiny not provide the support for some filesystems ( i rember that have downloaded only the jfs-utils)

 
Title: Re: filesystems support
Post by: theYinYeti on July 18, 2013, 02:43:00 PM
@candinico: I can’t help you with the script you talk about because I don’t use it, nor any “official” install script. As you say, TC only supports a few filesystems, and that’s OK, since it has to be tiny. We’re just supposed to customize it, and that’s fine :)

In my first post, I gave you the link where I explain how to do things for NTFS-3G; just adapt it to your filesystem. Basically, there are two things to do:
1— incorporate the extension that brings this filesystem’s support to TC into the initramfs (core.gz);
2— check that the default filesystem “driver” for your filesystem is the right one.
Step 2 may very well be unnecessary for you. In my case, I had to do this because the default “driver” is the in-kernel “ntfs”, whereas I wanted “ntfs-3g” to be used. It’s rather rare that there are two “drivers” for the same filesystem.
Title: Re: filesystems support
Post by: candinico on July 19, 2013, 03:11:34 AM
@theYinYeti ok , my question concerning the use of filrsystem utility to flash the installation and boot from the same filesystem: for example, make a new installation ON a filesystem type JFFS2 or NTFS. I runned the script , that's good , but dont'solve my problem. I think to recompile the kernel and perform more operation. My need is to launch Tiny on a SD with a JFFS2 filesystem.
Title: Re: filesystems support
Post by: bmarkus on July 19, 2013, 03:29:20 AM
Why do you want to recompile kernel? Everything you need is already available. Just asking...
Title: Re: filesystems support
Post by: theYinYeti on July 19, 2013, 03:39:13 AM
@candinico: I'm not sure I understand your last post.
If I do, though, I think you miss the point (or part of it): your issue here is that your boot-loader must recognize the partition first…
Title: Re: filesystems support
Post by: tinypoodle on July 19, 2013, 03:45:21 AM
You still haven't clearly expressed what exactly you intend to store on a jffs2 fs.
Boot files? Personal persistent repository? Or both of those?
Title: Re: filesystems support
Post by: candinico on July 19, 2013, 05:31:49 AM
ok. i'm clarify :) i'm esotheric sometimes  :)

setup:

a) TinyCore 3.6 running on GEODE AMD ca 500MHZ RAM 256k
b) applications  : a MySQL engine , among others, with data in a PERSISTENT path ( in fact , on the support)

The problem is to ensure a filesystem and a storage type ( already solved) to store safe and fast the data of our application



Title: Re: filesystems support
Post by: bmarkus on July 19, 2013, 05:34:16 AM
First, I would drop TC 3.6 and move to current 4.7.7
Title: Re: filesystems support
Post by: theYinYeti on July 19, 2013, 05:35:35 AM
TC 3.6? Wow! I'm not even sure anything I've written before actually applies to this TC…
Title: Re: filesystems support
Post by: tinypoodle on July 19, 2013, 06:05:43 AM
Then search wiki for remastering with adding modules and add the jffs2 module.
Title: Re: filesystems support
Post by: bmarkus on July 19, 2013, 06:28:05 AM
Still I'm not convinced that SD card use really verifies need of jffs2 and all extra work. Embedded systems, and Raspberry Pi is fine with ext3/ext4 on SD card.
Title: Re: filesystems support
Post by: candinico on July 19, 2013, 06:46:28 AM
@bmarkus: I'm performing these days various benchmark about filesystems and SD and DOM on our systems, to discover the advantages of the different filesystems. I'm curious about your opinion on JFFS2 on SD cards: why the ext4/ext3 is best for you?
Do you have some "doc" to enforce this opinion?

Title: Re: filesystems support
Post by: tinypoodle on July 19, 2013, 06:57:43 AM
I'm curious about your opinion on JFFS2 on SD cards: why the ext4/ext3 is best for you?
Do you have some "doc" to enforce this opinion?

Looks like you yourself have provided all proof ever needed about the advantage of compatibility since start of this thread which now reached Reply #23...
Title: Re: filesystems support
Post by: candinico on July 19, 2013, 07:11:15 AM
@tinypoodle  for the number of post, seems to be a flame :) I'm really interesting on advantages of a certain filesystem respect to another one. Suggestion from experiences? Related to tiny?

Title: Re: filesystems support
Post by: bmarkus on July 19, 2013, 07:45:19 AM
@tinypoodle  for the number of post, seems to be a flame :) I'm really interesting on advantages of a certain filesystem respect to another one. Suggestion from experiences? Related to tiny?

There is nothing TC specific, TC is just a LINUX. There are plenty of good articles on the file systems, use Google to search. At that phase it has nothing to do with Tiny Core.
Title: Re: filesystems support
Post by: theYinYeti on July 19, 2013, 07:46:55 AM
candinico, you should read at least the first 4 answers in this page:
http://www.linux-mtd.infradead.org/faq/general.html
Title: Re: filesystems support
Post by: bmarkus on July 19, 2013, 07:50:26 AM
candinico, you should read at least the first 4 answers in this page:
http://www.linux-mtd.infradead.org/faq/general.html

Quote from articel you are referring:

Quote
Please, do not be confused by USB stick, MMC, SD, CompactFlash and other popular removable devices. Although they are also called "flash", they are not MTD devices. They are out of MTD subsystem's scope. Please, read this FAQ entry.
Title: Re: filesystems support
Post by: theYinYeti on July 19, 2013, 07:52:19 AM
Then read this:
http://www.linux-mtd.infradead.org/faq/jffs2.html#L_hdd_jffs2

(@tinypoodle: one more post! see the efficiency: one link = one post :D :P )
Title: Re: filesystems support
Post by: bmarkus on July 19, 2013, 08:06:35 AM
There is nothing to do with jffs2 when you have SD card, as it is the case here. Except very low end cards they have a built-in wear levelling mechanism, you do not need any special attention.
Title: Re: filesystems support
Post by: candinico on July 19, 2013, 10:24:44 AM
thanks for your answers, i understand that a discussion on filesystems is out of scope of this forum.