Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Kernel Panic VFS not syncing
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
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Sun Jan 24, 2016 5:18 pm    Post subject: [SOLVED] Kernel Panic VFS not syncing Reply with quote

Hi all,

I do get the same error but with unknown-block(0,0).

This is my grub.cfg:
Code:
menuentry "Gentoo 4.1.15" {
    set root=(hd0,msdos1)
    linux /vmlinux-4.1.15-gentoo-r1 root=/dev/sda6 rootfstype=ext4 ro
}


I'm trying to install gentoo as guest running in hyper-v.
_________________
It is so beautiful to be detached from the "System"


Last edited by pacl on Wed Jan 27, 2016 6:34 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Jan 24, 2016 5:57 pm    Post subject: Reply with quote

pacl,

I've split your post off into a new topic as you have a different cause.
Code:
unknown-block(0,0).
means that the kernel cannot see your HDD at all.
Its because something is missing.

I do not know the details of hyper-v but I suspect that it offers emulated hardware to guest operating systems.

Post the output of lspci from inside hyper-v.
Tell us how you made your kernel.

-- edit --
pacl wrote:
Actually, I don't even understand why (0,0). In grub.cfg, root for this kernel is /dev/sda6.

The kernel cannot see your hard drive. If it could and it read the partition table, the numbers would be (8,6)
_________________
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
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Mon Jan 25, 2016 11:07 am    Post subject: Reply with quote

Getting the same error even with CONFIG_PATA_VIA set
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Mon Jan 25, 2016 11:47 am    Post subject: Reply with quote

My problem seems to be different.

In menuconfig I'm setting CONFIG_PATA_VIA.
But .config file still says:
Code:
#CONFIG_PATA_VIA is not set

_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
TigerJr
Guru
Guru


Joined: 19 Jun 2007
Posts: 540

PostPosted: Mon Jan 25, 2016 12:03 pm    Post subject: Reply with quote

pacl wrote:
My problem seems to be different.

In menuconfig I'm setting CONFIG_PATA_VIA.
But .config file still says:
Code:
#CONFIG_PATA_VIA is not set


Can you post Kernel panic photo? And lspci -k to make sure that kernel driver you are using from install disk?
_________________
Do not use gentoo, it die
Back to top
View user's profile Send private message
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Mon Jan 25, 2016 12:18 pm    Post subject: Reply with quote

TigerJr wrote:
pacl wrote:
My problem seems to be different.

In menuconfig I'm setting CONFIG_PATA_VIA.
But .config file still says:
Code:
#CONFIG_PATA_VIA is not set


Can you post Kernel panic photo? And lspci -k to make sure that kernel driver you are using from install disk?

Accidentally, I set CONFIG_SATA_VIA instead of PATA :roll:
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Mon Jan 25, 2016 5:38 pm    Post subject: Reply with quote

After running
Code:
lspci -k

while LiveCD booted, I made sure to compile same drivers into kernel.
Now I'm getting:
Code:
VFS: Cannot open root device "sda7" or unknown-block(8,7): error -19


Is initramfs required?
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Jan 25, 2016 8:13 pm    Post subject: Reply with quote

pacl,

You are being confused by help directed to Bobr.

CONFIG_PATA_VIA is useful only if you have that particular VIA chipset.
You need to post your lspci output and your kernel .config if you want us to check the kernel settings for your hardware.

The kernel .config is too big for a post - it must go to a pastebin.
_________________
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
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Tue Jan 26, 2016 6:15 am    Post subject: Reply with quote

Ok going to prepare configurations and settings
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Tue Jan 26, 2016 7:18 am    Post subject: Reply with quote

lspci -k (LiveCD)
Code:
00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (AGP disabled) (rev 03)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 01)
   Subsystem: Microsoft Corporation 82371AB/EB/MB PIIX4 ISA
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
   Kernel driver in use: ata_piix
   Kernel modules: ata_piix, pata_acpi, ata_generic
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual VGA


fstab
Code:
/dev/sda5    /boot    ext2   noauto,noatime    1 2
/dev/sda7    /        ext4   noatime           0 1
/dev/sda6    none     swap   sw                0 0


ls in grub prompt
Code:
(hd0) (hd0,msdos7) (hd0,msdos6) (hd0,msdos5) (fd0)


grub configuration (written by my own)
Code:
set timeout=5
set default=0

set gfxmode=1600x1200

insmod gfxterm
insmod all_video
insmod gzio

font=unicode

terminal_output gfxterm

menuentry "Gentoo 4.1.15 r1" {
  set gfxpayload=keep
  set root=(hd0,msdos5)
  linux /vmlinuz-4.1.15-gentoo-r1 root=/dev/sda7 rootfstype=ext3 ro
}


resulted into following kernel panic
Code:
VFS: Cannot open root device "sda7" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

I'm pretty sure, hda7 was one of the available partitions (unfortunately not shown anymore in kernel panic).

.config (taken from config, which is written to /boot while executing /usr/src/linux/make install)
https://bpaste.net/raw/a6f8da8ca6cf

Please be in mind, I'm using Gentoo as guest in Hyper-V host (generation 1).
_________________
It is so beautiful to be detached from the "System"


Last edited by pacl on Tue Jan 26, 2016 3:06 pm; edited 2 times in total
Back to top
View user's profile Send private message
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Tue Jan 26, 2016 10:21 am    Post subject: Reply with quote

I found out, that LiveCD is using module hv_vmbus.

About hv_vmbus:
http://www.freebsd.org/cgi/man.cgi?query=hv_vmbus&sektion=4
Quote:
The hv_vmbus provides a high performance communication interface between guest and root partitions in Hyper-V.


But I was unable to find something similar in menuconfig ...
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Tue Jan 26, 2016 3:04 pm    Post subject: Reply with quote

Link to image of kernel panic screenshot:
http://fs5.directupload.net/images/160126/f8ukzv5m.png
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jan 26, 2016 6:52 pm    Post subject: Reply with quote

pacl,

Please put your kernel .config file onto a pastebin.

Your emulated hardware for the guest is
Code:
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
   Kernel driver in use: ata_piix
   Kernel modules: ata_piix, pata_acpi, ata_generic


As you do not have an initrd, those kernel modules must be built into the the the kernel. Select them as <*>
ata_piix is what you need in place of PATA_VIA.

To find hv_vmbus ... cheat.
Code:
cd /usr/src/linux
grep -R hv_vmbus ./*
That looks through the entire kernel source tree and prints the file name and every line containing hv_vmbus.
The file names give some hints as to where to look.
./drivers/hv/vmbus_drv.c looks promising, so
Code:
cd ./drivers/hv/vmbus_drv.c
ls
Reading Kconfig, it says at the top
Code:
menu "Microsoft Hyper-V guest support"
so that's the menu to look on.

The Microsoft Hyper-V guest support ---- menu is under Device Drivers.

The menu contains
Code:
  │ │    - - Microsoft Hyper-V client drivers               │ │ 
  │ │    - -   Microsoft Hyper-V Utilities driver           │ │ 
  │ │    - -   Microsoft Hyper-V Balloon driver
(I had to turn on hidden symboles to see it.)

The help on Microsoft Hyper-V client drivers says

Code:
  ┌────────────────── Microsoft Hyper-V client drivers ──────────────────┐
  │ CONFIG_HYPERV:                                                       │ 
  │                                                                      │ 
  │ Select this option to run Linux as a Hyper-V client operating        │ 
  │ system.                                                              │ 
  │                                                                      │ 
  │ Symbol: HYPERV [=n]                                                  │ 
  │ Type  : tristate                                                     │ 
  │ Prompt: Microsoft Hyper-V client drivers                             │ 
  │   Location:                                                          │ 
  │     -> Device Drivers                                                │ 
  │       -> Microsoft Hyper-V guest support                             │ 
  │   Defined at drivers/hv/Kconfig:3                                    │ 
  │   Depends on: X86 [=y] && ACPI [=y] && PCI [=y] && \       │ 
  │ X86_LOCAL_APIC [=y] && HYPERVISOR_GUEST [=n]   

Notice the symbol name CONFIG_HYPERV. You should have that on already.
_________________
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
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Tue Jan 26, 2016 7:05 pm    Post subject: Reply with quote

Is this not what you are looking for?
https://bpaste.net/raw/a6f8da8ca6cf

Quote:
To find hv_vmbus ... cheat.

In the screenshot of the kernel panic, hv_vmbus is doing something before panic happens.

Everything related to Hypervisor is selected in config, except (was unable to select this via menuconfig)
Code:
# CONFIG_SYS_HYPERVISOR is not set


Does it matter, that the virtual hard disk is on an external USB 3.0 storage?
Does it matter, that the Windows is running natively on a Macbook (BOOTCAMP)?

If you like, I can provide dmesg log produced by LiveCD
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jan 26, 2016 7:38 pm    Post subject: Reply with quote

pacl,

pacl wrote:
Does it matter, that the virtual hard disk is on a external USB 3.0 storage?

Maybe. It depends how the guest reaches the external USB 3.0 storage.

If USB is passed through to the guest, it will see a USB drive. If the host looks after the guest file system, the host will hide the fact that the guest storage is on USB.

In the former case, it matters a great deal. You need more kernel options built in and more kernel command line options.
In the latter case, the host will hide everything, so it won't matter.

In either case, the settings here will stop you from booting
Code:
# SCSI support type (disk, tape, CD-ROM)
#
# CONFIG_BLK_DEV_SD is not set
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set


You need CONFIG_BLK_DEV_SD=y (SCSI Disks), CONFIG_CHR_DEV_SG (SCSI Generic, for USB Storage).
You may need CONFIG_BLK_DEV_SR=y for optical drives.

I'll look over the rest when you tell how the guest gets access to the USB3 starage.
_________________
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
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Tue Jan 26, 2016 7:56 pm    Post subject: Reply with quote

Quote:
I'll look over the rest when you tell how the guest gets access to the USB3 starage.


In Hyper-V Generation 1, the guest system only sees an IDE controller.
With the installation of Integration Service Components, SCSI controller can used as well:
http://www.serverwatch.com/imagesvr_ce/7281/img-gen1-vm.jpg
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Jan 26, 2016 9:40 pm    Post subject: Reply with quote

pacl,

The IDE controller will be your
Code:
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
interface.

To boot, you need to be able to read hard drive partitions.
Code:
CONFIG_MSDOS_PARTITION=y
CONFIG_EFI_PARTITION=y
That covers most things the guest is likely to see.

The old IDE drivers must be off ... good
Code:
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set


The following must be on. <*>
Code:
# CONFIG_BLK_DEV_SD is not set
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
They are the high level drivers for Hard Drives, Optical Media and anything else that pretends to be a SCSI device.

You have
Code:
CONFIG_HYPERV_STORAGE=y
set. If all is well. this will give you a hard drive called /dev/vda or something like that.
It won't be /dev/sda. Look in /dev for and entry that mirrors /dev/sda and its partitions.
If you fix the above and point grub (and fstab) there it may just work. The rest of this post is aimed at getting running with /dev/sda

Your fake chipset drivers.
Code:
CONFIG_ATA=y
CONFIG_ATA_SFF=y
CONFIG_ATA_BMDMA=y
CONFIG_ATA_PIIX=y


Filesystems
Code:
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_EXT4_FS is not set

/etc/fstab:

/dev/sda7    /        ext4

If your root is ext4 you need kernel support as <*>, if not, fix your /etc/fstab
When you are ready to chroot, the command
Code:
df -T
will show you your filesystem types.

Turn off CONFIG_NTFS_FS=y. Its mostly harmless now and does not do what you think it does.
Use the kernel FUSE support and emerge ntfs-3g if you really want NTFS support.

Fix your kernel and try again. Stay with sda for now. When your system boots, you can look for the HYPERV_STORAGE nodes in your own /dev and switch over at that time if you want to.

The kernel drivers for file systems and hard drives are like the layers of a cake.
At the top, is a filesystem. It does not care about the data layout on the media, nor how its internal structure is mapped.
The next layer down converts file system commands to the transport protocol. This is the layer you have missing.
The bottom layer converts protocol commands to chip set specific commands.
This layered approach makes it easy to maintain. To add support for a new chip set only requires a new chipset driver. Everything else is reused.
Likewise for a new filesystem ... the lower layers do not change.
_________________
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
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Wed Jan 27, 2016 6:34 am    Post subject: Reply with quote

It's working now!

Thank you very much!

But why EFI partition?
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
TigerJr
Guru
Guru


Joined: 19 Jun 2007
Posts: 540

PostPosted: Wed Jan 27, 2016 7:02 am    Post subject: Reply with quote

pacl wrote:

But why EFI partition?


Cause by hypervisor image bootloader EFI bios
_________________
Do not use gentoo, it die
Back to top
View user's profile Send private message
pacl
n00b
n00b


Joined: 24 Jan 2016
Posts: 38

PostPosted: Wed Jan 27, 2016 8:43 am    Post subject: Reply with quote

Quote:
Cause by hypervisor image bootloader EFI bios


Thank you
_________________
It is so beautiful to be detached from the "System"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Jan 27, 2016 6:42 pm    Post subject: Reply with quote

pacl,

You may not need EFI partition support.
I did not ask if you made an MSDOS or GPT partition table for the guest. EFI partition support is for GPT partition tables.
You have both. Its a little extra baggage if its not needed.

Now that it boots, you should be able to see the Hyper-V HDD in /dev if its there.
Performance will be better if you switch grub and fstab to use it.
_________________
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
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