Page 5 of 6
Re: Kernel panic at boot from CD to install GRUB.
Posted: 30. Mar 2012, 07:03
by globetrotterdk
Shador wrote:globetrotterdk wrote:mkinitrd -u usb-storage
That's wrong syntax. Did you even consult the mkinird man page?
Actually, I did.
Shador wrote:I suggest something like this:
But you need probably more than usb-storage. If you post the output of lsmod from the machine with the card reader attached, I might be able to give some hints. Also add the output of lspci -k.
Noted. Here is the output of lsmod:
Code: Select all
Module Size Used by
snd_seq_dummy 1119 0
snd_seq_oss 25900 0
snd_seq_midi_event 4696 1 snd_seq_oss
snd_seq 42680 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device 4505 3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss 34554 0
snd_mixer_oss 14726 1 snd_pcm_oss
ipv6 236629 14
ppdev 4901 0
parport_pc 18218 0
lp 7105 0
parport 25627 3 ppdev,parport_pc,lp
fan 1926 0
i915 360914 2
snd_hda_codec_realtek 222970 1
snd_hda_intel 18443 0
snd_hda_codec 61720 2 snd_hda_codec_realtek,snd_hda_intel
drm_kms_helper 23927 1 i915
drm 143202 3 i915,drm_kms_helper
snd_hwdep 4772 1 snd_hda_codec
i2c_algo_bit 4287 1 i915
thermal 6718 0
eeepc_laptop 12507 0
ath5k 129860 0
snd_pcm 59843 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
processor 23158 0
video 10482 1 i915
rtc_cmos 7970 0
rtc_core 11871 1 rtc_cmos
joydev 7695 0
intel_agp 9000 1 i915
snd_timer 15717 2 snd_seq,snd_pcm
ath 11089 1 ath5k
sparse_keymap 2436 1 eeepc_laptop
thermal_sys 11426 4 fan,thermal,processor,video
rtc_lib 1502 1 rtc_core
i2c_i801 7018 0
intel_gtt 11414 3 i915,intel_agp
snd 43891 11 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
mac80211 181473 1 ath5k
battery 8431 0
atl2 20719 0
hwmon 1065 2 eeepc_laptop,thermal_sys
psmouse 40986 0
soundcore 4641 1 snd
ac 2465 0
button 4005 1 i915
agpgart 23062 3 drm,intel_agp,intel_gtt
i2c_core 16421 5 i915,drm_kms_helper,drm,i2c_algo_bit,i2c_i801
cfg80211 122542 3 ath5k,ath,mac80211
snd_page_alloc 5957 2 snd_hda_intel,snd_pcm
serio_raw 3542 0
output 1456 1 video
rfkill 13278 2 eeepc_laptop,cfg80211
evdev 7303 17
shpchp 23205 0
sg 21511 0
yenta_socket 19256 0
pcmcia_rsrc 9344 1 yenta_socket
pcmcia 32618 0
pcmcia_core 10169 3 yenta_socket,pcmcia_rsrc,pcmcia
usbhid 32435 0
hid 63771 1 usbhid
fuse 58136 3
squashfs 25647 6
The following is the output of lspci -k:
Code: Select all
00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d9
Kernel driver in use: agpgart-intel
Kernel modules: intel-agp
00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d9
Kernel driver in use: i915
Kernel modules: i915
00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d9
00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82a1
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 04)
Kernel modules: shpchp
00:1c.1 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2 (rev 04)
Kernel modules: shpchp
00:1c.2 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3 (rev 04)
Kernel modules: shpchp
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d8
Kernel driver in use: uhci_hcd
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d8
Kernel driver in use: uhci_hcd
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d8
Kernel driver in use: uhci_hcd
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d8
Kernel driver in use: uhci_hcd
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d8
Kernel driver in use: ehci_hcd
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d4)
00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d8
Kernel modules: iTCO_wdt, intel-rng
00:1f.2 IDE interface: Intel Corporation 82801FBM (ICH6M) SATA Controller (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d8
Kernel driver in use: ata_piix
00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 04)
Subsystem: ASUSTeK Computer Inc. Device 82d8
Kernel modules: i2c-i801
01:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)
Subsystem: AzureWave AR5007EG 802.11bg Wi-Fi mini PCI express card
Kernel driver in use: ath5k
Kernel modules: ath5k
03:00.0 Ethernet controller: Atheros Communications L2 Fast Ethernet (rev a0)
Subsystem: ASUSTeK Computer Inc. Device 8233
Kernel driver in use: atl2
Kernel modules: atl2
Shador wrote:Additionally you need to change /etc/fstab to use UUID= for all devices. Did you change this? Although this doesn't cause a kernel panic, it could cause troubles later.
I thought this could wait until I am actually able to boot from the system.
Shador wrote:This should add a initrd /boot/... line and change the kernel argument to root=UUID=...
Did you check the grub.cfg for this?
Yes, I checked. There is absolutely no content in grub.cfg.
Re: Kernel panic at boot from CD to install GRUB.
Posted: 30. Mar 2012, 20:52
by Shador
I could find nothing in that output. What kind of controller is this? Is it a USB one?
globetrotterdk wrote:I thought this could wait until I am actually able to boot from the system.
Just wanted to mention this, as you wouldn't get much further without changing this if you get past the kernel panic.
globetrotterdk wrote:Yes, I checked. There is absolutely no content in grub.cfg.
Sorry, but you're looking in the wrong place. What do you expect me to do? Look for /boot/grub/grub.cfg on all drives, open it with a text editor. I'm using geany or mousepad, but any should work. But as I can tell from the menu you're getting the file is obviously there. It might be in an unexpected location, if you messed up the installation.
Honestly, this is so obvious that I'm wondering why you don't try it yourself. It's not that hard to try to find a solution for such problems. If you don't want to. OK, fine, but I can't help you then. Of course, I could do the setup for you, but that's not my job and I don't want to do this for free. Actually that would be a much cheaper solution for my time, but not for your pocket.

Nevertheless, I've got absolutely no problem with helping people, who got stuck and thus sharing some of my experience. But I don't want this to be my project - I've got my own -, but this is yours.
Re: Kernel panic at boot from CD to install GRUB.
Posted: 30. Mar 2012, 21:51
by globetrotterdk
Shador wrote:I could find nothing in that output. What kind of controller is this? Is it a USB one?
As I have posted before, I have been unable to determine the controller due to a lack of documentation
Shador wrote:globetrotterdk wrote:I thought this could wait until I am actually able to boot from the system.
Just wanted to mention this, as you wouldn't get much further without changing this if you get past the kernel panic.
Cheers.
Shador wrote:globetrotterdk wrote:Yes, I checked. There is absolutely no content in grub.cfg.
Sorry, but you're looking in the wrong place. What do you expect me to do? Look for /boot/grub/grub.cfg on all drives, open it with a text editor. I'm using geany or mousepad, but any should work. But as I can tell from the menu you're getting the file is obviously there. It might be in an unexpected location, if you messed up the installation.
Honestly, this is so obvious that I'm wondering why you don't try it yourself. It's not that hard to try to find a solution for such problems. If you don't want to. OK, fine, but I can't help you then. Of course, I could do the setup for you, but that's not my job and I don't want to do this for free. Actually that would be a much cheaper solution for my time, but not for your pocket.

Nevertheless, I've got absolutely no problem with helping people, who got stuck and thus sharing some of my experience. But I don't want this to be my project - I've got my own -, but this is yours.
There is only one /boot/grub/grub.cfg. What makes me suspicious about the app to use for opening is that I also have a file called /boot/grub/grub.cfg.old.3992 with nothing in it. The only prompt I get for the file type is K3b, for starting a new file project. (I have the card at this time in an external card reader and am viewing the card on my desktop system, which is running Salix64 KDE 13.37.) I have tried opening the files in Kwrite and Kate, with no success, which would be similar to using Geany or Mousepad.
Edit:
Not really sure why the files are acting as they are on my system, but I finally managed to get the file open with vim:
Code: Select all
#
# 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
load_env
fi
set default="${saved_entry}"
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 load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
insmod jpeg
background_image -m stretch /boot/grub/salix.jpg
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Salix 13.37.0 GNU/Linux, with Linux 2.6.37.6-smp' --class salix --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
echo 'Loading Linux 2.6.37.6-smp ...'
linux /boot/vmlinuz-huge-smp-2.6.37.6-smp root=/dev/sdc1 ro vt.default_utf8=1 quiet
}
menuentry 'Salix 13.37.0 GNU/Linux, with Linux 2.6.37.6-smp (recovery mode)' --class salix --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
echo 'Loading Linux 2.6.37.6-smp ...'
linux /boot/vmlinuz-huge-smp-2.6.37.6-smp root=/dev/sdc1 ro single vt.default_utf8=1
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### 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 ###
I would like to thank you for your help. I have appreciated it. Believe it or not, I have learned a lot of new things. I can imagine how this process has been irritating for you - you have expressed that fact on a number of occasions. So if you are tired of helping me, as you seem to be expressing, that is perfectly legitimate. Let's keep the comments at a civilized level and just go our separate ways.
Re: Kernel panic at boot from CD to install GRUB.
Posted: 30. Mar 2012, 23:10
by Shador
globetrotterdk wrote:Shador wrote:I could find nothing in that output. What kind of controller is this? Is it a USB one?
As I have posted before, I have been unable to determine the controller due to a lack of documentation
OK, alright. Just digged out that old post of yours. So the card reader is connected as a USB device.
The only weird thing is that no host controller driver (like ohci, ehci, xhci, ...) is loaded although you obviously have USB interfaces. But this might work (actually it seems the same instructions as for USB booting apply here):
Code: Select all
mkinird -c -u -m ehci_hcd:uhci_hcd:ohci_hcd:xhci-hcd:usb-storage -w 10
You need to run this from the SD card, too. So e.g. chroot again. If you still want to tweak this some more feel free to do so (like output file -o, or e.g. xhci is for USB 3.0). But let's try this for a starting point.
globetrotterdk wrote: So if you are tired of helping me, as you seem to be expressing, that is perfectly legitimate.
Yes, I'm tired of some stuff. But I'm not tired of providng helping. Although it might seem like I'm contradicting myself here.
globetrotterdk wrote:Not really sure why the files are acting as they are on my system, but I finally managed to get the file open with vim:
This was more or less what was getting on my nerves.
Anyway, your grub.cfg does not yet contain an initrd and does not use UUID for the root partition. So be sure to run update-grub/grub-mkconfig again (chroot). Check the grub.cfg afterwards.
Re: Kernel panic at boot from CD to install GRUB.
Posted: 31. Mar 2012, 16:27
by globetrotterdk
OK, for some reason the SD card is now called /devsdb1 when I boot from the live system. So here is what I did:
Code: Select all
root[one]# mkdir /mnt/sdb1
root[one]# mount /dev/sdb1 /mnt/sdb1
root[one]# mount --bind /proc /mnt/sdb1/proc
root[one]# mount --bind /sys /mnt/sdb1/sys
root[one]# mount --bind /dev /mnt/sdb1/dev
root[one]# chroot /mnt/sdb1
root[/]# mkinird -c -u -m ehci_hcd:uhci_hcd:ohci_hcd:xhci-hcd:usb-storage -w 10
bash: mkinird: command not found
root[/]# mkinitrd -c -u -m ehci_hcd:uhci_hcd:ohci_hcd:xhci-hcd:usb-storage -w 10
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/host/uhci-hcd.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/pcmcia/pcmcia_core.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/pcmcia/pcmcia.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/mmc/core/mmc_core.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/ssb/ssb.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/host/ohci-hcd.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/storage/usb-storage.ko added.
11628 blocks
/boot/initrd.gz created.
Be sure to run lilo again if you use it.
root[/]# update-grub
Generating grub.cfg ...
Found background: /boot/grub/salix.jpg
Found linux image: /boot/vmlinuz-huge-smp-2.6.37.6-smp
done
Here is what the new grub.cfg file looks like:
Code: Select all
#
# 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
load_env
fi
set default="${saved_entry}"
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 load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
insmod jpeg
background_image -m stretch /boot/grub/salix.jpg
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Salix 13.37.0 GNU/Linux, with Linux 2.6.37.6-smp' --class salix --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
echo 'Loading Linux 2.6.37.6-smp ...'
linux /boot/vmlinuz-huge-smp-2.6.37.6-smp root=/dev/sdc1 ro vt.default_utf8=1 quiet
}
menuentry 'Salix 13.37.0 GNU/Linux, with Linux 2.6.37.6-smp (recovery mode)' --class salix --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd1,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
echo 'Loading Linux 2.6.37.6-smp ...'
linux /boot/vmlinuz-huge-smp-2.6.37.6-smp root=/dev/sdc1 ro single vt.default_utf8=1
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### 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 ###
I can't find any initrd in the file, but I can confirm that there is now a initrd.gz file in / on the SD card, as well as a new /boot/initrd-tree directory. I am unfortunately still getting kernel panics when i try to boot from the SD card. I am almost positive that the card reader should be supported by the ehci_hcd and ohci_hcd modules as the card reader is listed under Win XP as being USB 2 compatible, so that would make most sense. I'll do some more reading up on Grub, but I feel like we have hit a wall and I don't understand why.
Re: Kernel panic at boot from CD to install GRUB.
Posted: 31. Mar 2012, 16:44
by Shador
globetrotterdk wrote:I can't find any initrd in the file, but I can confirm that there is now a initrd.gz file in / on the SD card, as well as a new /boot/initrd-tree directory. I am unfortunately still getting kernel panics when i try to boot from the SD card. I am almost positive that the card reader should be supported by the ehci_hcd and ohci_hcd modules as the card reader is listed under Win XP as being USB 2 compatible, so that would make most sense. I'll do some more reading up on Grub, but I feel like we have hit a wall and I don't understand why.
No, problem, I know the cause. Grub ignores symlinks. I don't know wether that's true always, but in this case it is. So grub is actually seeing vmlinuz-huge-smp-2.6.37.6-smp. It's looking for a corresponding image, but finds none as the initrd is lacking the version string. This is probably going to work:
Code: Select all
mkinitrd -c -u -m ehci_hcd:uhci_hcd:ohci_hcd:xhci-hcd:usb-storage -w 10 -o /boot/initrd-2.6.37.6-smp
Possibly you need to create a symlink from config-2.6.37.6-smp to config-huge-2.6.37.6-smp. But I'm not sure whether grub2 actually needs that file.
Re: Kernel panic at boot from CD to install GRUB.
Posted: 1. Apr 2012, 11:18
by globetrotterdk
OK, here is the output:
Code: Select all
root[one]# mount --bind /proc /mnt/sdb1/proc
root[one]# mount --bind /sys /mnt/sdb1/sys
root[one]# mount --bind /dev /mnt/sdb1/dev
root[one]# chroot /mnt/sdb1
root[/]# mkinitrd -c -u -m ehci_hcd:uhci_hcd:ohci_hcd:xhci-hcd:usb-storage -w 10 -o /boot/initrd-2.6.37.6-smp
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/host/uhci-hcd.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/pcmcia/pcmcia_core.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/pcmcia/pcmcia.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/mmc/core/mmc_core.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/ssb/ssb.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/host/ohci-hcd.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/host/xhci-hcd.ko added.
OK: /lib/modules/2.6.37.6-smp/kernel/drivers/usb/storage/usb-storage.ko added.
11628 blocks
/boot/initrd-2.6.37.6-smp created.
Be sure to run lilo again if you use it.
root[/]# update-grub
Generating grub.cfg ...
Found background: /boot/grub/salix.jpg
Found linux image: /boot/vmlinuz-huge-smp-2.6.37.6-smp
Found initrd image: /boot/initrd-2.6.37.6-smp
done
Here is what the new grub.cfg file looks like:
Code: Select all
#
# 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
load_env
fi
set default="${saved_entry}"
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 load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
insmod jpeg
background_image -m stretch /boot/grub/salix.jpg
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Salix 13.37.0 GNU/Linux, with Linux 2.6.37.6-smp' --class salix --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
echo 'Loading Linux 2.6.37.6-smp ...'
linux /boot/vmlinuz-huge-smp-2.6.37.6-smp root=UUID=8719a6da-67e4-491c-bc85-569798593ee4 ro vt.default_utf8=1 quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-2.6.37.6-smp
}
menuentry 'Salix 13.37.0 GNU/Linux, with Linux 2.6.37.6-smp (recovery mode)' --class salix --class gnu-linux --class gnu --class os {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root 8719a6da-67e4-491c-bc85-569798593ee4
echo 'Loading Linux 2.6.37.6-smp ...'
linux /boot/vmlinuz-huge-smp-2.6.37.6-smp root=UUID=8719a6da-67e4-491c-bc85-569798593ee4 ro single vt.default_utf8=1
echo 'Loading initial ramdisk ...'
initrd /boot/initrd-2.6.37.6-smp
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### 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 ###
When I tried to boot from the card, there were a number of errors about modules already loaded and a complaint that the usb-storage module hadn't been loaded. At some point the whole thing dropped into a root shell. I have tried to find a log with the specifics of what happened, and even ran "cat" on the files to be sure that I wasn't just getting an empty file because of a permission problem, so I am pretty sure there isn't anything in the usual log files. Is there something in particular I should try if I were to try again to boot from the SD card and get dropped into the root shell?
Re: Kernel panic at boot from CD to install GRUB.
Posted: 1. Apr 2012, 13:25
by Shador
globetrotterdk wrote:Here is what the new grub.cfg file looks like:
Ok, that one's looking fine now.
globetrotterdk wrote:When I tried to boot from the card, there were a number of errors about modules already loaded and a complaint that the usb-storage module hadn't been loaded.
They should do no harm. You probably can try to remove some/all modules from the initrd once it's working as they seem to be built into the huge kernel. But you still need the initrd for the sleep and udev.
globetrotterdk wrote:I have tried to find a log with the specifics of what happened, and even ran "cat" on the files to be sure that I wasn't just getting an empty file because of a permission problem, so I am pretty sure there isn't anything in the usual log files.
No, there isn't. You're actually not yet in your normal system on the sd card. You're still in a temporary root, that's stored in memory and populated with a minimal system from the files in the initrd. The whole purpose of that temporary system is just to make your actual root accessible in non-trivial boot scenarios.
globetrotterdk wrote:Is there something in particular I should try if I were to try again to boot from the SD card and get dropped into the root shell?
Yes, it's probably time to do the changes I mentioned regarding fstab. Check the output of blkid to see which uuids go with your sd card then replace the devices (e.g. /dev/sdc1) with UUID=<uuid>.
If it still fails try running mount and blkid from the prompt you're being dropped at. Apart it's highly useful if you could catch the reason why you're being dropped to the shell or at least at which point that's happening (last, exact message before you're dropped would help here e.g.).
But I guess you're getting this:
Code: Select all
echo
echo "RESCUE mode"
echo
echo " You can try to fix or rescue your system now. If you want"
echo " to boot into your fixed system, mount your root filesystem"
echo " read-only under /mnt:"
echo
echo " # mount -o ro -t filesystem root_device /mnt"
echo
echo " Type 'exit' when things are done."
echo
or this:
Code: Select all
echo "ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead."
echo " You can try to fix it. Type 'exit' when things are done."
echo
Re: Kernel panic at boot from CD to install GRUB.
Posted: 1. Apr 2012, 14:20
by globetrotterdk
OK, here is the latest info I have. My fstab now looks like this:
Code: Select all
UUID=b5a3988d-923f-416f-a88c-03e55bcceaaf swap swap defaults 0 0
UUID=8719a6da-67e4-491c-bc85-569798593ee4 / ext4 noatime,defaults 1 1
UUID=3e840f9c-f99c-48f7-989c-62275f126c2e /home ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,users,rw,umask=00 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
The following is a large chunk of the errors I get when i boot from the SD card:
Code: Select all
/boot/initrd-2.6.37.6-smp Load kernel modules from initrd immage
ehci_hcd: module is already loaded:
uhci_hcd: "
ohci_hcd: module is already registered
modprobe: can't load module xhci-hcd: invalid argument
modprobe: can't load module usb-storage: invalid module format
mount: can't find /mnt in /etc/fstab
Error: No /sbin/init found on rootdev (or not mounted). Trouble ahead
You can try to fix it. Type 'exit' when things
are done.
/bin/sh: can't access tty; job control turned off.
/# exit
mount: mounting /sys on /mnt/sys failed: No such file or directory
mount: mounting /dev on /mnt/dev failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
I hope that I was able to note down the important bits that you need.
Re: Kernel panic at boot from CD to install GRUB.
Posted: 1. Apr 2012, 15:21
by Shador
globetrotterdk wrote:OK, here is the latest info I have. My fstab now looks like this:
OK, the uuid for root seems right at least.
globetrotterdk wrote:I hope that I was able to note down the important bits that you need.
Yes, thank you. Apparently mkinitrd was not able to determine the root dev/fs when it is generated and it doesn't try to parse the kernel arguments.
Anyway, if you run it like this, that should fix it:
Code: Select all
mkinitrd -c -k 2.6.37.6-smp -u -w 10 -f ext4 -r UUID=8719a6da-67e4-491c-bc85-569798593ee4 -o /boot/initrd-2.6.37.6-smp
If that doesn't work you can add the modules again, but I'm certain that they're not needed (with the huge kernel):
Code: Select all
mkinitrd -c -k 2.6.37.6-smp -u -m ehci_hcd:uhci_hcd:ohci_hcd:xhci-hcd:usb-storage -w 10 -f ext4 -r UUID=8719a6da-67e4-491c-bc85-569798593ee4 -o /boot/initrd-2.6.37.6-smp
Should you ever update the kernel or change other relevant parts of your system, you need to change the corresponding arguments (like -k and -o for kernel upgrade):