SOLUTION: lilo awol on win/lin dual-boot, boot disk gives kernel panic

SOLUTION: lilo awol on win/lin dual-boot, boot disk gives kernel panic

Post by Serge Lever » Tue, 13 Nov 2001 04:29:43



I installed Mandrake 6.1 to dual-boot on a Windows 98 machine.
Everything worked fine for a long time, then one day LILO simply didn't
load anymore when booting.  I tried booting with the Mandrake bootdisk,
and that gave me a kernel panic error.  More detailed information on
the problem and solution below.

I have one 6GB hard disk which, _previous_ to installing Mandrake, was
partitioned into:
  c:\ FAT32 2GB
  d:\ FAT32 2GB
  e:\ FAT32 1.6GB
  f:\ FAT   0.4GB

I installed Mandrake replacing the e: partition with 3 EXT2 partitions
(root, swap, home).  Everything worked great, LILO would start when
booting the computer.

Problem:

After a few weeks my computer started simply booting to Windows, LILO
had disappeared, but Windows worked.  If I tried booting with the
Mandrake boot disk, it would stall during the boot up checks at the
following lines:
     Partition check:
       hda: hda1 hda2 < hda5 hda6 hda7 hda8 >
     Kernel panic: VFS: Unable to mount root fs on 03:07

Eventually I noticed that the e: drive (previously f: - the FAT drive)
had disappeared entirely from Windows (and the whole system.)  It turns
out this is what caused the entire problem.

Solution:

I downloaded and created the very useful "tomsrtbt" diskette, which
contains a complete Linux distribution on a floppy, and allows you to
mount the different partitions.

I booted with that and ran `/sbin/fdisk -l`, which gave:

   Device Boot    Start      End   Blocks   Id  System
/dev/hda1   *         1      261  2096451    b  Win95 FAT32
/dev/hda2           262      783  4192965    5  Extended
/dev/hda5           262      522  2096451    b  Win95 FAT32
/dev/hda6           523      611   714861   83  Linux native
/dev/hda7           612      627   128488+  82  Linux swap
/dev/hda8           628      665   305203+  83  Linux native

Evidently the 3rd windows partition - hda6 (the FAT one after the ext2
ones) had disappeared.

I downloaded and installed the free Windows program 'explore2fs'.  This
lets you read Linux files and/or export them to Windows.

explore2fs showed 2 partitions:
hda6 (root)
hda8 (home)

I booted with tomsrtbt and took a look at /etc/fstab.  hda6 was indeed
still being set up as a DOS partition, and hda7, hda8 and hda9 were
root, swap and home.

Here is the diff that was necessary - 'diff /etc/fstab
/etc/fstab.orig':

1,3c1,3
< /dev/hda6 / ext2 defaults 1 1
< /dev/hda7 swap swap defaults 0 0
< /dev/hda8 /home ext2 defaults 1 2
---

Quote:> /dev/hda7 / ext2 defaults 1 1
> /dev/hda8 swap swap defaults 0 0
> /dev/hda9 /home ext2 defaults 1 2
10a11
> /dev/hda6 /mnt/DOS_hda6 vfat user,exec,rw,conv=auto 0 0

So basically I just decremented the Linux partition numbers to take
into account the partition which had vanished, and deleted the previous
hda6 line.

This correction allowed me to boot into Linux with the Mandrake
bootdisk, but LILO was still nowhere to be found during bootup.

I decided to use Loadlin, another Linux loader.  I got Loadlin.exe from
the Mandrake CD under directory 'dosutils' (can also easily be found on
the net) and put it in a Windows folder named c:\linux.

Then, using explore2fs, I found my compressed Linux kernel (in my case
it was /boot/vmlinuz-2.2.13-7mdk) and exported it (right-click) to the
c:\linux folder.  I named it 'vmlinuz' in Windows.

Finally, so that I would be given the choice of Linux or Windows when
booting, I edited my c:\config.sys with my favorite text editor and
added the following:

[menu]
menuitem=WIN, Windows Boot
menuitem=LINUX, Linux Boot

[LINUX]
shell=c:\linux\loadlin.exe c:\linux\vmlinuz root=/dev/hda6 ro

[WIN]

A big thanks goes out to the ever helpful readers of
comp.os.linux.setup!

__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

##########################################################################

# PLEASE remember a short description of the software and the LOCATION.  #
# This group is archived at http://stump.algebra.com/~cola/              #
##########################################################################