Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
}
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:
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.
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?
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.
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
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.