[opensuse] Understanding YaST2 Bootloader setup
Well I am totally confused about using YaST2 to setup the bootloader, and no amount of reading documentation or searching the internet has allowed me to grok the underlying model of how this works... I am not looking for a cookbook set of instructions (which I find all over the place) BUT some clarification of terminology and what really is going on when I select various options. I have a system with multiple versions of SuSE installed on various different disk drives. I am using GRUB. In the YaST module for setting up the boot loader, there is a panel titled Boot Loader Installation and within that panel I am allowed to choose between one (or more) boot loader locations and this is where I am confused. The Help menu does not help either, just makes things even more confusing! So here are my questions - 1. The first choice offers me the option to Boot from Boot Partition. I cannot find a definition of what a "Boot Partition" is exactly, but my guess is that this is a partition that I will set fstab up to mount as /boot Is that correct? If so, (and I would argue that this is a bad way to name and describe it) why would I want to create a partition just for /boot? What would be the advantage and disadvantage of doing so. It seems to me that in an environment with multiple operating systems or versions of the same OS, that this might be a incredibly dangerous thing to do.. If a later version of an OS or GRUB is installed and wants to change, add, delete or modify files or the structure of files within this area, then that could break other or earlier versions of an OS, which is also dependent upon a common boot partition. Or is the thinking behind this option, to have each OS have its own boot partition? Is so why would that be an advantage? 2. The second choice is Boot from Extended Partition. I can find very little documentation on this feature and it somewhat baffles me. I am again guessing that this has something to do with installing an OS in an extended partition, but why should I have to explicitly specify that I am doing so? What is different about this option, that is not covered when either Boot From Boot Partition or Boot From Root Partition is chosen? If the Boot Partition or the Root Partition is in an extended partition why can't YaST simply figure that out and do what ever is necessary to support it? Or perhaps (and just a wild guess) does this have more to do with loading the OS from and extended partition and nothing to do with where the bootloader code actually exists? What does booting from an Extended Partition REALLY mean? 3. The third choice is Boot from Master Boot Record. While I think I understand the basic idea of the Master Boot Record, a couple of questions regarding it have come to my mind. First, the Help menu states that if one is going to have multiple OS's on ones system, then this method should not be used (not recommended) Well.... I have been using this method, and it seems to work OK. I use this method only because that apparently is the default method chosen by the SuSE installation process. This poor user would assume that if the installation process has the ability to detect if multiple operating systems are already installed, then the installation process would be smart enough to decide whether a boot from a MBR would be acceptable or not... So why is this not the recommended method for systems with multiple OS's? My second question regarding using the MBR (may in part answer the above question) comes from my reading about it. My understanding of the MBR is that it is located in the first sector of a disk drive. I also understand (and please correct me if I am wrong on this) is that on a system with multiple drives, the BIOS will choose the "first" drive to boot from it's MBR. I also read that this "order" of drives may change from one OS to another, which stunned me but then I have no idea how the BIOS works or how drive order/labels are assigned.. And indeed I discovered, (much to my dismay) that this order apparently did change between openSuSE11.0 and 11.2. Or to state what I discovered more correctly, the device referenced as /dev/sda1 on my openSuSE11.0 system is NOT the same device referenced as /dev/sda1 under openSuSE11.2 (and was I ever surprised and confused by this!!!) So if there is this sort of instability in drive order and name associations, is this why using the MBR is not recommended? And why is the SuSE installation process choosing to use this method by default, when multiple OS's are detected? I am lost on this one! The fourth choice is to Boot from Root Partition and again I am guessing that this really means to boot from the partition that I will configure fstab to mount as / Correct? If I choose this option, the Help states that I should select "Set active Flag in Partition Table for Boot Partition" Why??? Do I have to have a separate Boot Partition in order to use this Boot from Root Partition option? It seems to me that I should be setting an active flag in the Partition Table for the Root Partition, not for a Boot Partition. But then I see there is no such option in the Boot Loader Options, so is this an oversight?. And why don't the Help instructions tell me to set the active flag for the Boot Partition if I am going to use a Boot Partition? If I am going to choose to boot from the Boot Partition do I also have to explicitly tell YaST to Write Generic Boot Code to MBR, or does YaST assume this, and write something special to the MBR to work with the info in the Boot Partition? What does YaST set up if I have my boot loader in a Boot Partition and I select Write Generic Boot Code to MBR? Conversely, if I am choosing to boot from a Root Partition, then it seems I MUST choose to Write Generic Boot Code to MBR. When and why wouldn't I? Unless some sort of bootloader is written to the MBR, it does not seem possible that a system would boot, so why have this as an option under this condition, or does YaST simply assume that a boot loader, of some kind, already exists in the MBR? Shouldn't YaST at least warn me that a boot loader was not completely set up, in case I forget to tell it to Write Generic Boot Code to the MBR? Or perhaps, shouldn't I be forced to either tell YaST to Write Generic Boot Code to the MBR, or that there already is a valid bootloader there and I know this for a fact and YaST does not have to worry about it? This seems like a dangerous user trap to me, but again my ability to grok the underlying model has failed me, so perhaps I am missing something obvious. Finally, and this indicates that I must have a fundamental misunderstanding of the underlying model for boot loader locations, I noted that YaST2 allows me to select multiple Boot Loader Locations. What does it mean to check more than one location? How does that work, and why would I choose more than one location? Anywise I hope some nice guru will clarify these questions for me... I am trying to understand all this in order to more fully understand some other problems I seem to be having with the boot process. If there is a good description of the model for the boot load process, I would appreciate a pointer... I have already read most of what I could find in the SuSE docs, the GRUB website, and info manual and none of it helped me gain a deeper understanding of how the boot loaders really work and what all these location options mean.. Thanks in advance.... Marc.. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 9 Dec 2009 08:45:20 Marc Chamberlin wrote:
Well I am totally confused about using YaST2 to setup the bootloader, and no amount of reading documentation or searching the internet has allowed me to grok the underlying model of how this works... I am not looking for a cookbook set of instructions (which I find all over the place) BUT some clarification of terminology and what really is going on when I select various options.
I have a system with multiple versions of SuSE installed on various different disk drives. I am using GRUB. In the YaST module for setting up the boot loader, there is a panel titled Boot Loader Installation and within that panel I am allowed to choose between one (or more) boot loader locations and this is where I am confused. The Help menu does not help either, just makes things even more confusing!
Marc, First, can I politely suggest some reading that may help you understand what happens during the boot process? That understanding will help you figure out the answers to your questions below: http://www.ibm.com/developerworks/linux/library/l-linuxboot/ http://docs.fedoraproject.org/install-guide/f12/en-US/html/ch-boot-init- shutdown.html http://docs.fedoraproject.org/install-guide/f12/en-US/html/ch-grub.html The last 2 are from the Fedora project but give a good insight into the terminology and should answer more of your questions.
So here are my questions -
1. The first choice offers me the option to Boot from Boot Partition. I cannot find a definition of what a "Boot Partition" is exactly, but my guess is that this is a partition that I will set fstab up to mount as /boot Is that correct?
Yes. Traditionally in Unix systems /boot lived on a dedicated partition. On Linux this partition contains only the kernal images, kernel config files and stage 2 boot loader.
If so, (and I would argue that this is a bad way to name and describe it) why would I want to create a partition just for /boot? What would be the advantage and disadvantage of doing so.
That is how it is traditionally done and there are some valid reasons for doing so, however many current distributions don't do this by default.
It seems to me that in an environment with multiple operating systems or versions of the same OS, that this might be a incredibly dangerous thing to do.. If a later version of an OS or GRUB is installed and wants to change, add, delete or modify files or the structure of files within this area, then that could break other or earlier versions of an OS, which is also dependent upon a common boot partition. Or is the thinking behind this option, to have each OS have its own boot partition? Is so why would that be an advantage?
No, just the opposite. The boot loader is told which partitions to load from. No other partitions are mounted at this time. Once control is passed to the kernel then other partitions are mounted (which is when the boot partition becomes visible as /boot). Separate boot partitions for each OS (where only the relevant one is mounted by the running system) prevents having the others overwritten accidentally.
2. The second choice is Boot from Extended Partition. I can find very little documentation on this feature and it somewhat baffles me. I am again guessing that this has something to do with installing an OS in an extended partition, but why should I have to explicitly specify that I am doing so? What is different about this option, that is not covered when either Boot From Boot Partition or Boot From Root Partition is chosen? If the Boot Partition or the Root Partition is in an extended partition why can't YaST simply figure that out and do what ever is necessary to support it? Or perhaps (and just a wild guess) does this have more to do with loading the OS from and extended partition and nothing to do with where the bootloader code actually exists? What does booting from an Extended Partition REALLY mean?
The grub configuration file refers only to physical partitions, not mounted filesystems. I'm not sure exactly of the configuration differences between booting from a primary partition or booting from an extended partition (which, remember, is a virtual partition with a partition number above 5).
3. The third choice is Boot from Master Boot Record. While I think I understand the basic idea of the Master Boot Record, a couple of questions regarding it have come to my mind. First, the Help menu states that if one is going to have multiple OS's on ones system, then this method should not be used (not recommended) Well.... I have been using this method, and it seems to work OK. I use this method only because that apparently is the default method chosen by the SuSE installation process. This poor user would assume that if the installation process has the ability to detect if multiple operating systems are already installed, then the installation process would be smart enough to decide whether a boot from a MBR would be acceptable or not... So why is this not the recommended method for systems with multiple OS's?
Other OS's have their own boot loaders. If you install the other OS after installing grub/linux, the MBR will be overwritten, thus rendering your Linux system non-bootable. To overcome this, you need to install Linux/grub last. Grub then installs Stage 1 in the MBR and can chain-load the other OS bootloaders. The reading contained in the links I posted above will make this much clearer. If you choose to install grub to the MBR, it will install Stage1 and Stage 1.5 in the MBR; stage 2 will always reside in /boot/grub, regardless of whether /boot is a separate partition or not. HTH, Rodney. -- =================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au =================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Well I am totally confused about using YaST2 to setup the bootloader, and no amount of reading documentation or searching the internet has allowed me to grok the underlying model of how this works... I am not looking for a cookbook set of instructions (which I find all over the place) BUT some clarification of terminology and what really is going on when I select various options.
[snip] I had also several times difficulties when tried to use yast to create boot loaders. For this reason I learned lilo and since then I almost ultimately use lilo on command line to manipulate boot loaders. Nevertheless I am happy that these questions were raised since I had/have many of them too. I think at least openSUSE admin guide should explain the various options since they can be choosen in YAST, ie they are not only changeable by config file editing and cli magic. The disk order thing is one of the mysterious questions for me too. How the system decides which drive will be eg. sda, sdb etc, and how the change in YAST influences this? I guess from the answers given by experts, we 'ordinary users' can learn a lot. Thanks, Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Istvan Gabor
-
Marc Chamberlin
-
Rodney Baker