LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-05-2003, 06:52 PM   #1
phoneix
Member
 
Registered: Aug 2003
Location: Georgia, usa
Distribution: Mandrake 10.1
Posts: 44

Rep: Reputation: 15
Question Linux+ Question


Hey, I have this question from 2 studyguides and am confused. Can you help?

Q: A site admin. instructs the technician to install Linux as a secondary OS on an existing Workstation. He wants to use the boot loader of the primary OS. When requested where to place LILO, the tech should select which location:
a. BIOS
b. /etc/disktab
c. MBR
d. Partition superblock

A: B


Another question I got was similar. But it was multi-booting Windows, OS2, Linux. It said to put LILO on the Partition Superblock. Makes sense because of OS2.
I thought the answer to the above question would be either C or D. Can somebody help??
 
Old 08-05-2003, 07:52 PM   #2
masinick
Member
 
Registered: Apr 2002
Location: Clinton Township, MI
Distribution: Debian, antiX, Kubuntu, Xubuntu, and many others
Posts: 597
Blog Entries: 15

Rep: Reputation: 70
Re: Linux+ Question

Quote:
Originally posted by phoneix
Hey, I have this question from 2 studyguides and am confused. Can you help?

Q: A site admin. instructs the technician to install Linux as a secondary OS on an existing Workstation. He wants to use the boot loader of the primary OS. When requested where to place LILO, the tech should select which location:
a. BIOS
b. /etc/disktab
c. MBR
d. Partition superblock

A: B


Another question I got was similar. But it was multi-booting Windows, OS2, Linux. It said to put LILO on the Partition Superblock. Makes sense because of OS2.
I thought the answer to the above question would be either C or D. Can somebody help??
If you want your operating system to ctontrol the boot manager and boot loading operations for all system, then you write the boot loader to the MBR, the Master Boot Record. If you have a primary IDE disk drive, this is /dev/hda.

If you want your system to be able to boot, but you want some other system to control the Boot Loader, then you install the LILO boot loader on the partition superblock or boot partition in which the system is located, for example, /dev/hda5.

Personally, I try to manage all of my disk partitions from my Linux system. I use what's called a chain loader any time I need to access some foreign system, such as Windows or BSD, otherwise, I either list each of my kernels directly on each partition I use, or I cheat and use the chain loader approach to access them, too. GNU GRUB is the boot loader I use whenever possible, otherwise I use LILO.

If you don't want to do that, however, there are certainly other ways and other approaches to take. Here's another one -

Quoting an article:
NT Bootloader tutorial E. Jansson, 02 October 2002 Here is the link to the original tutorial:
http://gazonk.org/~eloj/articles/linux-bootloader.html

Linux Administration - Part 3: NT Bootloader

Introduction

Sorry, but you'll have to endure yet another Linux-related article
until I've done enough research to publish the other two articles in my queue. Anyway, this time I thought I'd talk a little about how to get Linux booting off the harddrive, and specifically, how to get it booting if you want(?!) or have to keep an NT-installation in place on the same boxen.

As we all know, NT is a real bastard, and very picky about how it can be booted. From my experience, though admittedly somewhat limited, NT will want to boot off the first partition of the first harddrive, and getting it to boot with anything but the NT Bootloader is sort of out of the question. So, if you want to be able to dualboot into Linux, you'll have to install another bootloader in front of NTs, or you'll have to get Linux into the NT Bootloader menu somehow. Let's explore the latter of these options.

This was tested on NT4 by myself, and I have confirmation it works under Windows 2000 too.

Get it on!

For you as the administrator, the booting process of NT is governed by the file boot.ini found in the root directory of your booting drive. Here's a typical example:

[boot loader]
timeout=3
default=multi(0)disk(0)rdisk(0)partition(1)WINNTS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)WINNTS="Windows NT Server Version 4.00"
multi(0)disk(0)rdisk(0)partition(1)WINNTS="Windows NT Server Version 4.00 [VGA mode]" /basevideo /sos

Now, one would think that adding in Linux would be as simple as adding a similar line to the ones above, changing the disk and partition parameters? Haha. Yeah, right.

To be able to boot Linux you'll have to install a bootloader into the Linux root/boot partition. Please note my wording, you will not be intalling it to the MBR, you will be writing it onto a Linux
partition. I use LILO. My /etc/lilo.conf looks like this:

boot = /dev/hdb2 delay = 3
image = /vmlinuz root = /dev/hdb2 label = Linux read-only
image = /vmlinuz.old root = /dev/hdb2 label = rescue read-only

The statement boot = /dev/hdb2 tells LILO to install into the
root-block of this partition.

You probably have LILO or some other loader installed already, if not, you'll have to pick one and install it. When the LILO configuration looks in order, run lilo to install it as a bootloader. If your configuration is similar to mine you will get a warning that the root-partition isn't on the first drive. Ignore it.

What we will have to do now is to extract the bootsector from our
Linux installation into a file, move it over into the NT-world, and
add in a reference to the file in boot.ini. To do this, login as root
and extract the bootsector using the command dd. It should look
something like this:

dd if=/dev/hdb2 of=bootsect.lnx bs=512 count=1

You must of course change the if parameter to the drive and partition of your linux root partition, matching your LILO configuration. This will get you a 512-byte file called bootsect.lnx. Now, move this file over to the root of the NT-boot partition - by means of a mounted shared FAT-partition, a floppy, or whatever - the same directory where you'll find the boot.ini.

Now we must give NT some attention by editing boot.ini. Please note that boot.ini is a hidden system file, so you'll have to

attr -r -h -s

boot.ini before you can edit it.

[boot loader]
timeout=3 default=cotsect.lnx [operating systems]
multi(0)disk(0)rdisk(0)partition(1)WINNTS="Windows NT Server Version 4.00"
multi(0)disk(0)rdisk(0)partition(1)WINNTS="Windows NT Server Version 4.00 [VGA mode]" /basevideo /sos
cotsect.lnx="Linux"

As you can see we have added a line at the end, referencing the
bootsector. We've also changed the default entry to be Linux. Now, if you did everything correctly, and if the invisible pink unicorn is with you, you will be able to reboot, see the Linux entry in the boot menu and after three seconds your Linux kernel will be decompressing and booting.

As always, everything can't be all neat, tidy, working and done. You might have to redo the process of extracting the bootsector and moving it over to the NT partition when you upgrade your kernel. If you boot and get a hang or wierd lockup it's probably because you have updated your kernel. Keep that boot-disk handy, you will need it.

Eddy doesn't want to keep NT around, but he has to. For this cowardice you can LART him.

(c)2000 Eddy L O Jansson. All rights reserved. All trademarks
acknowledged.
 
Old 08-05-2003, 08:30 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Re: Linux+ Question

Quote:
Originally posted by phoneix
Q: A site admin. instructs the technician to install Linux as a secondary OS on an existing Workstation. He wants to use the boot loader of the primary OS. When requested where to place LILO, the tech should select which location:
a. BIOS
b. /etc/disktab
c. MBR
d. Partition superblock

A: B
I think that this answer is wrong. Firstly,
one doesn't know WHAT the primary OS
is ... I've only heard of /etc/disktab in
relation to HP-UX and some DEC Unices.
And secondly, it's also a text-file there,
not a binary bootloader for other OSes ...

As for OS/2 ... you could put lilo into
the partition superblock of your Linux,
and have OS/2's boot-manager start it
from there :} or have lilo in MBR and
start OS/2 and winDOHs from there...

Cheers,
Tink
 
Old 08-06-2003, 05:40 PM   #4
phoneix
Member
 
Registered: Aug 2003
Location: Georgia, usa
Distribution: Mandrake 10.1
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks both of you! Eventhough I am fairly new to the beautiful world of Linux, I actually understood most of what was said! Scary. Thanks again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Question.... ommy Linux - General 6 06-10-2004 10:54 PM
Yet Another Linux HD Question egs4029 Linux - Newbie 5 05-29-2004 11:51 AM
Another Lilo dual boot (Linux+Linux) question tigerflag Slackware 11 05-22-2004 05:14 PM
Question: Which is better, linux or windows. Or, no : Why isn't linux mainstream yet? schatoor General 2 06-23-2003 05:57 AM
C++ question in linux kyoavk Linux - Software 1 07-22-2002 10:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration