Find the answer to your Linux question:
Results 1 to 2 of 2
Want to write a script that can do the following: If you have a HDD image file, is there a Linux command/way that can tell you if its partition table ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2011
    Posts
    6

    How to tell if hard drive image is MBR, GPT, LVM, contains GRUB?


    Want to write a script that can do the following:

    If you have a HDD image file, is there a Linux command/way that can tell you if its partition table is MBR, GPT, or LVM?

    Similarly, is there a way to tell whether the image file contains a GRUB bootloader or not?

    Thank you!

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,748
    The first sector (512 bytes) of a disc (or image in this case) contains the MBR and partition. You can extract and analyze this data as necessary to answer your question(s).
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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