LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
Search this Thread
Old 07-18-2010, 09:18 AM   #1
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Rep: Reputation: 15
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
 
Old 07-18-2010, 10:45 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,268

Rep: Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540
Might I suggest you run
diff -u oldconfig newconfig

and see what the main differences are?
 
Old 07-18-2010, 04:56 PM   #3
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Original Poster
Rep: Reputation: 15
There are no differences as I know of.. I used make cloneconfig
However as there is difference as kernels .32 to .34
 
Old 07-19-2010, 03:02 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,268

Rep: Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540
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?
 
Old 07-19-2010, 06:14 AM   #5
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Original Poster
Rep: Reputation: 15
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.
 
Old 07-19-2010, 05:17 PM   #6
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Original Poster
Rep: Reputation: 15
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
 
Old 07-20-2010, 02:43 AM   #7
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,268

Rep: Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540
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?
 
Old 07-20-2010, 06:09 AM   #8
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Original Poster
Rep: Reputation: 15
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...
 
Old 07-21-2010, 03:15 AM   #9
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,268

Rep: Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540
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.
 
Old 07-21-2010, 06:16 AM   #10
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Original Poster
Rep: Reputation: 15
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.
 
Old 07-22-2010, 02:46 AM   #11
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,268

Rep: Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540Reputation: 540
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.
 
Old 07-22-2010, 07:37 AM   #12
beli0135
Member
 
Registered: Jul 2008
Posts: 39

Original Poster
Rep: Reputation: 15
OK, thank you

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


Reply

Tags
compile, error, ioctl, kernel


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to pass IOCTL arguments from usespace ioctl call devkpict Linux - Kernel 1 12-07-2007 06:45 PM
Ioctl Fail In Some Systems Like Redhat 9, Kernel 2.4.20-8 lovelylinux Linux - Software 1 09-07-2007 06:27 AM
ioctl as non-root user cristianbdg Programming 3 12-21-2005 03:02 AM
Kernel 2.6.6 can't load my root filesystem TemplaraPheonix Linux - Software 2 05-31-2004 02:47 PM
doneshowconsole: Warning: the ioctl TIOCGDEV is not known by the kernel Consystor Linux - Hardware 3 08-05-2003 08:37 AM


All times are GMT -5. The time now is 12:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration