1

I'm new to Ubuntu. After doing a full reinstall of 14.04 LTS on an Acer Inspire E5, the hard drive is not recognized as a bootable device, though it is recognized in general. Booting Ubuntu from a usb and running sudo fdisk -l yields the following:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x81d6cb14

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdb: 4018 MB, 4018143232 bytes
255 heads, 63 sectors/track, 488 cylinders, total 7847936 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0021f04b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048     7847935     3922944    c  W95 FAT32 (LBA)

This differs in a few ways from the output on a working ubuntu laptop I have access to, which has three partitions, and doesn't use GPT. However I don't know which difference is causing the problem, or why my laptop suddenly failed to boot from hard drive (I wasn't messing around with partitions before this occurred), nor how to fix it. I especially wonder that the laptop doesn't boot from /dev/sda1 despite fdisk showing it as bootable (I set this using cfdisk).

Are there any obvious flaws with my partition table that would prevent booting from the hard drive?

Edit: the output of sudo gdisk -l is as follows:

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): DAE150BD-1F2D-450E-BAA4-551D3ACA8047
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3437 sectors (1.7 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1050623   512.0 MiB   EF00  
   2         1050624      1936922623   923.1 GiB   8300  
   3      1936922624      1953523711   7.9 GiB     8200  
user131331
  • 21
  • 3
  • Seems like an issue with UEFI booting. The use of GPT indicates that Ubuntu was installed in a UEFI environment; please check whether your live USB is booted from UEFI. Also, fdisk cannot handle GPT; use gdisk instead and paste the output of sudo gdisk -l /dev/sda. – Vincent Yu Jul 12 '15 at 06:21
  • I've found the usb was booted from UEFI. I tried booting from BIOS (legacy), but had the same issues. – user131331 Jul 12 '15 at 07:00
  • The first partition is an EFI system partition, so this is definitely installed as a UEFI system. From what I understand of UEFI, it is supposed to automatically find bootloaders in every system partition when booting up, so instead of choosing a disk to boot from (as in a BIOS system), you should be able to choose an OS to boot from. I'm not sure what's gone wrong here. Can you try booting in UEFI mode with secure boot disabled (if that's configurable in the UEFI setup)? – Vincent Yu Jul 12 '15 at 07:26
  • Booting in UEFI without Secure Boot doesn't change anything, but turning it off reveals a promising option in my Boot Menu: to 'Select an UEFI file as trusted for executing'. Currently I'm trying to access it. – user131331 Jul 12 '15 at 07:52
  • I wonder if the GRUB UEFI bootloader has been installed correctly. Let's see if the files look correct: Mount the EFI partition read-only with sudo mount -o ro /dev/sda1 /mnt/ and list the contents with ls -la /mnt/. Also check how much space is used with du -s /mnt/. (Add sudo in front of the ls and du commands to run as root if there are errors about permissions.) Unmount the partition with sudo umount /mnt/ afterward. – Vincent Yu Jul 12 '15 at 08:00
  • Do you mean sda1? With sdc1 directory isn't found. With /dev/sda1 the ls shows a directory /dev/sda1/EFI/ubuntu/ containing grub.cfg, grubx64.efi, MokManager.efi, and shimx64.efi. du return 3428 (blocks?) – user131331 Jul 12 '15 at 08:09
  • I should mention how this all started: while doing nothing really dangerous (editing .bashrc file, web browsing) I ran sudo shutdown 0, and got this upon rebooting, leaving me totally mystified. – user131331 Jul 12 '15 at 08:18
  • Yeah, sorry, I meant sda1. Do you mean you ran sudo shutdown 0 in the live USB environment after installing Ubuntu, or do you mean you were originally able to boot into the installed Ubuntu system? – Vincent Yu Jul 12 '15 at 08:24
  • I ran sudo shutdown 0 in a Ub 14.04 installation which to that point booted (from the hard drive) without issues. – user131331 Jul 12 '15 at 08:28
  • Oh. If there's nothing too private, do you mind posting all the commands that you ran? Just to check. You can find your command history by mounting your root partition with sudo mount -o ro /dev/sda2 /mnt/ and opening the file /mnt/home/<username>/.bash_history. If the system used to boot correctly, then simply reinstalling GRUB should work, but it would be nice to know why this happened in the first place. – Vincent Yu Jul 12 '15 at 08:39
  • I forgot to mention that .bash_history is hidden by default in the file manager (as are all other files starting with a period). You'll need to hit Ctrl+H to see it. Also, the system log at /mnt/var/log/syslog could also have useful info; upload it somewhere if you don't mind me taking a look. (There shoudn't be any private information in the syslog, but I'd recommend skimming it anyway to make sure.) – Vincent Yu Jul 12 '15 at 08:54
  • Unfortunately, I can't do that, because after the initial breakdown, I reformatted to reinstall Ubuntu (twice), which in retrospect was a panicked decision. What I ran though was just apt-get on various packages and vim, etc.. I'm not confident enough in my knowledge to manipulate things which are subtle. I'm going to try running grub-install, as described here: https://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-using-grub_002dinstall.html – user131331 Jul 12 '15 at 08:58
  • That's really strange and sounds like a bug in the installer—I would expect a full reinstall to work if the first install worked. You say you reformatted; how did you do that? I suppose the installer could have ran into some issue if there was some left-over partitioning. I would recommend using GParted to create an empty GPT on the hard disk before reinstalling. BTW, grub-install by itself shouldn't help because you'll first need to mount the target system and chroot into it. – Vincent Yu Jul 12 '15 at 09:14
  • What I meant is that I chose the installer option to format all three sda partitions and install anew. I'm going to try to do as you suggested with Gparted, or perhaps with the installer's builtin partitioning tool. – user131331 Jul 12 '15 at 09:27
  • Hey, reinstalling worked. What I did differently was to use the custom partition table option in the installer to explicitly tell it to place the boot loader in /dev/sda1, instead of ambiguously in /dev (the default option). For some reason this worked. Thanks for helping me troubleshoot in the early morning (for the Americas); I learned quite a bit about unix by following up on your suggestions. – user131331 Jul 12 '15 at 10:26
  • Haha, after rebooting it no longer works – user131331 Jul 12 '15 at 10:45
  • Darn. Personally, I'd give up on UEFI and switch to installing and staying in legacy BIOS mode, which is more robust as it's been around much longer. If you install while in BIOS mode, the installer will create an MBR partition table instead of GPT, which has its disadvantages (in particular, you'll need to use extended partitions to have more than 4 partitions). On the upside, the handy Memtest86+ only works in BIOS mode. You can use GPT with BIOS boot (as I do) by manually partitioning, but you won't be able to dual boot Windows on the same disk. – Vincent Yu Jul 12 '15 at 12:39

0 Answers0