LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 01-18-2014, 01:38 PM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 514

Rep: Reputation: 38
Kernel Panic: can't bootup


Using Crunchbang Waldorf 64 bit
I tried to boot the computer today and couldn't boot the system; I got this message:

Linux 3.2.0-4-amd64
Loading initial ramdisk
Couldn't read file

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block (0,0)
Pid: 1, comm: swapper/0 Not tainted 3.2.0-4-amd64 #1 Debian 3.2.51-1

Why would this happen? Would like to avoid this in the future.
How would I fix this or change the kernel?

Thanks
 
Old 01-18-2014, 05:12 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,502

Rep: Reputation: 161Reputation: 161
The message probably means that the initrd is looking for the root file system on the wrong device or the initrd does not contain the device driver for the device where it is trying to mount the root file system. Use a rescue CD and take a look at /boot/grub/grub.cfg in the system you are trying to boot. See if the "set root=" parameter points to the correct device.

If grub.cfg is configured correctly then the problem is probably that the initrd does not include the correct driver for the device where the root file system resides. That problem was probably created by a configuration mistake when you installed Crunchbang Waldorf 64 bit.

-----------------------
Steve Stites

Last edited by jailbait; 01-18-2014 at 10:08 PM.
 
Old 01-19-2014, 01:51 AM   #3
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 514

Original Poster
Rep: Reputation: 38
This is the menu entry in grub.cfg
Crunchbang is installed on partition 2 of the 1st hard drive so I think this is right. I installed Crunchbang a few months ago and it has been working alright. something just happened today. I also lost sound.
I have grub2 installed on a flash drive, couldn't get it to work from the hard drive, that I have been using since I installed Crunchbang, so don't think that is the problem.

Quote:
### BEGIN /etc/grub.d/10_linux ###
menuentry 'CrunchBang GNU/Linux, with Linux 3.2.0-4-amd64' --class crunchbang --class gnu- linux --class gnu --class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root e1242318-d819-4762-90cd-950f2adee391
echo 'Loading Linux 3.2.0-4-amd64 ...'
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=e1242318-d819-4762-90cd-950f2adee391 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-4-amd64
}
 
Old 01-19-2014, 01:18 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,502

Rep: Reputation: 161Reputation: 161
Quote:
Originally Posted by JosephS View Post
I have grub2 installed on a flash drive, couldn't get it to work from the hard drive, that I have been using since I installed Crunchbang, so don't think that is the problem.
Where is the grub.cfg that the grub2 installed on a flash drive is using? It may not be using the grub.cfg in partition 2 of the 1st hard drive. Check to see if the flash drive grub.cfg is pointing to the correct root partition.

If you have been running Crunchbang Waldorf 64 bit for a while and the problems only cropped up recently then my idea of a missing device driver or file system in initrd is not correct.

If grub is trying to boot the correct partition then the partition may be corrupted. Try running fsck against the suspect partition. Run fsck with the -n option where it will report errors but not try to fix them. See:

man fsck

----------------------
Steve Stites
 
Old 01-19-2014, 04:02 PM   #5
rokytnji
Senior Member
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 13 , Various Puppys (MacPup,Slack0),MX-14
Posts: 2,558
Blog Entries: 16

Rep: Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818
Having run Linux on flashdrives myself. I have found any uncorrect un-mounting of said flash drive will fix it so the usb file system to become corrupted also. So a fsck on the flashdrive where grub is installed may be in order first. Unmounted of course. Gparted can also handle this through a live cd/usb session. Just unmount first using right click. Then use check using right click.

Same for Crunchbang partition running a live session. But I would do the grub flash drive first.
 
Old 01-19-2014, 05:17 PM   #6
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 514

Original Poster
Rep: Reputation: 38
I can boot into the linux partition with System Rescue CD. I did that and used Gparted to reformat the partition on the flash drive I then reinstalled grub2 on it. Here is some info on the grub.cfg. I think it is good.

Quote:
### BEGIN /etc/grub.d/10_linux ###
menuentry 'CrunchBang GNU/Linux, with Linux 3.2.0-4-amd64' --class crunchbang --class gnu-linux --class gnu --class os {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos2)'
search --no-floppy --fs-uuid --set=root e1242318-d819-4762-90cd-950f2adee391
echo 'Loading Linux 3.2.0-4-amd64 ...'
linux /boot/vmlinuz-3.2.0-4-amd64 root=UUID=e1242318-d819-4762-90cd-950f2adee391 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-4-amd64
Could there be something wrong with the kernel. How would I reinstall it?
 
Old 01-19-2014, 05:46 PM   #7
rokytnji
Senior Member
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: AntiX 13 , Various Puppys (MacPup,Slack0),MX-14
Posts: 2,558
Blog Entries: 16

Rep: Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818Reputation: 818
Have you done a file system check on the Crunchbang partition yet like was suggested by jailbait?

Quote:
Here is some info on the grub.cfg. I think it is good.
Do UUID's match using the blkid command as root in terminal during a live session.

I always check that number in case something went wrong.

Quote:
Could there be something wrong with the kernel.
I don't know why you are saying that. Maybe you aren't telling us everything?
Kernels just don't go bad. I have done tons of kernel installs.
They either work right out of the box or they don't.
I never got a kernel panic though unless it was a new fresh kernel install.
In that scenario. I always had a good backup kernel to boot into to uninstall
the one that would not work.
 
Old 01-19-2014, 09:27 PM   #8
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 514

Original Poster
Rep: Reputation: 38
The UUID's root on the flash drive are the same as the root partition on /dev/sda2 which is where Crunchbang is located.

This is what I got for a fsck:
Quote:
root@sysresccd /root % fsck -n /dev/sda2
fsck from util-linux 2.22.2
e2fsck 1.42.7 (21-Jan-2013)
CrunchBang: clean, 120002/1602496 files, 1171341/6400000 blocks

root@sysresccd /root % e2fsck -nf /dev/sda2
e2fsck 1.42.7 (21-Jan-2013)
CrunchBang: clean, 120002/1602496 files, 1171341/6400000 blocks
root@sysresccd /root % e2fsck -nf /dev/sda2
e2fsck 1.42.7 (21-Jan-2013)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
CrunchBang: 120002/1602496 files (0.2% non-contiguous), 1171341/6400000 blocks
root@sysresccd /root %
I'm not familiar with this. I didn't see any error message

Thanks
 
Old 01-19-2014, 11:16 PM   #9
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,502

Rep: Reputation: 161Reputation: 161
Quote:
Originally Posted by JosephS View Post
The UUID's root on the flash drive are the same as the root partition on /dev/sda2 which is where Crunchbang is located.

This is what I got for a fsck:


I'm not familiar with this. I didn't see any error message

Thanks
There is no error message. fsck found no errors in the file system.

The thing that puzzles me is that your Crunchbang system will boot fine from the rescue CD but will not boot from grub. I think that the "Couldn't read file" message is a grub error message. It seems to me that grub loads the kernel then fails to find the initrd whereas the rescue CD finds and loads both the kernel and the initrd.

I am not certain but I think that the problem is in grub. I would be tempted to go through grub configuration again:

The command to create a new grub.cfg is:
grub-mkconfig -o /boot/grub/grub.cfg


The command to install a new grub bootloader configuration is:
grub-install /dev/sda

-----------------
Steve Stites
 
Old 01-20-2014, 12:57 AM   #10
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 514

Original Poster
Rep: Reputation: 38
When booting Crunchbang from the Rescue CD I boot it with its own kernel. that's why it works. If I get the CD to boot the kernel on the partition it won't work.

I'll try to check the grub.cfg again, although I don't understand a lot in it. If that doesn't work I will try to install grub again.
 
Old 01-20-2014, 01:24 AM   #11
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,950

Rep: Reputation: Disabled
You should concentrate on the initrd file, as that's the file grub can't seem to read.

When you boot using System Rescue CD, does the file /boot/initrd.img-3.2.0-4-amd64 exist, and can the file be read? Try dd'ing it to /dev/null:
Code:
dd if=/boot/initrd.img-3.2.0-4-amd64 of=/dev/null
You may want to check the S.M.A.R.T. status of the hard drive as well, just in case (smartctl -a /dev/sda).
 
Old 01-20-2014, 10:11 AM   #12
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,502

Rep: Reputation: 161Reputation: 161
I agree with Ser Olmy. Concentrate on the initrd instead of grub.

-------------------
Steve Stites

Last edited by jailbait; 01-20-2014 at 10:14 AM.
 
Old 01-20-2014, 03:17 PM   #13
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 514

Original Poster
Rep: Reputation: 38
Quote:
Originally Posted by Ser Olmy View Post
You should concentrate on the initrd file, as that's the file grub can't seem to read.

When you boot using System Rescue CD, does the file /boot/initrd.img-3.2.0-4-amd64 exist, and can the file be read? Try dd'ing it to /dev/null:
Code:
dd if=/boot/initrd.img-3.2.0-4-amd64 of=/dev/null
joe@crunchbang:/boot$ dd if=/boot/initrd.img-3.2.0-4-amd64 of=/dev/null
dd: reading `/boot/initrd.img-3.2.0-4-amd64': Input/output error
19256+0 records in
19256+0 records out
9859072 bytes (9.9 MB) copied, 48.758 s, 202 kB/s

Quote:
You may want to check the S.M.A.R.T. status of the hard drive as well, just in case (smartctl -a /dev/sda).
Quote:
smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.4.62-std380-amd64] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family: Toshiba 2.5" HDD MK..65GSX
Device Model: TOSHIBA MK6465GSX
Serial Number: Z0D3D0Z0B
LU WWN Device Id: 5 000039 2fa683c72
Firmware Version: GJ002J
User Capacity: 640,135,028,736 bytes [640 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 8
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Mon Jan 20 12:44:29 2014 MST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
Those seemed to have worked so I tried to make an initrd and had problems. My have not done it right:
Quote:
# tried to create initrd
root@crunchbang:/boot# update-initramfs -c -k vmlinuz-3.2.0-4-amd64
update-initramfs: Generating /boot/initrd.img-vmlinuz-3.2.0-4-amd64
WARNING: missing /lib/modules/vmlinuz-3.2.0-4-amd64
Device driver support needs thus be built-in linux image!
FATAL: vmlinuz-3.2.0-4-amd64: not absolute path.
ERROR: could not open directory /var/tmp/mkinitramfs_keYksq/lib/modules/3.4.62-std380-amd64: No such file or directory
FATAL: could not search modules: No such file or directory

# I think I have modules installed
root@crunchbang:/boot# ls /lib/modules
3.2.0-4-amd64 3.2.0-4-rt-amd64

# used absolute path
root@crunchbang:/boot# update-initramfs -c -k /boot/vmlinuz-3.2.0-4-amd64
update-initramfs: Generating /boot/initrd.img-/boot/vmlinuz-3.2.0-4-amd64
touch: cannot touch `/boot/initrd.img-/boot/vmlinuz-3.2.0-4-amd64.new': No such file or directory
: /boot/vmlinuz-3.2.0-4-amd64 is not a valid kernel version
update-initramfs: failed for /boot/initrd.img-/boot/vmlinuz-3.2.0-4-amd64 with 1.

root@crunchbang:/boot# uname -r
3.4.62-std380-amd64
The Rescue CD booted with its own kernel. Is that the problem for this?

Last edited by JosephS; 01-20-2014 at 03:25 PM.
 
Old 01-20-2014, 04:03 PM   #14
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,502

Rep: Reputation: 161Reputation: 161
Quote:
Originally Posted by JosephS View Post
j I tried to make an initrd and had problems. My have not done it right:


The Rescue CD booted with its own kernel. Is that the problem for this?
Probably. You need to make an initrd against the Crunchbang kernel not the rescue CD kernel. From the error messages I think that it may have been looking for 3.2.0-4-amd64 3.2.0-4-rt-amd64 kernel modules on the rescue CD which is using a 3.4.62-std380-amd64 kernel.

------------------------------
Steve Stites
 
Old 01-20-2014, 04:14 PM   #15
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 1,950

Rep: Reputation: Disabled
Quote:
Originally Posted by JosephS View Post
joe@crunchbang:/boot$ dd if=/boot/initrd.img-3.2.0-4-amd64 of=/dev/null
dd: reading `/boot/initrd.img-3.2.0-4-amd64': Input/output error
That should NOT happen. Something is clearly wrong with either the file system structure or the disk itself. Running dmesg | tail immediately afterwards may provide clues as to what the problem is.

Also, you left out a lot of details from smartctl. Try running:
Code:
smartctl -a /dev/sda | grep _Sector
That will filter out everything except the REALLOCATED_SECTOR_COUNT and CURRENT_PENDING_SECTOR attributes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Panic on EVERY Bootup tubatodd Ubuntu 9 04-29-2007 09:08 PM
kernel panic on bootup Tortanick Linux - General 3 01-23-2007 04:56 PM
kernel panic on bootup MattJohnson Fedora 3 11-24-2004 11:18 AM
slack 9.1 - kernel panic on bootup? rogue_jedi Slackware 3 11-21-2003 06:13 PM
Kernel Panic right at bootup. huh?! bkeating Linux - General 15 08-22-2002 04:15 PM


All times are GMT -5. The time now is 11:54 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration