PDA

View Full Version : 12.04 AMD64: New install; upgrade breaks grub2



dtheurer
January 27th, 2013, 02:05 AM
I have recently constructed a new computer and installed Ubuntu 12.04.1 LTS AMD64 on it. The hardware is:
MSI FM2-A75MA-E35 motherboard
AMD A6 5400K CPU
Patriot PC3 - 12800 8GB (2x4GB) memory
Seagate 160GB SATA-6G Barracuda 7200.12 hard drive
Dell 1704FPT (17" LCD) (VGA connection via Trulink KVM)

Installing appears to work OK, but after I install the proprietary ATI driver to get to the Dell's optimum resolution, I get all kinds of errors, notably, after restarting I get:

error: hd0 out of disk
grub: rescue> _I then booted from a USB stick with Ubuntu Secure Remix (12.10 64-bit), and ran boot-repair from the DASH. Resulting message was:

Boot Repair
Please write on a paper the following URL:
http://paste.ubuntu.com/1574401
In case you still experience boot problem, indicate this URL to:
boot.repair@gmail.com
You can now reboot your computer.After rebooting, I get:

error: invalid arch independent ELF magic.
grub rescue> _FWIW: I've been using the Trulink 4-port KVM and Dell 1704 with 4 other machines for at least 2 years now. Attached machines have all been AMDs, and have been running various 64-bit versions of Ubuntu (8.04, 10.04, 11.04 and 12.04) with no problems.

Any and all help would be appreciated. Thanks.

Dirk

dino99
January 27th, 2013, 09:40 AM
you might first watch possible errors about each partition shown by gparted

dtheurer
January 27th, 2013, 05:57 PM
you might first watch possible errors about each partition shown by gparted
Thanks for the suggestion; ran gparted and checked the /dev/sda1 partition. No errors.

Note: When installing Ubuntu 12.04.1 AMD64 (4 times so far), I installed using all defaults, including partitioning.

darkod
January 27th, 2013, 06:14 PM
I can't notice anything wrong in the bootinfo. Can you attach the monitor directly at least until you finish the post-install configuration and driver activation? Just to make sure the KVM is not interfering.

Also double check the hdd cables, and try it in another sata port.

oldfred
January 27th, 2013, 07:14 PM
I do not understand why Boot-Repair had issues writing to your system? Is it encrypted?

Even though your drive is not large, what mode is BIOS in? It should be LBA, large, AHCI but not IDE.
History of BIOS and IDE limits
http://tldp.org/HOWTO/Large-Disk-HOWTO-4.html
Out of disk error add to grub install disk-module=ata or use Boot-Repair ATA Disk support
HOWTO: dualboot on big disk (BIOS limitations)
https://help.ubuntu.com/community/InstallingUbuntuOnBigDisk
http://ubuntuforums.org/showthread.php?t=1998257

Boot-Repair may have partially updated grub by installing the liveCD's version of grub, but then could not write the rest?

error: invalid arch independent ELF magic

Often version of grub in MBR is not same as install.
Use same version to reinstall or chroot and fully uninstall & reinstall.

This issue is more common on very large drives over 500GB.
Also with large drives, grub files or kernels can be beyond 100GB and cause issues booting. Your files currently are all close to start of drive, but it may be better to have a / (root) of 25GB and use rest of drive for /home or data partition. Future updates may put files beyond the 100GB and then give similar out-of-disk errors. May be BIOS or grub, we are not really sure, but smaller root or separte /boot usually solve that issue.

dtheurer
January 27th, 2013, 10:13 PM
Thank you to oldfred and darkod for your suggestions. I am still baffled as to what's happening, but it appears I have partially "solved" the issue. Notes on questions:
- There is nothing wrong with the SATA port I'm using (I did try a different one but made no difference).
- Hard drive is not encrypted.
- Double-checked BIOS; disks are in AHCI mode.

Re-installing:
- Attached monitor directly to computer (mouse and keyboard remain attached to KVM)
- Partitioned so /boot is first partition at 16GB; /swap is last partition at 16GB; remainder is /
- Otherwise, everything left at defaults.

This time, the installer noted something about restoring previously installed software (even though I told it to reformat all partitions for which it allows formatting).

I cannot say for sure which of the changes I made mitigated the grub problem (I suspect it's the partitioning).

Rebooted fine (apparently no need to re-install grub), but I get an error during login if I attach the monitor to the KVM "1: Analog Input Cannot Display This Video Mode" If I re-attach monitor to computer, I can log in, and then re-attach to the KVM. Anyone have any idea of where login's video mode could be set to match that of when I'm logged in?

Marked this issue as solved. May post KVM/LightDM issue in separate thread.