Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] New kernel will not mount XFS root file system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
johnklug
n00b
n00b


Joined: 17 Jun 2013
Posts: 31

PostPosted: Thu May 12, 2016 6:37 am    Post subject: [SOLVED] New kernel will not mount XFS root file system Reply with quote

I changed GCC levels, and am now trying to get an identical kernel level to boot.

The old kernel still boots, but modules won't load, which I assume is due to gcc levels changing. I see:

    modprobe: ERROR: could not insert 'e1000e': Exec format error

Every module I try (and all have been rebuilt) fail.

So to move on to the new kernel, I have to determine how to get it to mount root.

So onto my new kernel, which won't mount root, since this is during boot, it is from a photo:

    ... sr1 driver: sr
    ... md3 (driver?)
    ... md2 (driver?)
    ... md1 (driver?)
    Kernel panic -- not syncing: VFS: Unable to mount root fs on unknown block(0,0)

Since it was able to find md?, I assume MD is OK? MD1 is ext2, MD2 and MD3 are xfs. MD2 is root and it is RAID1.

I am able to extract stuff using USB and the old kernel, since I have that built-in.

Grub configuration menu:


    title=Gentoo Linux (3.17.7-gentoo) uuid
    kernel /boot/vmlinuz-3.17.7-gentoo rootfstype=xfs root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/md2 doscsi udev domdadm
    initrd /boot/initramfs-genkernel-x86_64-3.17.7-gentoo

    title=Gentoo Linux (3.17.7-bzImage) uuid
    kernel /boot/bzImage rootfstype=xfs root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/md2 doscsi udev domdadm
    initrd /boot/kernel-genkernel-x86_64-3.17.7-gentoo


Identical except for the kernel image.

Now XFS, and MD from .config:


    ...
    CONFIG_XFS_FS=y
    # CONFIG_XFS_QUOTA is not set
    # CONFIG_XFS_POSIX_ACL is not set
    # CONFIG_XFS_RT is not set
    CONFIG_XFS_WARN=y
    # CONFIG_XFS_DEBUG is not set
    # CONFIG_GFS2_FS is not set
    # CONFIG_BTRFS_FS is not set
    # CONFIG_NILFS2_FS is not set
    ...
    # CONFIG_PATA_ACPI is not set
    # CONFIG_ATA_GENERIC is not set
    # CONFIG_PATA_LEGACY is not set
    CONFIG_MD=y
    CONFIG_BLK_DEV_MD=y
    CONFIG_MD_AUTODETECT=y
    # CONFIG_MD_LINEAR is not set
    CONFIG_MD_RAID0=y
    CONFIG_MD_RAID1=y


This leads me to believe that XFS is bad, but not sure what to do about it. Or else mount is missing. Since both kernels use the same initramfs, and the old kernel can mount without loading drivers, and would seem that the kernel configuration must have changed, or there is some problem induced by the new compiler. The disks are connected via SATA. The SATA is JMICRON JMB363 and I would assume that since the md devices were found, that this is not the issue.

I created the initramfs using:

    genkernel --mdadm initramfs


Last edited by johnklug on Sat May 14, 2016 9:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2970
Location: Germany

PostPosted: Thu May 12, 2016 2:30 pm    Post subject: Reply with quote

sounds like you didn't rebuild modules...?

(if in doubt, switch to built-in drivers)
Back to top
View user's profile Send private message
johnklug
n00b
n00b


Joined: 17 Jun 2013
Posts: 31

PostPosted: Thu May 12, 2016 2:43 pm    Post subject: Reply with quote

It is the rebuilt modules that do not work with the old kernel of the same level. Before the modules were rebuilt and genkernel was run, the old kernel loaded modules just fine.

As far as I can tell, the new kernel should not need any modules to mount root. But it refuses to do so. The old kernel mounts root without the modules, since it cannot load any at all.

Maybe the new GCC needs an option to make an operative kernel and modules?
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2970
Location: Germany

PostPosted: Thu May 12, 2016 3:25 pm    Post subject: Reply with quote

johnklug wrote:
It is the rebuilt modules that do not work with the old kernel of the same level.


You have to rebuild both. Kernel and modules (and modules inside initramfs) with the same gcc. And actually boot the kernel you rebuilt.

If you're still running your old kernel you shouldn't remove its modules... (Ideally when making such a switch you also switch kernel versions so there are no such collisions.)
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1074
Location: EU or US

PostPosted: Thu May 12, 2016 5:29 pm    Post subject: Reply with quote

First, when you get exec format error then it means module you are trying to insert was not built for kernel that is running.
Second, even if you use new GCC to build new kernel it will not affect old kernel or its modules.
Third, Kernel panic -- not syncing: VFS: Unable to mount root fs on unknown block(0,0) means your kernel cannot access the hard disk controller (in case you are using MBR).
Back to top
View user's profile Send private message
johnklug
n00b
n00b


Joined: 17 Jun 2013
Posts: 31

PostPosted: Sat May 14, 2016 9:15 pm    Post subject: Reply with quote

My solution to this problem was to boot from the Gentoo Live DVD (actually I used a USB flash drive). Apparently the live DVD does not have MD RAID1 support, so I then had to build a new Gentoo with MD Raid support, which I put on a flash drive. After booting my new flash based gentoo system, I could then mount my raided drives and build a new kernel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum