# [SOLVED] Kernel panic after changing filesystem

## Nitro_146

Hi all,

My primary HD died recently (SATA WD RAPTOR 74Go), so I bought a new disk to replace it (SATA SSD Intel X25-M)

I made a fresh reinstall of gentoo, and chosed Ext4 as it seems to be able to support TRIM along with 2.6.33

During install, I compiled a kernel with genkernel, and it works.

After install is done, I tried to compile a custom kernel using my backed up .config that worked perfectly on that computer. As the drive used EXT3, I modified the .config by just adding EXT4 support.

On reboot I get a kernel panic :

 *Quote:*   

> VFS: Cannot open root device "sda1" or unknown-block(0,0)
> 
> Please append a correct "root=" boot option
> 
> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0) 
> ...

 

Here are some infos :

grub.conf

 *Quote:*   

> default 1
> 
> timeout 30
> 
> splashimage=(hd0,1)/boot/grub/splash.xpm.gz
> ...

 

sfdisk -l

 *Quote:*   

> Disque /dev/sda : 9729 cylindres, 255 têtes, 63 secteurs/piste
> 
> Unités= cylindres de 8225280 octets, blocs de 1024 octets, décompte à partir de 0
> 
>    Périph Amor Début     Fin   #cyls    #blocs    Id  Système
> ...

 

/etc/fstab

 *Quote:*   

> /dev/sda2		/boot		ext3		defaults,noauto		1 2
> 
> /dev/sda1		/		ext4		noatime			0 1
> 
> #/dev/SWAP		none		swap		sw			0 0
> ...

 

and kernel .config (only filesystem part, the one that changed)

 *Quote:*   

> 
> 
> #
> 
> # File systems
> ...

 

----------

## NeddySeagoon

Nitro_146,

The error message suggests that the kernel cannot communicate with your SATA controller.

When you used the old .config file, was it from an *identical* kernel version?

If not you must run make oldconfig against it in the kernel tree.

If you have a 32 bit install, ext4 demands that you select huge file support. Its not an option on 64 bit kernels.

From the error, it looks like the kernel did not get as far as trying to talk to the filesystem.

Do you have several SATA controllers in your system and have now connected your new drive to a different one, such that its driver is missing from your kernel?

----------

## Nitro_146

Thank's for your answer.

 *NeddySeagoon wrote:*   

> When you used the old .config file, was it from an *identical* kernel version?

 

Yes, that was the exact same version.

 *Quote:*   

> If you have a 32 bit install, ext4 demands that you select huge file support. Its not an option on 64 bit kernels.
> 
> From the error, it looks like the kernel did not get as far as trying to talk to the filesystem.

 

My system is amd64 stable (with multilib)

 *Quote:*   

> Do you have several SATA controllers in your system and have now connected your new drive to a different one, such that its driver is missing from your kernel?

 

The disk is connected on the same cable that was used for the previous one, and therefore the same controler (ICH8 as far as I know)

----------

## NeddySeagoon

Nitro_146,

So you didn't change anything - it just doesn't work any more. That's a contradiction.

Please post your lspci output and we can take it from there.

----------

## Nitro_146

Well, i did change something ...

I had a traditionnal HDD with EXT3 and I swaped with a SSD with EXT4 and a fresh install.

Here is my lspci

```
00:00.0 Host bridge: Intel Corporation 82P965/G965 Memory Controller Hub (rev 02)

00:01.0 PCI bridge: Intel Corporation 82P965/G965 PCI Express Root Port (rev 02)

00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 02)

00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 02)

00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 02)

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)

00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 02)

00:1c.5 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 6 (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 02)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2)

00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02)

00:1f.2 SATA controller: Intel Corporation 82801HR/HO/HH (ICH8R/DO/DH) 6 port SATA AHCI Controller (rev 02)

00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)

01:00.0 VGA compatible controller: nVidia Corporation G71 [GeForce 7300 GS] (rev a1)

03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)

04:00.0 SATA controller: JMicron Technology Corp. 20360/20363 Serial ATA Controller (rev 02)

04:00.1 IDE interface: JMicron Technology Corp. 20360/20363 Serial ATA Controller (rev 02)

05:06.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)

```

There is nothing pluged on the other SATA controler (Jmicron) (The sata ports have different colors on the motherboard)

----------

## NeddySeagoon

Nitro_146,

Check your kernel settings against this post check you have the JMicron driver included too.

----------

## Nitro_146

I just had to remove 

```
Device Drivers  --->

    < > ATA/ATAPI/MFM/RLL support  --->
```

After compilation, and reboot, i works !

I am now running that kernel.

Thank you for your help !

----------

