Author Topic: Kernal Install - mkinitrd error  (Read 603 times)

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11071
  • MLUs Forever!
Kernal Install - mkinitrd error
« on: July 10, 2011, 03:40:57 AM »
Output through Synaptic


Quote
While installing package kernel-2.6.38.8-pclos3.a64-1-1pclos2011:

/sbin/mkinitrd: line 1099: [: too many arguments

Anyone else met with this?

What is the recommended resolution? .......  I have not attempted to reboot since the installation of the kernel ......  uninstall and try again?  .......  do mkinitrd separately? .....  reboot and try if it made any difference to the build? ......


Your thoughts appreciated.


Thanks.
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8838
  • Aurum nostrum non est aurum vulgi.
Re: Kernal Install - mkinitrd error
« Reply #1 on: July 10, 2011, 04:21:51 AM »
I don't know, CO.

Just making my presence known and in your support.

Maybe uninstall and reinstall will be the most logical thing to do??
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11071
  • MLUs Forever!
Re: Kernal Install - mkinitrd error
« Reply #2 on: July 10, 2011, 04:50:18 AM »
Thanks .... Yeah, I think that is the first option I will try ......  then even if it errors again I will try booting in verbose mode ..... and if that doesn't work then boot in present kernel and try a mkinitrd for the new kernel.

EDIT
          Tried uninstalling and reinstalling .....  same error.

Next is an attempt to boot that kernel .....  the new initrd.img is present ...

EDIT 2
           Booted into the new kernel, so the initrd is working.

It does though leave a question about what may not have been done when it was building, that might come back to bite me later  .....

regards.
« Last Edit: July 10, 2011, 04:59:56 AM by Just19 »
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6224
  • I don't do Windows
Re: Kernal Install - mkinitrd error
« Reply #3 on: July 10, 2011, 05:24:10 AM »
Line # 1099 is highlighted. But I haven't found the error trap routine. Too many modules? Dunno.

if [ -z "${kbddrivers##*/*}" ]; then
    withusb=1
    for syspath in $(echo ${kbddrivers} | sed 's/Sysfs=//g'); do
       [ -z "${syspath##*/*}" ] && [ -L /sys${syspath}/device/*:*/driver/module ] && \
            findmodule -$(basename $(readlink /sys${syspath}/device/*:*/driver/module))
    done
    findmodule -usbhid
fi

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline AS

  • Hero Member
  • *****
  • Posts: 4098
  • Have a nice ... night!
Re: Kernal Install - mkinitrd error
« Reply #4 on: July 10, 2011, 07:20:59 AM »
Quote
[ -L /sys${syspath}/device/*:*/driver/module ]

the failure is about how it has been expanded that *.* expression, the "test -L" is expecting one argument where probably Just19's machine expanded to more than one.

The other interesting fact I have always missed before, is that the mkinitrd process rely on info provided from /proc and /sys filesystems, and most important that while you are installing a new kernel, mkinitrd look at /proc and /sys and modules as provided from the running (usually previous version) kernel.

This make the mkinitrd process different depending on the actually installed/running kernel.

Ideally we should build a new initrd while running a new kernel.  ???  Another chicken/eggs problem!  ;D

AS

Offline Jonesy

  • Sr. Member
  • ****
  • Posts: 301
Re: Kernal Install - mkinitrd error
« Reply #5 on: July 10, 2011, 09:45:15 AM »
I had this exact issue which turned out to be my graphic card was so old and archaic it couldnt comply with what the newer kernel expected of it. Changed the card and the new kernel installed without a hitch.
"But it was ok before.... honest"

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11071
  • MLUs Forever!
Re: Kernal Install - mkinitrd error
« Reply #6 on: July 10, 2011, 12:03:01 PM »
Update:

I have been rebuilding this PC ....  put in extra HDDs & optical drives etc  ....  so I installed the .bfs kernel, uninstalled the .a64 and had a lot of shutting down and restarting etc etc.

On this boot I have installed the .a64  again ......  and this time, no error messages.

I have no idea what may be at play here, but the error has disappeared.

For some reason, another seems to have appeared .....  I don't know for certain yet.

To explain this one :

I am booting the HDD that is connected to the SAT 3 port.
That drive is first in the boot list in BIOS .....  or it was when I booted into this session.

On installing the .a64 kernel, the menu.lst gets edited .....  an extra stanza is added.

The partition designations do not appear to be correct .....  but I won't know until I reboot ....  so here is the present menu.lst after installing the .a64 kernel
Code: [Select]
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,5)/boot/gfxmenu
default 0

title linux
kernel (hd2,5)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc quiet acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb splash=silent vga=791
initrd (hd2,5)/boot/initrd.img

title linuxnonfb
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linuxnonfb root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb
initrd (hd0,5)/boot/initrd.img


title failsafe
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc failsafe acpi=on
initrd (hd0,5)/boot/initrd.img


title memtest-4.20
kernel (hd0,5)/boot/memtest-4.20 BOOT_IMAGE=memtest-4.20


title 2.6.38.8-pclos3.bfs
kernel (hd0,5)/boot/vmlinuz-2.6.38.8-pclos3.bfs BOOT_IMAGE=2.6.38.8-pclos3.bfs root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc quiet acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb splash=silent vga=791
initrd (hd0,5)/boot/initrd-2.6.38.8-pclos3.bfs.img


title linux
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc quiet acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb splash=silent vga=791
initrd (hd0,5)/boot/initrd.img


title 2.6.38.8-pclos3.a64
kernel (hd2,5)/boot/vmlinuz-2.6.38.8-pclos3.a64 BOOT_IMAGE=2.6.38.8-pclos3.a64 root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc quiet acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb splash=silent vga=791
initrd (hd2,5)/boot/initrd-2.6.38.8-pclos3.a64.img


I will add to this after a reboot ..... maybe some other install on one of the HDDs is the cause ....
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 11071
  • MLUs Forever!
Re: Kernal Install - mkinitrd error
« Reply #7 on: July 10, 2011, 12:23:54 PM »
While waiting for a d/load to finish .....  this is what I expected the menu.lst to look like ....

Code: [Select]
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,5)/boot/gfxmenu
default 0

title linux
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc quiet acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb splash=silent vga=791
initrd (hd0,5)/boot/initrd.img


title linuxnonfb
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=linuxnonfb root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb
initrd (hd0,5)/boot/initrd.img


title failsafe
kernel (hd0,5)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc failsafe acpi=on
initrd (hd0,5)/boot/initrd.img

title memtest-4.20
kernel (hd0,5)/boot/memtest-4.20 BOOT_IMAGE=memtest-4.20


title 2.6.38.8-pclos3.bfs
kernel (hd0,5)/boot/vmlinuz-2.6.38.8-pclos3.bfs BOOT_IMAGE=2.6.38.8-pclos3.bfs root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc quiet acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb splash=silent vga=791
initrd (hd0,5)/boot/initrd-2.6.38.8-pclos3.bfs.img


title 2.6.38.8-pclos3.a64
kernel (hd0,5)/boot/vmlinuz-2.6.38.8-pclos3.a64 BOOT_IMAGE=2.6.38.8-pclos3.a64 root=UUID=9dc6a34a-8a6f-4cd6-9ba0-46a24b2907fc quiet acpi=on resume=UUID=4bfd54de-974f-473e-87af-050e9e99a7bb splash=silent vga=791
initrd (hd0,5)/boot/initrd-2.6.38.8-pclos3.a64.img



EDIT:

As I thought .....  the Linux stanza with (2,5) would not boot, but the one with (0,5) did successfully, and the modules built during boot for the new kernel.

I will edit the menu.lst file to correct it ......  but wonder what might have caused the kernel install to use (2,5) in place of the correct (0,5) .....  :(


regards.
« Last Edit: July 10, 2011, 12:35:10 PM by Just19 »
MLUs rule the roost!

Linux XPS 3.4.48-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT