kernel panic problem. help me

kernel panic problem. help me

Post by Park Jung Ky » Sat, 02 Jun 2001 16:13:59



Hi~

I have modified bread() in buffer.c at Linux kernel 2.2.17.

Only modified bread() in buffer.c.

Modified bread is similar to original bread().

Differece in bread() is that modified bread() prefetch one block.

Origianl bread : fetch request block
Modified bread : fetch request block + prefetch one block

Source complie is no error but when kernel is booting,

show kernel panic message.

(kernel panic: VFS: Unable to mount root fs on 03:07)

what's wrong my source.

please tell me answer.

thanks for your help.

/* source */

struct buffer_head * bread(kdev_t dev, int block, int size)

{

             struct buffer_head * bh;
             struct buffer_head * ph;
             struct buffer_head * result;
             int prefetch = 0;
             int bhMiss = 1;

             if (block < 0)
                           return NULL;

             bh = getblk(dev, block, size);

             if ( buffer_uptodate(bh) ) {
                           bhMiss = 0;
                           result = bh;
             }

             else ll_rw_block(READ, 1, &bh);

             ph = getblk(dev, block + 1, size);

             if ( buffer_uptodate(ph) ) {
                           prefetch = 0;
             }
             else {
                   prefetch = 1;
                   ll_rw_block(READ, 1, &ph);
             }

             if ( bhMiss = 1 ) {
                   wait_on_buffer(bh);

                           if ( buffer_uptodate(bh) ) {
                            result =  bh;
                           }
                           else {
                            brelse(bh);
                                result = (struct buffer_head *)NULL;
                           }

             }

             /* OutofRange value 0 : block + 1 > total blocks in file system
*/
             /* OutofRange value 1 : block + 1 <= total blocks in file
system */

             if ( prefetch == 1 && OutofRange == 0) {
              wait_on_buffer(ph);
             }

             brelse(ph);
             return result;

Quote:}

 
 
 

1. Kernel Panic, Please Help...I am Panicking Too

I am pretty new to this linux stuff so bear with me.  I recently downloaded
and installed mandrake 7.2, but unfortunately my usb modem wasnt supported,
so when the kernel update came out I thought I would give that a try....got
the kernel compiled, updated LILO...restart and attempt to load the new
kernel...and I get a kernel panic error...

Speciffically:

kernel panic: VFS: Unable to mount root fs on 21:05

How can I fix this?  It was suggested to me that I try rdev....I tried it
but I am not sure how to use it correctly can someone elaborate or give me
some more insite into how I can correct this problem?

I appreciate all your help...

System spec's:


128mb EMS / 256mb Micron SDRAM - 20.4 7200 Barracuda - 20.4 7200 Western
Digital- SB Live - Plex 8/4/32 - Geforce 2 MX Prophet II 205/205,
WinMill/Win2k Pro/Whistler/Linux Mandrake 7.2

2. About X-server in Free BSDfor intell

3. HELP! Kernel Panic: EXT2-fs panic ...

4. S3 video card exits X of linux in the dark ?

5. Help ! Panic Panic: Kernel crash

6. Memory Growth /Solaris

7. compiling ANY new kernel gives "Kernel Panic"...HELP!

8. Security hole in xterm, getuid, Un?x !!!!!

9. Help: Kernel Panic:VFS: Unable to mount root, after rebuilding kernel

10. Help!I just compiled kernel 2.0.1 and now I get a kernel panic!

11. Help meeee!!I just compiled kernel 2.0.1 and now I get a kernel panic!!

12. Help!I just compiled kernel 2.0.1 and now I get a kernel panic!!

13. Help!I just compiled kernel 2.0.1 and now I get a kernel panic!