Code Monkey home page Code Monkey logo

bootinfoscript's Introduction

Usage Boot Info Script:
-----------------------

  Run the script as sudoer:

    sudo ./bootinfoscript <outputfile>

  or if your operating system does not use sudo:

    su -
    ./bootinfoscript <outputfile>


  When running the script, without specifying an output file, all the output
  is written to the file "RESULTS.txt" in the same folder as the script.

  But when run from /bin, /sbin, /usr/bin, or another system folder, the file
  "RESULTS.txt" is written to the home directory of the user.

  When the file "RESULTS.txt" already exists, the results will be written to
  "RESULTS1.txt". If "RESULTS1.txt" exists, the results will be written to
  "RESULTS2.txt", ...


  To get version number, release date, last git commit and git retrieval date
  of this script, use (no root rights needed):

    ./bootinfoscript -v
    ./bootinfoscript -V
    ./bootinfoscript --version


  To get this help text, use (no root rights needed):

    ./bootinfoscript -h
    ./bootinfoscript -help
    ./bootinfoscript --help


  To automatically gzip a copy of the output file, use (root rights needed):

    ./bootinfoscript -g <outputfile>
    ./bootinfoscript --gzip <outputfile>


  To write the output to stdout instead of a file, use (root rights needed):

    ./bootinfoscript --stdout


  The last development version of Boot Info Script can be downloaded, with:
    (no root rights needed)

    ./bootinfoscript --update <filename>

  If no filename is specified, the file will be saved in the home dir as
  "bootinfoscript_YYYY-MM-DD_hh:mm:ss".



Features:
---------

* Look at each MBR and identify its boot loader:
    - For GRUB and SuperGRUB: display the controlling partition.
    - For GRUB2: display the disk offset of the core.img as recorded in
                 the boot sector. Parse core.img and display embedded
                 modules, prefix and config script.
    - For Syslinux altmbr: display embedded boot partition number.
    - If the MBR is unknown, display the whole MBR.

* Look at all partitions:
    - Determine their type.
    - Identify their boot sectors.
        ° For GRUB: display the controlling partition and the offset of the
                    stage2 file as recorded in the boot sector.
        ° For GRUB2: display the disk offset of the core.img as recorded in
                     the boot sector. Parse core.img and display embedded
                     modules, prefix and config script.
        ° For Syslinux: display the full version name, check if internal
                        checksum matches, display installation directory,
                        display offset of the ldlinux.sys file.
        ° For NTFS and FAT: examine the Boot Parameter Block for errors.
    - Identify the operating system installed on that partition.
    - List boot programs.
    - Display the partition table.
    - Display the output of "blkid".
    - Look in "/" and "NST" for bootpart codes and display the offset and boot
      drive, it is trying to chainload.
    - Look on "/" and "/NST" for stage1 files and display the offset and boot
      drive of the stage 2 files it is trying to chainload.
    - Display boot configuration files.
    - Is able to search LVM partitions if the LVM2 package is installed
      ("apt-get install lvm2" in debian based distros).
    - Is able to search Linux Software RAID partitions (MD RAIDs) if the "mdadm"
      package is installed.
    - If dmraid is installed, search all RAID drives, detected by dmraid.

bootinfoscript's People

Contributors

arvidjaar avatar skalkoto avatar ghuls avatar

Watchers

James Cloos avatar Gabriel Hardy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.