# Hetzner vServer - Kernel panic - not syncing: VFS

## psycco

Hi folks,

i rented a Hetzner vServer and now I'm unable to boot into it. I've googled around but i didn't find the right answer. I compiled the kernel many times with different options but nothing worked.

The error message is "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)".

picture with error:

http://www.stooorage.com/show/248/19668135_error.png

emerge --info:

```
rescue linux # emerge --info

Portage 2.2.26 (python 2.7.10-final-0, default/linux/amd64/13.0, gcc-4.9.3, glibc-2.21-r2, 4.1.15 x86_64)

=================================================================

System uname: Linux-4.1.15-x86_64-Intel-R-_Xeon-R-_CPU_E5-26xx_-Sandy_Bridge-with-gentoo-2.2

KiB Mem:      956576 total,    456796 free

KiB Swap:          0 total,         0 free

Timestamp of repository gentoo: Fri, 26 Feb 2016 23:30:01 +0000

sh bash 4.3_p42-r1

ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1

app-shells/bash:          4.3_p42-r1::gentoo

dev-lang/perl:            5.20.2::gentoo

dev-lang/python:          2.7.10-r1::gentoo, 3.4.3-r1::gentoo

dev-util/pkgconfig:       0.28-r2::gentoo

sys-apps/baselayout:      2.2::gentoo

sys-apps/openrc:          0.19.1::gentoo

sys-apps/sandbox:         2.10-r1::gentoo

sys-devel/autoconf:       2.69::gentoo

sys-devel/automake:       1.14.1::gentoo, 1.15::gentoo

sys-devel/binutils:       2.25.1-r1::gentoo

sys-devel/gcc:            4.9.3::gentoo

sys-devel/gcc-config:     1.7.3::gentoo

sys-devel/libtool:        2.4.6::gentoo

sys-devel/make:           4.1-r1::gentoo

sys-kernel/linux-headers: 4.3::gentoo (virtual/os-headers)

sys-libs/glibc:           2.21-r2::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.gentoo.org/gentoo-portage

    priority: -1000

ACCEPT_KEYWORDS="amd64 ~amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=corei7-avx -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=corei7-avx -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="http://distfiles.gentoo.org"

LANG="de_DE.utf8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

USE="acl amd64 berkdb bindist bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 mmx mmxext modules multilib ncurses nls nptl openmp pam pcre readline seccomp session sse sse2 ssl tcpd unicode xattr zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
```

My /boot/grub/grub.cfg:

```
timeout=5

menuentry 'Gentoo Linux' {

        root=hd0,1

        linux /boot/vmlinuz-4.1.15-gentoo-r1 root=/dev/hda1

}
```

lsmod from the rescue system (debian):

```
root@rescue ~ # lsmod

Module                  Size  Used by

nfsd                  197608  2

exportfs                3091  1 nfsd

sg                     24689  0

sr_mod                 12263  0

cdrom                  21964  1 sr_mod

sd_mod                 26774  0

crc32_pclmul            2507  0

crc32c_intel           12569  0

ata_generic             3210  0

pata_acpi               3035  0

aesni_intel           157341  0

aes_x86_64              7191  1 aesni_intel

lrw                     3021  1 aesni_intel

gf128mul                5138  1 lrw

glue_helper             3453  1 aesni_intel

ablk_helper             1524  1 aesni_intel

cryptd                  6822  2 aesni_intel,ablk_helper

psmouse                63124  0

serio_raw               3929  0

virtio_scsi             8652  0

virtio_balloon          4472  0

i2c_piix4               7672  0

ata_piix               23807  0

acpi_cpufreq            5767  0

processor              22665  1 acpi_cpufreq

intel_agp              10016  0

intel_gtt              10310  1 intel_agp

autofs4                20268  2

virtio_net             17542  0

evdev                   8699  1

virtio_pci             11807  0

virtio_ring             5724  4 virtio_net,virtio_pci,virtio_balloon,virtio_scsi

virtio                  4618  4 virtio_net,virtio_pci,virtio_balloon,virtio_scsi

e1000                  86782  0
```

lspci -v:

```
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)

        Subsystem: Red Hat, Inc Qemu virtual machine

        Flags: fast devsel

00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]

        Subsystem: Red Hat, Inc Qemu virtual machine

        Flags: medium devsel

00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] (prog-if 80 [Master])

        Subsystem: Red Hat, Inc Qemu virtual machine

        Flags: bus master, medium devsel, latency 0

        [virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]

        [virtual] Memory at 000003f0 (type 3, non-prefetchable)

        [virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]

        [virtual] Memory at 00000370 (type 3, non-prefetchable)

        I/O ports at c0c0 [size=16]

        Kernel driver in use: ata_piix

00:01.2 USB controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01) (prog-if 00 [UHCI])

        Subsystem: Red Hat, Inc QEMU Virtual Machine

        Flags: bus master, fast devsel, latency 0, IRQ 11

        I/O ports at c080 [size=32]

        Kernel driver in use: uhci_hcd

00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)

        Subsystem: Red Hat, Inc Qemu virtual machine

        Flags: medium devsel, IRQ 9

        Kernel driver in use: piix4_smbus

00:02.0 VGA compatible controller: Device 1234:1111 (rev 02) (prog-if 00 [VGA controller])

        Subsystem: Red Hat, Inc Device 1100

        Flags: fast devsel

        Memory at fd000000 (32-bit, prefetchable) [size=16M]

        Memory at febf0000 (32-bit, non-prefetchable) [size=4K]

        Expansion ROM at febe0000 [disabled] [size=64K]

00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)

        Subsystem: Red Hat, Inc QEMU Virtual Machine

        Flags: bus master, fast devsel, latency 0, IRQ 10

        Memory at febc0000 (32-bit, non-prefetchable) [size=128K]

        I/O ports at c000 [size=64]

        Expansion ROM at feb80000 [disabled] [size=256K]

        Kernel driver in use: e1000

00:04.0 SCSI storage controller: Red Hat, Inc Virtio SCSI

        Subsystem: Red Hat, Inc Device 0008

        Flags: bus master, fast devsel, latency 0, IRQ 11

        I/O ports at c040 [size=64]

        Memory at febf1000 (32-bit, non-prefetchable) [size=4K]

        Capabilities: [40] MSI-X: Enable+ Count=4 Masked-

        Kernel driver in use: virtio-pci

00:05.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon

        Subsystem: Red Hat, Inc Device 0005

        Flags: bus master, fast devsel, latency 0, IRQ 10

        I/O ports at c0a0 [size=32]

        Kernel driver in use: virtio-pci
```

kernel .config:

in the next post - was too long  :Wink: Last edited by psycco on Sun Feb 28, 2016 6:11 pm; edited 1 time in total

----------

## NeddySeagoon

psycco,

A few things ...

Your kernel config file may be interesting but it will not fit into a forums post.

Use wgetpaste to put it onto the web and past a link.

```
menuentry 'Gentoo Linux' {

        root=hd0,1

        linux /boot/vmlinuz-4.1.15-gentoo-r1 root=/dev/hda1

}
```

Support for /dev/hda1 was removed a long time age. /dev/sda1 might work though.

```
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] (prog-if 80 [Master]) 

00:04.0 SCSI storage controller: Red Hat, Inc Virtio SCSI 
```

That fake PIIX3 IDE interface is very old.  You configure it under SATA today atd it gets a SCSI name.  You only need to use this if you wart to run an unmodifed guest.

For Gentoo, you should use the Virtio driver.  That will make your HDD appear as /dev/vda.  

Try fixing your grub.cfg.  If that fails, pastebing your kernel .config file.

----------

## frostschutz

It should be /dev/vda1 and virtio drivers and such need to be builtin your kernel...

Hetzner also has a forum, they might not be 100% Gentooers there but at least you find people who are using the very same product which can help a lot sometimes.

----------

## psycco

thanks for the clarification. this grub.cfg was old. i've compiled virtio-scsi into the kernel, but it won't boot. here is my kernel config: http://pastebin.com/ke6tzaEx

my grub.cfg:

```
timeout=5

menuentry 'Gentoo Linux' {

        root=hd0,1

        linux /boot/vmlinuz-4.1.15-gentoo-r1 root=/dev/vda1

}
```

is it right or only /dev/vda?

thanks!

edit @frostschutz: thanks, i will give it a try! besten dank  :Wink: 

----------

## frostschutz

 *psycco wrote:*   

> is it right or only /dev/vda?

 

You tell us! It depends on your partitioning and what you used as a root partition.

After booting rescue / chrooting, have a look at `lsblk`, `mount`, etc.

 *psycco wrote:*   

> i've compiled virtio-scsi into the kernel, but it won't boot.

 

You also need everything else. Support for your partitioning scheme. Support for your filesystem. Etc.

Even if you do not intend to use a Initramfs in the long run, if you added one temporarily at least it could give you an initramfs shell so you could figure out what is wrong (like if your block device is even there according to /proc/partitions, and whether it can be mounted, ...)

----------

## NeddySeagoon

psycco,

Now that you have changed the kernel, we need a new image of the failure.

----------

