Jump to content

Kernel panic: No init found Trying to go IDE->SCSI


joshio
 Share

Recommended Posts

I am very new to Linux, so I'm sure I missed something obvious along my path (or completely and totally screwed something up). I am running Mandrake 10.1 and I am migrating from an older IDE hard drive to an older set of SCSI hard drives attached to a sym53c895 SCSI adapter. Running "modprobe sym53c8xx" loads the drivers correctly and I can see /dev/sda and /dev/sdb and all of the respective partitions. So, since I wanted to be able to boot from these devices, I ran "mkinitrd --with sym53c8xx /boot/initrd-2.6.8.1-12mdk-new.img 2.6.8.1-12mdk", which appeared to run successfully. I can't remember if there was something else I did along the way, but somehow I eventually got to the point where I now see the sym53c8xx driver loading at boot. However, after a boot, I do not see /dev/sda or /dev/sdb. I can run "modprobe -r sym53c8xx" and then "modprobe sym53c8xx" and this restores /dev/sda and /dev/sdb, but this is definately not what I am looking for. Here is everything that appears to be related to SCSI from /var/log/messages:

 

Jul 25 18:07:33 localhost kernel: SCSI subsystem initialized
Jul 25 18:07:33 localhost kernel: sym0: <895> rev 0x2 at pci 0000:00:0f.0 irq 5
Jul 25 18:07:33 localhost kernel: sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking
Jul 25 18:07:33 localhost kernel: sym0: SCSI BUS has been reset.
Jul 25 18:07:33 localhost kernel: scsi0 : sym-2.1.18j
Jul 25 18:07:33 localhost kernel:   Vendor: IBM	   Model: IC35L036UCD210-0  Rev: S5BS
Jul 25 18:07:33 localhost kernel:   Type:   Direct-Access					  ANSI SCSI revision: 03
Jul 25 18:07:33 localhost kernel: sym0:0:0: tagged command queuing enabled, command queue depth 16.
Jul 25 18:07:33 localhost kernel: scsi(0:0:0:0): Beginning Domain Validation
Jul 25 18:07:33 localhost kernel: sym0:0: wide asynchronous.
Jul 25 18:07:33 localhost kernel: sym0:0: FAST-40 WIDE SCSI 80.0 MB/s ST (25.0 ns, offset 31)
Jul 25 18:07:33 localhost kernel: scsi(0:0:0:0): Ending Domain Validation
Jul 25 18:07:33 localhost kernel:   Vendor: IBM	   Model: IC35L036UCD210-0  Rev: S5BS
Jul 25 18:07:33 localhost kernel:   Type:   Direct-Access					  ANSI SCSI revision: 03
Jul 25 18:07:33 localhost kernel: sym0:1:0: tagged command queuing enabled, command queue depth 16.
Jul 25 18:07:33 localhost kernel: scsi(0:0:1:0): Beginning Domain Validation
Jul 25 18:07:33 localhost kernel: sym0:1: wide asynchronous.
Jul 25 18:07:33 localhost kernel: sym0:1: FAST-40 WIDE SCSI 80.0 MB/s ST (25.0 ns, offset 31)
Jul 25 18:07:33 localhost kernel: scsi(0:0:1:0): Ending Domain Validation

 

Here is an lsmod initially after boot:

Module				  Size  Used by
nfsd				  189408  8
exportfs				4736  1 nfsd
lockd				  58344  2 nfsd
sunrpc				127652  2 nfsd,lockd
md5					 3584  1
ipv6				  230916  16
rfcomm				 32348  0
l2cap				  19876  5 rfcomm
bluetooth			  39076  4 rfcomm,l2cap
maestro3			   32104  0
soundcore			   7008  1 maestro3
ac97_codec			 16844  1 maestro3
af_packet			  16072  2
usbhid				 41088  0
floppy				 55088  0
ide-cd				 37280  0
cdrom				  37724  1 ide-cd
loop				   12520  0
intel-agp			  19584  1
agpgart				27752  1 intel-agp
uhci-hcd			   28752  0
usbcore			   103172  4 usbhid,uhci-hcd
e100				   28160  0
mii					 4224  1 e100
sym53c8xx			  75860  0
scsi_transport_spi	 11200  1 sym53c8xx
scsi_mod			  103404  2 sym53c8xx,scsi_transport_spi
ext3				  120680  2
jbd					49080  1 ext3

 

And again after removing/readding with modprobe:

 

Module				  Size  Used by
sd_mod				 19232  0
sym53c8xx			  76212  0
scsi_transport_spi	 11424  1 sym53c8xx
scsi_mod			  104044  3 sd_mod,sym53c8xx,scsi_transport_spi
nfsd				  189408  8
exportfs				4736  1 nfsd
lockd				  58344  2 nfsd
sunrpc				127652  2 nfsd,lockd
md5					 3584  1
ipv6				  230916  16
rfcomm				 32348  0
l2cap				  19876  5 rfcomm
bluetooth			  39076  4 rfcomm,l2cap
maestro3			   32104  0
soundcore			   7008  1 maestro3
ac97_codec			 16844  1 maestro3
af_packet			  16072  2
usbhid				 41088  0
floppy				 55088  0
ide-cd				 37280  0
cdrom				  37724  1 ide-cd
loop				   12520  0
intel-agp			  19584  1
agpgart				27752  1 intel-agp
uhci-hcd			   28752  0
usbcore			   103172  4 usbhid,uhci-hcd
e100				   28160  0
mii					 4224  1 e100
ext3				  120680  2
jbd					49080  1 ext3

 

I'm sure there is something amazingly obvious that I have either left out or done wrong, so please go easy on me here. Thanks in advance for any tips/suggestions you can offer.

Edited by joshio
Link to comment
Share on other sites

If Mandrake 10.1 has an /etc/modprobe.preload file, try putting:

 

sym53c8xx

 

at the end of the file. If that doesn't work, you can always put the following at the end of /etc/rc.d/rc.local:

 

modprobe -r sym53c8xx

modprobe sym53c8xx

 

or whatever are the commands you run after a boot to get the scsi drives detected. That's probably the easiest since this appears to be a timing issue with something interfering with the sym53c8xx locking onto the the scsi adapter but apparently goes away later in the boot process. Since rc.local is the last init script to run, the conflict should be gone when you run the commands from there.

Edited by pmpatrick
Link to comment
Share on other sites

I tried adding the sym53c8xx to /etc/modprobe.preload with no success. Since I want to get this system to be able to boot from the SCSI hard drives, will adding the modprobe commands to rc.local achieve this?

 

I was also considering changing linuxrc inside of initrd so that it actually runs "modprobe sym53c8xx" rather than the 3 insmod commands that were added when I ran mkinitrd.

 

I will perform some more testing tomorrow to see if I can get this to work correctly.

Link to comment
Share on other sites

Since I want to get this system to be able to boot from the SCSI hard drives, will adding the modprobe commands to rc.local achieve this?

Nope. It fixes the problen after the fact.

 

I was also considering changing linuxrc inside of initrd so that it actually runs "modprobe sym53c8xx" rather than the 3 insmod commands that were added when I ran mkinitrd.

 

I think that's a good idea; the problen probably lies in the initrd you made.

Link to comment
Share on other sites

  • 3 weeks later...
I think that's a good idea; the problen probably lies in the initrd you made.

Ok, so I finally had a chance to rebuild the initrd and it now appears to work perfectly. I now have all of the /dev/sda's after boot and I dd'ed everything from the IDE drive to the first SCSI drive. My next question is: what configs will I have to change to tell Mandrake to boot from /dev/sda rather than /dev/hda? As long as I keep both hard drives plugged in, the system will boot from SCSI. However, if I remove the IDE drive, the system fails boot with "Kernel panic: No init found. Try passing init= option to kernel." (Apparently it starts booting from the SCSI drive, and then at some point in the boot process is pointing back to the IDE drive?) Thanks again for your help!

Link to comment
Share on other sites

  • 3 weeks later...
Ok, so I finally had a chance to rebuild the initrd and it now appears to work perfectly. I now have all of the /dev/sda's after boot and I dd'ed everything from the IDE drive to the first SCSI drive. My next question is: what configs will I have to change to tell Mandrake to boot from /dev/sda rather than /dev/hda? As long as I keep both hard drives plugged in, the system will boot from SCSI. However, if I remove the IDE drive, the system fails boot with "Kernel panic: No init found. Try passing init= option to kernel." (Apparently it starts booting from the SCSI drive, and then at some point in the boot process is pointing back to the IDE drive?) Thanks again for your help!

 

Allright, so I tried several things, I rebuilt my initrd countless times and screwed this thing up multiple times. It is now working to the point where I have /dev/sda1 set up in fstab, and the system boots happily that way. However, it still requires the IDE drive to boot for some reason. Here are the last few lines of boot code that I get if I disconnnect the IDE drive:

 

Attached scsi disk sda at scsi0, channel 0, id 0, lun 0

Loading jbd.ko module

Loading ext3.ko module

Mounting /proc filesystem

Mounting sysfs

Creating device files

mounting tmpfs on /dev

starting udev

Creating root device

Mounting root filesystem

mount: error 6 mounting ext3 flags defaults

well, retrying without the option flags

mount: error 6 mounting ext3

well, retrying read-only without any flag

mount: error 6 mounting ext3

pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2

umount /initrd/sys failed: 2

umount /initrd/proc failed: 2

Initrd finished

Freeing unused kernel memory: 200k freed

Kernel panic: No init found. Try passing init= option to kernel.

 

And here are the lines that appear to correspond from linuxrc

 

cho Mounting /proc filesystem

mount -t proc /proc /proc

echo Mounting sysfs

mount -t sysfs none /sys

echo Creating device files

mountdev size=1M,mode=0755

echo starting udev

udevstart

echo -n /sbin/hotplug > /proc/sys/kernel/hotplug

echo Creating root device

mkrootdev /dev/root

echo Mounting root filesystem

mount -o defaults --ro -t ext3 /dev/root /sysroot

echo 0x0100 > /proc/sys/kernel/real-root-dev

pivot_root /sysroot /sysroot/initrd

umount /initrd/sys

umount /initrd/proc

echo Initrd finished

 

What am I doing wrong here?

Edited by joshio
Link to comment
Share on other sites

The only thing you should ever have to change is /etc/fstab and either grub/lilo config for the boot loader. This is either /etc/lilo.conf or /boot/grub/menu.lst (or on some distros /boot/grub/grub.conf).

 

Then you have to run lilo to after editing /etc/lilo.conf to reinstall the boot loader. With grub, you'd have to install it to the MBR again but this time on /dev/sda since you will remove the IDE drive later.

 

It's a case of in either of these files changing the reference to /dev/hda to /dev/sda, but also, to ensure that the partitions are also either the same as on /dev/hda in terms of numbering, or to ensure that if you did change the numbering when moving the data, that you make sure /etc/fstab and the boot loader configuration knows this.

Link to comment
Share on other sites

The only thing you should ever have to change is /etc/fstab and either grub/lilo config for the boot loader. This is either /etc/lilo.conf or /boot/grub/menu.lst (or on some distros /boot/grub/grub.conf).

 

Then you have to run lilo to after editing /etc/lilo.conf to reinstall the boot loader. With grub, you'd have to install it to the MBR again but this time on /dev/sda since you will remove the IDE drive later.

 

It's a case of in either of these files changing the reference to /dev/hda to /dev/sda, but also, to ensure that the partitions are also either the same as on /dev/hda in terms of numbering, or to ensure that if you did change the numbering when moving the data, that you make sure /etc/fstab and the boot loader configuration knows this.

 

Well, that's what I assumed. What I did after getting initrd set up the way I thought it should be was to boot from a floppy with the appropriate drivers and I ran 'dd if=/dev/discs/disc0/disc of=/dev/discs/disc1/disc bs=1024k'

 

I went through the steps you mentioned above, changing fstab and lilo.conf and then I ran lilo again. I had to have missed something obvious along the trail, however. Here is my current partition table from /dev/sda

Disk /dev/sda: 36.7 GB, 36703918080 bytes

240 heads, 63 sectors/track, 4741 cylinders

Units = cylinders of 15120 * 512 = 7741440 bytes

 

Device Boot Start End Blocks Id System

/dev/sda1 * 1 812 6138688+ 83 Linux

/dev/sda2 813 1756 7136640 5 Extended

/dev/sda5 813 960 1118848+ 82 Linux swap

/dev/sda6 961 1756 6017728+ 83 Linux

 

Here is my /etc/fstab

/dev/sda1 / ext3 defaults 1 1

/dev/sda6 /home ext3 defaults 1 2

none /proc proc defaults 0 0

/dev/sda5 swap swap defaults 0 0

/dev/fd0 /mnt/floppy auto umask=0,user,iocharset=iso8859-1,sync,codepage=850,noa

uto,exec,users 0 0

/dev/hdb /mnt/cdrom auto umask=0,user,iocharset=iso8859-1,sync,codepage=850,noau

to,ro,exec,users 0 0

 

And here is /etc/lilo.conf

# File generated by DrakX/drakboot

# WARNING: do not forget to run lilo after modifying this file

 

default="linux-console"

boot=/dev/sda

map=/boot/map

install=menu

keytable=/boot/us.klt

prompt

nowarn

timeout=50

message=/boot/message

menu-scheme=wb:bw:wb:bw

image=/boot/vmlinuz

label="linux-console"

root=/dev/sda1

initrd=/boot/initrd.img

append="acpi=ht resume=/dev/sda5 console=ttyS0,9600"

read-only

 

I'm using the console statement because I don't have a monitor hooked up to this box, I'm just using the serial port along with hypertrm from my laptop. I'm going to try running lilo again to see if maybe it isn't taking correctly or something, and I'll post the results of that later.

Link to comment
Share on other sites

Ok, so I uninstalled and reinstalled Lilo

[root@localhost etc]# lilo -v -v -U

LILO version 22.5.9, Copyright © 1992-1998 Werner Almesberger

Development beyond version 21 Copyright © 1999-2004 John Coffman

Released 08-Apr-2004, and compiled at 16:42:15 on Oct 6 2004

 

Reading boot sector from /dev/sda

pf_hard_disk_scan: ndevs=2

0300 3F623F61 /dev/hda

0800 6F46E653 /dev/sda

device codes (user assigned pf) = 0

device codes (user assigned) = 0

device codes (BIOS assigned) = 1

device codes (canonical) = 3

Reading old boot sector.

Restoring old boot sector.

 

[root@localhost etc]# lilo -v -v

LILO version 22.5.9, Copyright © 1992-1998 Werner Almesberger

Development beyond version 21 Copyright © 1999-2004 John Coffman

Released 08-Apr-2004, and compiled at 16:42:15 on Oct 6 2004

 

raid_setup returns offset = 00000000 ndisk = 0

BIOS VolumeID Device

Reading boot sector from /dev/sda

pf_hard_disk_scan: ndevs=2

/boot/boot.0800 exists - no master disk volume ID record backup copy made.

0300 3F623F61 /dev/hda

0800 3D7ACE26 /dev/sda

device codes (user assigned pf) = 0

device codes (user assigned) = 0

device codes (BIOS assigned) = 1

device codes (canonical) = 3

mode = 0x80, columns = 15, rows = 25, page = 42

Using MENU secondary loader

Calling map_insert_data

Secondary loader: 18 sectors (0x3400 dataend).

bios_boot = 0x81 bios_map = 0x80 map==boot = 0 map S/N: 3F623F61

Mapping message file /boot/message -> message-text

Calling map_insert_file

Message: 1 sector.

BIOS data check was okay on the last boot

 

Boot image: /boot/vmlinuz -> vmlinuz-2.6.8.1-12mdk

Setup length is 10 sectors.

Mapped 2554 sectors.

Mapping RAM disk /boot/initrd.img -> initrd-2.6.8.1-12mdk.img

RAM disk: 486 sectors.

Added linux-console *

 

Boot image: /boot/vmlinuz -> vmlinuz-2.6.8.1-12mdk

Setup length is 10 sectors.

Mapped 2554 sectors.

Mapping RAM disk /boot/initrd.img -> initrd-2.6.8.1-12mdk.img

RAM disk: 486 sectors.

Added linux

 

Boot image: /boot/vmlinuz -> vmlinuz-2.6.8.1-12mdk

Setup length is 10 sectors.

Mapped 2554 sectors.

Mapping RAM disk /boot/initrd.img -> initrd-2.6.8.1-12mdk.img

RAM disk: 486 sectors.

Added failsafe

 

BIOS VolumeID Device

80 3F623F61 0300

81 3D7ACE26 0800

Writing boot sector.

/boot/boot.0800 exists - no boot sector backup copy made.

Map file size: 64000 bytes.

RAID device mask 0x0000

[root@localhost etc]#

 

Now when I boot all I see is

System Now Booting ...

L 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99

99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99

99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 9

9 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99

99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99

99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 9

9 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99

99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99

99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 9

9 99 99 99 99 99 99 99 99 99 99

 

What does this mean?

Link to comment
Share on other sites

The sequence of 9's means that LILO is not properly installed, probably because the MBR isn't directly accessible when you send your /sbin/lilo

The reasons might be quite a few, but I really cannot help much- the last time I touched LILO was some four and a half years ago. Since then I use grub and nothing else than that (and that does not mean you have to do the same, of course...).

Since I only have experience with Adaptec SCSI cards (3930,3940,39160...) I do not know if your card needs some special BIOS settings to boot Linux- I guess not, but I might be wrong.

Edited by scarecrow
Link to comment
Share on other sites

I definately wouldn't mind giving grub a try, lilo isn't really usable when using the serial cable anyway (I just get a bunch of gibberish on the screen). The thing I don't understand is that the SCSI drive boots just fine after a dd from the IDE drive. It's just that when I reinstall lilo after booting back up that it does this. I'll see if I can muddle my way through getting grub set up tomorrow and see if that changes anything for me. Thanks!

Link to comment
Share on other sites

So I tried to make a grub config, and I installed grub. Now, I see the grub menu (I think) starting, but the system never boots.

 

Here is the last thing that I see from grub:

System Now Booting ...GRUB Loading stage1.5.

 

 

GRUB loading, please wait...

 

If I type, I see the cursor moving, and if I type and press enter, I see the cursor moving alot, but since I'm using the console port, I only get plain text, where grub must be trying to draw out a pseudo graphical menu which I never get. So, I've obviously not set up my config correctly, but I honestly understand grub's config less than lilo's, so if someone can give me some pointers, that would be great. I tried going over the man page, but when it starts talking about grub's device mapping table, I'm pretty much lost. That plus the fact that I can't seem to see grub's output doesn't help at all.

 

Is there a way that I can make grub just dump plain text rather than trying to draw a menu?

Link to comment
Share on other sites

Grub's not completely loading properly. When you've attempted to install lilo/grub, were you chrooted into your Linux environment?

 

I would be tempted to boot from the Mandriva CD in rescue mode, with the IDE disk removed. Then I would install lilo or grub depending on your preference. As lilo would have been easier, what you should do is mount your partitions, mainly the / partition. /home really isn't required to mount for installing the boot loader, but if you have other separate partitions for /usr or /var for example, you will need to mount these. Anyway, assuming that you only have swap, / and /home, do this:

 

mkdir /mnt/mandriva
mount /dev/sdax /mnt/mandriva
mount -t proc proc /mnt/mandriva/proc
chroot /mnt/mandriva /bin/bash
source /etc/profile

 

replace /dev/sdax with the number of the partition where / was copied to. Then, after you've done this, you can reinstall lilo correctly, or try and give grub another whirl at getting it written properly to the MBR.

Link to comment
Share on other sites

I'm still working on this. I am a little limited with this piece of hardware, which may be where all of my headaches originate anyway. Just a little history, this is a Cisco Content Engine 560, and it does not have a video card (well, it has integrated video, but there is just a header on the motherboard which I have not been able to determine the pinout of), and best I can tell, it can only boot from either floppy or SCSI. I found this http://sourceforge.net/projects/btmgr/, which I assume I can use to bootstrap a CD from (since there is an IDE header, I just can't seem to boot from it). This all depends on whether everything will work ok with my serial console cable, but I'll see if I can make it work. Thanks for your suggestion, and I'll get back once I've been able to test this. Thanks!

Link to comment
Share on other sites

Ok, whew. Finally got it. For some reason, I couldn't get the boot manager to work, and I ended up using a Windows 98 boot floppy (lol!) and loadlin. I didn't have anything important on this box, so I actually just reinstalled from scratch and everything looks beautiful now. Thanks for all of your help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...