[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lilo (linux only hd -> dos only hd), no solution possible?



Kevin Grant <kpgrant@mindspring.com> writes:

> Thanks for the help I've gotten on this so far.  Unfortunately it doesn't
> seem to be working.  I seem to be caught in a catch-22 situation as far
> as getting the system to behave as I want it to.  Here's the situation:
> 
> I have one dos/windows only hd.  I have one linux only hd.  I want to be
> able to boot up linux and then use lilo to move to dos if I desire.  The
> earlier problem was that I had the linux hd as /dev/hda and the dos drive
> as /dev/hdb and lilo couldn't get dos to boot off of /dev/hdb.  Apparently
> the dos hd has to be /dev/hda (drive C in dos terms) to boot.  So I could
> only get into dos by telling my bios to swap the boot sequence around and
> boot off of drive "D" (apparently this caused the system to treat the dos
> drive as if it were drive C).

The dos drive must be the first drive.

> To solve this I swapped the hd's around and made the dos drive /dev/hda and
> the linux drive /dev/hdb.  However I still want to boot off of the linux
> drive, so I set the bios boot sequence so that it would boot from drive D
> (/dev/hdb).  Unfortunately this seems to cause the bios to consider
> drive C not to be the master drive anymore so that when I try to use lilo
> to get into dos I get exactly the same error message as before, a sort of
> "disk not available or non-system disk in drive" sort of message.
> 
> The catch-22 seems to be: the only way to boot linux from a linux-only hd
> as the default when the machine is turned on is to make the linux-only hd
> /dev/hda, or to alter the bios boot sequence so that the system treats it
> that way (no, I don't want to use a boot floopy to boot up linux either).
> At the same time, in order for lilo to boot up a dos-only hd, the dos-only
> hd has to be /dev/hda.  Unfortunately both hd's cannot be /dev/hda at the
> same time.  So if my analysis is correct, and unless lilo has some way to
> make the system change the hd that it considers the primary drive, there
> is no way to accomplish what I wish to accomplish.
> 
> The problem is that I am a linux newbie and can't tell if I'm making sense
> here.  Comments and possible solutions, if any exist, are requested.
> 
> Oh, and my latest attempt has netted me a "cannot start virtual terminal"
> sort of error message on the linux side, followed by a freeze, so that I
> can't boot linux at all.  This raises another interesting issue.  Since
> the lilo.config I'm experimenting with now contains lines like
> "boot = /dev/hdb1", if I change the drives back the way they were (with the
> linux drive as /dev/hda) presumably I won't be able to boot linux because
> the lilo.config stuff will point to the wrong place.  On the other hand, I
> can't boot into linux now to change the lilo.config file.  So how do you
> get into linux to change a lilo.config file when you cannot get into
> linux until after you've changed the file? :)  I'm guessing I've got to
> resort to the boot floppies at this point, right?  Even if this is the case,
> there should be a sort of general solution to this problem, to let you
> experiment with the contents of lilo.config safely.  I.E. to write a new
> one that doesn't work, and then to be able to get into linux anyway,
> without having to resort to a boot floppy, by some command that tells
> lilo to boot up using a "safe" backup config file that you know works.
> Is this option around and being new I'm just not aware of it?
>  
> If you've actually read this far thanks for your attention,
> -Kevin

It seems that at this point, you have linux on /dev/hdb. Another
file, that you probably did not consider is /etc/fstab, which is
probably still telling the system to mount /dev/hda.

Here is how I do it:

/etc/lilo.conf
x-------------------------
boot=/dev/hda
root=/dev/hdb1
install=/boot/boot.b
map=/boot/map
vga=normal
delay=20
image=/vmlinuz
label=Linux
read-only

image = /vmlinuz.old
label = Linux.old
read-only

other = /dev/hda1
label = dos
table = /dev/hda

x--------------------------------------------------------------------

# /etc/fstab: static file system information.
#
# <file system>	<mount point> <type> <options>         <dump> <pass>
/dev/hdb1  /	  ext2     defaults,errors=remount-ro       0  1
/dev/hdb5  none   swap     sw                               0  0
proc       /proc  proc     defaults                         0  0
/dev/hdb6  /usr   ext2     defaults                         0  2
/dev/hdb3  /var   ext2     defaults                         0  2
/dev/hdb4  /home  ext2     defaults                         0  2
/dev/hdc   /cd/0  iso9660  ro,user                          0  0
/dev/hdd   /cd/1  iso9660  ro,user                          0  0
/dev/fd0   /fd	  auto     rw,user,noauto                   0  0
/dev/hda1  /dos	  auto     rw,user,noauto,umask=007,gid103  0  0

x--------------------------------------------------------------------

Yes, it looks like that you will have to boot with your emergency/
install disk at this time. Then modify your /etc/fstab. Then reboot 
with the emergency disk again with the root=/dev/hdb1 parameter.
Then modify /etc/lilo.conf, run lilo, then try it all again. If all
works right, you should be able to boot into either dos or linux.

-- 
/*********************** Running Debian Linux ***********************
*   For God so loved the world that He gave his only begotten Son,  *
*   that whoever believes in Him should not perish...    John 3:16  *
* W. Paul Mills              *  Topeka, Kansas, U.S.A.              *
* EMAIL= Paul@Mills-USA.com  *  WWW= http://Mills-USA.com/          *
* Bill, I was there several years ago, why would I want to go back? *
************* pgp public key on keyservers everywhere? *************/


Reply to: