Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on Microsoft Hyper-V (Windows Server 2008 R2)-SOLVED
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 2:31 am    Post subject: Gentoo on Microsoft Hyper-V (Windows Server 2008 R2)-SOLVED Reply with quote

Hello,

I am trying to install Gentoo Linux (with the latest Kernel - 3.6.11 gentoo-sources) and after performing the installation I cannot get the system to boot.

Specifically, I get the following boot message (a screenshot is linked here as I am summarizing):

Code:
Unable to mount root fs on unknown-block


Now, if you view the image you can see that the kernel does recognize my partitions on the sda block device (which refers to my VHD and main partitions) and ext2-4 are listed as partitions that my kernel can mount from.

I compiled in both the Hyper-V drivers and the file system drivers.

So why do I have this problem?

Thank you for your time.

Here are links/info to various aspects of this Gentoo Instance:

lspci -v (Link - This is from Live CD)

Grub.conf:

Code:
(chroot) livecd / # cat /boot/grub/grub.conf
default 0
timeout 3
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3.6.11
root (hd0,0)
kernel /boot/kernel-3.6.11-gentoo root=/dev/sda3

# vim:ft=conf:


ls -hl /boot:

Code:
(chroot) livecd / # ls -hl /boot/
total 5.0M
lrwxrwxrwx 1 root root    1 Feb  7 21:53 boot -> .
drwxr-xr-x 2 root root 1.0K Feb  7 21:55 grub
-rw-r--r-- 1 root root 5.0M Feb  8 01:29 kernel-3.6.11-gentoo
drwx------ 2 root root  12K Feb  7 20:07 lost+found


uname -a:

Code:
(chroot) livecd / # uname -a
Linux livecd 3.6.11-gentoo #1 SMP Thu Jan 10 05:55:16 UTC 2013 x86_64 Intel(R) Xeon(R) CPU E5620 @ 2.40GHz GenuineIntel GNU/Linux


Kernel Config (Linked)


Last edited by ckoeber on Wed Feb 13, 2013 1:02 am; edited 1 time in total
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Tue Feb 12, 2013 5:57 am    Post subject: Reply with quote

ckoeber,

Try adding rootfstype=ext3, or whatever your filesystem is, to the kernel grub line
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 738
Location: Montréal

PostPosted: Tue Feb 12, 2013 6:08 am    Post subject: Reply with quote

Hello,

the output of the command blkid could help to determine the contain of your partitions table and the filesystem inside each partition. This could be retreive from a Linux live-cd.
_________________
Paul
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 6:53 am    Post subject: Reply with quote

BillWho wrote:
ckoeber,

Try adding rootfstype=ext3, or whatever your filesystem is, to the kernel grub line


I tried this (in my case I used rootfstype=ext4 as my root partition is ext4) to no avail.

Thanks. Anything else?
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 6:56 am    Post subject: Reply with quote

Logicien wrote:
Hello,

the output of the command blkid could help to determine the contain of your partitions table and the filesystem inside each partition. This could be retreive from a Linux live-cd.


Output of blkid:

Code:
/dev/loop0: TYPE="squashfs"
/dev/sr0: LABEL="Gentoo Linux amd64 20130110" TYPE="iso9660"
/dev/sda1: UUID="aad7b42d-664d-4c45-81c4-30d784efa09b" TYPE="ext2"
/dev/sda2: UUID="32e872af-8a7a-4dea-9e44-dd1513769d81" TYPE="swap"
/dev/sda3: UUID="2ec8ca7f-cbed-4a75-926b-465e30758206" TYPE="ext4"


Funny thing is, per what I wrote to the other commenter, I tried the rootfstype=ext4 and yet I still have the problem.

Thanks for assistance thus far.

Anything else?
Back to top
View user's profile Send private message
jrussia
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2012
Posts: 89
Location: Chicago

PostPosted: Tue Feb 12, 2013 7:41 am    Post subject: Reply with quote

Maybe related to
# CONFIG_DEVTMPFS is not set
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 8:08 am    Post subject: Reply with quote

jrussia wrote:
Maybe related to
# CONFIG_DEVTMPFS is not set


Thanks, I set this (under General Driver Options in the Kernel Config) but still no dice.

Same "Unable to mount root fs on unknown-block" error message.

What's weird is that the LiveCD recognizes the drives fine.

Anything else I can try?

Thanks again.
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 21
Location: Istanbul/Turkey

PostPosted: Tue Feb 12, 2013 9:13 am    Post subject: Reply with quote

Looks like your problem is the same with this one: https://forums.gentoo.org/viewtopic-t-950918.html
And it says "It works now, grub syntax was the problem"

If i had a configuration like this:

Code:
/dev/sda1 is boot partition with ext2, Label=Boot
/dev/sda2 is swap partition, Label=Swap
/dev/sda3 is root partition with ext4, Label=Root


I would use these lines in grub.conf:

Code:
kernel (hd0,0)/kernel-file-name-here root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=LABEL=Root udev real_rootfs=ext4 real_resume=LABEL=Swap splash=silent
initrd (hd0,0)/initramfs-file-here


I prefer Label because I find it more comfortable and easy to use.

First number in (hd0,0) is your disk number, 0 for sda, 1 for sdb, 2 for sdc...
Second number in (hd0,0) is the partition where your /boot folder is. If you have a seperate boot partition then this should point to it, if you don't have boot partition then it should point to your root partition. It is "(partition number)-1", 0 for sda1, 1 for sda2, 2 for sda3...


Last edited by shdcn on Tue Feb 12, 2013 3:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 738
Location: Montréal

PostPosted: Tue Feb 12, 2013 1:23 pm    Post subject: Reply with quote

shdcn,
I do not think your kernel line in Grub could work for the moment because ckoeber do not use an initramfs. Create one ckoeber possibly can solve the problem. The kernel can miss something in module it need to mount the root partition.

So, I would install dracut if not and create an initramfs with it after be sure /etc/dracut.conf is ok:
Code:
dracut /boot/initramfs-3.6.11-gentoo.cpio.gz 3.6.11-gentoo


for your kernel version and add it to the Grub entry:
Code:
title Gentoo Linux 3.6.11
root (hd0,0)
kernel /boot/kernel-3.6.11-gentoo root=/dev/sda3
initrd /boot/initramfs-3.6.11-gentoo.cpio.gz


This can be just a workaround if it work because myself I can boot Funtoo without any initramfs. So, I propose this because it's a bit long to find what's need to be modify in your kernel configuration file.

Edit: I see you have enable SELinux in your kernel configuration. I would disable it with in the Grub entry
Code:
title Gentoo Linux 3.6.11
root (hd0,0)
kernel /boot/kernel-3.6.11-gentoo root=/dev/sda3 selinux=0
initrd /boot/initramfs-3.6.11-gentoo.cpio.gz

_________________
Paul
Back to top
View user's profile Send private message
shdcn
n00b
n00b


Joined: 11 Feb 2013
Posts: 21
Location: Istanbul/Turkey

PostPosted: Tue Feb 12, 2013 3:03 pm    Post subject: Reply with quote

You are right Logicien, my grub line is not a solution. I was just trying to give an example grub line in case ckoeber finds a useful parameter in it.

ckoeber looks like you don't have ext2 enabled in kernel
Code:
# CONFIG_EXT2_FS is not set

You have a boot partition with ext2 and grub tries to access that partition for kernel. This might be your solution:
Code:
CONFIG_EXT2_FS=y
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 738
Location: Montréal

PostPosted: Tue Feb 12, 2013 4:01 pm    Post subject: Reply with quote

Until the Linux kernel do not need anything in the /boot partition after it is loaded by Grub with or without an initramfs, it is not mandatary to have the support of the /boot partition filesystem in the kernel. Grub can access the /boot partition to load the kernel plus the initramfs. The kernel is loaded as the timestamp show.

Mandatory is EXT4 in the kernel without an initramfs to mount the / partition. But to mount the /boot partition from /etc/fstab, EXT2 is needed in the kernel or in module.
_________________
Paul
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 6:44 pm    Post subject: Reply with quote

Logicien wrote:
shdcn,
I do not think your kernel line in Grub could work for the moment because ckoeber do not use an initramfs. Create one ckoeber possibly can solve the problem. The kernel can miss something in module it need to mount the root partition.

So, I would install dracut if not and create an initramfs with it after be sure /etc/dracut.conf is ok:
Code:
dracut /boot/initramfs-3.6.11-gentoo.cpio.gz 3.6.11-gentoo


for your kernel version and add it to the Grub entry:
Code:
title Gentoo Linux 3.6.11
root (hd0,0)
kernel /boot/kernel-3.6.11-gentoo root=/dev/sda3
initrd /boot/initramfs-3.6.11-gentoo.cpio.gz


This can be just a workaround if it work because myself I can boot Funtoo without any initramfs. So, I propose this because it's a bit long to find what's need to be modify in your kernel configuration file.

Edit: I see you have enable SELinux in your kernel configuration. I would disable it with in the Grub entry
Code:
title Gentoo Linux 3.6.11
root (hd0,0)
kernel /boot/kernel-3.6.11-gentoo root=/dev/sda3 selinux=0
initrd /boot/initramfs-3.6.11-gentoo.cpio.gz


OK, I followed the instructions and I get a new error message (Link to Image).

It looks like there is a problem with the type of driver being used; the drive geometry is off.

On the LiveCD the drive is recognized as a 1TB drive (approximate) but the kernel/initramfs thing the drive is recognized differently, it seems.

So how can I rectify that?

Thanks.
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 6:50 pm    Post subject: Reply with quote

shdcn wrote:
You are right Logicien, my grub line is not a solution. I was just trying to give an example grub line in case ckoeber finds a useful parameter in it.

ckoeber looks like you don't have ext2 enabled in kernel
Code:
# CONFIG_EXT2_FS is not set

You have a boot partition with ext2 and grub tries to access that partition for kernel. This might be your solution:
Code:
CONFIG_EXT2_FS=y


I didn't need this in other systems I installed before but I tried the suggestion and no dice.

Thank you for the help though.
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 9:53 pm    Post subject: Reply with quote

OK, I tried GenKernel and I still have the same problem; it can't mount my root partition ("/dev/sda3") but what is weird is that in GenKernel when I drop to the shell the system sees the various partitions on the disk.

This is the GenKernel Boot Screen I get now: (Link to Image)

And when I drop to the shell, I can list the disk with it's partitions: (Link to Image)

/dev/sda3 is formatted as ext4 so I don't know what the problem is.

Thank you for your time.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Tue Feb 12, 2013 10:34 pm    Post subject: Reply with quote

ckoeber

Now that you used genkenel try adding root=/dev/ram0 real_root=/dev/sda3 to the kernel line.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 10:47 pm    Post subject: Reply with quote

BillWho wrote:
ckoeber

Now that you used genkenel try adding root=/dev/ram0 real_root=/dev/sda3 to the kernel line.


Tried that but still the same result. Here is my Grub.conf:

Code:
# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

default 0
timeout 3
splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3.6.11
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.6.11-gentoo rootfstype=ext4 root=/dev/ram0 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-3.6.11-gentoo

# vim:ft=conf:


What else can I try?

Thank you for your time.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Tue Feb 12, 2013 10:59 pm    Post subject: Reply with quote

ckoeber,

I've never installed on nor am I at all familiar with MS Hyper-v so I'm at a total loss here.

I looked through your .config file and checked the block settings against mine and I don't see any reason for it not to boot.

Did you try entering /dev/sda3 :?: I see it shows '.' for block device. I had that problem a long time ago with sabayon, but I can't recall what I did to rectify it :(
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 11:04 pm    Post subject: Reply with quote

BillWho wrote:
ckoeber,

I've never installed on nor am I at all familiar with MS Hyper-v so I'm at a total loss here.

I looked through your .config file and checked the block settings against mine and I don't see any reason for it not to boot.

Did you try entering /dev/sda3 :?: I see it shows '.' for block device. I had that problem a long time ago with sabayon, but I can't recall what I did to rectify it :(


I am not sure what you mean by entering /dev/sda3.

I can mount it with no problem as an ext4 filesystem on the LiveCD.

Thanks.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Tue Feb 12, 2013 11:08 pm    Post subject: Reply with quote

You should be able to type it in at that failed start screen that says press enter for same
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 11:20 pm    Post subject: Reply with quote

BillWho wrote:
You should be able to type it in at that failed start screen that says press enter for same


I get this:

Code:
mount: mounting /dev/sda3 on / failed: Invalid argument


Really weird...
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Tue Feb 12, 2013 11:29 pm    Post subject: Reply with quote

Another shot in the dark here - what's your fstab entries :?:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 11:34 pm    Post subject: Reply with quote

BillWho wrote:
Another shot in the dark here - what's your fstab entries :?:


fstab:

Code:
livecd ~ # cat /mnt/gentoo/etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1               /boot           ext2            noauto,noatime  1 2
/dev/sda3               /               ext4            noatime         0 1
/dev/sda2               none            swap            sw              0 0
/dev/cdrom              /mnt/cdrom      auto            noauto,ro       0 0
/dev/fd0                /mnt/floppy     auto            noauto          0 0


Also, I ran sfdisk -l to list the partition table on the sda disk, this is what I found:

Code:
livecd ~ # sfdisk -l

Disk /dev/sda: 133674 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   *      0+     12-     13-    102400   83  Linux
/dev/sda2         12+    535-    523-   4196352   82  Linux swap / Solaris
/dev/sda3        535+ 133674- 133140- 1069442048   83  Linux
sfdisk:                 end: (c,h,s) expected (1023,254,63) found (554,172,2)

/dev/sda4          0       -       0          0    0  Empty


Does anyone know if that output is normal or not?

Thanks again.
Back to top
View user's profile Send private message
Logicien
l33t
l33t


Joined: 16 Sep 2005
Posts: 738
Location: Montréal

PostPosted: Tue Feb 12, 2013 11:35 pm    Post subject: Reply with quote

Do you boot in Bios or Efi mode? Do you have a Dos or a Gpt partitions table?
_________________
Paul
Back to top
View user's profile Send private message
ckoeber
Tux's lil' helper
Tux's lil' helper


Joined: 21 May 2007
Posts: 145

PostPosted: Tue Feb 12, 2013 11:41 pm    Post subject: Reply with quote

Logicien wrote:
Do you boot in Bios or Efi mode? Do you have a Dos or a Gpt partitions table?


Guest operating systems of the Microsoft Hyper-V system boot in BIOS (unless I am mistaken on what EFI is).

On your second question I used fdisk so the partition table should be dos.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Tue Feb 12, 2013 11:43 pm    Post subject: Reply with quote

What does fdisk -l report - I've never had output like that from sfdisk :?
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
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
Goto page 1, 2  Next
Page 1 of 2

 
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