Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
help booting lvm rootfs using genkernel - SOLVED
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
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2383
Location: Kentucky

PostPosted: Sun Jul 12, 2009 1:25 am    Post subject: help booting lvm rootfs using genkernel - SOLVED Reply with quote

I am having a TERRIBLE time trying to get a new box to boot! :evil:

The box is an AMD quad-core and I am running genkernel-x86_64-2.6.29-gentoo-r5 on it. It has 5 SATA drives in a SATA backplane. I was able to boot the box using a non-LVM root filesystem and a fully manually generated kernel. 8)

I need it to have LVM on the root filesystem so I can use snapshots for backup integrity. I cannot get it to boot with the root filesystem under LVM. :(

I had no trouble running:
Code:

modprove dm_mod
vgscan
vgchange -a y

from the liveCD, and everything went smoothly during the routine install per the AMD64 Handbook. I used genkernel to make the kernel, with manual control imposed by menuconfig, and keeping my old config from the manually generated kernel as a starting point.

Here is the /boot/grub/grub.conf section used to boot the box:
Code:

title=genkernel-x86_64-2.6.29-gentoo-r5
root (hd0,0)
kernel /kernel-genkernel-x86_64-2.6.29-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/gentoo/rootfs dolvm udev
initrd /initramfs-genkernel-x86_64-2.6.29-gentoo-r5

But when I boot it, I get:
Code:

>> Activating mdev
>> Scanning for Volume Groups
  Reading all physical volumes.  This may take a while...
>> Activating Volume Groups
>> Determining root device...
!! Block device /dev/gentoo/rootfs is not a valid root device...
!! Could not find the root block device in .
   Please specify another value or: press Enter for the same, type "shell" for a shell, or "q" to skip...
root block device() ::

If I then type shell and do a vgscan, I get "no volume groups found". :(

Does anybody have a clue what is wrong? This is driving me nuts! :evil:

Thanks! :D
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.


Last edited by Moriah on Fri Jul 17, 2009 11:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10727
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Jul 12, 2009 11:06 am    Post subject: Reply with quote

Have you see the Gentoo LVM2 installation guide or the Gentoo Linux x86 with Software Raid and LVM2 Quick Install Guide?

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2383
Location: Kentucky

PostPosted: Sun Jul 12, 2009 4:26 pm    Post subject: Reply with quote

Yes, I have read them both. This is not my first time doing this. I have many machines running LVM on the root filesystem, but it is the first time I have done it in well over a year. Apparently, something drastic has changed since then, as my old initrd setup will not work with the newer kernel, so I tried to use genkernel to create one. Things have changed *SO* much that its not even called initrd anymore; its called initramfs!

I have 3 machines that need to be built, and many others that could use a kernel upgrade, but until this problem is resolved, I dare not mess with the production systems.

Oh yes, I also have one box with the root filesystem on RAID-1 and LVM, but it is running the 2.6.15-gentoo-r1 kernel.

The documentation you referred me to is older than Methuselah:

http://www.elilabs.com/cgi-bin/myword_query.cgi?query=Genesis%205:27#27 :o

Is there any more recent HowTo that was written after all these changes?

Thanks for your help! :D
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2383
Location: Kentucky

PostPosted: Fri Jul 17, 2009 11:07 pm    Post subject: Reply with quote

I got it! :D

I had to build the modules, and then make sure that the device mapper and the lvm stuff (snapshot, crypt, zero, etc.) were *NOT* modules. It only took me 2 tries after I switched away from a completely static kernel to get it all to work. The first try I got the vgscan to detect the logical volumes, so I knew I was on the right track.

Nobody ever responded to this thread, and very little response to an earlier thread I opened for the same problem. This has been a back-burner effort for me for over a month, but now its working.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Shingoshi
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jan 2007
Posts: 128
Location: Salem, Oregon USA

PostPosted: Mon Mar 29, 2010 7:52 am    Post subject: What's the best way to get my /boot(s) on? Reply with quote

Moriah wrote:
I got it! :D

I had to build the modules, and then make sure that the device mapper and the lvm stuff (snapshot, crypt, zero, etc.) were *NOT* modules. It only took me 2 tries after I switched away from a completely static kernel to get it all to work. The first try I got the vgscan to detect the logical volumes, so I knew I was on the right track.

Nobody ever responded to this thread, and very little response to an earlier thread I opened for the same problem. This has been a back-burner effort for me for over a month, but now its working.

I know how you feel about not having your threads answered. I don't know if my situation is like yours or not. I installed my system by simply copying over the files from the livecd to my harddrive. I thought by doing that, I would have the kernel included as well. I had to go look for it /mnt/livecd/usr/src/arch/x86 to get the right bzImage. My system started to boot, but then hung without knowing how to handle the xfs filesystem. It seemed to have no problem with the fact the root partition is on RAID1. But the problem now remains as to how to specify xfs as the root filesystem type. I thought it would be something as simple as -t xfs. I haven't tried it yet, because I have to keep switching my monitor between the two machines. But I guess I'll try that right now and see what happens.

Ok. Here's the update. I rebooted and got the errors:
Quote:
SQUASHFS error: squashfs_read_data failed to read block 0,0
SQUASHFS error: unable to read squashfs_super_block
VFS: Cannot open root device "md0" or unknown block (9,0)
Please append a correct "root=" boot option
Here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown - block (9,0)
Pid: 1, comm: swapper not tainted 2.6.30-gentoo-r5 #1


So could someone please explain the best way to fix this. I'm thinking of just trying to install a new kernel from emerge in my now running chroot. I hope that will work. But if there's an easier way for me to simply boot my system with the kernel from the livecd, please how to go about it.

Thank you in advance!
Xavian-Anderson Macpherson
Shingoshi
_________________
The immediate equalization of all knowledge among all beings.
Xneutato - The Cluster-Distributed Package Development and Management Framework
http://portato.origo.ethz.ch/forum/23
Shingoshi's User Styles for Firefox
http://userstyles.org/users/3665
Back to top
View user's profile Send private message
Moriah
Advocate
Advocate


Joined: 27 Mar 2004
Posts: 2383
Location: Kentucky

PostPosted: Mon Mar 29, 2010 2:58 pm    Post subject: Reply with quote

You can't just copy the liveCD kernel because it reads a squashfs from the livecd, and you need to read an xfs for your root filesystem. You need to build a kernel for your machine. If you need help building a kernel, go to Pappy's Kernel Seeds at https://forums.gentoo.org/viewtopic-t-801641-start-475.html and you will find all the expert help you need.
_________________
The MyWord KJV Bible tool is at http://www.elilabs.com/~myword

Foghorn Leghorn is a Warner Bros. cartoon character.
Back to top
View user's profile Send private message
Shingoshi
Tux's lil' helper
Tux's lil' helper


Joined: 18 Jan 2007
Posts: 128
Location: Salem, Oregon USA

PostPosted: Mon Mar 29, 2010 6:15 pm    Post subject: I already built the new kernel... Reply with quote

Moriah wrote:
You can't just copy the liveCD kernel because it reads a squashfs from the livecd, and you need to read an xfs for your root filesystem. You need to build a kernel for your machine. If you need help building a kernel, go to Pappy's Kernel Seeds at https://forums.gentoo.org/viewtopic-t-801641-start-475.html and you will find all the expert help you need.

Thanks for the response. I soon realized there was no way around it. So I built a new kernel and installed it. My system is running now. I just need to get back into it with either "init 1" or the livecd and change the master password. But all in all, I'm very please with my progress.

Thanks!
Xavian-Anderson Macpherson
Shingoshi
_________________
The immediate equalization of all knowledge among all beings.
Xneutato - The Cluster-Distributed Package Development and Management Framework
http://portato.origo.ethz.ch/forum/23
Shingoshi's User Styles for Firefox
http://userstyles.org/users/3665
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