Skip to contentSkip to conversation

Can't make XFS work with 2.6.6

DISCUSSION David Johnson 7 participants 19 messages May 27, 2004 – May 28, 2004 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello,

I'm having a problem getting my system to boot with 2.6.6 and a XFS root filesystem. On boot it can't mount the root fs:

XFS: Bad magic number
XFS: SB validate failed
Kernel Panic: VFS: Unable to mount root fs on unknown-block(0,0)

XFS is compiled in so it's not a module problem. Google says this error is usually caused by passing the wrong root parameter to the kernel, but I'm definitely giving the right root device.

I can boot just fine with 2.4.25 using exactly the same boot options in Grub. I attach my .config. I'd be very greatful for any help with this. I've tried recompiling with XFS as a module and checked my version of xfsprogs meets the requirements.

Thanks in advance,
David.

Signature · 2 lines
David Johnson
http://www.david-web.co.uk/

A message that is not in the archive (sent off-list or not yet received): 1085676905.5311.33.camel@buffy

#2 lore raw
Quoted 30 lines · David Aubin

Your ide support is compiled as a module. If you are not calling out the module
in your initrc, then you will get this. Go back and compile in your ide support
or scsi support as compiled in options. Both are currently built as modules.

Dave Aubin

Quoted 20 lines · David Johnson

Hello,

I'm having a problem getting my system to boot with 2.6.6 and a XFS root filesystem. On boot it can't mount the root fs:

XFS: Bad magic number
XFS: SB validate failed
Kernel Panic: VFS: Unable to mount root fs on unknown-block(0,0)

XFS is compiled in so it's not a module problem. Google says this error is usually caused by passing the wrong root parameter to the kernel, but I'm definitely giving the right root device.

I can boot just fine with 2.4.25 using exactly the same boot options in Grub. I attach my .config. I'd be very greatful for any help with this. I've tried recompiling with XFS as a module and checked my version of xfsprogs meets the requirements.

Thanks in advance,
David.

#3 lore raw
In reply to a message not in the archive
Quoted 7 lines · David Aubin

Your ide support is compiled as a module. If you are not calling out the module
in your initrc, then you will get this. Go back and compile in your ide support
or scsi support as compiled in options. Both are currently built as modules.

OK, I recompiled with the IDE compiled in, but it didn't make much difference :-(
The error is the same except for: -

Instead of:
Kernel Panic: VFS: Unable to mount root fs on unknown-block(0,0)

I get:
Kernel Panic: VFS: Unable to mount root fs on hda3

Thanks for your help so far,
David.

Signature · 2 lines
David Johnson
http://www.david-web.co.uk/
#4 lore raw

Hi Dave,

Please include the latest copy of your .config.
Also the boot loader parameter as well. And possibly the validation that the root partition is of type XFS?

At a glance it appears that XFS is not compilied in to
your kernel now, if that is your root mount file type.

Thanks,
Dave

Quoted 21 lines · David Johnson
Quoted 7 lines · David Aubin

Your ide support is compiled as a module. If you are not calling out the module
in your initrc, then you will get this. Go back and compile in your ide support
or scsi support as compiled in options. Both are currently built as modules.

OK, I recompiled with the IDE compiled in, but it didn't make much difference :-(
The error is the same except for: -

Instead of:
Kernel Panic: VFS: Unable to mount root fs on unknown-block(0,0)

I get:
Kernel Panic: VFS: Unable to mount root fs on hda3

Thanks for your help so far,
David.

#5 lore raw
Quoted 3 lines · David Aubin

Hi Dave,

Please include the latest copy of your .config.

Attached.

Quoted 1 line

Also the boot loader parameter as well.

From Grub's menu.lst:

title Debian GNU/Linux, kernel 2.6.6
root (hd0,0)
kernel /vmlinuz-2.6.6 lapic video=rivafb:mode:1024x768x16 root=/dev/hda3 ro
initrd /initrd.img-2.6.6
savedefault
boot

Quoted 2 lines

And possibly
the validation that the root partition is of type XFS?

Here's the mount output from the system running a 2.4 kernel:

lug:/tmp# mount
/dev/hda3 on / type xfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda2 on /home type xfs (rw)
/dev/sda2 on /var type xfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
Quoted 2 lines

At a glance it appears that XFS is not compilied in to
your kernel now, if that is your root mount file type.

XFS is compiled in. I really don't know what else to try...

Thanks,
David.

Signature · 2 lines
David Johnson
http://www.david-web.co.uk/
#6 lore raw

Did you create these drives with any of the following attributes?
# CONFIG_XFS_RT is not set
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_SECURITY is not set
# CONFIG_XFS_POSIX_ACL is not set
If you did then please enable them and rebuild your kernel.

Also, hd(0,0) is /dev/hda3 correct? You didn't swap ide cables or anything and are now tring to boot off of an old kernel?

I don't have an XFS system. But I belive it works with 2.6.* kernels. You problem looks like you are missing xfs support in your kernel. If you say you have it compilied in, then perhaps you are not booting the kernel you think you are.

Best of luck.
Dave

Quoted 40 lines · David Johnson
Quoted 3 lines · David Aubin

Hi Dave,

Please include the latest copy of your .config.

Attached.

Quoted 3 lines

Also the boot loader parameter as well.

From Grub's menu.lst:

title Debian GNU/Linux, kernel 2.6.6
root (hd0,0)
kernel /vmlinuz-2.6.6 lapic video=rivafb:mode:1024x768x16 root=/dev/hda3 ro
initrd /initrd.img-2.6.6
savedefault
boot

Quoted 2 lines

And possibly
the validation that the root partition is of type XFS?

Here's the mount output from the system running a 2.4 kernel:

lug:/tmp# mount
/dev/hda3 on / type xfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda2 on /home type xfs (rw)
/dev/sda2 on /var type xfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
Quoted 2 lines

At a glance it appears that XFS is not compilied in to
your kernel now, if that is your root mount file type.

XFS is compiled in. I really don't know what else to try...

Thanks,
David.

#7 lore raw
Quoted 7 lines · David Aubin

Did you create these drives with any of the following attributes?
# CONFIG_XFS_RT is not set
# CONFIG_XFS_QUOTA is not set
# CONFIG_XFS_SECURITY is not set
# CONFIG_XFS_POSIX_ACL is not set
If you did then please enable them and rebuild your kernel.

Nope, it's just a plain XFS partition as created by debian-installer.

Quoted 4 lines

Also, hd(0,0) is /dev/hda3 correct? You didn't swap ide cables or anything and are now tring to boot off of an old kernel?

hd(0,0) is hda1 which is the boot partition. And no I've not touched the IDE cables. A 2.4 kernel with an almost identical Grub entry works fine.

Quoted 5 lines

I don't have an XFS system. But I belive it works with 2.6.* kernels. You problem looks like you are missing xfs support in your kernel. If you say you have it compilied in, then perhaps you are not booting the kernel you think you are.

I have XFS working fine with 2.6.6 on another machine. I've just made sure that I'm booting the correct kernel, and I am.

This is starting to drive me mad now!

Thanks,
David.

Signature · 2 lines
David Johnson
http://www.david-web.co.uk/
#8 lore raw
In reply to David Johnson

Cna you send dmesg output for 2.4 and 2.6 if you can caputer the latter. If not please compare them manually and check whether hda is still the same device as in 2.4. Also check if 2.6 finds more or less partitions.

#9 lore raw
In reply to David Johnson

Hi Dave,

I think the problem is this:
hd0,0 is /dev/hda1. Your kernel is in /dev/hda3.
You want to have hd0,2, not hd0,0. As for the output you see. You must have a kernel at /dev/hda1 that does not support XFS and hence the unknown fs error. Please fix your grub entry and you should have fun.

Dave

Quoted 40 lines · David Johnson
Quoted 3 lines · David Aubin

Hi Dave,

Please include the latest copy of your .config.

Attached.

Quoted 3 lines

Also the boot loader parameter as well.

From Grub's menu.lst:

title Debian GNU/Linux, kernel 2.6.6
root (hd0,0)
kernel /vmlinuz-2.6.6 lapic video=rivafb:mode:1024x768x16 root=/dev/hda3 ro
initrd /initrd.img-2.6.6
savedefault
boot

Quoted 2 lines

And possibly
the validation that the root partition is of type XFS?

Here's the mount output from the system running a 2.4 kernel:

lug:/tmp# mount
/dev/hda3 on / type xfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda2 on /home type xfs (rw)
/dev/sda2 on /var type xfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
Quoted 2 lines

At a glance it appears that XFS is not compilied in to
your kernel now, if that is your root mount file type.

XFS is compiled in. I really don't know what else to try...

Thanks,
David.

#10 lore raw
Quoted 9 lines · David Aubin

Hi Dave,

I think the problem is this:
hd0,0 is /dev/hda1. Your kernel is in /dev/hda3.
You want to have hd0,2, not hd0,0. As for the output you see. You must have a kernel at /dev/hda1 that does not support XFS and hence the unknown fs error. Please fix your grub entry and you should have fun.

Nope. My kernel is on /dev/hda1 (hd0,0) which is the boot partition. Then /dev/hda3 is the root partition.

I am booting the correct kernel - with XFS support.

Quoted 3 lines

Cna you send dmesg output for 2.4 and 2.6 if you can caputer the latter. If not please compare them manually and check whether hda is still the same device as in 2.4. Also check if 2.6 finds more or less partitions.

I've attached my 2.4 dmesg.
I can't capture or even read the 2.6 output as it scrolls off the screen too fast. I think it's finding the drive and using the correct IDE chipset driver, but I can't see the details.

I really can't see why this is happening. All the usual IDE stuff is compiled in, as is the correct IDE chipset driver, as is XFS...

Thanks,
David.

Signature · 2 lines
David Johnson
http://www.david-web.co.uk/
#11 lore raw
Quoted 3 lines · David Johnson

I've attached my 2.4 dmesg.

dmesg-2.4.gz

Compressing is a bad idea. Many people will glance at the stuff if it is easy to do so, but if you make it time-consuming to look, they'll pass.

#12 lore raw
In reply to David Johnson

Hi Dave,

You do not have devfs enabled. So root=/dev/hda3
should not work. Please enable in kernel and retry.

# CONFIG_DEVFS_FS is not set

Dave

Quoted 40 lines · David Johnson
Quoted 3 lines · David Aubin

Hi Dave,

Please include the latest copy of your .config.

Attached.

Quoted 3 lines

Also the boot loader parameter as well.

From Grub's menu.lst:

title Debian GNU/Linux, kernel 2.6.6
root (hd0,0)
kernel /vmlinuz-2.6.6 lapic video=rivafb:mode:1024x768x16 root=/dev/hda3 ro
initrd /initrd.img-2.6.6
savedefault
boot

Quoted 2 lines

And possibly
the validation that the root partition is of type XFS?

Here's the mount output from the system running a 2.4 kernel:

lug:/tmp# mount
/dev/hda3 on / type xfs (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda1 on /boot type ext3 (rw)
/dev/hda2 on /home type xfs (rw)
/dev/sda2 on /var type xfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
Quoted 2 lines

At a glance it appears that XFS is not compilied in to
your kernel now, if that is your root mount file type.

XFS is compiled in. I really don't know what else to try...

Thanks,
David.

#13 lore raw
Quoted 7 lines · David Aubin

Hi Dave,

You do not have devfs enabled. So root=/dev/hda3
should not work. Please enable in kernel and retry.

# CONFIG_DEVFS_FS is not set

But surely enabling devfs will stop /dev/hda3 working completely. Then wouldn't the path be something like /dev/ide/disk0/part1/blah/blah/blah.

I'm not using devfs with 2.4 and it works fine.

Thanks,
David.

Signature · 2 lines
David Johnson
http://www.david-web.co.uk/
#14 lore raw
In reply to David Aubin
Quoted 6 lines · David Aubin

Hi Dave,

You do not have devfs enabled. So root=/dev/hda3
should not work. Please enable in kernel and retry.

# CONFIG_DEVFS_FS is not set

Exactly the wrong way around. If you're brave enough to use devfs you need to use devfs names on the command line.

#15 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 6 lines · David Aubin

Hi Dave,

You do not have devfs enabled. So root=/dev/hda3
should not work. Please enable in kernel and retry.

# CONFIG_DEVFS_FS is not set

Exactly the wrong way around. If you're brave enough to use devfs you need to use devfs names on the command line.

Not at all.

$ cat /proc/cmdline 
root=/dev/hda1 video=sisfb:mode:1024x768x8
$ gunzip -c /proc/config.gz | grep DEVFS
CONFIG_DEVFS_FS=y
CONFIG_DEVFS_MOUNT=y
# CONFIG_DEVFS_DEBUG is not set

Yes, I should switch to udev, but I don't have time to mess around with that stuff right now, and the machine works the way it is.

Signature · 2 lines
Måns Rullgård
[email protected]
#16 lore raw
In reply to David Johnson
Quoted 3 lines · David Johnson

XFS is compiled in so it's not a module problem. Google says this error is usually caused by passing the wrong root parameter to the kernel, but I'm definitely giving the right root device.

Are you sure? Make sure the device names haven't changed between your 2.4 and 2.6 kernels. This can happen if a new driver is compiled in that causes them to be reordered, or for other reasons. XFS has been working fine in 2.6.6 for me so far...

Jesse

#17 lore raw
In reply to David Johnson
Quoted 7 lines · David Johnson

Hello,

I'm having a problem getting my system to boot with 2.6.6 and a XFS root filesystem. On boot it can't mount the root fs:

XFS: Bad magic number
XFS: SB validate failed

This is XFS saying "I read the first sector ondisk, and it doesn't have the XFS superblock magic number in the first word". This is the very first IO request XFS issues on mount. The read has completed without an error, its the contents of the buffer we get back that isn't an XFS superblock.

So, not a XFS compiled-in/module issue as was suggested, and not an XFS issue at all - looks like there's some problem in getting the root device identifier into the kernel I'd guess.

Quoted 1 line

Kernel Panic: VFS: Unable to mount root fs on unknown-block(0,0)

The "unknown" & (0,0) there is probably a hint, I've never come across that before though.

cheers.

Signature · 1 line
Nathan
#18 lore raw
In reply to David Johnson
Quoted 8 lines · David Johnson

Hello,

I'm having a problem getting my system to boot with 2.6.6 and a XFS root filesystem. On boot it can't mount the root fs:

XFS: Bad magic number
XFS: SB validate failed
Kernel Panic: VFS: Unable to mount root fs on unknown-block(0,0)

This means your block driver isn't compiled in. What device is your filesystem on, are you using devfs or similar crap?

#19 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 5 lines · David Johnson

Hello,

I'm having a problem getting my system to boot with 2.6.6 and a XFS root filesystem. On boot it can't mount the root fs:

Quoted 6 lines
Quoted 3 lines

XFS: Bad magic number
XFS: SB validate failed
Kernel Panic: VFS: Unable to mount root fs on unknown-block(0,0)

This means your block driver isn't compiled in. What device is your filesystem on, are you using devfs or similar crap?

Ok, the later mails answer the questions. Sorry for the noise.