View previous topic :: View next topic |
Author |
Message |
shgadwa Guru
Joined: 12 Mar 2009 Posts: 327
|
Posted: Mon Apr 09, 2012 2:47 pm Post subject: Initramfs lvm issues...[SOLVED] |
|
|
I'm having the hardest time getting my logical volumes to mount at boot. Usually it drops to a shell, sometimes I just panics. I've made my own initramfs and I've also used genkernel. I can't seem to figure it out.
After looking further, my physical partition isn't even in /dev. there is /dev/sda (the hard drive) but my partition is not there.
I think we have a problem with device nodes. I'm currently using devtmpfs, but Ive also used udev.
Last edited by shgadwa on Mon Apr 09, 2012 8:11 pm; edited 1 time in total |
|
Back to top |
|
|
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Mon Apr 09, 2012 5:06 pm Post subject: |
|
|
For starters, how about showing us you init-script and your fstab, together with the layout of your initramfs? _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
|
shgadwa Guru
Joined: 12 Mar 2009 Posts: 327
|
Posted: Mon Apr 09, 2012 7:05 pm Post subject: |
|
|
avx wrote: | For starters, how about showing us you init-script and your fstab, together with the layout of your initramfs? |
Sure. I think I'm getting somewhere. I just deleted the genkernel initrd. I don't see any point on that. I'm working on getting my own initramfs working.
After some digging, I found out that the reason that the kernel was panicing when using my init script, was that I did not include the lib64 libraries to make it work. I did that and now it runs the script with no problems, but drops to an sh shell after it cannot find any logical volumes. As I said before, the device node /dev/sda6 is not present. I cant figure out how to make it show up. It looks like dmesg does see the actual hard drive, it doesn't go into partitions though.
I would think maybe its something that is not enabled in the kernel, but I don't think so.
Dmesg: http://pastebin.com/6SVjW5Wx
/init script:
Quote: | #!/bin/busybox sh
mount -t proc none /proc
CMDLINE='cat /proc/cmdline'
mount -t sysfs none /sys
mount -t devtmpfs none /dev
#wait a little to avoid trailing kernel output
sleep 3
#rescue function in case something is going wrong
rescue_shell() {
echo "Something went wrong. Dropping to a shell."
busybox --install -s
exec /bin/sh
}
/bin/lvm vgscan --mknodes || rescue_shell
/bin/lvm vgchange -ay || rescue_shell
mount -o ro /dev/mapper/cryptpool-cryptroot /mnt/root || rescue_shell
#unmount psuedo FS
umount /sys
umount /proc
umount /dev
#root switch
exec /bin/busybox switch_root /mnt/root /sbin/init ${CMDLINE}
|
/etc/fstab:
Quote: | # /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/sda5 /boot ext2 noauto,noatime 1 2
/dev/mapper/cryptpool-cryptroot/ ext4 noatime 0 1
/dev/cryptpool/cryptswapnone swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
/dev/fd0 /mnt/floppy auto noauto 0 0
|
/boot/grub/menu.lst:
Quote: | # Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst
# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/sda (hd0)
# /dev/sdb2 (hd1,1)
# /dev/sda3 (hd0,2)
#
# FRAMEBUFFER RESOLUTION SETTINGS
# +-------------------------------------------------+
# | 640x480 800x600 1024x768 1280x1024
# ----+--------------------------------------------
# 256 | 0x301=769 0x303=771 0x305=773 0x307=775
# 32K | 0x310=784 0x313=787 0x316=790 0x319=793
# 64K | 0x311=785 0x314=788 0x317=791 0x31A=794
# 16M | 0x312=786 0x315=789 0x318=792 0x31B=795
# +-------------------------------------------------+
# for more details and different resolutions see
# https://wiki.archlinux.org/index.php/GRUB#Framebuffer_resolution
# general configuration:
timeout 5
default 0
color light-blue/black light-cyan/blue
# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*
# (0) Gentoo Linux
title Gentoo Linux
root (hd0,4)
kernel /boot/kernel-3.2.12-gentoo dolvm debug root=/dev/ram0 real_root=/dev/mapper/cryptpool-cryptroot
initrd /initramfs
# (1) Gentoo Linux
title Gentoo Linux Fallback
root (hd0,4)
kernel /kernel-genkernel-x86_64-3.2.12-gentoo dolvm root=/dev/ram0 real_root=/dev/mapper/cryptpool-cryptroot
initrd /initramfs
# (2) Gentoo linux 3
title Gentoo Linux 3
root (hd0,4)
kernel /boot/kernel-3.2.12-gentoo dolvm root=/dev/mapper/cryptpool-cryptroot init=/init
initrd /initramfs
# (3) Windows
title Windows
rootnoverify (hd0,0)
makeactive
chainloader +1
|
I've been booting from the first option. |
|
Back to top |
|
|
shgadwa Guru
Joined: 12 Mar 2009 Posts: 327
|
Posted: Mon Apr 09, 2012 8:11 pm Post subject: |
|
|
I got it working. I don't know how I missed this, but a careful look at dmesg showed that I didn't have support for my hard drive built into the kernel. I forget what it was that fixed it, I believe it was Serial ATA something. I've had the driver for my hard drive built in previously. One thing I didn't understand was why /boot was loading fine, and the initramfs image had been mounted, when there wasn't support for my hard drive. |
|
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
|
|