Re: [gentoo-user] Re: [OT] busybox fsck vs. fsck.ext4 ... experiences?

2017-03-31 Thread Adam Carter
Interesting that it includes fsck (any by the looks of
https://busybox.net/BusyBox.html, also fsck.minix) but none of the other
fsck's. The choice of mkfs is a different set, with mkfs.ext2, mkfs.minix,
mkfs.reiser, mkfs.vfat included.


[gentoo-user] Re: [OT] busybox fsck vs. fsck.ext4 ... experiences?

2017-03-31 Thread Jonathan Callen

On 03/31/2017 09:50 AM, tu...@posteo.de wrote:

On 03/31 10:59, Nils Freydank wrote:

[...]

The fsck.*'s are built in


I agree:

% bb
~ $ which fsck
~ $ fsck -v
fsck (busybox 1.26.2, 2017-03-12 11:38:12 CET)


--
GPG fingerprint: '00EF D31F 1B60 D5DB ADB8  31C1 C0EC E696 0E54 475B'
Nils Freydank


Ok, if its builtin then back to the initial question:
How does this implementation compares to the "official" stuff of
e2fsprogs and friends?
Any experiences with that ?

Thanks a lot for any help in advance!

Cheers
Meino




e2fsprogs provides two different executables that matter for this 
discussion, fsck and e2fsck.  There are also symlinks from fsck.ext2, 
fsck.ext3, and fsck.ext4 pointing to e2fsck, so I will use these name 
interchangeably.  The busybox executable provides an implementation of 
fsck, but not one for e2fsck.  The fsck executable reads your /etc/fstab 
file and calls the appropriate fsck.${FSTYPE} for each filesystem you 
wish to check (and, in the case of busybox's implementation, tries to 
call fsck.auto for filesystems not listed in /etc/fstab if you don't 
otherwise tell it which filesystem type the filesystem is).  Busybox 
itself does not have any implementation of fsck.ext4, just the fsck 
wrapper itself.  You need an fsck.ext4 implementation to actually check 
your filesystem, which can be provided by e2fsprogs's e2fsck.  If you do 
not have a fsck.ext4 executable, then busybox fsck will be unable to 
actually do any check on your ext4 filesystem.


If your filesystem is not ext4, but instead something else, like vfat, 
then you would need the appropriate fsck.vfat (or whatever), and could 
use ether implementation of fsck to call it, but you would still need 
fsck.vfat.  The only exception to this is if you are using the minix 
filesystem (which you probably aren't), in which case there is a 
fsck.minix applet that can be compiled into busybox, but is not included 
by default.


--
Jonathan Callen



Re: [gentoo-user] Re: [OT] busybox fsck vs. fsck.ext4 ... experiences?

2017-03-31 Thread tuxic
On 03/31 10:59, Nils Freydank wrote:
> [...]
> > The fsck.*'s are built in
> 
> I agree:
> 
> % bb
> ~ $ which fsck
> ~ $ fsck -v
> fsck (busybox 1.26.2, 2017-03-12 11:38:12 CET)
> 
> 
> -- 
> GPG fingerprint: '00EF D31F 1B60 D5DB ADB8  31C1 C0EC E696 0E54 475B'
> Nils Freydank

Ok, if its builtin then back to the initial question:
How does this implementation compares to the "official" stuff of
e2fsprogs and friends?
Any experiences with that ?

Thanks a lot for any help in advance!

Cheers
Meino





Re: [gentoo-user] Re: [OT] busybox fsck vs. fsck.ext4 ... experiences?

2017-03-31 Thread Nils Freydank
[...]
> The fsck.*'s are built in

I agree:

% bb
~ $ which fsck
~ $ fsck -v
fsck (busybox 1.26.2, 2017-03-12 11:38:12 CET)


-- 
GPG fingerprint: '00EF D31F 1B60 D5DB ADB8  31C1 C0EC E696 0E54 475B'
Nils Freydank

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Re: [OT] busybox fsck vs. fsck.ext4 ... experiences?

2017-03-30 Thread Adam Carter
Wikipedia says "*BusyBox* is software that provides several stripped-down Unix
tools  in a
single executable
file ."

Its also statically linked, so you dont need any libraries;
$ file /bin/busybox
/bin/busybox: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux),
statically linked, for GNU/Linux 2.6.32, stripped, with debug_info

>
The fsck.*'s are built in


Re: [gentoo-user] Re: [OT] busybox fsck vs. fsck.ext4 ... experiences?

2017-03-30 Thread tuxic
On 03/30 06:49, Jonathan Callen wrote:
> On 03/29/2017 10:42 PM, tu...@posteo.de wrote:
> > Hi,
> > 
> > Before doing the wrong decision:
> > How "secure" is it to use fsck of busybox in a limited environment
> > (SoC) to check sdcard partitions (etx4) occasionally instead of using
> > fsck.ext4 ?
> > Does someone has some experiences with this ?
> > 
> > Thanks a lot in advance for any help!
> > Cheers
> > Meino
> > 
> > 
> > 
> > 
> 
> The fsck applet provided by busybox is just the fsck(8) driver, which calls
> the fsck.${FSTYPE} command to actually check the filesystem.  You still need
> fsck.ext4/e2fsck from e2fsprogs to actually do the check.
> 
> -- 
> Jonathan Callen
> 

Hi Jonathan,

thanks for your reply! :)

That means, that one or both of the other binaries have to be
somewhere on the sdcard...
I have to search deeper ;)

Cheers
Meino





[gentoo-user] Re: [OT] busybox fsck vs. fsck.ext4 ... experiences?

2017-03-30 Thread Jonathan Callen

On 03/29/2017 10:42 PM, tu...@posteo.de wrote:

Hi,

Before doing the wrong decision:
How "secure" is it to use fsck of busybox in a limited environment
(SoC) to check sdcard partitions (etx4) occasionally instead of using
fsck.ext4 ?
Does someone has some experiences with this ?

Thanks a lot in advance for any help!
Cheers
Meino






The fsck applet provided by busybox is just the fsck(8) driver, which 
calls the fsck.${FSTYPE} command to actually check the filesystem.  You 
still need fsck.ext4/e2fsck from e2fsprogs to actually do the check.


--
Jonathan Callen