[PLUG] Strange bootloader behavior
John Cirillo
cirillo@purdue.edu
Thu, 22 Feb 2001 21:40:24 -0500 (EST)
Here is a strange problem I am having with booting RedHat 7.
First, let me describe how it DID work:
This is a dual-boot machine with Windows NT4 and linux, using the NT
bootloader and bootsect.lnx. I did have RedHat 6.1
working fine. The boot setup was like this:
After installing linux on /dev/hdb2 and letting it make the boot floppy, I
rebooted from the floppy which took me into my new installation. I then made
a bootsect.lnx using dd if=/dev/hda2 of=/bootsect.lnx bs=512 count=1. I then
did an mcopy /bootsect.lnx a: This is from the Linux+NT-Loader howto. Then I
took out the floppy and booted into NT. There I edited boot.ini by adding a
line for c:\bootsect.lnx="Linux". I also copied the bootsect.lnx from the
floppy to c:\. After that, when I booted the machine and the bootloader for
NT came up, I could select either NT or linux and it worked fine.
Recently I got an 80 gig hard drive, since I am using this machine as a
backup machine. But kernel 2.2.12 wasn't handling the drive right no matter
what I did. I read somewhere that 2.2.14 and up can handle drives larger than
32 gig properly, and since RH7 has 2.2.16 I decided to try it. Being lazy and
liking to try new things, I decided once and for all to try the 'upgrade'
install and see what really happens, despite people saying it won't work. So
the install went smoothly, it created an emergency boot disk, and asked me to
reboot. I rebooted, and figured I'd better boot from the diskette since I
need the new bootsect.lnx for the NT bootloader. It booted fine and the
upgrade install seems to work fine so far. Now here's where it starts getting
confusing. I did the procedure to create a new bootsect.lnx, mcopied it to a
floppy, and rebooted to NT. I copied the new bootsect.lnx into c:\ and
rebooted. So now it comes to the NT bootloader and I select linux. It goes to
where I should see LILO and says that a kernel component is missing, and
that I need to boot from a floppy.
So I rebooted from the floppy and went and looked at lilo.conf. It looks fine
to me:
boot=/dev/hdb2
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
default=linux
message=/boot/message
image=/boot/vmlinuz-2.2.16-22
label=linux
read-only
root=/dev/hdb2
The linux install is on hdb2, since hdb1 is an NT partition, and all of hda
is NT. This DID work on RH6.1. My lilo.conf on RH6.1 was essentially the
same as what is shown above. But somehow it doesn't work on RH7 and I believe
it has to do with the bootsect.lnx file that I create.
In the Linux+NT-Loader howto it covers an emergency scenario like this and
says to change boot= to /dev/fd0, put in a floppy, and execute /sbin/lilo. I
did that, and it wrote to floppy. I rebooted with this floppy installed, and
linux booted fine. Then it says if this works, do a dd if=/dev/fd0
of=/bootsect.lnx bs=512 count=1, and then mcopy that to a floppy and put it
in c:\ for NT to use. I tried that, and sure enough I can select linux from
the NT bootloader and it boots fine. So what's going wrong with the original
procedure? I know it's probably something simple that's gone wrong but
I don't get it.
I don't mind having to do it the way I did, but it's wrong because I should
be able to use dd if=/dev/hda2 of=/bootsect.lnx to get the bootloader. Or did
something change that I don't know about?
Sorry for the long explanation but hopefully someone will either spot the
error or can tell if something changed to make this method not work any more.
By the way, the 80 gig drive formatted fine on this kernel, and so far I
don't see any ill-effects due to me upgrading instead of doing a new install.
I suppose they'll start popping up now that I said that.
Thanks for any help and advice.
John
----------------------------------
John Cirillo
E-Mail: cirillo@purdue.edu