LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   IOCTL problem in kernel, does not load root fs (http://www.linuxquestions.org/questions/linux-general-1/ioctl-problem-in-kernel-does-not-load-root-fs-820528/)

beli0135 07-18-2010 09:18 AM

IOCTL problem in kernel, does not load root fs
 
Hi

I had opensuse 11.2 with kernel 2.6.32 that I complied myself and that work as charm. I have upgraded to 11.3 but preinstalled kernel didn't work well, while my old kernel also work as a charm.

Now, I have compiled myself new kernel, but I get:
Could not mount root fs. Inappropriate IOCTL for device.

and it doesnt boot, of course. I checked ext4 is included in kernel. What I am doing wrong?

Thanks

business_kid 07-18-2010 10:45 AM

Might I suggest you run
diff -u oldconfig newconfig

and see what the main differences are?

beli0135 07-18-2010 04:56 PM

There are no differences as I know of.. I used make cloneconfig
However as there is difference as kernels .32 to .34

business_kid 07-19-2010 03:02 AM

Ok, lets have a little more on the error.
Quote:

Could not mount root fs. Inappropriate IOCTL for device.
Which device? Post the o/p of fdisk -l, and your grub entry with the offending kernel. Is that all it says?

beli0135 07-19-2010 06:14 AM

I will post some data from the other kernel..

offending one stops at that only error, and that is it. Just stops.
Grub entry was made as all others (make install). I suspect there something inside kernel config file, that is set or unset.

beli0135 07-19-2010 05:17 PM

fdisk -l

Device Boot Start End Blocks Id System
/dev/sda1 * 1 131 1052226 83 Linux
/dev/sda2 9948 30401 164296755 f W95 Ext'd (LBA)
/dev/sda3 132 6123 48130740 83 Linux
/dev/sda4 6124 9947 30716280 7 HPFS/NTFS
/dev/sda5 9948 10209 2104483+ 82 Linux swap / Solaris
/dev/sda6 10210 23264 104864256 83 Linux
/dev/sda7 23265 30401 57327921 7 HPFS/NTFS


Grub entries:

Offending kernel:
--------------------
title Custom -- openSUSE 11.3 - 2.6.34
root (hd0,0)
kernel /vmlinuz-2.6.34-custom root=/dev/disk/by-id/ata-Hitachi_HTS542525K9SA00_080121BB0F00WDHHSTWC-part3 resume=/dev/disk/by-id/ata-Hitachi_HTS542525K9SA00_080121BB0F00WDHHSTWC-part5 splash=silent quiet showopts vga=0x317
initrd /initrd-2.6.34-custom

Working kernel
---------------
title Beli - 2.6.32.2
root (hd0,0)
kernel /vmlinuz-2.6.32.2-Beli root=/dev/disk/by-id/ata-Hitachi_HTS542525K9SA00_080121BB0F00WDHHSTWC-part3 resume=/dev/disk/by-id/ata-Hitachi_HTS542525K9SA00_080121BB0F00WDHHSTWC-part5 splash=silent quiet showopts vga=0x317
initrd /initrd-2.6.32.2-Beli
W

business_kid 07-20-2010 02:43 AM

I can't fault any of that. Have you a module tree for both kernels in /lib/modules?
Now WHEN exactly do you get that error? Does kernel & initrd load? Does init start?

beli0135 07-20-2010 06:09 AM

It's on very beginning on the initialization. Since /boot is ext2 and / is ext4, it loads init and kernel (as I reckon), but can't mount root fs. I tried selecting ext4 both as module or in kernel.

I know it is some setting inside kernel config I didn't compiled in, or I compiled too much...

business_kid 07-21-2010 03:15 AM

Let's go through this in detail
1. Grub shows a screen, & you select something.
2. That kernel is loaded, usually from /boot
3. That kernel boots.
4. That kernel mounts the root filesystem specified by 'root=' on the command line read only
5. It then goes looking for /sbin/init on the root directory
6. Init starts up.

At which exact point does it barf? A number, please.

beli0135 07-21-2010 06:16 AM

Stop is just after pass 3. It does boot kernel from /boot which is on ext2, and then show me that error and root FS is not mounted due to IOCTL problem.

business_kid 07-22-2010 02:46 AM

Well, the usual error there is: "Unable to mount root fs" or something like that.
Inappropriate IOCTL makes me think the device is being addressed the wrong way - like looking for the ignition key on your horse, or the reins in your car. :-). Google tells me it's a common enough disk error. The difference between reading the disk in 2. & 4. is that 2. is started by the bios but 4. is done by the kernel, so the kernel has to be capable of reading the disk.

Check that kernel .config. If it is ok, run
make clean && make > make.err 2>&1
without any parallel builds, and you can check if the 2 kernels are the same with md5sum. Read over make.err and check for errors - ignore warnings. It's probably a m/b chipset error, or a driver error, or a driver/chipset problem. Read the help.

beli0135 07-22-2010 07:37 AM

OK, thank you

I will rebuild the kernel. and see what is going on


All times are GMT -5. The time now is 07:47 AM.