LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   problem to boot with 2.6.7 kernel (https://www.linuxquestions.org/questions/slackware-installation-40/problem-to-boot-with-2-6-7-kernel-199036/)

TroyCoX 06-29-2004 07:23 AM

problem to boot with 2.6.7 kernel
 
Hello there. I downloaded slack 10.0 and i install & compile kernel 2-6-7 from disk2. I have INTEL ICH5R chipset Both audio and Sata.My FS is ReiserFs and i try to make an initrd image to load the reiserfs libata and ata_piix.i execute this commands: mkinitrd -c -k 2.6.7 -m reiserfs:libata:ata_piix -f reiserfs -r /dev/sda2. i have the initrd in /boot
and lilo.conf looks like this:

image=/boot/vmlinuz
initrd=/boot/initrd.gz
label=2.6.7
read-only
so when the party begins i recieve this eror msg:

mount:mounting /dev/sda2 on /mnt failed:no such file or directory
error:mounting /dev/sda2 on /mnt failed: invalid argument
( i think it means in the /boot/initrd-tree directory but the /mnt is there)
/boot/initrd:exiting
mounted devfs on /dev
pivot_rooti: pivot_root:device or resourse busy

# <----- i think here prompts me to execute some commands but i dont know what to do


so any ideas?


P4 3.06 Ghz
gigabyte 8ik1100
seagate 80 gb sata
seagate 60 gb ata
maxtor 40 gb ata
512 ram single channel
OS: Slackware 10.0
Reiserfs
in Seagate sata HDD

Aussie 06-30-2004 06:41 PM

Yes, in 2.4.xx your SATA drive is seen as an IDE device (dev/hd#), and in 2.6.x you've built the libata modules which see SATA as scsi (/dev/sd#), your fstab probably has the drives listed as IDE devices as probably does your initrd.
My solution is to continue with the IDE device as libata is still beta software.

scsikid 07-04-2004 07:41 AM

i tried installing slackware on a seperate ide disk and mounting the raid array. so the story begins! i installed slackware 10 and it sounds like you got further than me. i loaded all necessary modules and i can even see the the raid0 configured disks as it should be, two 80gig seagates showing as one 140gig drive. i ran cfdisk on /dev/sda2. partioned it with logical partitions with /usr, /var, /var/log, /, /home and swap of course. they appear with sda2p5, sda2p6, and so on.
after writing this and exiting its like everything just disappeared.

i run mkfs.ext2, or mkfs.ext3, or mkfs.resierfs. try to format one of the partitions and i just get an error saying sda2p5 or 6.... etc. doesn't exist. so i try to format the whole damn thing, mkfs.reiserfs /dev/sda2 and it formats. heh, great! you would think... mount /dev/sda2 /mnt/sda2. so i cd to /mnt/sda2 and see lost+found. woo! something worked! lets create a file..... WRONG! INPUT OUTPUT ERRORS! what the heck!

my reason for writing this i suppose is to see if anyone else has got there raid array working with slackware 10. on an ICH5R chipset. i have tried 2.4.26 and that didnt work either.

sammut 07-06-2004 02:51 AM

Hi everybody,

I have the same problem with a sata hard disk. I use slackware 10 / Kernel 2.4.26 and the promise driver so I have in my fstab /dev/sda1, /dev/sda2, ... Now I want to use the Kernel 2.6. I make the initrd with mkinitrd : mkinitrd -c -k 2.6.7 -m scsi_mod:libata:sata_promise -f ext3 -r /dev/sda7 -o initrd-2.6.7.img and when I boot I have these messages :

# Modules loaded successfully ...
ata1: SATA max UDMA/133
ata2: SATA max UDMA/133
ata1: no device found
scsi0: sata_promise
ata2: dev 0 ATA, max UDMA/133, ...
ata2: dev 0 configured for UDMA/133
scsi1: sata_promise
VENDOR: ATA MODEL: ST3120026AS REV: 3.05
TYPE: Direct-Access
mount: Mounting /dev/sda7 on /mnt failed: No such device or address
mount: Mounting /dev/sda7 on /mnt failed: Invalid argument
mount: Mounting /dev/sda7 on /mnt failed: Invalid argument
/boot/initrd.gz : exiting
pivot_root : Device or ressource busy

Thanks for your help.

movitto 02-19-2006 04:51 AM

Is this issue resolved? If so please relay how you fixed it. I'm having a similar problem with Slackwawre 10, but instead of a sata drive its a scsi drive initrd is complaining of.
Same error though:
"mount: mounting /dev/sda1 on /mnt failed. No such file or directory"

initrd exits and gives me a basic shell w/ root access and I can verify that /dev/sda1 is actually there. Possibly whatever you did to fix your issue may shed some light on my solution. Thank you.

kevkim55 02-19-2006 05:25 AM

Could you edit the linuxrc file residing in the initrd.gz image and add the following line after the line modprobe <ata-module-name> line:
sleep 15
This line tells the kernel to sleep for 15 seconds bofore it continues with the task of mounting the root device. I think, what is happening there is that - when the module is loaded it takes some time for the module to detect the device correctly, while in the mean time the kernel tries to load the root device and doesn't find the device files /dev/sda* and panics. Possibly by the time the device files are created the kernel must have already tried mouting the root system and given up !
You will have to gunzip the initrd.gz and mount it as a loopback filesystem if it is a filesystem image or extract it if it is a cpio archive. After editing the file linuxrc, you'll have to reverse the steps i.e cpio or unmount the loop filesystem and then gzip it into initrd.gz.
Ldemm know if any of you have been successful with this.

lestoil 02-19-2006 12:22 PM

Troycox you need root = line in lilo.conf. Good luck.

lestoil 02-19-2006 12:25 PM

Sammut mkinitrd statement for ext3 should have jbd:ext3. ext3 needs jbd. Good luck.

movitto 02-19-2006 04:03 PM

kevkim55, I tried you suggestion. I midified the linuxrc file in the /boot/initrd-tree directory (which was accessed by booting using knoppix, mounting my root fs, and chrooting into it), and made an initrd image for my kernel. I then ensured lilo.conf was correct and ran lilo. But to my dispair, the problem still persists. I see the sleep executing (i set it for 30s) on the boot screen, then almost immediately afterwords. I get "cannot mount /dev/sda1 on /mnt no such file or directory". I'm almost positive that all the required modules are loaded (I see that the devices are recognized on the boot up text as it scrolls by). Why is it not recognizing the /dev/sda1 device though I can verify that it is there? Thanks for everyone's help.

kevkim55 02-20-2006 01:16 AM

movitto, you said you can verify that the device node /dev/sda1 exists after the init drops you to shell prompt. If the device file /dev/sda1 exists then, is it possible for you to fdisk on /dev/sda or even mount it manually ?

movitto 02-20-2006 02:05 PM

First of all, thank you for your responses. It is still not working but I am getting closer.

When I am presented with the prompt I have tried running mount manually, but this returns with the same error. fdisk isn't present in my initrd image, I could try adding it, but I'm not sure it will run as it may require libraries that are not implace on this image.

When debugging the output, I realized that the scsi device that was being recognized was not my hard drives but rather a scsi tape drive. The initrd disk was having trouble loading the aic7xxx module that it needed to recognize the drive. After a little debugging, I found that this was because, I had not loaded the scsi_transport_spi module (which aic7xxx required) after doing so, recreating the ramdisk, and rebooting, I saw the drive was recognized (the initrd process stopped for a little while to fully recognize it). But to no avail, the problem still persists.

Upon closer examination of the output, I saw that immediately after the drive appeared on the bootup output, I get the following message: "sda: unknown partition table". This does not cause initrd to stop, but I strongly believe this is the problem. But I have no idea how to fix it.

It would also be probably good to mention that the scsi device that I'm trying to boot from is actually a scsi array which requires the aic7xxx and megaraid drivers. All the required drivers are loaded successfully on the bootup processes (afterall I see all the information about the drive in the startup output) but the initrd still gives me the error "unable to mount /dev/sda1 on /mnt: no such device or address" before stopping the boot process and giving me the limited prompt.

Finally, before I found this thread, I started another relating to this problem. You can visit it at: http://www.linuxquestions.org/questi....php?p=2111298
It may offer a little more insight into my problem.

I appreciate all the help.

movitto 02-20-2006 02:05 PM

sorry double post

kevkim55 02-21-2006 01:30 AM

movitto,
If it is not troublesome, could you try my suggestion again ? Ask the init to sleep for few seconds after every module (related to the HD). I have had the same problem with a SCSI disk connected thru' firewire interface. I'd to insert 'sleep' after evry related module which for ieee1394 is 14 seconds and for others 3 seconds each. I couldn't get it to work with less than 14 secs for ieee1394 !
Is Knoppix able to access the disk in question ? If yep, why not lsmod and find out what modules are required to make it work.
Finally, a silly question ! Do you have modules scsi_mod, sd_mod loaded as well thru' initrd ?

PS: You can make linuxrc to be more verbose by adding echo "something..." lines. Take a look at the lilnes that do the actual pivot_root which are found at the end of linuxrc file. You might wanna add some echo "..." lines there too, to see whatz really going on.

movitto 02-21-2006 10:40 AM

kevkin55, thank you for your response.
1. I will try the sleep suggestion again (as soon as I get home later on today)
2. I also thought of copying the modules for the knoppix cd and enabling them in my initrd. The thing is that I'm trying to get my 2.6 kernel booted up and not the 2.4 The 2.4 kernel is another problem all together, whenever I place and enable the modules in my initrd fs, initrd complains on boot up about each module not being of "ELF" format, and thus it does not boot any module. Additionally, I tried booting the latest Knoppix version (3.9 as opposed to 3.3 which I was booting) that comes with the 2.6 kernel, but I always get bootup errors when I use the new cd. Because I really dont want to debug knoppix just so I can debug my problem, I am not going to bother.
3. It may be a silly question but I dont have an answer for you. I'm not sure if I am loading scsi_mod and sd_mod on startup. The thing is, is that I dont recall actually seeing these modules in the 2.6 kernel (are they 2.4 specific?). If I need them, then why does the initrd recognize the device on bootup?

Thank you for your responses.

lestoil 02-21-2006 10:59 AM

The SW >=10.1 kernels sata.i for 2.4.31 and test26.s(2.6.13) are supposed to work well with sata setups. SW Current event has 2.6.14-x kernel. Hope you get a chance to try those kernels. Review Pat's 2.6.13 kernel config on the kernel testing directory SW10.2 download site(any of the mirrors) for handy guide. Good luck.

kevkim55 02-22-2006 03:51 AM

Quote:

2. I also thought of copying the modules for the knoppix cd and enabling them in my initrd. The thing is that I'm trying to get my 2.6 kernel booted up and not the 2.4 The 2.4 kernel is another problem all together, whenever I place and enable the modules in my initrd fs, initrd complains on boot up about each module not being of "ELF" format, and thus it does not boot any module. Additionally, I tried booting the latest Knoppix version (3.9 as opposed to 3.3 which I was booting) that comes with the 2.6 kernel, but I always get bootup errors when I use the new cd. Because I really dont want to debug knoppix just so I can debug my problem, I am not going to bother.
movitto, I wasn't talking 'bout copying the modules form knoppix to you ilnux installtion. As you already know, that wouldn't work because of version and symbols mismatch/missing. I suggested that you simply boot into knoppix and if you disk work fine while in knoppix, note down the modules loaded by doing an lsmod. Create mkinitrd to include the modules you have just noted from knoppix and that might get it kicking.

Quote:

3. It may be a silly question but I dont have an answer for you. I'm not sure if I am loading scsi_mod and sd_mod on startup. The thing is, is that I dont recall actually seeing these modules in the 2.6 kernel (are they 2.4 specific?). If I need them, then why does the initrd recognize the device on bootup?
ata modules would recognize and initialize the disk drive. Since your drive is a ATA/SATA drive, the kernel 2.6 would configure it as a SCSI drive and hence, scsi_mod and sd_mod become really important. Itz these modules which would make the disk become available as a SCSI disk and then only the device files /dev/sda* would be created. And oh yes ! These modules are very much there in kernel 2.6 ! :-) And, these are the modules that make the non-IDE drives work !!

So, check the contents of initrd and double check that the required modules are really there. Don't forget the filesystem modules and the interface modules as well.

If this fails, it would be worthwhile to compile your kernel enabling suitable debugging options under Kernel Hacking. This would print a lot of debugging messages and might just reveal whatz going wrong !

movitto 03-15-2006 09:54 PM

Sorry for the delayed response. Been busy with school and work.

1. I tried the sleep suggestion once again, but to no avail. After the loop that runs through load_kernel_modules and loads all the modules, I put a "sleep 120". The initrd paused for 2 whole minutes before continuing but still failed to boot. Regardless, I'm still not fully sure how this would work. My initrd image recognizes the device just fine. I see it recognized on the startup output. The catch is that before I load the aic7xxx module needed to recognize the device, I need to load scsi_transport_spi and scsi_debug. While loading scsi debug I get the following error: "sda uknown partition table". The boot continues but once again stops on "Mounting /dev/sda1 on /mnt no such device or address".

2. I searched my entire system for sd_mod and scsi_mod but could not find them, even in the /lib/modules/2.6.14.6 directory. I believe this is because they are built into my kernel. (can this be the problem?) I load the following modules in the following order: jdb:ext3:scsi_debug:scsi_transport_spi:aic7xxx Needless to say, my rootfs is ext3.
What I was trying to say with the Knoppix issue was not that I wanted to copy the modules from the Knoppix 2.4 cd, but that there seems to be a big difference between the 2.4 and 2.6 knoppix modules, and I could not determine which 2.6 modules I needed from running lsmod from a 2.4 live cd. As mentioned, I tried the latest knoppix release which incorporates the 2.6 kernel, but for some reason or another this cd failed to boot (something about cloop).

3. One interesting thing that I noticed was that in the linuxrc file in the initrd image, there is the following:
# Handle LVM
if [ -x /sbin/vgscan ] ; then
/sbin/vgscan -mknodes
sleep 20
/sbin/vgcheck
fi
The thing is that in the image the /sbin dir does not even exist. Do I need this utility to manage the LVM of the raid array?

4. Maybe my system specs will give someone an idea. Gateway ALR 8200. Adaptec AIC-7890 scsi raid array. (Do I need anything special for my raid array? In the knoppix 2.4 kernel, the megaraid module was loaded, but in my 2.6 modules, there was megaraid_mm, megaraid_mbox, and megaraid_sas. I have tried loading all three of these, but it does not help the bootup process) Slack Linux v10.0 Trying to boot kernel 2.6.14.6 downloaded in a package with corresponding kernel modules and headers from slackware.it/en. From the package description "If you need more advanced filesystems, or need to load support for a SCSI or other controller, then you'll need to load one or more kernel modules using an initial ramdisk, or initrd." So I'm sure it can be done.


Really lost on this one. Thanks for all the help so far.

kevkim55 03-18-2006 01:39 AM

After having come across the many installtion/boot woes Slackware, I decided to try it out myself. Installed Slack 10.1 on USB Drive. Had real f*** fun booting ! Spent two evenings after this pesky boot problem. Error was the same as has been repeated many a times in this thread !

After a bit of investigating I realized that somehow the device nodes for the disk were not created and so the error. Created an initrd with the device nodes copied from /dev/ directory. Booted off, believing this was gonna make it work. Surprise ! Dispappointment awaited me ! Same f** lil' error ! Checked if the device nodes were there - they were very much there ! Yet the error - device /dev/sda6 is not a block device !

Bit more playing and I relized that somehow the insertion of modules and later recognition/initialization of the disk by the modules didn't result in the creation of device nodes. An initrd image containing pre-created device nodes, didn't make a difference as the pre-created device nodes were somehow not linked to the actual device.

Didn't wanna go too deep with kernel 2.4. Compiled kernel 2.6 which greeted me with the same problem.

Realized that I was gonna need udev and hotplug support built into the initrd image which would take care of the dynamic creation of the device nodes, I decided to use the mkinitrd package fromt SuSE10.0. I did just that, created an initrd using SuSE's mkinitrd which contains udev and hotplug support. Voila !! No trace of the f*** error message. I was able to boot into Slack 10.1 without any problem.

So guys, I believe there's not much you can do if you've included all the support modules and yet are not able to boot in. Unless you decide to alter the source code ! I'd suggest you include udev/hotplug support to do the necessary initialization and subsequent creation of the device nodes dynamically. It doesn't have to be SuSE's mkinitrd, yet atleast you know about an mkinitrd that would make it work.

I suggest you guys to try this method and see if this works. Of-course, you're likely to encounter hurdles about some missing config files when you run SuSE's mkinitrd as it expects some config files in the default location. I suggest you read the SuSE's mkinitrd manual which, does mention the config files along with their default location. So, it is just a matter of creating those files with just the necessary variables which, again is talked about in the manual. There's /etc/sysconfig/kernel in SuSE10.0 which defines a variable that stores the modules to include in initrd image. Certainly, this can be over-ridden by specifying the modules to include as the command line paramenters of mkinitrd command.

Anyone's interested in trying this out ???

movitto 03-19-2006 05:41 PM

I give up :-( After a while of fiddling around with many possible solutions, I downloaded the latest version of the kernel which I originally installed on my system (scsi2.s v.2.4.31) from the official slackware site and installed it with the corresponding modules to get my machine up and running again. One interesting thing to notice is that no 2.6 kernel or distro which I used could mount my scsi raid array properly. I have tried multiple precompiled 2.6 kernels from slackware packages, Knoppix, Slax, and other live cd's but with no luck. 2.6 just does not want to recognize my drives. While trying to resolve the problem, I found that there was a bit of work done concering scsi devices on the latest kernel, 2.6.15 (http://lwn.net/Articles/167711/). Possibly some of this work involved fixing problems such as mine. Regardless, I'll probably stick with my current kernel for a while, possibly compiling a new kernel once more from the scsi2.s config file + some modifications inorder to get my dual processor setup working (as of now, only 1 processor is being recognized. hopefully an easy fix). While this is the first linux problem that has 'defeated' me (eg. I couldn't resolve it yet) I'm not discouraged as I've learnt much in the process. Thanks greatly to everyone who has helped me, and I hope this thread helps someone out in the future in a similar situation. Cheers.


All times are GMT -5. The time now is 04:38 PM.