LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kenel panic - not sysching (http://www.linuxquestions.org/questions/linux-newbie-8/kenel-panic-not-sysching-932720/)

saman_artorious 03-04-2012 06:28 PM

kenel panic - not sysching
 
I installed a new kernel 3.0.22 on ubuntu server 11.04 32 bit.
when I select the kenel from boot loader it stops when
Code:

loading initial ramdisk...
I added all_generic_ide at the end of linux line and also added dev/sda1 to linux line: root=UUID=dev/sda1

now it says that
Code:

kernel panic - not synching: attempts to kill init
init not tainted 3.0.22
call trace:
(some addresses like)
?printkxxxx
do_exit...
vfs_writexxx
do_group_exit...
sys_exit_groupxxxx
sysenter_do_callxxxxxx

I have checked from the first kernel with df -h, it says that my main drive which is the root file system is /dev/sda1.
so! what's the problem?

camorri 03-05-2012 08:47 AM

Quote:

root=UUID=dev/sda1
/dev/sda1 isn't a UUID. That will not work.

To find what UUID is for /dev/sda1/ open a konsole, navigate to :

/dev/disk/by-UUID/ You should see something like this with a ls command:

Quote:

lrwxrwxrwx 1 root root 10 Mar 5 09:10 06d25c2c-62bd-4739-bdf2-eae4cc6e9629 -> ../../sdb5
lrwxrwxrwx 1 root root 10 Mar 5 04:10 2d3acd2b-40d9-4924-b588-6d5fb1999822 -> ../../sda5
lrwxrwxrwx 1 root root 10 Mar 5 09:10 3246c11f-7165-4cbd-bd64-0e6393950547 -> ../../sdb6
lrwxrwxrwx 1 root root 10 Mar 5 09:10 3c471dd6-ad42-4f99-9008-c89da5be2ddc -> ../../sda6
lrwxrwxrwx 1 root root 10 Mar 5 04:10 cc9bc7ff-c5ee-4cf8-adff-2cab298fd0e3 -> ../../sda1
lrwxrwxrwx 1 root root 10 Mar 5 09:10 f7cefa1c-32a7-41b0-ae0c-14705b2deecb -> ../../sdb1
This is from my two disk system, so do not try to copy this. Your UUID's are different. Copy the one for /dev/sda1/ if that is where your /boot directory is. Its the long string of ASCII characters after the time stamp.

saman_artorious 03-07-2012 05:52 AM

new kernel comile, root file system fails to mount
 
3 Attachment(s)
well, thanks for the reply. I checked /dev/disk/by-uuid, you know, ../../dev/sda1 is the only device in this directory.
you know, my guess is that i probably don't select some particular modules required to load the root filesystem. Because I tested the new kernel on 32 bit, 64 bit and even another distribution of linux, and I have the same problem everywhere.

Let's be more accurate. when I choose my customized kernel, first it said :
Code:

Booting a command list
alloc magic is broken at 0x3f503710
Aborted. Press any key to exit.

when i edited the boot with all_generic_ide and root=dev/sda1
it output some other things, I got a shot of the screen which is attached.




I would
thank if you help me fix the problem.

the attached file is mykernel .config customized with make menuconfig
more info:
Code:

processor        : 0
vendor_id        : GenuineIntel
cpu family        : 6
model                : 13
model name        : Intel(R) Pentium(R) M processor 1.40GHz
stepping        : 8
cpu MHz                : 600.000
cache size        : 2048 KB
fdiv_bug        : no
hlt_bug                : no
f00f_bug        : no
coma_bug        : no
fpu                : yes
fpu_exception        : yes
cpuid level        : 2
wp                : yes
flags                : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2
bogomips        : 1198.00
clflush size        : 64
cache_alignment        : 64
address sizes        : 32 bits physical, 32 bits virtual
power management:


camorri 03-07-2012 12:31 PM

This is the UUID for sdb1 on my system. -->f7cefa1c-32a7-41b0-ae0c-14705b2deecb

It is the ASCII string, this is what you want for sda1 on your system.

saman_artorious 03-07-2012 01:19 PM

Quote:

Originally Posted by camorri (Post 4621080)
This is the UUID for sdb1 on my system. -->f7cefa1c-32a7-41b0-ae0c-14705b2deecb

It is the ASCII string, this is what you want for sda1 on your system.

I don't understand! this is the only address inside by-uuid folder in my system. And it is for the root file system. How should I fix the problem?

camorri 03-07-2012 02:34 PM

Quote:

I don't understand! this is the only address inside by-uuid folder in my system. And it is for the root file system. How should I fix the problem?
Please cut and paste the folder contents here. You should have an ASCII strig of characters in the that folder for sda1. If it is not there, you can not boot using UUID.

This is Ubuntu. It uses Grub2.

Grub2 documentation can be found here -->https://help.ubuntu.com/community/Grub2

saman_artorious 03-08-2012 06:46 AM

Quote:

Originally Posted by camorri (Post 4621171)
Please cut and paste the folder contents here. You should have an ASCII strig of characters in the that folder for sda1. If it is not there, you can not boot using UUID.

Well, thanks for your concern. This time I tried the installation on my own laptop, again the same problem. I also check out what the uuid string points to.. and it's correct it points to the right device in my machine, which is /dev/sda6. Have a look here:

Code:

root@saman-HP-ProBook-4530s:/dev/disk/by-uuid# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6            186G  16G  161G  9% /
none                  1.9G  708K  1.9G  1% /dev
none                  2.0G  320K  2.0G  1% /dev/shm
none                  2.0G  224K  2.0G  1% /var/run
none                  2.0G    0  2.0G  0% /var/lock
/dev/sdb1            7.5G  5.7G  1.8G  76% /media/Saman

well, this one says that my / root file system and as you said the directory where /boot is located is /dev/sda6, now let's jump to /dev/disk/by-uuid/ n c the string:
Code:

lrwxrwxrwx 1 root root 10 2012-03-08 15:54 0b4e5053-302a-4977-a1e0-0e128a1e3b8c -> ../../sda5
lrwxrwxrwx 1 root root 10 2012-03-08 15:54 3149-0944 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2012-03-08 15:54 620020A200207EE3 -> ../../sda2
lrwxrwxrwx 1 root root 10 2012-03-08 15:54 642824CF2824A252 -> ../../sda3
lrwxrwxrwx 1 root root 10 2012-03-08 15:54 a43da646-97b6-4e71-b0fa-bb27d0d52a4b -> ../../sda6
lrwxrwxrwx 1 root root 10 2012-03-08 15:54 ea0965c8-d66b-4f0e-bb20-ed629eb011fc -> ../../sda7
lrwxrwxrwx 1 root root 10 2012-03-08 15:54 FED00908D008C93B -> ../../sda1

well, it's right, the bootloader shows the right string which is a43xxxx. Though I wonder why when I load it in recovery mode, it prompts an alert n says:
Code:

ALET! root=uuid=a43xxxxxx does not exists!!
this is what is inside /boot/grub/grub.cfg
Code:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos6)'
search --no-floppy --fs-uuid --set=root a43da646-97b6-4e71-b0fa-bb27d0d52a4b
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos6)'
search --no-floppy --fs-uuid --set=root a43da646-97b6-4e71-b0fa-bb27d0d52a4b
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
  clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.0.22-kernel-0-rt37' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        set gfxpayload=$linux_gfx_mode
        insmod part_msdos
        insmod ext2
        set root='(/dev/sda,msdos6)'
        search --no-floppy --fs-uuid --set=root a43da646-97b6-4e71-b0fa-bb27d0d52a4b
        linux        /boot/vmlinuz-3.0.22-kernel-0-rt37 root=UUID=a43da646-97b6-4e71-b0fa-bb27d0d52a4b ro  quiet splash vt.handoff=7
        initrd        /boot/initrd.img-3.0.22-kernel-0-rt37
}
menuentry 'Ubuntu, with Linux 3.0.22-kernel-0-rt37 (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        set gfxpayload=$linux_gfx_mode
        insmod part_msdos
        insmod ext2
        set root='(/dev/sda,msdos6)'
        search --no-floppy --fs-uuid --set=root a43da646-97b6-4e71-b0fa-bb27d0d52a4b
        echo        'Loading Linux 3.0.22-kernel-0-rt37 ...'
        linux        /boot/vmlinuz-3.0.22-kernel-0-rt37 root=UUID=a43da646-97b6-4e71-b0fa-bb27d0d52a4b ro single
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-3.0.22-kernel-0-rt37
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        set gfxpayload=$linux_gfx_mode
        insmod part_msdos
        insmod ext2
        set root='(/dev/sda,msdos6)'
        search --no-floppy --fs-uuid --set=root a43da646-97b6-4e71-b0fa-bb27d0d52a4b
        linux        /boot/vmlinuz-2.6.38-8-generic root=UUID=a43da646-97b6-4e71-b0fa-bb27d0d52a4b ro  quiet splash vt.handoff=7
        initrd        /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
        recordfail
        set gfxpayload=$linux_gfx_mode
        insmod part_msdos
        insmod ext2
        set root='(/dev/sda,msdos6)'
        search --no-floppy --fs-uuid --set=root a43da646-97b6-4e71-b0fa-bb27d0d52a4b
        echo        'Loading Linux 2.6.38-8-generic ...'
        linux        /boot/vmlinuz-2.6.38-8-generic root=UUID=a43da646-97b6-4e71-b0fa-bb27d0d52a4b ro single
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-2.6.38-8-generic
}
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
        insmod part_msdos
        insmod ext2
        set root='(/dev/sda,msdos6)'
        search --no-floppy --fs-uuid --set=root a43da646-97b6-4e71-b0fa-bb27d0d52a4b
        linux16        /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod part_msdos
        insmod ext2
        set root='(/dev/sda,msdos6)'
        search --no-floppy --fs-uuid --set=root a43da646-97b6-4e71-b0fa-bb27d0d52a4b
        linux16        /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sda1)" --class windows --class os {
        insmod part_msdos
        insmod ntfs
        set root='(/dev/sda,msdos1)'
        search --no-floppy --fs-uuid --set=root FED00908D008C93B
        chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

if I install the kernel having the same options selected as ubuntu-generic-pae kernel installed from DVD, it works fine. But when i try to load the customized one i face this problem. My guess is that i forget to select some important options required to load the root file system or ... i don't know. bcoz even if that was the case, the Alert file system does not exist message is relevant to it.

What do you think?

camorri 03-08-2012 08:48 AM

Have you followed the instructions for updating Grub2 in the link I posted ( post6) above?

A direct quote from the section on updating Grub2:

Quote:

Important note: Configuration changes are normally made to /etc/default/grub and to the custom files located in /etc/grub.d. Any changes made directly to the /boot/grub/grub.cfg are overwritten whenever update-grub is executed either by the user or when called automatically by various system functions.

After editing /etc/default/grub or the scripts in the /etc/grub.d folder the user should run sudo update-grub to incorporate the changes into the GRUB 2 menu.
If you do not follow the update instructions, you will get kernel panic, as the boot loader will not be able to find the necessary files to load your custom kernel. This is not a UUID problem now, you have it correct.

saman_artorious 03-08-2012 09:07 AM

I don't think the problem is update-grub. Whenever the kernel is installed via the debian packages, the grub is automatically updated at the end of the process:
Code:

dpkg -i linux-headersxxx.deb
dpkg -i linux-imagexxxx.deb


camorri 03-08-2012 09:19 AM

You are trying to do a custom kernel, if I understand correctly. You will have to update grub2 manually to get the correct files loaded.

saman_artorious 03-08-2012 09:33 AM

Quote:

Originally Posted by camorri (Post 4621881)
You are trying to do a custom kernel, if I understand correctly. You will have to update grub2 manually to get the correct files loaded.

Well, I don't understand your comment. Yes, I am trying to load a customized kernel. I don't think that it does matter whether I update grub or the dpkg does it automatically. The dpkg -i command installs the .deb packages which are compiled using my customized .config file.

camorri 03-08-2012 09:50 AM

Quote:

The dpkg -i command installs the .deb packages which are compiled using my customized .config file.
If that is true, it should boot.

Did you create an initrd.gz file for this custom kernel?


All times are GMT -5. The time now is 02:14 PM.