Operating System - Linux
1830238 Members
3462 Online
109999 Solutions
New Discussion

Re: lvmcreate_initrd file too large

 
support_5
Super Advisor

lvmcreate_initrd file too large

Dear all,

I am converting a redhat 7.3 server to LVM. I successfully run the command lvmcreate_initrd.

I edit /etc/lilo.conf as per the lvm howto:
image = /boot/KERNEL_IMAGE_NAME
label = lvm
root = /dev/vg00/lv_root
initrd = /boot/INITRD_IMAGE_NAME
ramdisk = 8192

But when I run lilo, I get the error message:

boot =/dev/hda, map = /boot/map.0301
Fatal: Kernel /boot/initrd-lvm-2.4.18-3.gz is too big

From the lvmcreate_initrd man page it says the modifications should be in the form of:

image = /boot/vmlinuz
initrd = /boot/initrd-lvm-KernelVersion.gz
root = /dev/YourVG/YourRootLV
label = rootonlv
append = 'ramdisk_size=8192'

When run with this config an error is returned:

sysntax error on line 15 - the append line.

Anyone done this successfully?

Cheers,

Damo
3 REPLIES 3
U.SivaKumar_2
Honored Contributor

Re: lvmcreate_initrd file too large

Hi,

The correct syntax of ramdisk_size is this


append = "ramdisk_size=8192"


( note the double quotation is used )

regards,
U.SivaKumar



Innovations are made when conventions are broken
U.SivaKumar_2
Honored Contributor

Re: lvmcreate_initrd file too large

Hi,

The error means that your ramdisk size is too
big.

So try to reduce the size in /etc/lilo.conf to this line

append = "ramdisk_size=4096"


( OR )

ramdisk = 4096

regards,

U.SivaKumar



Innovations are made when conventions are broken
Albert P Tobey
Occasional Advisor

Re: lvmcreate_initrd file too large

If you're compiling your own kernels, you can set the size of the rd devices in the kernel config. The default for linus kernels is 4096. I believe that RedHat uses twice that. The quick way to set it higher is to edit your kernel .config file and change CONFIG_BLK_DEV_RAM_SIZE.

Also, the newer mkinitrd from RH 8 (grab kernel-tools rpm) automagically adds LVM stuff if necessary. Personally, I keep my root disk on a real partition and compile LVM directly into the kernel instead of a module. This removes the need for any initrd. Also, if your root is on a real partition, you can edit /etc/rc.sysinit and add a "modprobe lvm-mod" toward the top to make it load LVM before doing the vgscan. Also, in this case, you will not need LVM in your initrd.