You are not logged in.

#1 2006-11-04 13:25:59

vanes
Member
Registered: 2006-07-16
Posts: 14

/sbin/mkinitcpio: 54: Syntax error: Bad substitution

When I try upgrading my kernel I get the following output, ending with a Bad Substitution error:

checking package integrity... done.
loading package data... done.
checking for file conflicts... done.
upgrading kernel26... done.
>>>
>>> If you use the LILO bootloader, you should run 'lilo' before rebooting.
>>>
>>> Updating module dependencies. Please wait ...
>>> MKINITCPIO SETUP
>>> ----------------
>>> If you use LVM2, Encrypted root or software RAID,
>>> Ensure you enable support in /etc/mkinitcpio.conf .
>>> More information about mkinitcpio setup can be found here:
>>> http://wiki.archlinux.org/index.php/Mkinitcpio

>>> Generating initial ramdisk, using mkinitcpio.  Please wait...
/sbin/mkinitcpio: 54: Syntax error: Bad substitution

I tried reinstalling mkinitcpio, but that does not seem to have any effect. What could be the problem here?

Offline

#2 2006-11-04 14:01:26

vanes
Member
Registered: 2006-07-16
Posts: 14

Re: /sbin/mkinitcpio: 54: Syntax error: Bad substitution

changing the shebang to #!/bin/bash instead of #!/bin/sh in mkinitcpio seems to get it working again.

but now I get the following:

>>> Generating initial ramdisk, using mkinitcpio.  Please wait...
==> Building image "default"
==> Running command: /sbin/mkinitcpio -k 2.6.18-ARCH -c /etc/mkinitcpio.conf -g /boot/kernel26.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [autodetect]
:: Parsing hook [ide]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/kernel26.img'...usage: gzip [-cdfhlLnNtvV19] [-S suffix] [file ...]
FAILED
==> FAIL
==> Building image "fallback"
==> Running command: /sbin/mkinitcpio -k 2.6.18-ARCH -c /etc/mkinitcpio.d/kernel26-fallback.conf -g /boot/kernel26-fallback.img
:: Begin build
:: Parsing hook [base]
:: Parsing hook [udev]
:: Parsing hook [ide]
:: Parsing hook [scsi]
:: Parsing hook [sata]
:: Parsing hook [usbinput]
:: Parsing hook [raid]
:: Parsing hook [filesystems]
:: Generating module dependencies
:: Generating image '/boot/kernel26-fallback.img'...usage: gzip [-cdfhlLnNtvV19] [-S suffix] [file ...]
FAILED
==> FAIL

something is screwy here.

Offline

#3 2006-11-04 14:11:03

vanes
Member
Registered: 2006-07-16
Posts: 14

Re: /sbin/mkinitcpio: 54: Syntax error: Bad substitution

pacman -S bash gzip

seems to have fixed it, weirdness.

Offline

#4 2006-11-04 16:01:28

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: /sbin/mkinitcpio: 54: Syntax error: Bad substitution

Let me guess, you tried to unpack a cpio image as root?

Offline

#5 2006-11-12 09:55:28

jf/
Member
Registered: 2003-10-26
Posts: 79

Re: /sbin/mkinitcpio: 54: Syntax error: Bad substitution

JGC wrote:

Let me guess, you tried to unpack a cpio image as root?

nope, i had the same problem too! Applied the same "fix" (thanks, vanes) (basically RE-installed bash and gzip), and then mkinitcpio was ok again. Something wrong there with bash and gzip's initial install? This is on a fresh install, btw. Only thing "extraordinary" with this install was, instead of installing the "normal" kernel from /arch/setup, i went into the chroot from another prompt and installed kernel26beyond (pacman -Sy kernel26beyond), before going back to the setup program to install the bootloader. That's about it. Dont think that should matter though?

This is with mkinitcpio 0.5.9-1, and bash 3.1.17-1, gzip 1.2.4b-1

Offline

Board footer

Powered by FluxBB