Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I ran a apt-get dist-upgrade on my nas (Ubuntu 13:04 64BIT) and it keeps giving an error on line 281 of /etc/grub.d/00_header "Bad substitution"

I have tried futzing around with the file but it does not solve the file. Anyone any tips on what to do?

-------  OUTPUT FROM apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? 
Setting up linux-image-3.8.0-35-generic (3.8.0-35.50) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.8.0-35-generic /boot/vmlinuz-3.8.0-35-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.8.0-35-generic /boot/vmlinuz-3.8.0-35-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8.0-35-generic /boot/vmlinuz-3.8.0-35-generic
update-initramfs: Generating /boot/initrd.img-3.8.0-35-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.8.0-35-generic /boot/vmlinuz-3.8.0-35-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.8.0-35-generic /boot/vmlinuz-3.8.0-35-generic
Generating grub.cfg ...
/etc/grub.d/00_header: 281: /etc/grub.d/00_header: Bad substitution
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.8.0-35-generic.postinst line 1010.
dpkg: error processing linux-image-3.8.0-35-generic (--configure):
 subprocess installed post-installation script returned error exit status 2
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of linux-image-extra-3.8.0-35-generic:
 linux-image-extra-3.8.0-35-generic depends on linux-image-3.8.0-35-generic; however:
  Package linux-image-3.8.0-35-generic is not configured yet.

dpkg: error processing linux-image-extra-3.8.0-35-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-image-generic:
 linux-image-generic depends on linux-image-3.8.0-35-generic; however:
  Package linux-image-3.8.0-35-generic is not configured yet.
 linux-image-generic depends on linux-image-extra-3.8.0-35-generic; however:
  Package linux-image-extra-3.8.0-35-generic is not configured yet.

dpkg: error processing linux-image-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-image-generic (= 3.8.0.35.53); however:
  Package linux-image-generic is not configured yet.

dpkg: error processing linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-image-3.8.0-35-generic
 linux-image-extra-3.8.0-35-generic
 linux-image-generic
 linux-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question

migrated from stackoverflow.com Dec 16 '13 at 20:43

This question came from our site for professional and enthusiast programmers.

1  
Can you show your /etc/grub.d/00_header contents? –  favoretti Dec 16 '13 at 18:16
1  
Actually, scratch that.. It probably can not parse something from defaults, I'd rather see your /etc/default/grub instead. –  favoretti Dec 16 '13 at 18:17
    
/etc/default/grub GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=2 GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian`` GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="" –  user3108374 Dec 19 '13 at 20:08
    
Please, edit the question instead. –  Braiam Dec 24 '13 at 17:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.