Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Kernel panic on boot after install dual-boot
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
JotaStar
n00b
n00b


Joined: 01 Oct 2016
Posts: 25

PostPosted: Wed Feb 01, 2017 6:00 pm    Post subject: [SOLVED] Kernel panic on boot after install dual-boot Reply with quote

Hi,

I've a Debian in my computer and now I want to add a Gentoo distro. I've installed Gentoo by terminal in Debian and chrooted to Gentoo in order to emerge all packages.

Now, I added Gentoo to Grub (installed on Debian) and for that I used the command:
Code:

root@reborn:/home/jota# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Encontrada imagen de linux: /boot/vmlinuz-3.16.0-4-amd64
Encontrada imagen de memoria inicial: /boot/initrd.img-3.16.0-4-amd64
Encontrado Gentoo Base System release 2.3 en /dev/sda3
hecho
root@reborn:/home/jota#

So it works ok. When I reboot I have the new entry of Gentoo but when is booting the system halts with kernel panic error

Code:
Kernel panic - not synching:VFS:Unable to mount root fs on unknown-block(0,0)

The part of grub.cfg seems ok,
Code:

menuentry 'Gentoo Base System release 2.3 (en /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-f40f428c-f76d-489f-9d97-a259f34ed457' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos3'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  f40f428c-f76d-489f-9d97-a259f34ed457
    else
      search --no-floppy --fs-uuid --set=root f40f428c-f76d-489f-9d97-a259f34ed457
    fi
    linux /boot/vmlinuz-4.4.39-gentoo root=/dev/sda3 ro
}

fdisk output is:
Code:


Device     Boot     Start       End   Sectors  Size Id Type
/dev/sda1            2048  97656831  97654784 46,6G 83 Linux
/dev/sda2        97656832 116088831  18432000  8,8G 82 Linux swap / Solaris
/dev/sda3  *    116088832 218488831 102400000 48,8G 83 Linux

Where sda1 is Debian /, sda2 is swap for both Debian and Gentoo, and sda3 is Gentoo /

I've tried to change the boot flag trough sda1 and sda3 with no changes.

And the fstab file of Gentoo is:

Code:
/dev/sda3       /       ext4        errors=remount-ro   0 1
/dev/sda2       none        swap        sw          0 0



Edit:
In https://wiki.gentoo.org/wiki/Knowledge_Base:Unable_to_mount_root_fs

Analysis
Quote:

The panic informs that the Linux kernel is unable to:

Detect the controller for the hard disk (a likely candidate if the message says unknown-block(0,0));
Detect the partition because it does not have support for the partition type (less likely, but still possible);
Mount the partition because it does not know how to access the file system (a likely candidate if the message gives a non-zero figure in the first number set, such as unknown-block(2,0));
Detect the partition because the wrong device was passed in the boot loader configuration.


How can I ensure about the driver? In Debian says that is ahcI

Code:

        *-storage
             description: SATA controller
             product: SB7x0/SB8x0/SB9x0 SATA Controller [IDE mode]
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 11
             bus info: pci@0000:00:11.0
             version: 40
             width: 32 bits
             clock: 66MHz
             capabilities: storage ahci_1.0 bus_master cap_list
             configuration: driver=ahci latency=32
             resources: irq:19 ioport:f090(size=8) ioport:f080(size=4) ioport:f070(size=8) ioport:f060(size=4) ioport:f050(size=16) memory:feb0b000-feb0b3ff

        *-serial
             description: SMBus
             product: SBx00 SMBus Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 14
             bus info: pci@0000:00:14.0
             version: 42
             width: 32 bits
             clock: 66MHz
             configuration: driver=piix4_smbus latency=0
             resources: irq:0

        *-ide
             description: IDE interface
             product: SB7x0/SB8x0/SB9x0 IDE Controller
             vendor: Advanced Micro Devices, Inc. [AMD/ATI]
             physical id: 14.1
             bus info: pci@0000:00:14.1
             version: 40
             width: 32 bits
             clock: 66MHz
             capabilities: ide bus_master
             configuration: driver=pata_atiixp latency=32




Last edited by JotaStar on Thu Feb 02, 2017 11:34 am; edited 2 times in total
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Wed Feb 01, 2017 6:33 pm    Post subject: Reply with quote

Hi,

This is maybe not related to Grub.

Did you double check your kernel setup? (file system, etc...)
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3100
Location: Illinois, USA

PostPosted: Wed Feb 01, 2017 6:47 pm    Post subject: Reply with quote

Code:
Unable to mount root fs on unknown-block(0,0)
This is most often caused by SATA or ext4 support being configured as modules in the kernel without the use of an initram or the initram not having the driver modules. Be sure that the drivers are built in to the kernel by 'y' not 'm'.

The kernel can't read partition 0 on drive 0.
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 340
Location: Stockholm

PostPosted: Wed Feb 01, 2017 6:55 pm    Post subject: Reply with quote

LILO boot loader is easy to configure and works fine with ext2 file system.
Back to top
View user's profile Send private message
JotaStar
n00b
n00b


Joined: 01 Oct 2016
Posts: 25

PostPosted: Wed Feb 01, 2017 6:56 pm    Post subject: Reply with quote

Tony0945 wrote:
Code:
Unable to mount root fs on unknown-block(0,0)
This is most often caused by SATA or ext4 support being configured as modules in the kernel without the use of an initram or the initram not having the driver modules. Be sure that the drivers are built in to the kernel by 'y' not 'm'.

The kernel can't read partition 0 on drive 0.


As module, I only have these.
Quote:

reborn linux # cat .config |grep =m
CONFIG_NF_LOG_COMMON=m
CONFIG_NF_NAT=m
CONFIG_NF_NAT_FTP=m
CONFIG_NF_NAT_IRC=m
CONFIG_NF_NAT_SIP=m
CONFIG_NETFILTER_XT_MARK=m
CONFIG_NETFILTER_XT_TARGET_LOG=m
CONFIG_NETFILTER_XT_NAT=m
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m
CONFIG_NF_LOG_ARP=m
CONFIG_NF_LOG_IPV4=m
CONFIG_NF_NAT_IPV4=m
CONFIG_NF_NAT_MASQUERADE_IPV4=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_NF_LOG_IPV6=m
CONFIG_X86_PKG_TEMP_THERMAL=m
CONFIG_CRYPTO_ECHAINIV=m


I dont know if the driver of HDD (SSD connected by SATA2) is the problem.

In Debian, the driver is ahci (lshw) and I have it in .config with SCSI
Quote:

CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=y

# SCSI device support
CONFIG_SCSI_MOD=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_NETLINK is not set
# CONFIG_SCSI_MQ_DEFAULT is not set
CONFIG_SCSI_PROC_FS=y

CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y



I'm stucked.

Thank you
Back to top
View user's profile Send private message
mamac
l33t
l33t


Joined: 29 Feb 2004
Posts: 890

PostPosted: Wed Feb 01, 2017 9:04 pm    Post subject: Reply with quote

Your kernel says:
Code:

Unable to mount root fs on unknown-block(0,0)


If I'm correct block(0,0) is your SDA1 where your Debian resides, is that correct?
_________________
Powered by Gentoo Linux since 2003
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Feb 01, 2017 9:12 pm    Post subject: Reply with quote

JotaStar,

Code:
unknown-block(0,0)
usually means that the kernel cannot see any hard drives at all.

Get back into your Gentoo chroot.
Code:
emerge wgetpaste pciutils -av
unless they are already installed.

When that emerge completes, execute
Code:
lspci | wgetpaste
wgetpaste /usr/src/linux/.config


Post the two URLs, that's your lspci output and kernel .config file.
If your kernel .config is not at /usr/src/linux/.config fix the path in that command.

Describe the process you used to configure and build the kernel and the initrd.
Is your partition table MSDOS or GPT?
_________________
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
JotaStar
n00b
n00b


Joined: 01 Oct 2016
Posts: 25

PostPosted: Thu Feb 02, 2017 11:34 am    Post subject: Reply with quote

NeddySeagoon wrote:
JotaStar,

Code:
unknown-block(0,0)
usually means that the kernel cannot see any hard drives at all.

Get back into your Gentoo chroot.
Code:
emerge wgetpaste pciutils -av
unless they are already installed.

When that emerge completes, execute
Code:
lspci | wgetpaste
wgetpaste /usr/src/linux/.config


Post the two URLs, that's your lspci output and kernel .config file.
If your kernel .config is not at /usr/src/linux/.config fix the path in that command.

Describe the process you used to configure and build the kernel and the initrd.
Is your partition table MSDOS or GPT?


Finally, as you said, it was a driver problem.

I found it with
Code:
lshw
command in storage section.
Code:

*-ide
     description: IDE interface
     product: SB7x0/SB8x0/SB9x0 IDE Controller
     vendor: Advanced Micro Devices, Inc. [AMD/ATI]
     physical id: 14.1
     bus info: pci@0000:00:14.1
     version: 40
     width: 32 bits
     clock: 66MHz
     capabilities: ide bus_master
     configuration: driver=[b]pata_atiixp[/b] latency=32


Just adding
Code:
CONFIG_PATA_ATIIXP=y
config in kernel works.

Thanks
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