How do I know if it was grub or grub 2 who wrote the MBR on my machine?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by colorpurple21859
It is coded in the mbr. even if the partition is deleted and you get a grub-rescue prompt if you enter set at the grub prompt it will tell you what the partition grub is looking for the grub files in.
Exactly what I was thinking, thanks for confirming that!
That means the 'set root' command specifies what partition the grub.cfg file is in (of course, within that partition the path is /boot/grub/ assuming)?
Distribution: openSUSE(Leap and Tumbleweed) and a (not so) regularly changing third and fourth
Posts: 627
Rep:
All grub does initially, is to boot up to menu. It doesn't know which system you will choose and therefore which grub.cfg it needs until you choose it. Even from a rescue you have to tell it which partition and where is the root before it will find your system and boot it.
Excuse me. Assuming it all begins in the MBR (that famous 0XEB90 jump) at some time the loader will have to read the grub.cfg file, am I right? But it has to know what partition it is in then?
The code in the Mbr is set to look for the rest of the grub modules needed to access the grub.cfg in a particular partition The grub modules are usually located in /boot/grub/i386-pc If the partition/files doesn't exist you get a grub rescue prompt
You might take a look at the link below to the SuperGrubDisk forums. The initial post give a dd command to use which should give you this information. I would suggest you continue reading the comments from the other person who appears to be one of the developers/maintainers of the software who mentions some of the possible problems with using it. Note, the posts are 10 years old and refer only to Grub Legacy. If you want to run the commands and do them correctly all they do is output info to a terminal but always take care with typing using dd.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.