LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   LVM and Stage3 / Bootstrap / Rpmstrap Install Issues (http://www.linuxquestions.org/questions/linux-general-1/lvm-and-stage3-bootstrap-rpmstrap-install-issues-526107/)

TheOracle 02-06-2007 12:33 PM

LVM and Stage3 / Bootstrap / Rpmstrap Install Issues
 
Hi all

In trying to install a Gentoo Stage3 / Debian Bootstrap / Red Hat Rpmstrap environment all goes well until it comes to boot time.

I think the issue here is that I'm using LVM.

1) create the LVM partitions, format etc from FC6 using the graphical interface.
2) mount the part and mount proc. "mount -t ext3 /dev/VolGroup01/LogVol01 /mnt/install/"
3) install the file system
4) chroot and configure fstab, grub.conf etc. (see below)
5) run pvscan ; lvscan ; vgscan (see output below)
6) on re-boot the machine sticks at "VFS: Unable to mount root fs via NFS, trying floppy"... "sd 2:0:0:0:"... not sure if this is a red herring!

Extra info:
localhost linux # mkinitrd /boot/initrd.img 2.6.19-gentoo-r5
unable to stat /dev/VolGroup01/LogVol01: 2

Please tell me what is wrong
Graeme



---x---
localhost dev # pvscan
/sys/block: opendir failed: No such file or directory
PV /dev/sda5 VG VolGroup00 lvm2 [38.56 GB / 32.00 MB free]
PV /dev/sda2 VG VolGroup01 lvm2 [46.56 GB / 0 free]
Total: 2 [85.12 GB] / in use: 2 [85.12 GB] / in no VG: 0 [0 ]

---x---

localhost dev # lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [36.59 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
ACTIVE '/dev/VolGroup01/LogVol00' [36.00 GB] inherit
ACTIVE '/dev/VolGroup01/LogVol01' [10.56 GB] inherit

---x---

localhost dev # vgscan
Reading all physical volumes. This may take a while...
/sys/block: opendir failed: No such file or directory
Found volume group "VolGroup00" using metadata type lvm2
Found volume group "VolGroup01" using metadata type lvm2

---x---

localhost dev # cat /etc/fstab
# <fs> <mountpoint> <type> <opts> <dump/pass>
/dev/sda3 /boot ext2 noauto,noatime 1 2
/dev/VolGroup01/LogVol01 / ext3 noatime0 1
/dev/VolGroup00/LogVol01 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0

# NOTE: The next line is critical for boot!
proc /proc proc defaults 0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0

--x--
grub.conf

title Fedora Core new (2.6.18-1.2798.fc6)
root (hd0,2)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=/dev/VolGroup01/LogVol00 rhgb quiet
initrd /initrd-2.6.18-1.2798.fc6.img
#
title Gentoo
root (hd0,2)
kernel /kernel ro root=/dev/VolGroup01/LogVol01
initrd /initrd.img

syg00 02-07-2007 05:31 AM

You read and followed the Gentoo LVM2 installation guide ???.

TheOracle 02-08-2007 04:06 AM

Hi Syg00

Yes, this is under http://www.gentoo.org/doc/en/lvm2.xml.
So you know I did not create any volumes under the Gentoo chroot env. as they were already there.

What I did do is run...
# vgscan --mknodes
# vgchange -a y
... in addition to pvscan ; lvscan ; vgscan.

Some extra info:
localhost / # ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 63 2007-02-06 11:41 control
brw------- 1 root root 253, 0 2007-02-06 18:04 VolGroup00-LogVol00
brw------- 1 root root 253, 1 2007-02-06 18:04 VolGroup00-LogVol01
brw------- 1 root root 253, 2 2007-02-06 18:04 VolGroup01-LogVol00
brw------- 1 root root 253, 3 2007-02-06 18:04 VolGroup01-LogVol01

The above is the same in both the fc6 and gentoo env. however there are no links under /dev in the gentoo env as there are in fc6. See below...
Only FC6 has this.
[root@localhost ~]# ls -l /dev/VolGroup0*
/dev/VolGroup00:
total 0
lrwxrwxrwx 1 root root 31 Feb 8 08:40 LogVol00 -> /dev/mapper/VolGroup00-LogVol00
lrwxrwxrwx 1 root root 31 Feb 8 08:40 LogVol01 -> /dev/mapper/VolGroup00-LogVol01

/dev/VolGroup01:
total 0
lrwxrwxrwx 1 root root 31 Feb 8 08:40 LogVol00 -> /dev/mapper/VolGroup01-LogVol00
lrwxrwxrwx 1 root root 31 Feb 8 08:40 LogVol01 -> /dev/mapper/VolGroup01-LogVol01

Thanks again
G


All times are GMT -5. The time now is 05:22 PM.