Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
hii
i presently have grub on MBR .. and from wot i have read on internet , it says if u wish to have a dual boot with winxp u shudnt have GRub on MBR but on first sector of /boot , i wish to know why ?
also if i wanna change the grub from MBR to /boot wot to do ?
i always thot BIOS give control to MBR at a fixed offset ... if i want grub to be primary boot loader to link me to linux and winxp .. why wudnt i want it on MBR ? and also i read that my /boot should be within 1024 cylinder's of hard disk if i have old BIOS .. how to check if my BIOS support more than 1024 ???
I also wanna know how to enable a partition to boot ? as the asterix sign ...my winxp partition has the * but not linux partitions ..
wot does it really signify ? tht it is boot enable ?
thanks
1024 cylinder limit is history. So forget it. It was already irrelevant to either Grub or Lilo at least two years ago.
Grub should always be in MBR if you want it to multi boot others.
/boot is not where Grub resides. It is always /boot/grub which holds the Grub files. The operational part of Grub is either in MBR or the boot sector of the root partition of the Linux.
The * mean the partition has been marked bootable. It is only used by MS system. Linux never uses it.
Should have a look at "Just booting tips" in my signature. The information is good enough for you to boot any number of OS.
-------------------
Toozy
Suggest you run fdisk, make a primary partition active or bootable and check the movement of the *.
You are nearly correct if we talk only MS systems because MS's MBR has no target to boot. It searches the first one that has its booting flag switched on (the *). So in that sense it can be your interpretation of the "default" system to boot. However I have said it. Linux never uses it.
The answer is very simple.
In Grub it always has a root statement which specifies the partition to boot. like
Code:
root (hd0,0)
Grub counts from 0 so the above is the 1st partition of the 1st disk.
In Lilo there is always a "root=" statement or "other=" statement which also defines the partition to be booted.
Having a * or no * makes no difference to Linux.
Hope this is clear. I can be wrong so any further information is welcome.
if that is the case , then why do Fedora core 3 installation always give u a option to choose between installing Grub on MBR or on boot sector
when i wish to boot other systems too .. why isnt installed on MBR by default
my question basially boils down to ..
can grub boot more than 1 OS when its on boot sector and not in MBR and how ? suppose MBr have winxp NTLDR and grub is on boot sector .. wudnt the system directly go windows xp then why does FC3 give a option to choose where to install grub even if it has detected other systems .. and i guess other distros also give u this option ..
also please clear to me .. is it /boot or boot sector of root partition coz both r clearly different ..
thanks saikeee and others ..
please explain me i m bit slow
-----------
saikeee ur links dont work .. i dearly wanted to read them ..all said time out
Choice is good.
The Windoze loader (in the MBR) can also be made to chainload to a Linux loader installed into the boot sector of a partition.
It isn't as easy to setup, but is do-able. So grub/lilo aren't the only choice for the MBR.
And likewise Linux loaders can chainload onwards to others.
When grub is installed to a partition, the startup code is written to the boot sector record - the first sector on the partition (this is equivalent to the code that would be written to the MBR). Like the MBR code it's primary task is to point (and transfer control) to the location of the stage files and conf file - typically located in /boot/grub for grub.
There are a maximum of 4 choices for the boot loader installation
(1) do not install
(2) In a floppy
(3) In MBR
(4) in root partition
To put it in MBR means a user selects the Linux to multi boot others if he/she has more than one system.
To put it in the root partition means the Linux will not be booted directly on power up but may be booted indirectly by another boot loader occupying the MBR. When Grub boots another Linux it chaniloads its boot loader from the root partition. Both Lilo and Windows's NTlrd do exactly the same.
If you are still not clear then read the last 3 of my links.
In the 100+ systems links I stated that I chainloaded over 80 of them. That was done by making the over 80+ system to place their boot loader in their root partions.
I never used /boot in a devoted partition as suggested by old documentation. I believe that is to do with older version of boot loader unable to cross the 1024 cylinders limit. Nowaday both Grub and Lilo can run at the end of a 300Gb disk!!!
All my distros still have /boot but it is a directory inside every root partition.
Saikee is "Doctor Boot", so anything he says prevails....
First, **something** must be in the MBR (defined as the first 512-byte block(typically the first sector) on the drive). This is where the BIOS goes during startup.
Second, don't confuse directories (eg "/boot") with partitions and sectors.
Third, boot loading can and does happen in stages. EG Windows goes first to the MBR and then to the first sector of the Windows partition--that is where NTLDR is.
GRUB typically has stage 1 in the mbr (or a floppy), and stage 2 in the /boot/grub directory.
thanks a lot BOOT DOCTOR ur such a relief ...and pixellany thanks a lot
actually mine was a silly doubt in which i wanted to ask if grub installed in boot sector of root directory can chainload another OS .. and although i knew the answer tht its not possible because bios switch control to MBR still i asked .. coz on many forums they alert u not to install grub on MBR with windows xp as 2nd OS .. and i just wanted to know why?
thanks a lot guys .. if there was no LQ and u people .. i wud have died in ignorance ... 3 cheers to Linux and LQ
and by the way tommorow i see my chancellor of university to seek approval for starting LINUX USER GROUP .. wish me luck !!!
and yehh any suggestions with this LUG ? i wish i cud call u all to be guest lectures hehe ..
thanks a ton~~
and yehh saikeee links r working now .. that day it didnt .. maybe problem in my connection ...
thanks guys ..
p.s. if u got any link explaining all work arounds related to SATA and linux .. please give me
thnks again
hi ..
i wish to know one more thing .. once in past i had to install grub on floppy and i used this command ( i was root)
grub-install /dev/fd0
this installed it on floppy .. but wot happened was .. it removed grub from my MBR .. because when i tried to boot through hard disk .. it showed me GRUB some million times ... all i cud see on screen was grub
but i was able to boot through floppy .. i asked this question on LQ before too .. does this command above transfer grub from MBR to floppy or install a fresh copy ..
because it clearly did transfer and not fresh install in my case .. coz my hard disk was not able to boot me
can u please elaborate on that command wot did it do ..
why am i not able to boot through hard disk after rebooting .. and only through floppy ...
and also think to be noted is .. when i issued command after bootin through floppy in my linux
grub-install /dev/hda
my floppy drive was active .. which again showed some transfer ..
and then i was not able to boot through floppy but only through hard disk ..
Grub-install is one of the two ways to install Grub into the MBR. A more robust way is Task B4 (using "root" + "setup" commands in a Grub shell or Grub prompt) as described in "Just Booting tips" in my signature.
Grub-install can get into trouble if the Linux is installed at the high end of a large disk and the Linux has not put together with a kernel anticipate such a position.
The age of Grub may possibly has something to do with it especially if it is older than the 0.95 version. Current Grub is 0.97.
----------------------------------------------------------------
Guys,
Thanks for the nice words. I am just learning Linux same as everybody. The real experts have answered the same booting problems hundreds of times and may not be motivated to answer every new one. It is up to us newbies to help each other.
I did my share helping newer newbies and have to put together things I have been repeating into my signature to save typing them again.
I can be wrong and hopefully others could step in to tell my mistakes. We all learn so there is no loser here.
It installs a new copy.
You misinterpreted what you saw - the (hard disk) MBR wasn't affected. The stage file(s) it needed to link to had been moved.
When you created the floppy you re-wrote the files in /boot/grub on the hard disk. The MBR code finds them by specific sector. The boot code written to the floppy knew where the new files were, but not the hard disk MBR code.
When you re-reran the install for the hard disk, you reversed the problem.
To create a floppy try "grub-install --root-directory=/mnt/floppy /dev/fd0" (adjust mountpoint as needed). This will write all the needed files to the floppy and leave the hard disk version unaffected.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.