Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel panic Unable to mount root fs on unknown block(8,4)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
pav1uxa
n00b
n00b


Joined: 10 Jun 2007
Posts: 13

PostPosted: Fri Jan 23, 2015 6:12 pm    Post subject: Kernel panic Unable to mount root fs on unknown block(8,4) Reply with quote

I used this guide to install Gentoo http://wiki.gentoo.org/wiki/Handbook:Main_Page

after reboot to grub2 and select Gentoo Linux i got this:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,4)
http://i58.tinypic.com/280kt3a.jpg
http://i58.tinypic.com/2rh93m0.jpg

hd0 (IDE) partitions:
sda1
sda2 boot
sda3 swap
sda4 root

hd1 (SATA) is disk with Windows 7, it starts correctly

/usr/src/linux/.config
http://pastebin.com/Anmdr93t
/boot/grub/grub.cfg
http://pastebin.com/ZcByhpDf
lspci
http://pastebin.com/8AAN1fRk
/etc/fstab
http://pastebin.com/2njj3pSf
lspci -k (chroot)
http://pastebin.com/mRUmaUbC
lspci -nnk (chroot)
http://pastebin.com/cqBVkNFN
lspci -k (live cd)
http://pastebin.com/BHdwLg6n

parted -l
http://pastebin.com/M7cXa2RX

Please help and sorry for my eng...

Quote:
try adding rootfstype=ext4 to the boot parameters (end of the linux line)

did not help


Last edited by pav1uxa on Fri Jan 23, 2015 9:31 pm; edited 2 times in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Jan 23, 2015 6:52 pm    Post subject: Reply with quote

particularly on mixed ide, sata, usb connected drives what is seen by one kernel as sda may be sdb or sdx as seen by another kernel.

is your bios set to run hard drives in ide, ahci, or raid mode? lspci output suggests ide is enabled. recommend ahci.
<*> AHCI SATA support
<*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support
<*> JMicron PATA support

Don't enable:
< > Intel PATA old PIIX support
< > Intel SCH PATA support
They may interfere.

lspci -k run from the cd system will show the driver in use by the cd system.

parted -l | wgetpaste may be helpful
_________________
Defund the FCC.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Fri Jan 23, 2015 8:38 pm    Post subject: Reply with quote

pav1uxa,

Code:
... unknown-block(8,4)
tells that the kernel can see sda4 but not read the filesystem that is found there.

Either your root filesystem driver is not available to the kernel or you have several HDD attached and what your kernel sees as sda4 now is not the drive you intalled on.

It looks like grub2 is trying to use UUIDs to define the root filesystem, so it should work even if drives have been swapped around.

Your ext4 options look a bit agressive.
Code:
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_EXT4_DEBUG=y

You really don't want debug on unless you are doing ext4 filesystem development.
You probably don't want
Code:
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
either.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pav1uxa
n00b
n00b


Joined: 10 Jun 2007
Posts: 13

PostPosted: Fri Jan 23, 2015 9:15 pm    Post subject: Reply with quote

DONAHUE wrote:

<*> AHCI SATA support
<*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support
<*> JMicron PATA support

Don't enable:
< > Intel PATA old PIIX support
< > Intel SCH PATA support
They may interfere.

did not help

DONAHUE wrote:

is your bios set to run hard drives in ide, ahci, or raid mode? lspci output suggests ide is enabled. recommend ahci.

Enabled AHCI, but did not help. With this option, the computer is loaded longer

lspci -k (chroot)
http://pastebin.com/mRUmaUbC
lspci -nnk (chroot)
http://pastebin.com/cqBVkNFN
lspci -k (live cd)
http://pastebin.com/BHdwLg6n
parted -l
http://pastebin.com/M7cXa2RX
Back to top
View user's profile Send private message
iamben
Apprentice
Apprentice


Joined: 10 May 2004
Posts: 275

PostPosted: Fri Jan 23, 2015 9:45 pm    Post subject: Reply with quote

I suspect your storage controller drivers may be getting initialized in a different order so the disks are numbered differently. I would recommend trying to change root=/dev/sda4 to a PARTUUID option. Run "blkid" to get the PARTUUID corresponding to rootfs, then change the root= parameter to something like:

root=PARTUUID=d0e9ba19-5f59-4faf-9bab-14699e775d1a

Note that you must remove the "" that is shown in blkid output, it should be unquoted like my example above. Give that a try and let us know how it goes
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Fri Jan 23, 2015 9:52 pm    Post subject: Reply with quote

pav1uxa,

Its unfortunate that all your drives have a partition 4.
Code:

Disk /dev/sda: 80.0GB
 Number  Start   End     Size    File system     Name    Flags
 4      4432MB  80.0GB  75.6GB  ext4            rootfs

Disk /dev/sdb: 250GB
 Number  Start   End     Size    File system     Name    Flags
 4      112GB   250GB  138GB   extended

Disk /dev/sdc: 8053MB
 Number  Start   End     Size    File system     Name    Flags
 4      131kB  8053MB  8053MB  primary  fat32        boot


The kernel can see the fourth partition on any of them.

Be aware that BIOS drive order and kernel drive order are only loosely connected, if at all.
The kernel will scan the PCI bus in numerical order, which is
Code:
00:1f.2 IDE interface: Intel Corporation 82801JI (ICH10 Family) 4 port SATA IDE Controller #1
00:1f.5 IDE interface: Intel Corporation 82801JI (ICH10 Family) 2 port SATA IDE Controller #2
03:00.0 IDE interface: JMicron Technology Corp. JMB368 IDE controller
all other things being equal. That means that your PATA drive is unlikely to be sda as its attached to the JMicron controller.

Most BIOSes do something similar, however a few brain dead BIOSes, particularly in mixed IDE/SATA systems report the boot drive, whatever it is, as (hd0).
This ensures that your drive mapping changes between install and reboot and makes it particularly hard to get the boot loader install right.

The test for this is easy but fixing it is harder. Only connect your 80G drive.
It might just boot now. If not, get into your chroot and reinstall grub to the MBR. If you are using a USB stick as the boot media, ensure your HDD is sda.
Reboot to test.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pav1uxa
n00b
n00b


Joined: 10 Jun 2007
Posts: 13

PostPosted: Sat Jan 24, 2015 11:25 am    Post subject: Reply with quote

iamben wrote:
I suspect your storage controller drivers may be getting initialized in a different order so the disks are numbered differently. I would recommend trying to change root=/dev/sda4 to a PARTUUID option. Run "blkid" to get the PARTUUID corresponding to rootfs, then change the root= parameter to something like:

root=PARTUUID=d0e9ba19-5f59-4faf-9bab-14699e775d1a

Note that you must remove the "" that is shown in blkid output, it should be unquoted like my example above. Give that a try and let us know how it goes


Now it works, thank you

But grub2-mkconfig will fix it?
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sat Jan 24, 2015 2:13 pm    Post subject: Reply with quote

pav1uxa wrote:
Now it works, thank you
And why ?
Quote:
But grub2-mkconfig will fix it?
No, but it will do it, look into /etc/default/grub for GRUB_DISABLE_LINUX_UUID
Back to top
View user's profile Send private message
iamben
Apprentice
Apprentice


Joined: 10 May 2004
Posts: 275

PostPosted: Sat Jan 24, 2015 2:48 pm    Post subject: Reply with quote

GRUB_DISABLE_LINUX_UUID won't help here.

pav1uxa: You can try re-running grub2-mkconfig and I think it will detect root=/dev/sdb4 this time and start working, although in the future it's always possible the drive orders will switch again.

Unfortunately grub2-mkconfig can't handle root=PARTUUID= yet. It can handle root=UUID=, BUT that requires that you boot with an initramfs. In fact, if you had an initramfs, grub would automatically use root=UUID=... the GRUB_DISABLE_LINUX_UUID option is used to keep grub from automatically using this when it finds initramfs.
Back to top
View user's profile Send private message
pav1uxa
n00b
n00b


Joined: 10 Jun 2007
Posts: 13

PostPosted: Sun Jan 25, 2015 10:00 am    Post subject: Reply with quote

iamben wrote:
and I think it will detect root=/dev/sdb4 this time and start working

Yep, it works with root=/dev/sdb4... Thank you man.


solved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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