View previous topic :: View next topic |
Author |
Message |
sensi_tuX n00b
Joined: 18 Dec 2004 Posts: 46
|
Posted: Thu Mar 30, 2017 7:28 pm Post subject: [SOLVED] Couldn't find the root block device in UUID (KVM) |
|
|
Hi there,
im trying to install Gentoo as a guest system after renting a new virtual server. As this is my first experience with host/guest system it seems im missing something. I tried to install according to the amd64 handbook.
Everytime im booting with the grub2 bootloader im getting the error message like written in the title.
I tried to changed different kernel settings (VIRTIO_*), using supported file systems built directly into the kernel instead of modules, using the UUID and partition UID in fstab but nothing works. Nwo im running out of ideas what i could try next.
Im using genkernel with linux-4.8.17-hardened-r2 sources.
If anybody needs some more data pls let me know...
parted -l with live cd
blkid with live cd
lspci -kl with live cd
used grub2 config
kernel .config
dmesg
Last edited by sensi_tuX on Fri Mar 31, 2017 10:48 am; edited 2 times in total |
|
Back to top |
|
|
Roman_Gruber Advocate
Joined: 03 Oct 2006 Posts: 3846 Location: Austro Bavaria
|
Posted: Thu Mar 30, 2017 7:34 pm Post subject: |
|
|
Quote: | /dev/sda2: UUID="ea9bb68c-c769-4c89-80de-f06f3e2ebf3d" SEC_TYPE="ext2" TYPE="ext3" PARTLABEL="boot" PARTUUID="82ebccb9-41c0-4f5f-aee6-741c3cf67931" |
UEFI => gpt partition table => boot partition is vfat not ext2 (TYPE="ext3")
I assume you use the new layout for UEFI based boxes
--
uuid can be read out with blkid command
grub2 has a shell feature. I suggest you use the shell and see yourself how the partitions are named and accessed!
--
line 63 of grub
Quote: | set root='hd0,gpt4' |
is wrong
partition should be formated with vfat,
and should be
Code: | insmod part_gpt
set root='hd0,gpt2'
|
you want to access your kernel in boot. So files are in boot and not in your root partition. therefore you need to point grub to boot partition, second partition.
--
you also miss some important flags
mine:
Code: | ASUS-G75VW roman # parted -l
Model: ...
Disk /dev/sda: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 3146kB 2097kB grub bios_grub
2 3146kB 137MB 134MB fat16 boot boot, esp
3 137MB 120GB 120GB lvm
|
yours
Code: | Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 41.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 3146kB 2097kB grub bios_grub
2 3146kB 137MB 134MB ext3 boot
3 137MB 8627MB 8489MB linux-swap(v1) swap
4 8627MB 41.9GB 33.2GB ext4 rootfs |
please redo partition number 2, according to handbook. wrong file system, wrong flags
--
edit just saw your backup / faulty boot entry is just pointing to the wrong partition
--
anyway
I suggest you clean up those messy default grub boot entries, to something like this, small and beautiful
Something like this, without my comments. I hope you get my point.
Code: | menuentry ' gentoo ' {
insmod part_gpt
set root='hd0,gpt2'
echo ' boot entry gentoo'
linux /4.9.13-gentoo-10-03-2017 rootfstype=ext4 keymap= (add e.g. de when you want that) init=/linuxrc ramdisk=8192 real_root= (fill out please)
initrd /early_ucode.cpio /initramfs-genkernel-x86_64-4.2.3-gentoo (e.g. for intel microcode, initramfs when needed)
|
Those grub script generated boot entries are just messy, not really human readable!
--
the on the fly edit mode from grub is a nice feature, so you can test out instantly without keeping those changes. try with the edit mode, write down your changes, also use the grub shell to see what grub sees at that point. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Thu Mar 30, 2017 8:16 pm Post subject: |
|
|
sensi_tuX,
What sort of virtualisation do you have?
It looks like KVM with all that Red Had pseudo hardware. Please confirm.
I've never used KVM with UEFI and I don't think you are either. Its BIOS and GPT.
Is that correct?
Do you have a virtual console, or are we doing this bind?
I guess you have a console or it would just fail to boot and you wouldn't know about Quote: | Could not find the root block device in UUID |
Its interesting that the liveCD mentions /dev/sda.
The virtio driver will have the HDD as /dev/vda.
What determines this is how the host is set up.
How did you make your initrd?
It looks like genkernel. I don't know now well genkernel works with KVMs, so I would build in everything I need to boot.
My working KVM hardened .config expects virtio hardware.
It does not need an initrd to boot but you may not use UUID on the kernel command line. Use PARTUUID or /dev/vd... or maybe /devsd...
By way of diagnostics, go into into the shell when boot fails and run ls /dev
Do you see sda* and/or vda* or neither? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3137
|
Posted: Thu Mar 30, 2017 9:48 pm Post subject: |
|
|
I've seen similar messages when kernel was unable to find init.
Try booting with "init=/bin/bash"
or (if you use genkernel's initramfs) "debug"
Those tricks will drop you to shell so you can have a look around and e.g. confirm you're using the right partition for your root.
You know, you're not going to succeed if you point your kernel at /boot
Code: |
[ 13.110881] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10
[ 13.156044] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
[ 13.161944] virtio-pci 0000:00:04.0: irq 24 for MSI/MSI-X
[ 13.161962] virtio-pci 0000:00:04.0: irq 25 for MSI/MSI-X
[ 13.161977] virtio-pci 0000:00:04.0: irq 26 for MSI/MSI-X
[ 13.161991] virtio-pci 0000:00:04.0: irq 27 for MSI/MSI-X
[ 13.162355] scsi host2: Virtio SCSI HBA
[ 13.163301] scsi 2:0:0:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 13.165433] virtio-pci 0000:00:03.0: irq 28 for MSI/MSI-X
[ 13.165470] virtio-pci 0000:00:03.0: irq 29 for MSI/MSI-X
[ 13.165506] virtio-pci 0000:00:03.0: irq 30 for MSI/MSI-X
[ 13.178733] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 13.178788] sd 2:0:0:0: [sda] 81788928 512-byte logical blocks: (41.8 GB/39.0 GiB)
[ 13.179076] sd 2:0:0:0: [sda] Write Protect is off
[ 13.179079] sd 2:0:0:0: [sda] Mode Sense: 63 00 00 08
[ 13.179150] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 13.182709] sda: sda1 sda2 sda3 sda4
[ 13.183339] sd 2:0:0:0: [sda] Attached SCSI disk
[ 14.279884] warning: process `hwsetup' used the deprecated sysctl system call with 1.23.
[ 19.608790] NET: Registered protocol family 10
[ 19.758204] cfg80211: Calling CRDA to update world regulatory domain
[ 19.830611] cfg80211: World regulatory domain updated:
[ 19.830613] cfg80211: DFS Master region: unset
[ 19.830614] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 19.830616] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 19.830617] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 19.830618] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 19.830620] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
[ 19.830621] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[ 19.830622] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 19.830623] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 19.830624] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 422.164532] Adding 8290300k swap on /dev/sda3. Priority:-1 extents:1 across:8290300k
[ 441.966323] EXT4-fs (sda4): mounted filesystem with ordered data mode. Opts: (null)
[ 608.276007] kjournald starting. Commit interval 5 seconds
[ 608.276182] EXT3-fs (sda2): using internal journal
[ 608.276186] EXT3-fs (sda2): mounted filesystem with writeback data mode |
Virtio drives visible as sda. Funny thing. Still, if kernel can mount those partitions, and then fails to find root, I suppose it is just looking for init on a wrong partition.
Edit: Yup. your parted shows sda2 is /boot. Root is on sda4. |
|
Back to top |
|
|
sensi_tuX n00b
Joined: 18 Dec 2004 Posts: 46
|
Posted: Fri Mar 31, 2017 10:45 am Post subject: |
|
|
Ufff....finally its running...
First i started to ask the support whether its a UEFI system or just a old BIOS system. The support then told me its a KVM BIOS system.
Next i was recreating the boot partition with ext2 instead of ext3.
Then i found the KVM howto where i found out that most of the virtio stuff (guest section) was compiled as modules instead of compiling it right into the kernel like described in this howto. Ok...changed it and compiled kernel and modules again with genkernel.
Next i was looking what to do with the boot partition and grub2. From my understanding this howto is using grub1, isn't it? I created a device.map file followed by a grub-install --device-map=blahblah but it seems that this isnt supported (or needed) anymore.
So i decided to follow again the grub2 instructions in the amd64 installation handbook, rebooted and voila...everythings looks fine (apart from some probably minor warnings/errors while booting)!
What was a bit strange for me: i couldn't find any vda devices. Isn't a typical KVM guest installation working with this vd(a) devices instead like in my case with sd(a) devices? Also in the KVM guest documentation they use a device.map for mapping the vda device.
However...finally its up an running. Thx to you all!
@szatox
sda2 and sda4 was mounted by me when chrooting. Sorry...should have removed that part from dmesg output... |
|
Back to top |
|
|
sensi_tuX n00b
Joined: 18 Dec 2004 Posts: 46
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Fri Mar 31, 2017 12:44 pm Post subject: |
|
|
sensi_tuX,
There is not a yes/no answer to your vda question. It depends how the host provisions your storage.
You have a Code: | 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
Subsystem: Red Hat, Inc Qemu virtual machine
Kernel driver in use: ata_piix
Kernel modules: ata_piix, pata_acpi, ata_generic
| emulated hardware IDE interface and a Code: | 00:04.0 SCSI storage controller: Red Hat, Inc Virtio SCSI
Subsystem: Red Hat, Inc Virtio SCSI
Kernel driver in use: virtio-pci | virtio emulated SCSI interface.
If its attached to either of those devices, you get /dev/sd... naming.
If it uses virtio directly, which is faster, its /dev/vd... naming.
The latter needs the guest to be compiled with suitable support for virtio.
The former allows any random guest to be run. Think Windows, where you can't rebuild 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 |
|
|
|
|
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
|
|