Hi Abhimanyu, I'm afraid there is no easy way I know of. When the kernel boots successfully you can see the logs using dmesg which prints the kernels logging buffer. However, when your kernel panics you can't do this so I was just copying it off the console and reposting it here. One thing I did have to do was in /boot/grub/menu.lst, the entry for my kernel went in with the parameters "quiet" and "splash" which will surpress/hide your kernel logging onto the screen. So just remove them and you will see the logging on the screen. I assume there is an equivalent if you are using LILO. Thanks, Stephen
On Wed, Mar 4, 2009 at 4:46 AM, abhimanyu khadtare <[email protected] > wrote: > Congres Stephen, > to get working kernel , i'm totally new to this .If suppose my kernel > gets panic how can i captured panic detail to mail here ? > > > On Wed, Mar 4, 2009 at 6:31 AM, Stephen Roberts < > [email protected]> wrote: > >> Hi guys, >> Just to let you know, I got the kernel booted. I did make defconfig but >> then built the kernel with: >> >> make-kpkg --initrd --append-to-version=-steo kernel_image kernel_headers >> >> Now I'm not sure what the difference is really, I guess this is a sort of >> all in one tool for building a kernel. The only difference I can see really >> is the initrd. When I install the resulting deb package I see: >> >> Setting up linux-image-2.6.28-steo (2.6.28-steo-10.00.Custom) ... >> Running depmod. >> Finding valid ramdisk creators. >> Using mkinitramfs-kpkg to build the ramdisk. >> Other valid candidates: mkinitramfs-kpkg mkinitrd.yaird >> >> So this tool builds the init ram disk differently. >> >> I have a working kernel now, but I always did and was trying to understand >> the process. I'd prefer to do it by hand but at least I have a starting >> point now. I shall update if I can shed any light on it, >> Thanks, >> Stephen >> >> >> On Tue, Mar 3, 2009 at 12:48 AM, Stephen Roberts < >> [email protected]> wrote: >> >>> Hi, >>> The hard disk attatchment is SATA. Looking in /proc/modules on the >>> working version I can see (among many more): >>> >>> ---------------------------------------------------------------- >>> sg 36880 0 - Live 0xf89bc000 >>> sr_mod 17956 0 - Live 0xf88f1000 >>> cdrom 37408 1 sr_mod, Live 0xf8931000 >>> sd_mod 30720 3 - Live 0xf8913000 >>> pata_acpi 8320 0 - Live 0xf889a000 >>> ata_generic 8324 0 - Live 0xf88e6000 >>> ahci 28548 2 - Live 0xf88de000 >>> ata_piix 19588 0 - Live 0xf887c000 >>> libata 159600 4 pata_acpi,ata_generic,ahci,ata_piix, Live 0xf8987000 >>> tg3 116228 0 - Live 0xf8969000 >>> scsi_mod 151436 5 sbp2,sg,sr_mod,sd_mod,libata, Live 0xf8943000 >>> ------------------------------------------------------------------- >>> >>> and doing an lsmod gives me >>> >>> -------------------------------------------------------------- >>> mbcache 9600 1 ext3 >>> sg 36880 0 >>> sr_mod 17956 0 >>> cdrom 37408 1 sr_mod >>> sd_mod 30720 3 >>> pata_acpi 8320 0 >>> ata_generic 8324 0 >>> --------------------------------------------------------------- >>> >>> I have enabled anything that looks like it might relate to these. Also, >>> for a change, I tried to use YAIRD to create my initrd as Mulyadi suggested >>> there may be issues with mkinitrd. Also, yaird seems to do a little more >>> analysis to tell me if I am doing stupid things :-) >>> >>> Doing a 'yaird --test' gives: >>> >>> yaird error: unsupported device required: sr0 (fatal) >>> >>> And doing >>> >>> >>> -------------------------------------------------------------------------------------------------------------------------- >>> step...@the-batman:/usr/local/src/linux-2.6.28$ sudo yaird -o >>> initrdsteo.img-2.6.28 2.6.28 >>> yaird error: unrecognised device: >>> /sys/devices/platform/i8042/serio0/input >>> yaird error: unrecognised device: >>> /sys/devices/platform/i8042/serio0/input/input1 >>> yaird error: unrecognised device: /sys/devices/virtual >>> yaird error: unrecognised device: /sys/devices/virtual/input >>> yaird error: unrecognised device: /sys/devices/virtual/input/input2 >>> yaird error: unrecognised device: /sys/devices/virtual >>> yaird error: unrecognised device: /sys/devices/virtual/input >>> yaird error: unrecognised device: /sys/devices/virtual/input/input4 >>> yaird error: unrecognised device: /sys/devices/LNXSYSTM:00 >>> yaird error: unrecognised device: /sys/devices/LNXSYSTM:00/device:00 >>> yaird error: unrecognised device: >>> /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00 >>> yaird error: unrecognised device: >>> /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00 >>> yaird error: unrecognised device: >>> /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input >>> yaird error: unrecognised device: >>> /sys/devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input5 >>> yaird error: there were errors in this run, aborting now without output >>> (fatal) >>> step...@the-batman:/usr/local/src/linux-2.6.28$ >>> ---------------------------------------------------------------------------------------------------------------------------------------- >>> >>> So....yaird is probably telling me I haven't done enough to continue. But >>> I ignored it and went onto use mkinitrd as before with just one warning: >>> FATAL: Module sg not found. >>> >>> Then on boot I saw a lot of SCSI and SATA stuff flash by and then: >>> >>> >>> ------------------------------------------------------------------------------------------------------------ >>> RAMDISK: Loading into RAM disk... done >>> List of all partitions: >>> No filesystem could mount root, tried: ext3 vfat msdos iso9660 >>> Kernel Panic - not syncing: VFS: Unable to mount root fs on unkown >>> block(0,0) >>> >>> ------------------------------------------------------------------------------------------------------------ >>> >>> Now the last time I tried with just a make defconfig, I got the following >>> partitions listed: >>> >>> List of all partitions: >>> 0800 sda driver: sd >>> 0801 <numbers> sda1 >>> 0802 <numbers> sda2 >>> 0803 <numbers> sda3 >>> 0804 <numbers> sda4 >>> 0b00 <numbers> sr0 driver: sr >>> >>> The only difference is that I enabled more SATA and SCSI like stuff. >>> Also, I tried make oldconfig using my current kernel config >>> 2.6.24-23-generic (I'm using ubuntu 8.10 distro) but that just gave me the >>> same original devfs problem :( >>> Sorry for the long mail, >>> All help much appreciated >>> Stephen >>> >>> On Mon, Mar 2, 2009 at 2:08 AM, Durga Prasad <[email protected]> wrote: >>> >>>> Hi Stephen >>>> What is your harddisk attachment? SAS? ATA? You need to build the >>>> appropriate module for the attachment. (Hint: Check the config for a >>>> running >>>> kernel) >>>> You would need to enable SCSI_LOWLEVEL without which you would not have >>>> many low level SCSI drivers. >>>> >>>> Would enabling EXT2 help? >>>> >>>> # >>>> # SCSI Transports >>>> # >>>> CONFIG_SCSI_SPI_ATTRS=y >>>> # CONFIG_SCSI_FC_ATTRS is not set >>>> CONFIG_SCSI_ISCSI_ATTRS=y >>>> # CONFIG_SCSI_SAS_ATTRS is not set >>>> # CONFIG_SCSI_SAS_LIBSAS is not set >>>> # CONFIG_SCSI_SRP_ATTRS is not set >>>> # CONFIG_SCSI_LOWLEVEL is not set >>>> # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set >>>> # CONFIG_SCSI_DH is not set >>>> >>>> >>>> Regards >>>> Durga >>>> >>>> ------------------------------ >>>> *From:* Stephen Roberts <[email protected]> >>>> *To:* Durga Prasad <[email protected]> >>>> *Cc:* Mulyadi Santosa <[email protected]>; >>>> [email protected] >>>> *Sent:* Monday, March 2, 2009 2:42:05 AM >>>> >>>> *Subject:* Re: Kernel Panic at boot >>>> >>>> Hi Durga, >>>> Attached is my .config file. Let me know if you can see this, thanks >>>> >>>> On Sun, Mar 1, 2009 at 8:37 AM, Durga Prasad <[email protected]>wrote: >>>> >>>>> Hi, >>>>> Can you provide the .config file used to compile your kernel. >>>>> >>>>> - Durga >>>>> >>>>> ------------------------------ >>>>> *From:* Mulyadi Santosa <[email protected]> >>>>> *To:* Stephen Roberts <[email protected]> >>>>> *Cc:* [email protected] >>>>> *Sent:* Sunday, March 1, 2009 10:42:31 AM >>>>> *Subject:* Re: Kernel Panic at boot >>>>> >>>>> Hi... >>>>> >>>>> On Sun, Mar 1, 2009 at 6:02 AM, Stephen Roberts >>>>> <[email protected]> wrote: >>>>> > Hi, >>>>> > Thanks for your response. >>>>> > >>>>> > I tried what you said and it seemed to help, but when I ran mkinitrd >>>>> I got >>>>> > this: >>>>> > >>>>> > >>>>> ------------------------------------------------------------------------------------------------------------------------------------------------- >>>>> > step...@the-batman:/usr/local/src/linux-2.6.28$ sudo mkinitrd -o >>>>> > initrdsteo.img-2.6.28 2.6.28 >>>>> > /usr/sbin/mkinitrd: add_modules_dep_2_5: modprobe failed >>>>> > FATAL: Module sg not found. >>>>> > FATAL: Module sd_mod not found. >>>>> > WARNING: This failure MAY indicate that your kernel will not boot! >>>>> > but it can also be triggered by needed modules being compiled into >>>>> > the kernel. >>>>> >>>>> hmm, i did this to see where sg module should land: >>>>> [muly...@mulyadi ~]$ cd /lib/modules/`uname -r` >>>>> [muly...@mulyadi 2.6.27.12-78.2.8.fc9.i686]$ find | grep -i sg >>>>> ./kernel/drivers/media/video/videobuf-dma-sg.ko >>>>> ./kernel/drivers/char/ipmi/ipmi_msghandler.ko >>>>> ./kernel/drivers/scsi/sg.ko >>>>> >>>>> so it seems that sg.ko has something to do with SCSI. are you sure you >>>>> have enabled everything related to SCSI? I can't give any hints about >>>>> it, so I think other people could help better here. >>>>> >>>>> my other suspicion is, you need to upgrade your mkinitrd to somehow >>>>> match the installed kernel version. >>>>> >>>>> >>>>> > Then when I booted the kernel: >>>>> > >>>>> ------------------------------------------------------------------------------------------------------------------------------------------------- >>>>> > RAMDISK: Loading into RAM disk... done >>>>> > List of all partitions: >>>>> > 0800 sda driver: sd >>>>> > 0801 <numbers> sda1 >>>>> > 0802 <numbers> sda2 >>>>> > 0803 <numbers> sda3 >>>>> > 0804 <numbers> sda4 >>>>> > 0b00 <numbers> sr0 driver: sr >>>>> > No filesystem could mount root, tried: ext3 vfat msdos iso9660 >>>>> > Kernel Panic - not syncing: VFS: Unable to mount root fs on unkown >>>>> > block(0,0) >>>>> >>>>> Here's my confusion. When I looked the above messages, I think that >>>>> you also forgot to compile certain filesystem types. What's the >>>>> filesystem type of your root filesystem anyway? and if it's compiled >>>>> as kernel modules, are you sure it's included in the initrd image? >>>>> >>>>> regards, >>>>> >>>>> Mulyadi. >>>>> >>>>> -- >>>>> To unsubscribe from this list: send an email with >>>>> "unsubscribe kernelnewbies" to [email protected] >>>>> Please read the FAQ at http://kernelnewbies.org/FAQ >>>>> >>>>> >>>>> >>>> >>>> >>> >> >> >> >
