[lug] problem compiling Ubuntu kernel

Lee Woodworth blug-mail at duboulder.com
Sat Jan 23 20:56:39 MST 2010


On 01/23/10 19:12, bgiles wrote:
> Oh, my system is incredibly unhappy.  I almost wish I had reinstalled 
> from scratch instead of doing a dist-upgrade.  (It probably doesn't help 
> that I did a dist-upgrade from Debian to Ubuntu 9.04 six months ago 
> instead of a clean install.)
> 
> I can mount the drives (with renamed devices) after I run vgchange -ay.  
> If I do it manually.  If I put it into an initramfs script it seems to 
> hang the system.

Hanging implies a wait or livelock vs. a panic. Is it in the initramfs or
the distro part of the boot? Since the vgchange works in the rescue shell,
maybe you need to have a pvscan and vgscan in the initramfs before the vgchange.

I would suggest unpacking your initrd/initramfs to a temp dir. An initramfs
format is just a gzip compressed cpio archive. You can then figure out
what it is doing. This unpack command is from the man page below:
   cd /some/temp/dir
   gunzip -c /boot/initrd.img-2.6.18-1-686 | \
              cpio -i -d -H newc --no-absolute-filenames

If you don't already know of these links, maybe they can help:
   http://packages.ubuntu.com/dapper/initramfs-tools
   http://man.he.net/man8/initramfs-tools

It may be important to have the latest version of the initramfs-tools so
it will know how to handle newer kernels.

> 
> I haven't been able to get the X server up.  If I use the nvidia module 
> it says it needs the 'glx extensions'.  If I use the vesa module, just 
> to get it up, it says it needs the 'glx extensions'.  The xorg.conf file 
> has the 'glx module' line commented out so it's not that.

Was there an upgrade to xorg at the same time? Between the server version 1.5
and 1.6 there were some big changes. The event system (evdev kernel module)
is now expected as is hal. In Gentoo, hal depends on dbus. I am running
xorg-server 1.6.5 without an xorg.conf but I do have the evdev mopdule installed
in the kernel, and the hald, dbus and consolekit services running. The server
is finding everything on its own, even the synaptics touchpad.

.....

> Yes, I can mount the partitions after running that manually.  How do you 
> put that into the initramfs?  I have installed initramfs-tools and tried 
> putting something under the scripts directory but that mostly succeeded 
> in hanging the boot process.

I build my own initramfs. When I looked around I didn't find tools for building
an initramfs  -- didn't want to build an initrd. Here is the /init
that boots (/bin and /sbin have static versions of the tools - busybox, lvm):

One thing I did find is the initramfs needed to have the
the same /etc/lvm/lvm.conf used as when doing the distro boot. This
meant copying /etc/lvm/lvm.conf from the live system to the initramfs
and making sure that path references in /etc/lvm/lvm.conf for the
cache/log/backup... dirs were to a non-LVM hosted file system that had
the same path in the initramfs as in the live system. I ended up using
/boot/lvm for those dirs since my boot partition isn't on LVM.

#!/bin/sh
echo "# /bin/mount -t proc proc /proc"
/bin/mount -t proc proc /proc
echo "# /bin/mount -t sysfs sysfs /sys"
/bin/mount -t sysfs sysfs /sys
echo "# /sbin/modprobe rtc-lib"
/sbin/modprobe rtc-lib
echo "# /sbin/modprobe rtc-core"
/sbin/modprobe rtc-core
echo "# /sbin/modprobe rtc-cmos"
/sbin/modprobe rtc-cmos
echo "# /sbin/modprobe pciehp"
/sbin/modprobe pciehp
echo "# /sbin/modprobe scsi_transport_spi"
/sbin/modprobe scsi_transport_spi
echo "# /sbin/modprobe libata"
/sbin/modprobe libata
echo "# /sbin/modprobe ahci"
/sbin/modprobe ahci
echo "# /sbin/modprobe sd_mod"
/sbin/modprobe sd_mod
echo "# /sbin/modprobe ehci-hcd"
/sbin/modprobe ehci-hcd
echo "# /sbin/modprobe ohci-hcd"
/sbin/modprobe ohci-hcd
echo "# /sbin/modprobe usb-storage"
/sbin/modprobe usb-storage
echo "# /sbin/modprobe mbcache"
/sbin/modprobe mbcache
echo "# /sbin/modprobe exportfs"
/sbin/modprobe exportfs
echo "# /sbin/modprobe jbd"
/sbin/modprobe jbd
echo "# /sbin/modprobe ext3"
/sbin/modprobe ext3
echo "# /sbin/modprobe xfs"
/sbin/modprobe xfs
echo "# /sbin/modprobe dm-mod"
/sbin/modprobe dm-mod
echo "# /bin/mount -t xfs /dev/sda1 /boot"
/bin/mount -t xfs /dev/sda1 /boot
echo "# /sbin/vgscan --ignorelockingfailure --mknodes"
/sbin/vgscan --ignorelockingfailure --mknodes
echo "# /sbin/vgchange --ignorelockingfailure -ay"
/sbin/vgchange --ignorelockingfailure -ay
echo "# /bin/mount -t xfs -o ro /dev/mapper/vg20090810-sys /newroot"
/bin/mount -t xfs -o ro /dev/mapper/vg20090810-sys /newroot
echo "# /bin/mount /boot /newroot/boot -o move"
/bin/mount /boot /newroot/boot -o move
echo "# /bin/umount /proc"
/bin/umount /proc
echo "# /bin/umount /sys"
/bin/umount /sys
echo "# cd /newroot"
cd /newroot
echo "# exec /sbin/switch_root -c /dev/console /newroot /sbin/init"
exec /sbin/switch_root -c /dev/console /newroot /sbin/init



More information about the LUG mailing list