webmanoffesto

Boot Info Script

Dec 4th, 2017
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.36 KB | None | 0 0
  1.  
  2. Usage Boot Info Script:
  3. -----------------------
  4.  
  5. Run the script as sudoer:
  6.  
  7. sudo ./bootinfoscript <outputfile>
  8.  
  9. or if your operating system does not use sudo:
  10.  
  11. su -
  12. ./bootinfoscript <outputfile>
  13.  
  14.  
  15. When running the script, without specifying an output file, all the output
  16. is written to the file "RESULTS.txt" in the same folder as the script.
  17.  
  18. But when run from /bin, /sbin, /usr/bin, or another system folder, the file
  19. "RESULTS.txt" is written to the home directory of the user.
  20.  
  21. When the file "RESULTS.txt" already exists, the results will be written to
  22. "RESULTS1.txt". If "RESULTS1.txt" exists, the results will be written to
  23. "RESULTS2.txt", ...
  24.  
  25.  
  26. To get version number, release date, last git commit and git retrieval date
  27. of this script, use (no root rights needed):
  28.  
  29. ./bootinfoscript -v
  30. ./bootinfoscript -V
  31. ./bootinfoscript --version
  32.  
  33.  
  34. To get this help text, use (no root rights needed):
  35.  
  36. ./bootinfoscript -h
  37. ./bootinfoscript -help
  38. ./bootinfoscript --help
  39.  
  40.  
  41. To automatically gzip a copy of the output file, use (root rights needed):
  42.  
  43. ./bootinfoscript -g <outputfile>
  44. ./bootinfoscript --gzip <outputfile>
  45.  
  46.  
  47. To write the output to stdout instead of a file, use (root rights needed):
  48.  
  49. ./bootinfoscript --stdout
  50.  
  51.  
  52. The last development version of Boot Info Script can be downloaded, with:
  53. (no root rights needed)
  54.  
  55. ./bootinfoscript --update <filename>
  56.  
  57. If no filename is specified, the file will be saved in the home dir as
  58. "bootinfoscript_YYYY-MM-DD_hh:mm:ss".
  59.  
  60.  
  61. If multiple versions of Boot Info Script are detected in the same directory,
  62. Boot Info Script will list all versions found.
  63. In that case you need to force Boot Info Script to run a certain version,
  64. by adding "--this" as first argument (root rights needed):
  65.  
  66. ./bootinfoscript --this <outputfile>
  67.  
  68.  
  69.  
  70. Features:
  71. ---------
  72.  
  73. * Look at each MBR and identify its boot loader:
  74. - For GRUB and SuperGRUB: display the controlling partition.
  75. - If the MBR is unknown, display the whole MBR.
  76.  
  77. * Look at all partitions:
  78. - Determine their type.
  79. - Identify their boot sectors.
  80. ° For GRUB: display the controlling partition and the offset of the
  81. stage2 file as recorded in the boot sector.
  82. ° For Syslinux: display the full version name, check if internal
  83. checksum matches, display installation directory,
  84. display offset of the ldlinux.sys file.
  85. ° For NTFS and FAT: examine the Boot Parameter Block for errors.
  86. - Identify the operating system installed on that partition.
  87. - List boot programs.
  88. - Display the partition table.
  89. - Display the output of "blkid".
  90. - Look in "/" and "NST" for bootpart codes and display the offset and boot
  91. drive, it is trying to chainload.
  92. - Look on "/" and "/NST" for stage1 files and display the offset and boot
  93. drive of the stage 2 files it is trying to chainload.
  94. - Display boot configuration files.
  95. - Is able to search LVM partitions if the LVM2 package is installed
  96. ("apt-get install lvm2" in debian based distros).
  97. - Is able to search Linux Software RAID partitions (MD RAIDs) if the "mdadm"
  98. package is installed.
  99. - If dmraid is installed, search all RAID drives, detected by dmraid.
Add Comment
Please, Sign In to add comment