Monday 18 March 2013

WTF : invalid arch independent ELF magic ?

As I booted my laptop today I got into grub rescue with this nasty error message : "invalid arch independent ELF magic". Everything was working fine so far so I assume 1 update blew up my grub :-(


Trying to fix that issue, I put Ubuntu Secure Remix on s USB stick so that I could use boot-repair (https://help.ubuntu.com/community/Boot-Repair) to repair grub.

When executing the commands recommended by boot-repair to remove grub, I then came into that issue : "files list file for package libdrm-intel1:amd64 is missing final newline". I could fix it using the python script here :

http://ubuntuforums.org/showthread.php?t=1319791

Then I hit another similar issue : "files list file for package `tango-icon-theme' contains empty filename"

Thanks to this thread http://ubuntuforums.org/showthread.php?t=2045017 I figured out that just apt-get install tango-icon-theme will do the trick.

Now I can effectively use boot-repair !
Take a deep breath, the fun is just about to start.

1) At my 1st attempt using boot-repair, it failed because of this error :
Reinstall the grub-efi linux of mapper/isw_bicccigiih_RAID0SYS6
mkdir: cannot create directory `/boot/efi/EFI/ubuntu': Input/output error
grub-install --efi-directory=/boot/efi --target=x86_64-efi : exit code of grub-install :1
 
BootInfo summary : http://paste.ubuntu.com/5621193/

2) At my 2nd attempt (I rebooted and forgot to add-apt-repository ppa:yannubuntu/boot-repair), I could successfully repair grub (!) :

BootInfo summary : http://paste.ubuntu.com/5621275/

But when I rebooted I ran into "file '/boot/grub/x86_64-efi/normal.mod' not found". I could then figure out that it was because I was not using the latest version of boot-repair thanks to this thread http://forum.ubuntu-fr.org/viewtopic.php?id=1148581 (in French)

3) After that I ran boot-repair another time and I'm still stuck with the same issue I had at step 1 ! :
mkdir: cannot create directory `/boot/efi/EFI/ubuntu': Input/output error

BootInfo summary : http://paste.ubuntu.com/5621363/

At this stage I figured out that I was just another one affected by this issue : https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1090829

4) Decided to run e2fsck -f -y -v /dev/mapper/isw_bicccigiih_RAID0SYS6 and after that boot-repair ended up by successfully reinstalling grub ! :

BootInfo summary : http://paste.ubuntu.com/5623554/ 

5) After reboot, I know have another issue in grub (come on...!):

error:invalid magic number
error:you need to load the kernel first

6) Ran boot-repair one more time. In the advanced options I checked "Reinstall latest kernel". At some point I had to manually remove /boot/mykernel with rm -rf or dpkg will complain that it cannot remove the directory or something similar.

Then boot-repair completed successfully ! (sigh)

BootInfo summary : http://paste.ubuntu.com/5624239/

Special thanks to YannBuntu for this great tool !

Sunday 10 March 2013

Enabling function keys


To enable functions keys on the UX51VZ, do :

sudo sed -i s/quiet/quiet\ acpi_osi=/g /etc/default/grub
sudo update-grub

Thanks to the AsusZenbookPrime Ubuntu page !

P.S. : I did try the installation of the 3.8 kernel (https://help.ubuntu.com/community/AsusZenbookPrime#Upgrading_Linux_kernel_manually) but in my case it didn't solve the HDMI issue... However it seems that for the UX31/UX32 it did the trick. I know that UX32VD embeds the GT620M whereas the UX51VZ is equipped with the GT650M but at least I tried...