|
|
| Next: Accessing Linux drive from Windows XP? |
| Author |
Message |
Brad External

Since: Feb 19, 2006 Posts: 10
|
Posted: Sun May 07, 2006 12:29 am Post subject: LILO booting off second IDE disk Archived from groups: comp>os>linux>misc, others (more info?) |
|
|
I'm running Slackware 9.1 with a linux 2.6.16.5 kernel and lilo
22.5.7.2. I have three IDE disks and a cd-rom drive connected
to the two IDE controllers on my PC's motherboard:
master on first controller - hda - main root/boot system disk
slave on first controller - hdb - secondary boot disk
master on second controller - hdc - cd-rom drive
slave on second controller - hdd - data disk with secondary root
I have lilo set up with multiple operating systems installed on
the main system disk (hda), everything working fine.
My Award 2000 bios allows me to nominate any hard disk from which
I can boot. In the past I've used lilo to boot linux off
other disks, but for the life of me I can't do it this time around.
What I want to do is install a boot Linux environment (like /boot) on
the 'secondary boot disk' (hdb), set the bios to boot off
that disk, and thus allow the system to boot totally independent
of the master drive (hda).
I've tried any number of things. The bios says that all the
drives are LBA-accessible, and a simple lilo.conf works for
all the operating systems as you'd expect for the main disk,
i.e.:
lba32
boot = /dev/hda3
install = menu
map = /boot/lilo.map
backup = /boot
menu-title = "Lilo boot from main 120GB disk"
message = /u/LILO/lilo.msg
image = /boot/vmlinuz_2.6.16.5
label = linux_2.6.16.5
root = /dev/hda5
read-only
but setting up hdb1 as a simple filesystem for a kernel boot
just doesn't work:
lba32
boot = /dev/hdb1 # emergency /boot fileysystem, marked as active
install = menu
map = /mnt/lilo.map
backup = /mnt
menu-title = "Lilo boot from emergency hdb1"
message = /mnt/lilo.hdb1.msg
image = /mnt/vmlinuz_2.6.16.5
label = linux_2.6.16.5
root = /dev/hdd1 # second root copy is on this disk
read-only
hdb1 is a simple filesystem set up with the files typical for a /boot
area - the various Linux kernels and the message file lilo.hdb1.msg.
Lilo gives me a warning that I am installing on a disk that "is not
the first disk" and when I change my BIOS boot setting to boot off the
second drive I just get the infamous sole two letters 'LI' and the system
hangs.
Not knowing too much about the inticacies of PC boots, but thinking that
when the BIOS boots off a disk other than the primary IDE drive, it
might switch the BIOS drive designations around, I added the following
to the lilo.hdb1.conf I listed above:
disk=/dev/hda
bios=0x81
disk=/dev/hdb
bios=0x80
but got exactly the same results. No warning message about not being
the 'first drive' any more though; no warning messages whatever. But
it still hangs after the 'LI' when booting off the second drive.
Everything I'd expect gets plonked in the /mnt (hdb1) filesystem
after running lilo - a backup of the original boot sector for hdb1,
and the lilo.map file.
I've tried using 'geometry' rather than lba32, tried putting in the
actual C/H/S that the bios sees, etcetera. Always the same thing.
I'm sure I've been able to do this in the past. There must be something
simple I'm missing?
One stupid question - in the past I've used versions of Lilo, I think,
that used /boot/boot.b as the secondary/chain boot loader, and would have
placed that file, in addition to the kernels, on the secondary disk's
filesystem (mounted as /mnt, as you can see from the lilo.conf examples
above). I gather now, with the later versions of Lilo, that that boot
code is now part of the /sbin/lilo binary itself? Lilo isn't doing
something silly like directly linking in parts of its own binary,
is it? Because I'm executing my 'lilo -C lilo.hdb1.conf' command
while running under my 'normal' environment, with root mounted from
the primary (hda) disk drive.
Any and all help would be most gratefully received. I'm sure I've
done this before - booted entirely off a second drive by setting
a machine's bios to boot cold off that drive - so there must be
something I've forgotten, or otherwise something (obvious) I've missed
between old and new versions of Lilo.
Thanks,
Brad |
|
| Back to top |
|
 |
JohnInSD At san DOT rr do External

Since: Sep 24, 2004 Posts: 35
|
Posted: Sun May 07, 2006 12:29 am Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
If you place the boot record on /dev/hdb1, then you must boot from /dev/hdb.
The question is: Is the first partition on /dev/hdb marked active?
--John
On Sun, 07 May 2006 00:29:52 +1000, Brad <brad DeleteThis @hatespam.com> wrote:
>I'm running Slackware 9.1 with a linux 2.6.16.5 kernel and lilo
>22.5.7.2. I have three IDE disks and a cd-rom drive connected
>to the two IDE controllers on my PC's motherboard:
>
> master on first controller - hda - main root/boot system disk
> slave on first controller - hdb - secondary boot disk
>
> master on second controller - hdc - cd-rom drive
> slave on second controller - hdd - data disk with secondary root
>
>I have lilo set up with multiple operating systems installed on
>the main system disk (hda), everything working fine.
>
>My Award 2000 bios allows me to nominate any hard disk from which
>I can boot. In the past I've used lilo to boot linux off
>other disks, but for the life of me I can't do it this time around.
>What I want to do is install a boot Linux environment (like /boot) on
>the 'secondary boot disk' (hdb), set the bios to boot off
>that disk, and thus allow the system to boot totally independent
>of the master drive (hda).
>
>I've tried any number of things. The bios says that all the
>drives are LBA-accessible, and a simple lilo.conf works for
>all the operating systems as you'd expect for the main disk,
>i.e.:
>
> lba32
> boot = /dev/hda3
>
> install = menu
>
> map = /boot/lilo.map
> backup = /boot
>
> menu-title = "Lilo boot from main 120GB disk"
> message = /u/LILO/lilo.msg
>
> image = /boot/vmlinuz_2.6.16.5
> label = linux_2.6.16.5
> root = /dev/hda5
> read-only
>
>but setting up hdb1 as a simple filesystem for a kernel boot
>just doesn't work:
>
> lba32
> boot = /dev/hdb1 # emergency /boot fileysystem, marked as active
>
> install = menu
>
> map = /mnt/lilo.map
> backup = /mnt
>
> menu-title = "Lilo boot from emergency hdb1"
> message = /mnt/lilo.hdb1.msg
>
> image = /mnt/vmlinuz_2.6.16.5
> label = linux_2.6.16.5
> root = /dev/hdd1 # second root copy is on this disk
> read-only
>
>hdb1 is a simple filesystem set up with the files typical for a /boot
>area - the various Linux kernels and the message file lilo.hdb1.msg.
>
>Lilo gives me a warning that I am installing on a disk that "is not
>the first disk" and when I change my BIOS boot setting to boot off the
>second drive I just get the infamous sole two letters 'LI' and the system
>hangs.
>
>Not knowing too much about the inticacies of PC boots, but thinking that
>when the BIOS boots off a disk other than the primary IDE drive, it
>might switch the BIOS drive designations around, I added the following
>to the lilo.hdb1.conf I listed above:
>
> disk=/dev/hda
> bios=0x81
> disk=/dev/hdb
> bios=0x80
>
>but got exactly the same results. No warning message about not being
>the 'first drive' any more though; no warning messages whatever. But
>it still hangs after the 'LI' when booting off the second drive.
>
>Everything I'd expect gets plonked in the /mnt (hdb1) filesystem
>after running lilo - a backup of the original boot sector for hdb1,
>and the lilo.map file.
>
>I've tried using 'geometry' rather than lba32, tried putting in the
>actual C/H/S that the bios sees, etcetera. Always the same thing.
>
>I'm sure I've been able to do this in the past. There must be something
>simple I'm missing?
>
>One stupid question - in the past I've used versions of Lilo, I think,
>that used /boot/boot.b as the secondary/chain boot loader, and would have
>placed that file, in addition to the kernels, on the secondary disk's
>filesystem (mounted as /mnt, as you can see from the lilo.conf examples
>above). I gather now, with the later versions of Lilo, that that boot
>code is now part of the /sbin/lilo binary itself? Lilo isn't doing
>something silly like directly linking in parts of its own binary,
>is it? Because I'm executing my 'lilo -C lilo.hdb1.conf' command
>while running under my 'normal' environment, with root mounted from
>the primary (hda) disk drive.
>
>Any and all help would be most gratefully received. I'm sure I've
>done this before - booted entirely off a second drive by setting
>a machine's bios to boot cold off that drive - so there must be
>something I've forgotten, or otherwise something (obvious) I've missed
>between old and new versions of Lilo.
>
>Thanks,
>
>
>Brad |
|
| Back to top |
|
 |
Stanislaw Flatto External

Since: Mar 26, 2004 Posts: 296
|
Posted: Sun May 07, 2006 12:29 am Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Brad wrote:
> lba32
> boot = /dev/hda3
>
> lba32
> boot = /dev/hdb1 # emergency /boot fileysystem,
> marked as active
>
> Thanks,
>
>
> Brad
Hi!
hda3 and hdb1 are partitions on primary master and slave.
For booting from a drive by directing the BIOS to it you have to install
the booting manager information in a little cage called MBR.
Then BIOS releases control to whatever is contained in MBR, and with
LILO you can do anything.
Been there, done it. But a very good helper were 'man lilo' and 'man
lilo.conf' and a lot of patience.
HTH
Stanislaw
Slack user from Ulladulla. |
|
| Back to top |
|
 |
intanont External

Since: May 07, 2006 Posts: 2
|
Posted: Sun May 07, 2006 2:02 am Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
| join now |
|
| Back to top |
|
 |
Brad External

Since: Feb 19, 2006 Posts: 10
|
Posted: Sun May 07, 2006 8:36 am Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
JohnInSD At san DOT rr dot COM wrote:
> If you place the boot record on /dev/hdb1, then you must boot from /dev/hdb.
> The question is: Is the first partition on /dev/hdb marked active?
Yes, it is. I can't work it out; I'm sure I've done this before, but
searching the web, all I can find is examples of booting initially
off the first drive, and from there then using Lilo to boot something
else (Linux, Windows) off the second drive. But nothing that boots
straight off the second, after setting the machine's bios to do so.
Brad |
|
| Back to top |
|
 |
Grant External

Since: Jan 04, 2006 Posts: 622
|
Posted: Sun May 07, 2006 10:06 am Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: comp>os>linux>misc (more info?) |
|
|
On Sat, 06 May 2006 22:38:36 GMT, Stanislaw Flatto <compaid.TakeThisOut@shoalhaven.net.au> wrote:
>For booting from a drive by directing the BIOS to it you have to install
>the booting manager information in a little cage called MBR.
>Then BIOS releases control to whatever is contained in MBR, and with
>LILO you can do anything.
>Been there, done it. But a very good helper were 'man lilo' and 'man
>lilo.conf' and a lot of patience.
Have you tried the lilo diagnostics disk mentioned in the man pages?
Grant.
--
Memory fault -- brain fried |
|
| Back to top |
|
 |
Stanislaw Flatto External

Since: Mar 26, 2004 Posts: 296
|
Posted: Sun May 07, 2006 10:06 am Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Grant wrote:
> On Sat, 06 May 2006 22:38:36 GMT, Stanislaw Flatto <compaid.RemoveThis@shoalhaven.net.au> wrote:
>
>
>>For booting from a drive by directing the BIOS to it you have to install
>>the booting manager information in a little cage called MBR.
>>Then BIOS releases control to whatever is contained in MBR, and with
>>LILO you can do anything.
>>Been there, done it. But a very good helper were 'man lilo' and 'man
>>lilo.conf' and a lot of patience.
>
>
> Have you tried the lilo diagnostics disk mentioned in the man pages?
No, but got into the habit to invoke '/sbin/lilo -t' after editing
lilo.conf and read the response.
>
> Grant.
Stanislaw
Slack user from Ulladula. |
|
| Back to top |
|
 |
linnix External

Since: Jan 28, 2005 Posts: 71
|
Posted: Sun May 07, 2006 11:39 am Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Grant wrote:
> On Sun, 07 May 2006 12:29:08 +1000, Brad <brad DeleteThis @hatespam.com> wrote:
>
> >My personal preference is to leave the MBR alone and instead get LILO
> >to install its bootstrap in the active partition of the disk off which
> >I wish it to boot.
> >
> >In this case, I want to:
> >
> >- set the partition hdb1 on the second disk to 'active'
> >- set up a /boot filesytem (kernel, etc) on hdb1
> >- install LILO onto hdb1
> >- direct my bios to boot off the second disk (hdb)
> >- and boot!
> >
> >Leaving the MBR on hdb alone and intact.
>
> Move the drive from /dev/hdb to /dev/hdc (master on second IDE),
We have an old HP box (Pentium MMX 233)
that can only boot from hdc,
since It won't boot off hda.
It does not work on hdb and hdd at all.
The bios is very picky about geometry.
We just set it to 4 heads and 32 sectors
and different tracks for different sizes
of CF boot drives. Once booted,
it can access a 160G hard drive on hda.
For example:
730 for 48M, 1780 for 128M and 3560 for 256M
We can build identical images on it,
at least for the boot partition.
There is 1 partition for the 48M,
2 partitions (48M+80M) for 128M and
3 partitions (48M+80M+128M) for 256M.
It can boot 2.2.25, 2.4.32 and 2.6.16 for testing.
Don't know if it works for you, but just sharing what we tried.
PS: this machine won't boot from 32M or 64M,
doesn't support USB (build-in) or PCI interrupts.
This stupid HP machine can just drive you crazy.
> see how you go.
>
> Grant.
> --
> Memory fault -- brain fried |
|
| Back to top |
|
 |
Brad External

Since: Feb 19, 2006 Posts: 10
|
Posted: Sun May 07, 2006 12:29 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: comp>os>linux>misc, others (more info?) |
|
|
Stanislaw Flatto wrote:
> hda3 and hdb1 are partitions on primary master and slave.
> For booting from a drive by directing the BIOS to it you have to install
> the booting manager information in a little cage called MBR.
> Then BIOS releases control to whatever is contained in MBR, and with
> LILO you can do anything.
My personal preference is to leave the MBR alone and instead get LILO
to install its bootstrap in the active partition of the disk off which
I wish it to boot.
In this case, I want to:
- set the partition hdb1 on the second disk to 'active'
- set up a /boot filesytem (kernel, etc) on hdb1
- install LILO onto hdb1
- direct my bios to boot off the second disk (hdb)
- and boot!
Leaving the MBR on hdb alone and intact.
I don't think the MBR is the problem; after all, I'm directing my
machine's bios to boot off hdb, and the MBR must be successfully
executing and then loading the LILO bootstrap off the active hdb1
partition, because I'm getting the first two letters 'LI' before LILO
hangs. I think the MBR is doing its job quite happily, an it's LILO
that is getting stuck.
> Been there, done it. But a very good helper were 'man lilo' and 'man
> lilo.conf' and a lot of patience.
I've been poring over those man pages, and googling for all sorts of key
words, for a couple of days now. As you say, I'm quite sure I've done
this before - change a machine's bios to have it boot completely off another
drive, and set up LILO quite happily to boot a kernel off that drive in
such circumstances, while running under my normal drive/root environment -
but it must have been under a lower/older version of LILO. I just can't
get it to work this time around.
Any other ideas? You don't have an old lilo.conf hanging around from
when you did it? *crosses fingers*
> Stanislaw
> Slack user from Ulladulla.
Brad
Slackware (9.1 with parts of 10.2) user from Brisbane |
|
| Back to top |
|
 |
Stanislaw Flatto External

Since: Mar 26, 2004 Posts: 296
|
Posted: Sun May 07, 2006 12:29 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Brad wrote:
> Stanislaw Flatto wrote:
>
>> hda3 and hdb1 are partitions on primary master and slave.
>> For booting from a drive by directing the BIOS to it you have to
>> install the booting manager information in a little cage called MBR.
>> Then BIOS releases control to whatever is contained in MBR, and with
>> LILO you can do anything.
>
>
> My personal preference is to leave the MBR alone and instead get LILO
> to install its bootstrap in the active partition of the disk off which
> I wish it to boot.
BIOS simple cannot access partitions, so no matter what is on partition
it is out of bonds for it.
>
> In this case, I want to:
>
> - set the partition hdb1 on the second disk to 'active'
Not needed for Linux.
> - set up a /boot filesytem (kernel, etc) on hdb1
> - install LILO onto hdb1
You are the boss (root), what is the problem?
> - direct my bios to boot off the second disk (hdb)
'Allo, 'Allo this is MBR calling!
> - and boot!
>
> Leaving the MBR on hdb alone and intact.
So which MBR receives BIOS call and starts some OS activity?
>
> I don't think the MBR is the problem; after all, I'm directing my
> machine's bios to boot off hdb, and the MBR must be successfully
> executing and then loading the LILO bootstrap off the active hdb1
> partition, because I'm getting the first two letters 'LI' before LILO
> hangs. I think the MBR is doing its job quite happily, an it's LILO
> that is getting stuck.
>
>> Been there, done it. But a very good helper were 'man lilo' and 'man
>> lilo.conf' and a lot of patience.
>
> Any other ideas? You don't have an old lilo.conf hanging around from
> when you did it? *crosses fingers*
No, but for curiosity I installed DOSes (MS and DR) both with Win3.11,
Win98SE (English, Greek and Hebrew) variants, Win2k, Slackware and
Mandrake on two hard drives, all booting from LILO with hiding and
unhiding partitions and activating them by menu choices selections.
Slackware was THE native distro taking control of LILO configuration and
installation in MBR.
The "guest" distro had its LILO installed on partition so when called
from native LILO it responded by booting "guest" kernel (it had zero
waiting time and no menu display).
What I would suggest is: install LILO in normal way in MBR of master
drive, configure it to boot systems on your box. When everything is
working properly start changing lilo.conf one step at a time, while
saving previous lilo.conf to brad.conf so you can restore working
configuration (make a booting diskette to your distro!)
Have fun
>
>> Stanislaw
>> Slack user from Ulladulla.
>
>
> Brad
> Slackware (9.1 with parts of 10.2) user from Brisbane |
|
| Back to top |
|
 |
Brad External

Since: Feb 19, 2006 Posts: 10
|
Posted: Sun May 07, 2006 12:36 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: comp>os>linux>misc (more info?) |
|
|
Grant wrote:
> Have you tried the lilo diagnostics disk mentioned in the man pages?
Yes, both diag1.img and diag2.img. Nothing out of the ordinary; they
both pick up all of my disk drives and report the LBA and geometry
settings consistent with what my bios and kernel state.
When I install lilo without putting in any bios redirection in lilo.conf
lilo gives the 'not the first disk' warning (and won't boot). When
I put in the bios redirections:
disk=/dev/hda
bios=0x81
disk=/dev/hdb
bios=0x80
.... lilo doesn't give the warning ... but still doesn't boot.
(I still don't know if, when one instructs one's PC to boot
from a second drive that isn't the first disk, whether the
bios rearranges the settings as per the above - making the
boot disk 0x80 - or leaves them as normal? Would a bios expert
be able to tell me for sure? It would allow me to halve the
number of combinations I have to test when trying something new)
In any case, no obvious problems reported by the LILO diagnostics.
Brad |
|
| Back to top |
|
 |
Grant External

Since: Jan 04, 2006 Posts: 622
|
Posted: Sun May 07, 2006 5:32 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Sun, 07 May 2006 12:29:08 +1000, Brad <brad.TakeThisOut@hatespam.com> wrote:
>My personal preference is to leave the MBR alone and instead get LILO
>to install its bootstrap in the active partition of the disk off which
>I wish it to boot.
>
>In this case, I want to:
>
>- set the partition hdb1 on the second disk to 'active'
>- set up a /boot filesytem (kernel, etc) on hdb1
>- install LILO onto hdb1
>- direct my bios to boot off the second disk (hdb)
>- and boot!
>
>Leaving the MBR on hdb alone and intact.
Move the drive from /dev/hdb to /dev/hdc (master on second IDE),
see how you go.
Grant.
--
Memory fault -- brain fried |
|
| Back to top |
|
 |
Michael Grimborounis External

Since: May 08, 2006 Posts: 1
|
Posted: Mon May 08, 2006 11:50 am Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: comp>os>linux>misc, others (more info?) |
|
|
Brad wrote:
> I'm running Slackware 9.1 with a linux 2.6.16.5 kernel and lilo
> 22.5.7.2. I have three IDE disks and a cd-rom drive connected
> to the two IDE controllers on my PC's motherboard:
>
> master on first controller - hda - main root/boot system disk
> slave on first controller - hdb - secondary boot disk
>
> master on second controller - hdc - cd-rom drive
> slave on second controller - hdd - data disk with secondary root
>
> I have lilo set up with multiple operating systems installed on
> the main system disk (hda), everything working fine.
>
> My Award 2000 bios allows me to nominate any hard disk from which
> I can boot. In the past I've used lilo to boot linux off
> other disks, but for the life of me I can't do it this time around.
> What I want to do is install a boot Linux environment (like /boot) on
> the 'secondary boot disk' (hdb), set the bios to boot off
> that disk, and thus allow the system to boot totally independent
> of the master drive (hda).
[snip]
I may be wrong here, but IMHO what the BIOS does when you boot off your
second HD, is tell software your second disk is really the first. So now:
Slave == hda (0x80)
Master == hdb (0x81)
hdc/hdd are not affected. So, if we name your current master
Disk_M and your current slave DISK_S, the process you should use is this:
1. Setup hda (Disk_M) normally.
2. Remove Disk_M (or use its jumper switches to set it up for slave,)
and connect Disk_S as master (or set it from slave to master,) and thus
change it from hdb to hda.
3. Setup hda (Disk_S) normally (that is, set it up as the first disk,
hda, ignore the fact it is going to be changed back to hdb later on.)
4. Once you have Disk_S setup and everything works as intended, change
it back to primary slave (hdb) and reinstall Disk_M as primary master
(hda). Now things should work as you want: when you change the boot
order from BIOS you will be changing the disk you select to hda, and
work as if it had been connected to the primary channel as master.
Note that as far as Linux is concerned, you can have it run from any
disk, but you cannot change the disk on which its partitions reside: if
/etc/fstab says hda2 is swap, it will try to mount whatever is
currently /dev/hda2 as swap. Having your second Linux installation on
hdd is OK, since that does not change.
Windows 98 would want to run from hda (0x80), so you can run it only if
it is on the disk you have set as first from the BIOS. Win2K/XP would
run from other disks, but they should want to know which disk they are
on. Win2K (and I assume XP too, though I never tried it,) can see
through BIOS mappings, so this should be no problem, just tell LILO
where to find it with _current BIOS mapping_ Do not swap disks in
hardware after installing W2k/XP or they will not run.
As always, backup any valuable data first. I make no guarantees about
any of the above.
HTH.
Michael |
|
| Back to top |
|
 |
Brad External

Since: Feb 19, 2006 Posts: 10
|
Posted: Tue May 09, 2006 9:03 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
iforone wrote:
> In your particular situation, you do not want to touch the MBR on hda
>
> This means that you would need to place (some _part_of_) LiLo on the
> MBR of hdb - or you could place /something else/ on a MBR of hdb, or
> /something else/ on hda's MBR....or some other MBR located somewhere
> else.
There's already an MBR on hdb, I believe; otherwise I wouldn't be
getting the first two letters of 'LILO' coming out. Various web pages
all state that a hang after the first two letters occurs when LILO tries
to pass control to its second-stage boot loader. I.e. hdb's MBR has
booted properly, and passed control to LILO's first stage bootstrap
in hdb1, which has then had problems.
At least that's where I think the problem is.
brad |
|
| Back to top |
|
 |
Unruh External

Since: May 27, 2005 Posts: 2192
|
Posted: Tue May 09, 2006 9:03 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Brad <brad RemoveThis @hatespam.com> writes:
>iforone wrote:
>> In your particular situation, you do not want to touch the MBR on hda
>>
>> This means that you would need to place (some _part_of_) LiLo on the
>> MBR of hdb - or you could place /something else/ on a MBR of hdb, or
>> /something else/ on hda's MBR....or some other MBR located somewhere
>> else.
The booting of anything is completely controlled by your bios. No operating
system has any control. The bios goes to the first sector on the first hard
drive and reads in the first 512 bytes or so into memory, and jumps to one
of the memory locations in that. Anything else has to be controlled from
there. Thus the MBR on hda is what controlls everything. If you want to
change what is booted, what is on the MBR of hda has to be changed.
After that it depends on what is on the MBR. It can read (using the bios
again) stuff from a other areas of other hard disks. Again, all it can do
is to read in a certain number of bytes from an absolute disk sector and
jump.
>There's already an MBR on hdb, I believe; otherwise I wouldn't be
>getting the first two letters of 'LILO' coming out. Various web pages
No I suspect it is the mbr on hda ( although I guess you could have done
drive swapping in the bios-- since people did enough trimming of the
previous posts so that noone has any idea of what the thread was really
about!)
>all state that a hang after the first two letters occurs when LILO tries
>to pass control to its second-stage boot loader. I.e. hdb's MBR has
>booted properly, and passed control to LILO's first stage bootstrap
>in hdb1, which has then had problems.
>At least that's where I think the problem is.
>brad |
|
| Back to top |
|
 |
dillinger External

Since: Jun 16, 2005 Posts: 30
|
Posted: Tue May 09, 2006 10:47 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Brad wrote:
> iforone wrote:
>
>> In your particular situation, you do not want to touch the MBR on hda
>>
>> This means that you would need to place (some _part_of_) LiLo on the
>> MBR of hdb - or you could place /something else/ on a MBR of hdb, or
>> /something else/ on hda's MBR....or some other MBR located somewhere
>> else.
>
> There's already an MBR on hdb, I believe; otherwise I wouldn't be
> getting the first two letters of 'LILO' coming out. Various web pages
> all state that a hang after the first two letters occurs when LILO tries
> to pass control to its second-stage boot loader. I.e. hdb's MBR has
> booted properly, and passed control to LILO's first stage bootstrap
> in hdb1, which has then had problems.
>
> At least that's where I think the problem is.
>
>
> brad
Of course there is, the point is, where does your lilo on hdb point.
Afaik lilo points to some sector on some drive, not to some file in some
directory.
Can you please try the following:
Switch disks.
Install your emergency system on hdb (which at that time will be hda)
Switch disks back.
Install your main system on hda.
Good luck.
Michel. |
|
| Back to top |
|
 |
Brad External

Since: Feb 19, 2006 Posts: 10
|
Posted: Tue May 09, 2006 11:29 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Java Jive wrote a very detailed response to my plea for help,
including this crucial snippet:
> That's the theory, but in practice there are some pitfalls ...
>
> One particularly important one is that the MBR installed by MS' FDisk
> doesn't work according to the above theory. It *assumes* that it is running
> on HD0 (0x80) and IIRC actually has no way of knowing that it isn't. So,
> regardless of whichever disk it was *actually* loaded and run from, it will
> *always* read the partition table from, and boot the first active partition
> on, HD0!
And that's a critical little bit of information I didn't know; and that
was my problem.
By simply replacing:
boot = /dev/hdb1
with
boot = /dev/hdb
LILO replaced the MBR instead of the PBR, and everything worked exactly as
expected (the bios settings for hda/hdb were also swapped, but that's as
expected and what I'd done before).
So, thank you, Mr. Jive!!
I guess my Microsoft MBR was booting off hdb, booting the PBR off *hda*, as
you say, which also had LILO; and when that lilo ran its second-stage loader
it tried to retrieve its mapped sectors off device 0x80 ... which was hdb
at the time. Hence the problem.
All working now!!
I wonder how or why the Microsoft MBR does that; it doesn't use the bios and
just ask for 'disk 0x80', like the rest of the boot process seems to do?
I found your three booting configurations interesting, and much along the
lines of what I've done before, particularly your first:
> 1) Normal boot from /dev/sda, but having to put the map file on /dev/sdb
> because /dev/sda has an OS that is RO from Linux. This means that the rest
> of the system will still boot even if Linux gets rodgered:
>
> lilo -m /mnt/win98/LiloMap.bin
Interesting! In the bad old days of geometric addressing I've
had to have some Linux/Lilo configurations refer to map files and kernels placed
in DOS or Windows partitions placed at the beginning of the disk, under the
1024 cylinder limit, but I've never placed the maps on drives separate from
the rest of /boot.
Thanks for your help; I do appreciate the time you put into your reply; you
fixed my problem for me. And my apologies to my other respondents, some of
whom I think suggested 'install LILO on the MBR of the second disk',
to which I only stubbornly replied 'but the MBR isn't the problem, I know it's
executing and running LILO'. Sigh. As it turned out, it was running
the *wrong* LILO! I had no bloody idea the MS MBR had that little quirk.
Thanks all,
(booting beautifully) Brad |
|
| Back to top |
|
 |
Java Jive External

Since: Jan 22, 2005 Posts: 30
|
Posted: Tue May 09, 2006 11:29 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Glad to have helped, and thanks for bothering to come back with your thanks.
Some don't, and it can be a discouragement to put a lot of effort in trying
to help, just to be ignored ...
All the best.
"Brad" <brad RemoveThis @hatespam.com> wrote in message
news:44609934$0$503$61c65585@uq-127creek-reader-03.brisbane.pipenetworks.com.au...
>
> And that's a critical little bit of information I didn't know; and that
> was my problem. |
|
| Back to top |
|
 |
iforone External

Since: Dec 28, 2005 Posts: 294
|
Posted: Tue May 09, 2006 11:35 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Stanislaw Flatto wrote:
> Brad wrote:
>
>
> > But I found this interesting too; I'm not very up-to-date with the
> > Microsoft operating systems, and didn't know that Win98 will only run
> > on the 'first' disk of a system, or that Win2K and XP are more clever.
>
> Nope. LILO (and other bootloaders) can cheat Win98 to believe it IS on
> primary drive and behave like 'normal' on any drive, just the partition
> HAS to be primary.
> NT related OS's retained their Unix trait of being able to be called
> from logical partitions in extended.
>
Correct...
Furthermore; IIRC, both Win98 and WinNT based OSes as well, *still*
need to be marked as "Active" in order to Boot. Whether the signature
bytes (55AAh) are at the end of the MBR (in 95/98 cases) and/or in the
Boot Sector (xMBR) for 2K/XP of the chosen Partition, be it Primary or
Logical.
Linux partitions have no such requrement (AFAIK) in order to Boot. I
boot Debian off hdb3 (Primary), and have even booted Debian off of hda7
(Logical), without ever having to set either "active".
I know win98 will mark it's own Extended (which falls into hdX1/2/3/4
range), as well as the Logicals (hdX5/6/7...) with the signature bytes
too. BTW - 'cfdisk' sees 95/98's Ext'd as a Primary.
As root
# fdisk -l
in linux will show you all the partitions and their
locations/types/IDs.
(as a User, just prefix the command with 'sudo')
I wish the OP would've mentioned MS's involvement in the very
beginning... |
|
| Back to top |
|
 |
Brad External

Since: Feb 19, 2006 Posts: 10
|
Posted: Tue May 09, 2006 11:35 pm Post subject: Re: LILO booting off second IDE disk [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
Michael Grimborounis wrote:
> ...
> Windows 98 would want to run from hda (0x80), so you can run it only if
> it is on the disk you have set as first from the BIOS. Win2K/XP would
> run from other disks, but they should want to know which disk they are
> on. Win2K (and I assume XP too, though I never tried it,) can see
> through BIOS mappings, so this should be no problem, just tell LILO
> where to find it with _current BIOS mapping_ Do not swap disks in
> hardware after installing W2k/XP or they will not run.
Thanks for this Michael. As you may have read from an earlier post I
just sent, Java Jive solved my problem for me, by telling me about the
(horrible!?) inadequacy of the Microsoft MBR.
But I found this interesting too; I'm not very up-to-date with the
Microsoft operating systems, and didn't know that Win98 will only run
on the 'first' disk of a system, or that Win2K and XP are more clever.
I didn't want to have to muck around changing hardware, and I was fairly
sure there was a way to get around all that. Now that I've put LILO
squarely in control of my second drive - death to the Microsoft MBR! -
it's all plain sailing.
Thanks for the help,
Brad |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can 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
|
| |
|
|