>>>>> "Ben" == Ben Armstrong <[email protected]> writes:
> On 03/16/2011 11:45 AM, David Kuehling wrote:
>> Going over the live-boot scripts, I just noticed that it uses 'blkid'
>> to detect file-systems, with no way to override the result:
>>
>> scripts/live (check_dev()):
>>
>> fstype=$(get_fstype "${devname}")
>>
>> scripts/live-helper:
>>
>> get_fstype () { /sbin/blkid -s TYPE -o value $1 2>/dev/null
>> }
>>
>> Unfortunately blkid does not seem to support jffs2 file-system, so no
>> way to boot directly from mtd flash?
>>
>> Am I overlooking something? What would be the best way to fix that?
> What would return the correct value here in this case?
That's an interesting question. I guess jffs is designed in a way that
makes it quite difficult to detect (without scanning the full
partition). There is the 'mtdinfo' utility from 'mtd-utils' package,
which can be used on the mtdNN device corresponding to a mtdblockNN
device file:
blkid /dev/mtd3 :
mtd3
Name: NOR (RW) JFFS2 Root File System
Type: nor
Eraseblock size: 131072 bytes, 128.0 KiB
Amount of eraseblocks: 88 (11534336 bytes, 11.0 MiB)
Minimum input/output unit size: 1 byte
Sub-page size: 1 byte
Character device major/minor: 90:6
Bad blocks are allowed: false
Device is writable: true
But that doesn't really help, does it?
> What value gets returned here instead when operating on jffs2?
blkid returns nothing at all when called on /dev/mtdblock*.
I'll have a look at openwrt, maybe there's somewhere a proper solution
available already.
A manual override for the fstype from the kernel command line would also
be a helpful workaround for now.
cheers,
David
--
GnuPG public key: http://user.cs.tu-berlin.de/~dvdkhlng/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205 D016 7DEF 5323 C174 7D40
pgp1KDVx5fUvb.pgp
Description: PGP signature
