So ... questions were asked at today's meeting about
setting up dual boot (some Microsoft Windows somethin' or another)
and Linux.
I mentioned some bit about how in some circumstances, one may want to
leave NT Boot loader as the MBR and primary/default boot loader.
E.g., if one needs that for some reason of compatibility, or to
not freak out an IT department or other co-workers in a (mostly)
Microsoft shop, etc.
So, I mentioned I'd posted something in more detail about
that ... somewhere, once-upon a time. Might have more detailed
somewhere else, but this is what I found that I'd posted earlier:
news:ac21e42d-eeb0-4e40-a9e4-0f8eb04499c9@y22g2000prd.google groups.com
https://groups.google.com/forum/#!original/comp.os.linux. setup/GkdmTGEZCeU/ux1klBi6H_oJ
Also found these, which may be relatively useful:
http://www.thinkwiki.org/wiki/How_to_setup_boot_loaders#NT_B oot_Loader
https://en.wikipedia.org/wiki/NTLDR
So ... essentially one would proceed as follows, presuming one already
has the Microsoft operating system installed:
One will generally need to shrink the Microsoft partition
Then one installs Linux - being careful not to stomp on the MBR. Good
idea to backup the MBR first, in case that happens, so one can
restore it. Various Linux utilities can also well do that.
And of course don't stomp on the Microsoft partition(s).
And for the Linux installation, usually that means, for one's Linux boot
stuff done on the installation, that's written to / (root) filesystem,
or a separate /boot filesystem, and no overwriting of the MBR.
Then, the NT boot loader - I'm not going to attempt to give a tutorial
on it - I'm no expert on it, just tweaked a few things - I'll try and
cover the relevant points:
So ... NT boot loader ... somewhere out there, it has a
BOOT.INI file ... with XP, it was, I believe, at the root (top)
level of the filesystem. That has various stuff in it.
There is (optionally?) a timeout parameter in seconds,
set it to something reasonable - I believe if one drops it
to 0, then it'll just boot whatever's configured as the default.
There's a default= to specify what it boots by default (with
timeout, or if one just hits <ENTER>).
One lists "operatnig systems" - these aren't necessarily
operating systems, but things to potentially boot.
They're basically, in Microsoft format, a file, or a partition, e.g.:
C:\BOOT\grub.boot_sector
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
I think that example above would be the first primary partition
on the first disk ... dear knows exactly how all those parts work,
but the part after partition - notably the number within (),
seems to be the number of the primary partition. I think that's
what the default would look like in XP. I'd mucked about with mine,
relocated the partition, making it 2nd partition, changing that (1) to
(2), and inserting a (Linux) primary boot partition as the first
partition ... and relocated the filesystem when it was still some
flavor of FAT, before it got converted to NTFS (that's the way it came
shipped on the drive - at first boot of that operating system it would
change from FAT to NTFS - back in 2003, FAT was much easier to deal with
under Linux than NTFS, so I shrunk and relocated the filesystem while it
was still FAT - before even a first boot of (yuck) XP).
so, there's the bit of file or partition, and = sign, then a
quoted (") label - which is what it displays to select from when the
boot loader menu comes up.
The NT boot loader doesn't like to boot "foreign" operating systems.
It doesn't understand their filesystems, etc.
It, however, will "boot" (chain load) a boot sector placed in a file.
So, that's typically what one was to have NT boot loader boot
a Linux operating system. After installing Linux as I
basically mentioned, copy the boot block from the applicable
Linux filesystem (or even file in some cases), to the file where
the NT boot loader knows how to find and read it. Then when one
boots, from the NT boot loader menu, select that corresponding
menu item, and it then chain loads that boot sector data from
file - and, if, e.g. that is the appropriate data one copied that
grub had created, then one's just fired up the grub boot loader
from there. After that, one continues as essentially a regular boot
of Linux from grub.
Other interesting bit (I kind'a mentioned on earlier post).
I'd set up the NT boot loader so that by default it would boot
grub. I also set up lilo boot loader.
I also configured both grub and lilo, so they could, among their
various options, also chain load each other or the NT boot loader ... so one could
actually cycle among the various boot loaders, jumping from any boot loader
to any boot loader.
So, yes, good to back up the MBR when doing this ... and also likewise,
the BOOT.INI file, before mucking with that. If those are saved in
reasonable location, one can also generally restore them fairly easily
with some common Linux tools.
Other random hint/tip I'll mention, on most of the common Linux bootloader
stuff (especially grub). So, there's often the question, do a separate
/boot filesystem, ... or not (have /boot directly on root filesystem).
And, I often see the "silly" (seems to me) discussion about all the
configuration stuff in the boot loader ... needing to be prefixed
with /boot if one didn't use a separate boot filesystem, and not being
prefixed with /boot if one did use a separate boot filesystem.
Well, I pretty much always would just set up:
# (cd /boot && ln -s . boot)
E.g. that leaves us with:
$ (cd /boot && ls -l boot)
lrwxrwxrwx 1 root root 1 Dec 29 2011 boot -> .
$
Then the whole matter becomes simpler ... all those config bits about
prefix or not with /boot, prefix 'em all with /boot, and then doesn't
matter if one has a separate /boot filesystem or not, or changes, or
whatever - all still works the same consistently throughout. (basically
/boot is always the same place, whether it's relative to the root filesystem
with no /boot filesystem, or the separate /boot filesystem, mounted as such
or relative to the root of the /boot filesystem).
I don't know why that's simply not just done that way on all configurations
by default - makes it much more straight forward and consistent.
At least all the Linux boot loaders I've seen that are smart enough to be
able to read filesystem path names, are also smart enough to be able to follow
symbolic links.
Oh, ... UEFI. Yeah, that's a rather different matter, and some or much of the above
may not be applicable to UEFI ... in any case, UEFI certainly starts out
differently, and has it's own partitioning scheme, etc. So, things get a
bit different ... or at bare minimum, extended.
--
You received this message because you are subscribed to the Google Groups "BerkeleyLUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to berkeleylug+unsubscribe@googlegroups.com .
To post to this group, send email to berkeleylug@googlegroups.com.
Visit this group at https://groups.google.com/group/berkeleylug .
For more options, visit https://groups.google.com/d/optout .