# (solved) Problem with lvm2create_initrd  script

## xmaes

hello,

I am having problem running the lvm2create_initrd, here's the output:

```
sh ./lvm2create_initrd -M gentoo -c /etc/lvm/lvm.conf -R /etc/mdadm.conf

lvm2create_initrd -- make LVM initial ram disk /boot/initrd-lvm2-2.6.27-gentoo-r4.gz

lvm2create_initrd -- finding required shared libraries

lvm2create_initrd -- calculating initrd filesystem parameters

lvm2create_initrd -- calculating loopback file size

du: cannot access `(0x00007fff8fbff000)': No such file or directory

du: cannot access `(0x00007fffb37ff000)': No such file or directory

du: cannot access `(0x00007ffff27fe000)': No such file or directory

lvm2create_initrd -- making loopback file (5916 kB)

lvm2create_initrd -- making ram disk filesystem

lvm2create_initrd -- mounting ram disk filesystem

lvm2create_initrd -- adding required /dev files

lvm2create_initrd -- copying initrd files to ram disk

find: `(0x00007fff8fbff000)': No such file or directory

find: `(0x00007fffb37ff000)': No such file or directory

find: `(0x00007ffff27fe000)': No such file or directory

lvm2create_initrd -- creating symlinks to busybox

lvm2create_initrd -- creating new /tmp/mnt.6955/sbin/init

lvm2create_initrd -- copying /etc/lvm/lvm.conf to /tmp/mnt.6955/etc/lvm/lvm.conf

lvm2create_initrd -- ummounting ram disk

umount: /tmp/initrd.6955: not mounted

lvm2create_initrd -- ERROR umounting /tmp/initrd.6955

rmdir: failed to remove `/tmp/mnt.6955': Device or resource busy
```

I was able to run it successfully for few months now.

I don't know what change made it fail.

Any hint where to start ?

Thanks,

XavierLast edited by xmaes on Fri Dec 26, 2008 12:17 am; edited 1 time in total

----------

## xmaes

I dont understand what is going on.

i review the how to on lvm2 on root,  kernel config, download the script again... but the problem remain

If i run the script in verbose mode i get the following information

```
This filesystem will be automatically checked every 26 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

                  -- creating mountpoint /tmp/mnt.19170

lvm2create_initrd -- mounting ram disk filesystem

                  -- mount -o loop /tmp/initrd.19170 /tmp/mnt.19170

                  -- creating basic set of directories in /tmp/mnt.19170

lvm2create_initrd -- adding required /dev files

                  -- BASICDEVICES: std consoleonly fd

                  -- BLOCKDEVICES: md hda hdb hdc hdd sda sdb sdc sdd
```

```
lvm2create_initrd -- ummounting ram disk

lvm2create_initrd -- ERROR umounting /tmp/initrd.19170

                  -- removing /tmp/initrd.19170

                  -- removing /tmp/mnt.19170

                  -- exit with code 1
```

somehow it fails to umount the  /tmp/initrd.19170 and doesnt create the initrd files

Any help would be very apreciated.

thanks,

xavier

----------

## xmaes

I can mount my old initrd file, remove th files in it and then copy the files from /tmp/mnt.*** to the mounted initrd files and it works.

I have a problem with this part of the script

```
echo "$cmd -- ummounting ram disk"

umount $DEVRAM

if [ $? -ne 0 ]; then

   echo "$cmd -- ERROR umounting $DEVRAM"

   cleanup 1

fi
```

I dont know why this part stop working....

----------

## xmaes

well never really understood what went wrong here but i spent sometimes settings an initramfs in the kernel and i understand more what i am doing than with the script.

----------

