Find the answer to your Linux question:
Results 1 to 5 of 5
Hi. I have been searching google for hours now, trying to find out how to check a partition for ext2(3,4) using dd and hexdump. Maybe I'm not using the correct ...
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    6

    File system type using dd and hexdump

    Hi.
    I have been searching google for hours now, trying to find out how to check a partition for ext2(3,4) using dd and hexdump. Maybe I'm not using the correct search criteria, because I can't find anything. I have also been looking at the hexdump of all ext file systems, but I can't figure out which part describes the type of ext or that it is an ext file system in the first place.

    I know you can use tools like file,blkid and such, but that is not an option for me, since these are not available where I need this.

  2. #2
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    386
    Do you have access to the 'fsck' command? It's an essential tool that should come with any system, and it can tell you the filesystem type even if you don't have access to the device.
    Code:
    krendoshazin@null:~> cat /dev/root
    cat: /dev/root: Permission denied
    krendoshazin@null:~> /sbin/fsck -N /dev/root
    fsck from util-linux 2.19
    [/sbin/fsck.ext3 (1) -- /] fsck.ext3 /dev/xvda
    Code:
    -bash-4.0$ /sbin/fsck -N /dev/sdb1
    fsck from util-linux-ng 2.16
    [/sbin/fsck.jfs (1) -- /] fsck.jfs /dev/sdb1

  3. #3
    Just Joined!
    Join Date
    Oct 2010
    Posts
    6
    It's to be used on Android devices. fsck exists, but it shows fsck.auto an complains about /etc/fstab. I need something more independent that can do this check and exists on most devices by default and also can do this on unmounted partitions, hence dd and hexdump.

  4. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    It's not clear (to me) that the Android has enough similarity to allow identification of filesystems:
    Android's kernel is a fork of the Linux kernel and has further architecture changes by Google outside the typical Linux kernel development cycle.[64] Android does not have a native X Window System nor does it support the full set of standard GNU libraries, and this makes it difficult to port existing Linux applications or libraries to Android.[65]

    -- Android (operating system) - Wikipedia, the free encyclopedia
    However, if there is similarity, then the MBR will contain some information:
    Master boot record - Wikipedia, the free encyclopedia
    see offset 0x04, and then the partition types at reference [7], viz. Partition types: List of partition identifiers for PCs

    Good luck ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  5. #5
    Just Joined!
    Join Date
    Oct 2010
    Posts
    6
    Thx I will play with that.

    For now I compiled a custom busybox with blkid file system support. Seams to work just fine identifying different ext and vfat file systems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...