SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
mkinitrd library load failure, '-s', 13.37 / current / RC3
mkinitrd seems to be failing to load some libraries OR I'm being stupid and can't see it.
Code:
bash-4.1# echo $x
virtio_blk:virtio_net:virtio_balloon:virtio:virtio_pci:virtio_ring:virtio-rng:virtio_console
bash-4.1# mkinitrd -k 2.6.37.4 -c -o initrd_2.6.37.4 -s initrd_2.6.37.4-tree -f ext4 -r /dev/sda1 -m ext4:$x
OK: /lib/modules/2.6.37.4/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/2.6.37.4/kernel/fs/mbcache.ko added.
OK: /lib/modules/2.6.37.4/kernel/fs/ext4/ext4.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/virtio/virtio_ring.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/virtio/virtio.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/block/virtio_blk.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/net/virtio_net.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/virtio/virtio_balloon.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/virtio/virtio_pci.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/char/hw_random/virtio-rng.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/char/virtio_console.ko added.
cp: with --parents, the destination must be a directory
Try `cp --help' for more information.
cp: with --parents, the destination must be a directory
Try `cp --help' for more information.
cp: with --parents, the destination must be a directory
Try `cp --help' for more information.
4016 blocks
/boot/initrd_2.6.37.4 created.
Be sure to run lilo again if you use it.
The mkinitrd section that seems to be the source:
Code:
(
cd $SOURCE_TREE
for i in $(find -L . -type l -exec readlink -m /{} \; 2>/dev/null ) ; do
cp -P --parents ${i} $SOURCE_TREE
done
)
The missing libraries are 'libnsl-2.13.so', 'libm-2.13.so' and 'libc-2.13.so'. Running the same command without '-s' works. mkinitrd-1.4.6-x86_64-7
Cheers,
Last edited by lazardo; 03-24-2011 at 12:51 AM.
Reason: clarification
Although the man page doesn't explicitly say so, it looks like the mkinitrd script relies on the -s argument being an absolute path.
Input validation is a little lacking in this script. It really ought to either canonicalize it with readlink or throw out an error and abort if a relative path is passed.
Although the man page doesn't explicitly say so, it looks like the mkinitrd script relies on the -s argument being an absolute path.
Input validation is a little lacking in this script. It really ought to either canonicalize it with readlink or throw out an error and abort if a relative path is passed.
[PATCH] mkinitrd-1.4.6-x86_64-7 in 13.37 current RC3
Quote:
Originally Posted by GazL
Although the man page doesn't explicitly say so, it looks like the mkinitrd script relies on the -s argument being an absolute path.
Input validation is a little lacking in this script. It really ought to either canonicalize it with readlink or throw out an error and abort if a relative path is passed.
Eliminates need for '-s' argument absolute path in mkinitrd-1.4.6-x86_64-7.
After thought for side-effect readers: In the real virtual world, only the 'virtio_blk' module is required for 'mkinitrd' since [in this case] the root device uses it.
Code:
bash-4.1$ sudo ./mkinitrd.patch -k 2.6.37.4 -c -f ext4 -r /dev/sda1 \
> -m ext4:virtio_blk:virtio_net:virtio_balloon:virtio:virtio_pci:virtio_ring:virtio-rng:virtio_console \
> -o test4 -s test4-tree
OK: /lib/modules/2.6.37.4/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/2.6.37.4/kernel/fs/mbcache.ko added.
OK: /lib/modules/2.6.37.4/kernel/fs/ext4/ext4.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/virtio/virtio_ring.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/virtio/virtio.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/block/virtio_blk.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/net/virtio_net.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/virtio/virtio_balloon.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/virtio/virtio_pci.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/char/hw_random/virtio-rng.ko added.
OK: /lib/modules/2.6.37.4/kernel/drivers/char/virtio_console.ko added.
9205 blocks
/boot/test4 created.
Be sure to run lilo again if you use it.
# list is complete
bash-4.1$ find test4-tree -name \*.so
test4-tree/lib64/libnsl-2.13.so
test4-tree/lib64/libnss_compat-2.13.so
test4-tree/lib64/libnss_files-2.13.so
test4-tree/lib64/libm-2.13.so
test4-tree/lib64/ld-2.13.so
test4-tree/lib64/libc-2.13.so
Last edited by lazardo; 03-25-2011 at 01:04 AM.
Reason: virtio clarification
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.