Martin Cracauer Homepage Forum Forum Index Martin Cracauer Homepage Forum
Don't get confused, this is just my homepage, not really a message board. I implemented it as a forum for reasons you can find here.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The perfect setup for bootloaders for multi-boot

 
Post new topic   Reply to topic    Martin Cracauer Homepage Forum Forum Index -> Operating system installation and configuration
View previous topic :: View next topic  
Author Message
Martin Cracauer
Site Admin


Joined: 09 Feb 2005
Posts: 114
Location: Boston, MA, USA

PostPosted: Sun Mar 26, 2006 11:59 am   Reply with quote

So here is how to do a universal bootloader install:

  • the MBR of the disk (not partition) holds the FreeBSD boot selector (the one that allows you to presse F1-F5)
  • Grub is installed into the beginning of Linux partitions (not on the disk MBR)
  • grub.conf (or menu) lives on a /boot partition
  • there is only one /boot partition for all Linuxes installed
  • the /boot partition is ext2fs


Reasons:

You need you need the FreeBSD bootloader on top-level mainly, because:
  • it remembers what you booted last, automatically, without editing something (you have the option of not doing tat later through grub)
  • grub is not robust enough. Fatfingered /etc/grub.conf missing an OS or two is bad enough, but much worse is that parts of grub live in the root filesystem and that corruption to the root filesystem can break grub
  • a reinstall of Linux usually does not pick up the old grub.conf, so a "fatfingered" grub.conf is actually the natural result of broken install programs
  • I recently had a fsck move away or destroy grub stage 1.5. That is "kind of" annoying because not only becomes the affected OS but all OSes. So the FreeBSD boot selector which has no parts in any filesystem is used at the highest level, so that you can boot into any OS even when grub breaks


Although the FreeBSD bootloader remembers what it booted last you can still boot any OS without remembering. That is because if you select Linux you don't boot Linux directly, you jump into grub, and grub allows you to boot FreeBSD from grub. So if you want to boot FreeBSD only once but after the reboot your want Linux (without you being there to hit a key), then you select "Linux" in the FreeBSD boot selector, which brings up grub, and then you select FreeBSD in grub. The next time you reboot it will go through grub and use whatever the edited default is

You use ext2fs with no extra attributes for the partition that grub.conf resides on. That is done because this kind of Linux partition can be read and fscked from more OSes. You will mount /boot readonly to prevent it from being corrupted by accidents elsewhere (in FreeBSD I always have the complete root filesystem readonly but that is not practical in most Linux distributions).
Back to top
View user's profile Send private message Visit poster's website Permanent URL to this post in this thread
Martin Cracauer
Site Admin


Joined: 09 Feb 2005
Posts: 114
Location: Boston, MA, USA

PostPosted: Sun Mar 26, 2006 12:12 pm   Reply with quote

Here is how to install the above sequence:

If Linux is your first OS to install:

  • As always you should use an MS-DOS fdisk as the first step in establishing partition tables. Both FreeBSD and Linxu frequenctly get the disk geometry wrong which might work for a while but then later bombs with a new OS (namely *&##*#&*&# Fedora Core 5).
  • But you need to start MS-DOS from a state where it had no partition table at all
  • So you wipe out of disk MBR under FreeBSD or Linux with dd or cstream
  • Then you use MS-DOS fdisk to write a first partition table
  • Then use boot a FreeBSD install disk (even if you don't want FreeBSD at this point) and write a partition table and select to install the FreeBSD boot selector into the MBR (or use the MS-DOS *.exe on the disk)
  • Then you boot your Linux installation disk
  • Select to have a separate /boot partition
  • Tell the installer to use ext2fs (not ext3fs) for /boot
  • Tell the installer to install grub into the partition, not the disk MBR. You want /dev/hda1, /dev/hdc3 or similar, not /dev/hda or /dev/hdc


That should have you covered.

If your first OS to install is Windows, then
  • the MS-DOS fdisk might or might not be needed, but you should still start from a zeroed-out disk with no existing partition table.
  • Since Windows install always wipes out the MBR without asking (of course...) you need to reverse the above order. First wipe out the MBR, then install Windows, then install the FreeBSD boot selector
Back to top
View user's profile Send private message Visit poster's website Permanent URL to this post in this thread
Display posts from previous:   
Post new topic   Reply to topic    Martin Cracauer Homepage Forum Forum Index -> Operating system installation and configuration All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group