LILO vanished on win/lin dual-boot, boot disk gives kernel panic

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Serge Leve » Tue, 11 Sep 2001 06:24:20



I installed Mandrake 6.1 to dual-boot on a Windows 98 machine.  Everything
worked fine for a few weeks, then one day LILO simply didn't load when booting
anymore.  I tried booting with the Mandrake bootdisk, and that gives me a kernel
panic error.  I have read all the relevent faqs and spent a lot of time looking
through google groups but was unable to find a solution for my situation.  More
detailed information below (I apologize for the length, but I am erring on that
side as requested in the LINUX FAQ.)

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

I booted the Mandrake CD and replaced the e: partition with 3 (or 4, can't
remember) EXT2 partitions and installed it.  Everything worked great, LILO would
start when booting the computer, and I had Mandrake as the default to be loaded
after x seconds.  I didn't play around with much any configuration files so I
don't think I screwed anything up.  The only thing I changed was how long it
took for LILO to start the default OS!

Well after a few weeks of bliss my computer started simply booting to Windows,
LILO had disappeared, and everything was fine in Windows.  If I try booting with
the Mandrake boot disk, it crashes 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

So I am unable to get to any LINUX prompt whatsoever.

Something even weirder happened some days later, which may or may not be
related.  The e: drive in Windows (previously f: - the FAT drive) disappeared
entirely from Windows Explorer.  Windows still works fine though.

Here is the current output of FDISK:

                          Display Partition Information

    Current fixed disk drive: 1

    Partition  Status   Type    Volume Label  Mbytes   System   Usage
     C: 1         A    PRI DOS   WINDOWS       2047   FAT32       33%
        2              EXT DOS                 4095               67%

    Total disk space is  6150 Mbytes (1 Mbyte = 1048576 bytes)

    The Extended DOS Partition contains Logical DOS Drives.
    Do you want to display the logical drive information (Y/N)......?[Y]

                      Display Logical DOS Drive Information

Drv Volume Label  Mbytes  System  Usage
D:  D              2047  FAT32      50%

    Total Extended DOS Partition size is  4095 Mbytes (1 MByte = 1048576 bytes)

This looks kind of odd to me, but I'm no expert.  I would have thought that
something would show up about the EXT2 partition, or the FAT partition.  Note
that in Windows, the c: and d: drives each display 2GB of disk space, so the
remaining 2GB is somewhere, but FDISK says it's on the second partition.

If a solution is discovered I will post a summary to comp.os.linux.announce.

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Charles Sulliva » Tue, 11 Sep 2001 10:25:44


It sounds like your partition numbering may have been screwed up.

Here's something that _may_ get you up and running in Linux:
Under Win 98, search the web for, download,  and install the free Windows
 program 'explore2fs'.  This lets you read Linux files and/or export them to Windows.

Find your compressed Linux kernel and export it (right-click) to a DOS folder.
(In RedHat it's named 'vmlinuz-xxxx' where xxxx is the kernel version - I don't know
about Mandrake.)  Name it just 'vmlinuz' in  DOS.

Either on your Mandrake CD (maybe under directory /dos_utils) or on
the web, get the DOS program LOADLIN.EXE and put it in the same folder
as vmlinuz.
Then boot your system into DOS (not a DOS window under Win 98)
and from the above DOS folder run:
  loadlin.exe  vmlinuz   root=/dev/hda5   ro
(Replace /dev/hda5 with whatever partition is your root (/) partition -
you might discover this is not what you originally thought after running
explore2fs above.)

If all goes well you will be able to get into Linux, fix up your
/etc/lilo.conf, and rerun lilo.

Someone else may come up with something easier, but this is what
I'd do.  (In addition to having a Linux boot floppy, I always keep a copy of
my Linux kernel on Win 98 for just such a situation.)



> I installed Mandrake 6.1 to dual-boot on a Windows 98 machine.
> Everything worked fine for a few weeks, then one day LILO simply didn't
> load when booting anymore.  I tried booting with the Mandrake bootdisk,
> and that gives me a kernel panic error.  I have read all the relevent
> faqs and spent a lot of time looking through google groups but was
> unable to find a solution for my situation.  More detailed information
> below (I apologize for the length, but I am erring on that side as
> requested in the LINUX FAQ.)

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

> I booted the Mandrake CD and replaced the e: partition with 3 (or 4,
> can't remember) EXT2 partitions and installed it.  Everything worked
> great, LILO would start when booting the computer, and I had Mandrake as
> the default to be loaded after x seconds.  I didn't play around with
> much any configuration files so I don't think I screwed anything up.
> The only thing I changed was how long it took for LILO to start the
> default OS!

> Well after a few weeks of bliss my computer started simply booting to
> Windows, LILO had disappeared, and everything was fine in Windows.  If I
> try booting with the Mandrake boot disk, it crashes 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

> So I am unable to get to any LINUX prompt whatsoever.

> Something even weirder happened some days later, which may or may not be
> related.  The e: drive in Windows (previously f: - the FAT drive)
> disappeared entirely from Windows Explorer.  Windows still works fine
> though.

> Here is the current output of FDISK:

>                           Display Partition Information

>     Current fixed disk drive: 1

>     Partition  Status   Type    Volume Label  Mbytes   System   Usage
>      C: 1         A    PRI DOS   WINDOWS       2047   FAT32       33%
>         2              EXT DOS                 4095               67%

>     Total disk space is  6150 Mbytes (1 Mbyte = 1048576 bytes)

>     The Extended DOS Partition contains Logical DOS Drives. Do you want
>     to display the logical drive information (Y/N)......?[Y]

>                       Display Logical DOS Drive Information

> Drv Volume Label  Mbytes  System  Usage D:  D              2047  FAT32  
>    50%

>     Total Extended DOS Partition size is  4095 Mbytes (1 MByte = 1048576
>     bytes)

> This looks kind of odd to me, but I'm no expert.  I would have thought
> that something would show up about the EXT2 partition, or the FAT
> partition.  Note that in Windows, the c: and d: drives each display 2GB
> of disk space, so the remaining 2GB is somewhere, but FDISK says it's on
> the second partition.

> If a solution is discovered I will post a summary to
> comp.os.linux.announce.


 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Serge Leve » Wed, 12 Sep 2001 07:58:42



> It sounds like your partition numbering may have been screwed up.



> > I installed Mandrake 6.1 to dual-boot on a Windows 98 machine.
> > Everything worked fine for a few weeks, then one day LILO simply didn't
> > load when booting anymore.  I tried booting with the Mandrake bootdisk,
> > and that gives me a kernel panic error.

Thanks for the help, I haven't got to a LINUX prompt yet, but it's definitely a
step in the right direction.

explore2fs shows 2 partitions:
hda6 (contains bin, boot, dev, etc, home, root, usr, ...)
hda8 (contains my account directory, httpd, samba)

From looking at the "Debug Level: High" messages, it looks like hda7 is the
LINUX swap partition.

So I tried "loadlin vmlinuz root=/dev/hda6 ro" and here's the startup error
messages I get:

swapon: /dev/hda8: Invalid argument
                                                                       [FAILED]
[...]
Checking root file system
fsck.ext2: Bad magic number in super-block while trying to open /dev/hda7
(null):
The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
                                                                       [FAILED]
*** An error occured during the filesystem check
[...]

Note that while terminating, when it turns swap off it fails again
(unsurprisingly).

To me (a newbie), it would seem that my correct root and swap are hda6 and hda7
respectively, but that no matter what I try to load LINUX with (boot LILO,
bootdisk LILO, LOADLIN), it always tries to load root from hda7 (and likely swap
from hda8).  It's obvious that it chokes on hda7 since it is the
swap partition, but why is LOADLIN trying to load root on hda7 when it should be
loading hda6 (as specified on the command line)?

As a bonus, here's the contents of /etc/lilo.conf:

boot = /dev/hda
timeout = 600
prompt
  message = /boot/message
  default = linux
  vga = normal
  read-only
map=/boot/map
install=/boot/boot.b
image = /boot/vmlinuz
  label = linux
  root = /dev/hda7
other = /dev/hda1
  label = windows
  table=/dev/hda
other = /dev/fd0
  label = floppy
  unsafe

root = /dev/hda7 is probably the problem, I need to change that to hda6.  Let's
hope that when I finally do it doesn't repeat the same nonsense as LOADLIN,
ignoring what's specified and loading on hda6+1!

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Charles Sulliva » Wed, 12 Sep 2001 12:20:39






>> It sounds like your partition numbering may have been screwed up.



>> > I installed Mandrake 6.1 to dual-boot on a Windows 98 machine.
>> > Everything worked fine for a few weeks, then one day LILO simply
>> > didn't load when booting anymore.  I tried booting with the Mandrake
>> > bootdisk, and that gives me a kernel panic error.

> Thanks for the help, I haven't got to a LINUX prompt yet, but it's
> definitely a step in the right direction.

> explore2fs shows 2 partitions:
> hda6 (contains bin, boot, dev, etc, home, root, usr, ...) hda8 (contains
> my account directory, httpd, samba)

> From looking at the "Debug Level: High" messages, it looks like hda7 is
> the LINUX swap partition.

> So I tried "loadlin vmlinuz root=/dev/hda6 ro" and here's the startup
> error messages I get:

> swapon: /dev/hda8: Invalid argument
>                                                                        [FAILED]
> [...]
> Checking root file system
> fsck.ext2: Bad magic number in super-block while trying to open
> /dev/hda7 (null):
> The superblock could not be read or does not describe a correct ext2
> filesystem.  If the device is valid and it really contains an ext2
> filesystem (and not swap or ufs or something else), then the superblock
> is corrupt, and you might try running e2fsck with an alternate
> superblock:
>     e2fsck -b 8193 <device>
>                                                                        [FAILED]
> *** An error occured during the filesystem check [...]

> Note that while terminating, when it turns swap off it fails again
> (unsurprisingly).

> To me (a newbie), it would seem that my correct root and swap are hda6
> and hda7 respectively, but that no matter what I try to load LINUX with
> (boot LILO, bootdisk LILO, LOADLIN), it always tries to load root from
> hda7 (and likely swap from hda8).  It's obvious that it chokes on hda7
> since it is the swap partition, but why is LOADLIN trying to load root
> on hda7 when it should be loading hda6 (as specified on the command
> line)?

> As a bonus, here's the contents of /etc/lilo.conf:

> boot = /dev/hda
> timeout = 600
> prompt
>   message = /boot/message
>   default = linux
>   vga = normal
>   read-only
> map=/boot/map
> install=/boot/boot.b
> image = /boot/vmlinuz
>   label = linux
>   root = /dev/hda7
> other = /dev/hda1
>   label = windows
>   table=/dev/hda
> other = /dev/fd0
>   label = floppy
>   unsafe

> root = /dev/hda7 is probably the problem, I need to change that to hda6.
>  Let's hope that when I finally do it doesn't repeat the same nonsense
> as LOADLIN, ignoring what's specified and loading on hda6+1!

This is getting beyond my league.  Perhaps someone more knowledgeable
than myself can help you fix your current setup, but as a fallback you
can use explore2fs to import  critical personal  files  to your Win 98
partition and reinstall Mandrake from scratch.

Regards,
Charles Sullivan

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Eric » Wed, 12 Sep 2001 15:14:55


Quote:>      Partition check:
>        hda: hda1 hda2 < hda5 hda6 hda7 hda8 >
>      Kernel panic: VFS: Unable to mount root fs on 03:07

> So I am unable to get to any LINUX prompt whatsoever.

Does the mandrake CD support a "rescue" option.
Put in the installation CD, and see if such an option exists.

boot from that, and run `/sbin/fdisk -l` to see if there's something
wrong with your partitiontable (Show it here, if you're unsure)

Then try to mount the partitions from your rescue system.
Does it succeed? Run fsck on all ext2 partitions. Do you encounter
any errors (unmount the partitions first!)

Eric

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Serge Leve » Thu, 13 Sep 2001 07:58:40



> Does the mandrake CD support a "rescue" option.
> Put in the installation CD, and see if such an option exists.

Unfortunately it does not.
 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Eric » Thu, 13 Sep 2001 15:38:01


Quote:> > Does the mandrake CD support a "rescue" option.
> > Put in the installation CD, and see if such an option exists.

> Unfortunately it does not.

Then get another rescue system (from the web) and use that.

Eric

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Serge Leve » Sat, 15 Sep 2001 08:10:27



> Does the mandrake CD support a "rescue" option.
> Put in the installation CD, and see if such an option exists.

> boot from that, and run `/sbin/fdisk -l` to see if there's something
> wrong with your partitiontable (Show it here, if you're unsure)

> Then try to mount the partitions from your rescue system.
> Does it succeed? Run fsck on all ext2 partitions. Do you encounter
> any errors (unmount the partitions first!)

fdisk -l:
   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

The 3rd windows partition (after the ext2 ones; this one is FAT, not FAT32) is
not showing (same deal in windows).  Perhaps it's between 666 and 783 and is the
root of this entire problem?  Has anyone ever installed Linux in between FAT32
and FAT partitions?

I mounted hda6 and hda8 with no problems, and e2fsck shows no errors.

Everywhere it seems that /dev/hda7 (Linux swap) was being loaded as root,
instead of /dev/hda6 as it should be.

I changed lilo.conf root=/dev/hda7 to /dev/hda6.  When booting, LILO is still
hiding, not being called, loaded or seen in any form whatsoever.

So my other choice is the Mandrake bootdisk.  I tried changing the lilo.conf
root=/dev/hda7 to /dev/hda6.  This still gives the same old kernel panic 03:07.  
Is the device hard-coded somewhere else?  It doesn't seem to even read
lilo.conf.  I tried even renaming the /dev/hda7 file on the bootdisk to
gibberish, and did (mknod /dev/hda6 b 3 6) to no avail.  I am a Linux newbie so
that may have been pointless, but it seemed worth a try.

Also recall that when I copied the kernel to Win98 and tried running LOADLIN
from DOS (loadlin vmlinuz root=/dev/hda6 ro) it tried to load hda7 anyway.

How do I go about running LILO upon booting my PC without a boot disk now that
it has disappeared?  Has the MBR been changed back to a pre-LILO form?  How else
could LILO disappear?

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Eric » Sat, 15 Sep 2001 15:22:59


Quote:> > Does the mandrake CD support a "rescue" option.
> > Put in the installation CD, and see if such an option exists.

> > boot from that, and run `/sbin/fdisk -l` to see if there's something
> > wrong with your partitiontable (Show it here, if you're unsure)

> > Then try to mount the partitions from your rescue system.
> > Does it succeed? Run fsck on all ext2 partitions. Do you encounter
> > any errors (unmount the partitions first!)

> fdisk -l:
>    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

> The 3rd windows partition (after the ext2 ones; this one is FAT, not
FAT32) is
> not showing (same deal in windows).  Perhaps it's between 666 and 783 and
is the
> root of this entire problem?  Has anyone ever installed Linux in between
FAT32
> and FAT partitions?

there's no hda9 left. Are you sure you didn't delete that, and installed
linux in it's place? You can try to create a FAT partition right after hda9
and see
if it mounts. If the FS is still there, you may just be able to recover it.

You could also try some of the partition recovery programs (gpart eg.)
to see if it can retrieve the lost partition for you.

Quote:> I mounted hda6 and hda8 with no problems, and e2fsck shows no errors.

> Everywhere it seems that /dev/hda7 (Linux swap) was being loaded as root,
> instead of /dev/hda6 as it should be.

the lost FAT partiiton was probably called hda5 before you lost it. Losing
it would
then indeed cause this behaviour. I have still no idea *how* it got lost
though.
You must have done something.

Quote:> I changed lilo.conf root=/dev/hda7 to /dev/hda6.  When booting, LILO is
still
> hiding, not being called, loaded or seen in any form whatsoever.

rerun `/sbin/lilo`
lilo.conf is not read during runtime, it must be "compiled" in.

Quote:> So my other choice is the Mandrake bootdisk.  I tried changing the
lilo.conf
> root=/dev/hda7 to /dev/hda6.  This still gives the same old kernel panic
03:07.
> Is the device hard-coded somewhere else?

It is hardcoded in the kernel., but passing the option to lilo overrides
this.
(you can see/change the hardcoded value with rdev)

Quote:> It doesn't seem to even read
> lilo.conf.

It doesn't. Run `/sbin/lilo -v -v`
If you enter the option manually (And your lilo.conf isn't setup to ignore
these options) the correct root FS wiill be used:

at boot th lilo prompt appears:

LILO>

now normally you enter "linux", provide it with a new root option now:

LILO> linux root=/dev/hda6

This will use hda6 as the root FS

Quote:> I tried even renaming the /dev/hda7 file on the bootdisk to
> gibberish, and did (mknod /dev/hda6 b 3 6) to no avail.  I am a Linux
newbie so
> that may have been pointless, but it seemed worth a try.

> Also recall that when I copied the kernel to Win98 and tried running
LOADLIN
> from DOS (loadlin vmlinuz root=/dev/hda6 ro) it tried to load hda7 anyway.

Sorrry I've never even used loadlin.

Quote:> How do I go about running LILO upon booting my PC without a boot disk now
that
> it has disappeared?  Has the MBR been changed back to a pre-LILO form?
How else
> could LILO disappear?

Besides LILO a partition disappeared too. How it did, I don't know. (Did you
delete it?)
Perhaps you have a virus scanner that claimed the MBR was infected(It's not
a virus, it's LILO),
and chose to restore it?

Eric

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Serge Leve » Sun, 16 Sep 2001 09:16:52



Quote:

>LILO> linux root=/dev/hda6

>This will use hda6 as the root FS

This finally got me past the kernel panic 03:07 problem!  Now it stalls on the
following error:

swapon: /dev/hda8: Invalid argument

The swap is /dev/hda7.  Is there a way to specify this as well to LILO?
'man lilo | grep -i swap' turns up nothing...  Any way to do this or do I have
to recompile the kernel?

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by John D. Barnet » Mon, 17 Sep 2001 03:42:09


Check the BootPrompt HOWTO, which mentions the 'rdev' utility; also, see
the rdev man page.

Some of the settings, such as the location of the swap partition, are
stored directly in the kernel image.

Good luck!

-John



> >LILO> linux root=/dev/hda6

> >This will use hda6 as the root FS

> This finally got me past the kernel panic 03:07 problem!  Now it stalls on the
> following error:

> swapon: /dev/hda8: Invalid argument

> The swap is /dev/hda7.  Is there a way to specify this as well to LILO?
> 'man lilo | grep -i swap' turns up nothing...  Any way to do this or do I have
> to recompile the kernel?

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Timothy Murp » Tue, 18 Sep 2001 06:27:13



>The 3rd windows partition (after the ext2 ones; this one is FAT, not FAT32) is
>not showing (same deal in windows).  Perhaps it's between 666 and 783 and is the
>root of this entire problem?  Has anyone ever installed Linux in between FAT32
>and FAT partitions?

Does Windows allow you to use a primary partition after an extended partition?
I've a vague idea the extended partition had to be the last primary partition.
But I don't use Windows much, so may be talking nonsense.

Quote:>Everywhere it seems that /dev/hda7 (Linux swap) was being loaded as root,
>instead of /dev/hda6 as it should be.

Are you sure your /etc/lilo.conf is correct,
and that you have run lilo after changing it?

Quote:>So my other choice is the Mandrake bootdisk.  

Another thing I have found very useful is the "tomsrtbt" diskette --
this contains a complete Linux system on a floppy,
and allows you to mount the different partitions.

--
Timothy Murphy  

tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Timothy Murp » Tue, 18 Sep 2001 06:32:07



Quote:>Some of the settings, such as the location of the swap partition, are
>stored directly in the kernel image.

Is that true?
It seems very unlikely to me.
Can't one just edit /etc/fstab and reboot?

--
Timothy Murphy  

tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Timothy Murp » Tue, 18 Sep 2001 06:59:08



>This finally got me past the kernel panic 03:07 problem!  Now it stalls on the
>following error:
>swapon: /dev/hda8: Invalid argument

Are you sure it stalls?
I'd have thought it would just boot without a swap partition,
which would be perfectly feasible.

Quote:>The swap is /dev/hda7.  Is there a way to specify this as well to LILO?
>'man lilo | grep -i swap' turns up nothing...  Any way to do this or do I have
>to recompile the kernel?

I think it gets the swap partition(s) from /etc/fstab.
I would guess that you can just edit this file and re-boot.

--
Timothy Murphy  

tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland

 
 
 

LILO vanished on win/lin dual-boot, boot disk gives kernel panic

Post by Eric » Tue, 18 Sep 2001 15:39:06


Quote:> >The 3rd windows partition (after the ext2 ones; this one is FAT, not
FAT32) is
> >not showing (same deal in windows).  Perhaps it's between 666 and 783 and
is the
> >root of this entire problem?  Has anyone ever installed Linux in between
FAT32
> >and FAT partitions?

> Does Windows allow you to use a primary partition after an extended
partition?
> I've a vague idea the extended partition had to be the last primary
partition.
> But I don't use Windows much, so may be talking nonsense.

Drive numbering get's a bit odd, but it is allowed.

Eric