Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Problem booting kernel from grub
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1044

PostPosted: Wed Oct 23, 2019 6:33 pm    Post subject: [solved] Problem booting kernel from grub Reply with quote

I am trying to setup gentoo on a vserver. The host is virtuozzo 7.

As there is no gentoo provided, I got an ubuntu image to begin with, so I set it up to have a big swap partition of about 30 Gb, deleted that partition and used it to setup gentoo on this sda2. boot is just a folder, not a separate partition.

So I chrooted in and everything went fine until I tried to boot that system.

Error is:
cannot open root device "sda2" or unknown-block (0,0): error -6

I tried with different kernel configs, tried my kernel config from another vserver, which works fine in virtuozzo6 host on from the same hoster, tried creating the kernel with make localyesconfig, even tried the ubuntu kernel konfig. Tried with gentoo grub, tried with ubuntu grub, even copied everything from boot folder in sda2 into ubuntu's boot folder in sda1. Tried with /dev/sda2 in fstab and also with UUID entry instead. No luck.

In grub rescue prompt I can see the kernels in the corresponding partition issuing

ls (hd0,msdos2)/

Unfortunately I cannot find the character "=" within grub prompt, tried every possible button, and unfortunately ascii code (Alt61) does not work either within grub rescue prompt, so I could not try if it would have been possible to boot kernel manually from within grub rescue prompt.

Last thing I tried, is creating initramfs file with genkernel, but that failed too

From gentoo chroot

lspci

lsmod

actual kernel .config

emerge --info

How can I solve this?


Last edited by Elleni on Wed Oct 23, 2019 8:24 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Oct 23, 2019 6:59 pm    Post subject: Reply with quote

Elleni,

You have two devices that your HDD could be attached to
Code:
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:04.0 SCSI storage controller: Red Hat, Inc. Virtio SCSI


The first one needs
Code:
CONFIG_ATA_PIIX=y
but the other one is not configured.
I think that you need # CONFIG_SCSI_LOWLEVEL is not set, then the Virtio option in that menu.

unknown-block (0,0) means that the kernel cannot communicate with the HDD.
Grub is doing it thing and loading the kernel.
_________________
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
Elleni
Veteran
Veteran


Joined: 23 May 2006
Posts: 1044

PostPosted: Wed Oct 23, 2019 7:20 pm    Post subject: Reply with quote

Hello NeddySeagoon, thanks a lot for looking into this.

I activated scsi_lowlevel but do no see a virtio module in that section. Is there another dependency? Could this item be hidden because of another missing dependency? There is a switch to show the hidden options, isn't it?

Are this options meant to be activated (under device drivers/virtio drivers)?

Code:
--- Virtio drivers                                                             │ │ 
  │ │        < >   PCI driver for virtio devices                                            │ │ 
  │ │        < >   Platform bus driver for memory mapped virtio devices


virtio was a good keyword though, lead me to the following website, and activating the kernel modules, scsi virtio in scsi lowlevel became visible. Compiling kernel for testing right now. Editing fstab to vda2 instead of sda2 was not needed as device shows as sda not vda. I will report back, if it works or if I still need assistance.

Edit to add, kernel boots now, but I have no network connection yet. Althouth I have activated

Code:
[*] Network device support  --->
        [*] Network core driver support
            <*> Virtio network driver


Oh, I see with ifconfig -a that it is named eth0 instead of ens3 as it was named on the ubuntu linux, which I had used to chroot in to install. Reconfiguring right now :D

Thanks Neddy :D
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Oct 23, 2019 8:30 pm    Post subject: Reply with quote

Elleni,

press 'z' to toggle hidden options.

Maybe my memory is faulty.

Code:
 virtio-scsi support ────────────────────────────────────────────┐
  │ CONFIG_SCSI_VIRTIO:                                                                                         │ 
  │                                                                                                             │ 
  │ This is the virtual HBA driver for virtio.  If the kernel will                                              │ 
  │ be used in a virtual machine, say Y or M.                                                                   │ 
  │                                                                                                             │ 
  │ Symbol: SCSI_VIRTIO [=n]                                                                                    │ 
  │ Type  : tristate                                                                                            │ 
  │ Prompt: virtio-scsi support                                                                                 │ 
  │   Location:                                                                                                 │ 
  │     -> Device Drivers                                                                                       │ 
  │       -> SCSI device support                                                                                │ 
  │         -> SCSI low-level drivers (SCSI_LOWLEVEL [=y])                                                      │ 
  │   Defined at drivers/scsi/Kconfig:1504                                                                      │ 
  │   Depends on: SCSI_LOWLEVEL [=y] && SCSI [=y] && VIRTIO [=m]   
Maybe not.

There is another block device driver.
Code:
<*>   Virtio block driver

Code:
CONFIG_VIRTIO_BLK:                                                                                          │ 
  │                                                                                                             │ 
  │ This is the virtual block driver for virtio.  It can be used with                                           │ 
  │ QEMU based VMMs (like KVM or Xen).  Say Y or M.                                                             │ 
  │                                                                                                             │ 
  │ Symbol: VIRTIO_BLK [=m]                                                                                     │ 
  │ Type  : tristate                                                                                            │ 
  │ Prompt: Virtio block driver                                                                                 │ 
  │   Location:                                                                                                 │ 
  │     -> Device Drivers                                                                                       │ 
  │       -> Block devices (BLK_DEV [=y])                                                                       │ 
  │   Defined at drivers/block/Kconfig:428                                                                      │ 
  │   Depends on: BLK_DEV [=y] && VIRTIO [=m] 

I didn't check your kernel but this will make your HDD appear as /dev/vda, not /dev/sda ... and so on.

-- edit --
Its also off in your kernel.
_________________
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 Kernel & Hardware 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