Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
LVM2 installed on root + GRUB2 error invalid mounted point
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
samiswt
n00b
n00b


Joined: 13 Apr 2013
Posts: 19

PostPosted: Fri Feb 12, 2016 11:36 pm    Post subject: LVM2 installed on root + GRUB2 error invalid mounted point Reply with quote

Hi guys, I'd like to install Gentoo x86 Stage3 on my laptop(HP G62 i3 CPU) by using Minimal Installation CD. When I compiled kernel and restarted it, I got an error:
Code:
cat:read error: Invalid argument
1 logical volume in volume group "mysys" now active
Reading all physical volumes. This may take a while...
Found volume group "mysys" using metadata type lvm2
1logical volume in volume group "mysys" now active
The filesystem mounted at /dev/mapper/mysys-root does not appear to be a valid /, try again
Could not find the root block device in .
...


What I've done is :
1. fdisk /dev/sda and configure /dev/sda3 as LVM format.
Code:

pvcreate -ff /dev/sda3
vgcreate mysys /dev/sda3
lvcreate -l 100%FREE -n root mysys

mkfs.ext4 /dev/mysys/root

mount /dev/mysys/root /mnt/gentoo
mkdir /mnt/gentoo/boot
mount -t ext2 /dev/sda1 /mnt/gentoo/boot

2.emerge packages by the order:
Code:

grub
sys-fs/lvm2
busybox
mdadm
genkernel
sys-kernel/gentoo-sources
vixie-cron
net-wireless/wireless-tools
wpa_supplicant
net-misc/wicd

3.configured and compiled kernel:
Code:

...(rc-update add lvm boot)
genkernel --no-zfs --splash=autopal --lvm --install --menuconfig all
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub/grub.cfg

4./etc/fstab:
Code:

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sda1                      /boot      ext2      defaults,noatime     0 0
/dev/mapper/mysys-root   /      ext4      noatime              0 0
/dev/sda2                      none      swap      sw                      0 0
tmp                         /tmp      tmpfs   rw,mode=1777           0 0
vartmp                 /var/tmp   tmpfs   rw,mode=1777           0 0

5.pieces of my /etc/default/grub:
Code:

GRUB_CMDLINE_LINUX_DEFAULT="rootfstype=ext4 dolvm vga=791 splash=silent,theme:mysys console=tty1 quiet init=/sbin/bootchartd"
GRUB_DEVICE=/dev/mapper/mysys-root
GRUB_PRELOAD_MODULES=lvm


I've also tried to change
Code:
GRUB_DEVICE=/dev/mysys/root
both part1 and part5, still the same thing.

Please help me, any idea would be appreciated.


Last edited by samiswt on Sat Feb 13, 2016 8:05 pm; edited 2 times in total
Back to top
View user's profile Send private message
alinefr
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jul 2009
Posts: 112
Location: São Paulo, Brasil

PostPosted: Sat Feb 13, 2016 7:22 am    Post subject: Reply with quote

Your init is pointing to /sbin/bootchartd. Did you emerge bootchart inside the chroot?

You should try to boot your system first without bootchart by omitting the init parameter.
Back to top
View user's profile Send private message
samiswt
n00b
n00b


Joined: 13 Apr 2013
Posts: 19

PostPosted: Sat Feb 13, 2016 8:02 pm    Post subject: Reply with quote

alinefr wrote:
Your init is pointing to /sbin/bootchartd. Did you emerge bootchart inside the chroot?

You should try to boot your system first without bootchart by omitting the init parameter.


Thanks for your opinion, I'm afraid that it can at most affect 'cat:read error' and has nothing to do with root mount point. I'll try and tell you what happened.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Feb 13, 2016 8:58 pm    Post subject: Reply with quote

samiswt,

Code:
The filesystem mounted at /dev/mapper/mysys-root does not appear to be a valid /, try again
Could not find the root block device in .

In the second line, the kernel should list all the block devices it can see. In this case, none at all.

It drops you to the ash shell after the boot has failed. What /dev/sd* devices do you have?
What /dev/mapper/* devices?

It looks like you have bits missing from your kernel or initrd, or both.

Also post the output of lspci and put your kernel .config file onto a pastebin site.
wgetpaste is your friend.
_________________
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
samiswt
n00b
n00b


Joined: 13 Apr 2013
Posts: 19

PostPosted: Sat Feb 13, 2016 9:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:
samiswt,

It drops you to the ash shell after the boot has failed. What /dev/sd* devices do you have?
wgetpaste is your friend.

Code:

# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0000d066

   Device Boot      Start         End      Blocks   Id       System
/dev/sda1   *        2048                               83       Linux
/dev/sda2                                               82       Linux swap
/dev/sda3                                               8e       LVM 

If start and end blocks matter, I'll update later because I don't have my target laptop on hand.

Quote:
What /dev/mapper/* devices?

Code:

bash-4.3# pvdisplay
WARNING: Ignoring duplicate config value: filter
  Configuration setting "devices/use_lvmetad" unknown.
  /run/lvm/lvmetad.socket: connect failed: Connection refused
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               mysys
  PV Size               297.47 GiB / not usable 4.34 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              76150
  Free PE               0
  Allocated PE          76150
  PV UUID               F3acR2-cWFc-Roxw-Psho-4Gyx-YByS-C9JADI

bash-4.3# vgdisplay
WARNING: Ignoring duplicate config value: filter
  Configuration setting "devices/use_lvmetad" unknown.
  /run/lvm/lvmetad.socket: connect failed: Connection refused
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  --- Volume group ---
  VG Name               mysys
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               297.46 GiB
  PE Size               4.00 MiB
  Total PE              76150
  Alloc PE / Size       76150 / 297.46 GiB
  Free  PE / Size       0 / 0   
  VG UUID               BD2qK3-4egW-QyBs-IjRS-093W-acXg-DLV0Sm

bash-4.3# lvdisplay
WARNING: Ignoring duplicate config value: filter
  Configuration setting "devices/use_lvmetad" unknown.
  /run/lvm/lvmetad.socket: connect failed: Connection refused
  WARNING: Failed to connect to lvmetad. Falling back to internal scanning.
  --- Logical volume ---
  LV Path                /dev/mysys/root
  LV Name                root
  VG Name                mysys
  LV UUID                v5bBKq-D7XY-n8sC-S8Lj-u1FA-J2aD-lXYclV
  LV Write Access        read/write
  LV Creation host, time livecd, 2016-01-29 18:54:41 +0000
  LV Status              available
  # open                 1
  LV Size                297.46 GiB
  Current LE             76150
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

There is only one logic volume on LV path.

My kernel.config is at here.

If I don't use lvm for my root, I'm able to compile, start my Gentoo successfully use the same kernel.config.
I didn't configure my initrd path in kernel.config, does it matter?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Feb 13, 2016 10:48 pm    Post subject: Reply with quote

samiswt,

I'll look over your kernel but I need the output from the shell you are in after a failed boot.
Your initrd path not being in the kernel does not matter if you use a boot loader.
That is intended for use when you need an initrd but don't use a boot loader. The initrd is then built into the kernel.

I also need your lspci output.

Code:
CONFIG_IDE=y
must be off. IDE devices use the drivers under CONFIG_ATA=y
You probably have two drivers for the same hardware. They fight and neither works.

Code:
CONFIG_BLK_DEV_DM=y
good
_________________
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
samiswt
n00b
n00b


Joined: 13 Apr 2013
Posts: 19

PostPosted: Sun Feb 14, 2016 6:23 pm    Post subject: Reply with quote

Thank you very much, NeddySeagoon!

It's a long weekend in Alberta, Canada, so I'll upload what you asked for on Tuesday.

BTW, I was able to use
Code:
mount/umount /dev/mysys/root, but not /dev/mapper/mysys-root
after a failed boot. When I changed
Code:
/dev/mapper/mysys-root TO /dev/mysys/root
on each step above, I mean from partition, format to /etc/fstab, started installation all over again, and I was still unable to boot with the same problem
Code:
The filesystem mounted at /dev/mysys/root does not appear to be a valid /, try again


If I changed
Code:
GRUB_DEVICE=/dev/mapper/mysys-root------>/dev/mysys/root, maintain '/dev/mapper/mysys-root' part at /etc/fstab
and did
Code:
grub2-install /dev/sda && grub2-mkconfig -o /boot/grub/grub.cfg
then I got an error said
Code:
The filesystem mounted at /dev/dm-5 does not appear to be a valid /, try again
.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1747

PostPosted: Sun Feb 14, 2016 7:03 pm    Post subject: Reply with quote

Quote:
The filesystem mounted at /dev/dm-5 does not appear to be a valid /

In my case this error always means kernel doesn't recognize init. By default it checks /init /linuxrc /sbin/init
If none of those exist (or is executable), you will be informed the filesystem you provided is not a valid root.

Quote:
init=/sbin/bootchartd
Does it exist and is executable?
Back to top
View user's profile Send private message
samiswt
n00b
n00b


Joined: 13 Apr 2013
Posts: 19

PostPosted: Tue Feb 16, 2016 10:53 pm    Post subject: Reply with quote

szatox wrote:
Quote:
The filesystem mounted at /dev/dm-5 does not appear to be a valid /

In my case this error always means kernel doesn't recognize init. By default it checks /init /linuxrc /sbin/init
If none of those exist (or is executable), you will be informed the filesystem you provided is not a valid root.

Quote:
init=/sbin/bootchartd
Does it exist and is executable?


Thank you szatox and alinefr, I've tried to remove
Code:
init=/sbin/bootchartd
from my grub.cfg, the error message changed to
Code:

sshd      ssh-keygen: generating new host keys: RSA
lvm      /run/lvm/lvmetad.socket: connect failed: No such file or directory

If I mounted and copied /run/lvm/* at chroot, I got a connection refused error. Does it matter?
Any ideas?

NeddySeagoon:

my lspci is at here.

Thank you very very very ... ... much, all of you! You saved my life.
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1747

PostPosted: Wed Feb 17, 2016 6:08 pm    Post subject: Reply with quote

Quote:
If I mounted and copied /run/lvm/* at chroot, I got a connection refused error. Does it matter?


Code:
 # mount | grep run 
tmpfs on /run type tmpfs

It's not supposed to be persistent. You should not copy anything there, it's a space for temporary files created by an application when it needs them, like e.g. locks and pid trackers. And sockets.
It seems your lvm failed to start... or wasn't started.
Back to top
View user's profile Send private message
samiswt
n00b
n00b


Joined: 13 Apr 2013
Posts: 19

PostPosted: Thu Feb 18, 2016 5:09 pm    Post subject: Reply with quote

szatox wrote:
Quote:
If I mounted and copied /run/lvm/* at chroot, I got a connection refused error. Does it matter?


Code:
 # mount | grep run 
tmpfs on /run type tmpfs

It's not supposed to be persistent. You should not copy anything there, it's a space for temporary files created by an application when it needs them, like e.g. locks and pid trackers. And sockets.
It seems your lvm failed to start... or wasn't started.


I've tried the method mentioned here, it only worked for my chroot installation. I just tried anything in a desperate situation.

I'll try this, it should work, and I'll update my result.

Best hope for tagging my thread a REAL BIG SOLVED.

Thank you very much.
Back to top
View user's profile Send private message
samiswt
n00b
n00b


Joined: 13 Apr 2013
Posts: 19

PostPosted: Fri Feb 19, 2016 5:00 pm    Post subject: Reply with quote

There was /etc/init.d/lvmetad, I should have had added it to boot. After I did that, my system works perfectly fine now.

Thank you very much!
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