guess_fstype now works for ext4

Jesse has updated the /sbin/guess_fstype utility and it now recognises ext4 partitions.

I need to compile it statically to use in the "initial ramdisk", and I think previously I used uClibc. This time I used Dietlibc as we have that in the 'devx' file. However, I had to jump through a few hoops to get there, as documented here:

edit first two lines of Makefile:


CC = diet gcc -nostdinc
CFLAGS = -W -Wall -Os -static

compile needs this:

# cd /usr/lib/diet
# ln -s lib lib-i386
# cp /usr/include/error.h /usr/inlude/diet/

In linux_fs.h insert this at beginning:

typedef unsigned char u_char; /*BK*/

In guess_fstype.c insert this at beginning:

typedef unsigned int uint; /*BK*/

Now it compiles:
# make guess_fstype

But, gives this warning:
guess_fstype.c: In function 'do_guess_fstype':
guess_fstype.c:354: warning: array subscript is above array bounds


Interesting that I get an executable of 21KB, whereas the previous one (compiled in uClibc I think) is 26KB. Note also the warning message.

Jesse sent me a p.m. about a problem with the kernel and ext4. When mounting a ext4 filesystem in alpha4 there is an error:

EXT4-fs: sdb1: Filesystem with huge files cannot be mounted read-write without CONFIG_LBD

This needs "large file support" enabled in the kernel. I have made a note of that for the next kernel compile.

The PET package that has Jesse's latest guess_fstype is 'guess_fs-20090512.pet'. The utility is also at /bin/guess_fstype in the initial ramdisk.


Posted on 18 May 2009, 9:56 - Category: Woof
Edit - Delete


Comments:

Posted on 18 May 2009, 12:06 by dogone
fsck output w/pfix=fsck
If it would a very easy thing to do, can Puppy please display fsck [-f] output when pfix=fsck is invoked? The switch is used only when a user has a reason to be concerned, so she deserve explicit feedback and a thorough test (-f switch).

It's just one of those "feel good" things.
Delete



Add Comment

Title
Author
 
Content
Show Smilies
Security Code 0675690
Name of the Puppy Linux mascot?
Password (So people cannot steal your identity)