Difference between revisions of "Linux/grub"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
(update-grub; links)
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
* {{l/same|grub-install}}
 
* {{l/same|grub-install}}
 
** note that the target must be a ''device'' (e.g. /dev/sdd), not a ''partition'' or ''filesystem'' (e.g. /dev/sdd1).
 
** note that the target must be a ''device'' (e.g. /dev/sdd), not a ''partition'' or ''filesystem'' (e.g. /dev/sdd1).
 +
* {{l/same|grub-mkconfig}} creates a new grub.cfg based on what disks and boot options it finds. Run as root and redirect output to the desired file.
 
* {{l/same|update-grub}} updates the grub menu
 
* {{l/same|update-grub}} updates the grub menu
 
** bootable drives do not need to be mounted in order to be included
 
** bootable drives do not need to be mounted in order to be included
 +
==Commmands==
 +
===rescue mode===
 +
''these commands are still available in rescue mode; examples are from a system with one hard drive on /dev/hda, 2nd partition is [[ext4]]''
 +
* <code>ls (hd{{arg|drive}},{{arg|partition}})</code>
 +
** Example: <code>ls (hd0,2)</code>
 +
*** Returns: (hd0,2): Filesystem is ext2.
 +
** Example: <code>ls (hd0,2)/boot/grub</code>
 +
*** Returns: ''(horizontal list of files)''
 
==Notes==
 
==Notes==
 +
* https://askubuntu.com/questions/41930/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0/48516#48516 - this actually worked when the Repair Disk did not
 
* http://community.linuxmint.com/tutorial/view/245
 
* http://community.linuxmint.com/tutorial/view/245
 
* http://askubuntu.com/questions/420778/i-need-step-by-step-guidence-to-recover-grub
 
* http://askubuntu.com/questions/420778/i-need-step-by-step-guidence-to-recover-grub
 +
* https://askubuntu.com/questions/142300/how-to-fix-error-unknown-filesystem-grub-rescue
 +
* https://ubuntuforums.org/showthread.php?t=1706090 "Grub error unknown filesystem"
 +
* https://askubuntu.com/questions/5298/grub-help-and-reinstalling-ubuntu
 +
 +
Overall, though, this seems to be the magic tool for fixing broken grub booting: https://help.ubuntu.com/community/Boot-Repair
 +
* https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows - looks like it might discuss the manual steps Boot Repair does
 +
 +
Other links that may be useful:
 +
* https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/s2-grub-whatis-booting-uefi
 +
* https://www.eightforums.com/threads/uefi-doesnt-recognise-my-bootable-usb-device.16780/

Latest revision as of 20:40, 11 August 2019

related commands

  • grub-install
    • note that the target must be a device (e.g. /dev/sdd), not a partition or filesystem (e.g. /dev/sdd1).
  • grub-mkconfig creates a new grub.cfg based on what disks and boot options it finds. Run as root and redirect output to the desired file.
  • update-grub updates the grub menu
    • bootable drives do not need to be mounted in order to be included

Commmands

rescue mode

these commands are still available in rescue mode; examples are from a system with one hard drive on /dev/hda, 2nd partition is ext4

  • ls (hd<drive>,<partition>)
    • Example: ls (hd0,2)
      • Returns: (hd0,2): Filesystem is ext2.
    • Example: ls (hd0,2)/boot/grub
      • Returns: (horizontal list of files)

Notes

Overall, though, this seems to be the magic tool for fixing broken grub booting: https://help.ubuntu.com/community/Boot-Repair

Other links that may be useful: