10
Device          Start        End   Sectors   Size Type
/dev/sda1        2048    1050623   1048576   512M EFI System
/dev/sda2     1050624  837228543 836177920 398.7G Linux filesystem
/dev/sda3  1452748800 1465147391  12398592   5.9G Linux swap
/dev/sda4   837228544 1452748799 615520256 293.5G Microsoft basic data

Partition table entries are not in disk order.


Disk /dev/sdb: 14.6 GiB, 15636364800 bytes, 30539775 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
Disklabel type: dos
Disk identifier: 0x00378159


Device     Boot Start      End  Sectors  Size Id Type
/dev/sdb1  *     2048 30539774 30537727 14.6G  c W95 FAT32 (LBA)

I am kinda lost here. I am not very experienced with ubuntu and might need a little detailed solution. I installed Windows 10 after ubuntu 16.10 and when I try to reinstall grub2 and it gives me the following error: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? Please help!

Tony Lancer
  • 1,003
  • Please detail the procedure used. – kyodake Nov 25 '16 at 13:54
  • Ok so I run the Following commands: mount /dev/sda1 /boot/efi and it mounts. when I run: apt-get install --reinstall grub-efi it gives me this output: – Evion Cane Nov 25 '16 at 13:59
  • The following NEW packages will be installed: grub-common grub-efi grub-efi-amd64 grub-efi-amd64-bin grub2-common 0 upgraded, 5 newly installed, 0 to remove and 196 not upgraded. Need to get 2,534 B/2,996 kB of archives. After this operation, 16.4 MB of additional disk space will be used. Do you want to continue? [Y/n] y – Evion Cane Nov 25 '16 at 14:00
  • Err:1 http://al.archive.ubuntu.com/ubuntu yakkety/main amd64 grub-efi amd64 2.02~beta2-36ubuntu11 Temporary failure resolving 'al.archive.ubuntu.com' E: Failed to fetch http://al.archive.ubuntu.com/ubuntu/pool/main/g/grub2/grub-efi_2.02~beta2-36ubuntu11_amd64.deb Temporary failure resolving 'al.archive.ubuntu.com' E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? – Evion Cane Nov 25 '16 at 14:00
  • when I run sudo fdisk -l: Device Start End Sectors Size Type /dev/sda1 2048 1050623 1048576 512M EFI System /dev/sda2 1050624 837228543 836177920 398,7G Linux filesystem /dev/sda3 1452748800 1465147391 12398592 5,9G Linux swap /dev/sda4 837228544 1452748799 615520256 293,5G Microsoft basic data – Evion Cane Nov 25 '16 at 14:02
  • Partition table entries are not in disk order. Disk /dev/sdb: 14,6 GiB, 15636364800 bytes, 30539775 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 Disklabel type: dos Disk identifier: 0x00378159 Device Boot Start End Sectors Size Id Type /dev/sdb1 * 2048 30539774 30537727 14,6G c W95 FAT32 (LBA) – Evion Cane Nov 25 '16 at 14:02
  • when I run boot repair it gives me the following error: GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again. – Evion Cane Nov 25 '16 at 14:09
  • 2
    You have to be consistent. You can install both Windows & Ubuntu in UEFI boot mode on gpt partitioned drive or both in BIOS boot mode on MBR(msdos) partitioned drive. But Windows only boots from gpt with UEFI and only with BIOS from MBR. And how you boot install media it then how it installs. So if you want UEFI, boot only in UEFI mode. https://help.ubuntu.com/community/UEFI If Boot-Repair is asking for a bios_grub partition then it is trying to make Ubuntu a BIOS boot on gpt drive. You then cannot have Windows in BIOS boot mode as drive is gpt. – oldfred Nov 25 '16 at 16:51
  • 2
    @EvionCane Please edit your question with the above information. It's nearly impossible to read in comment form. – wjandrea Nov 25 '16 at 21:30
  • In my case, the EFI partition(for me /dev/sdc1) was not mounted correctly to /boot/efi since as it was missing in /etc/fstab. This can be checked with output of df -Th is missing /boot/efi. After mounting it the package installed correctly and issue disappeared. – harish Feb 04 '22 at 22:53

2 Answers2

7

Try this:

Boot the Ubuntu Live Usb-Dvd.

Open a terminal,

Press Ctrl+Alt+T

Run it:

sudo -i
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
grub-install --boot-directory=/mnt/boot --bootloader-id=ubuntu  --target=x86_64-efi --efi-directory=/mnt/boot/efi  
reboot
kyodake
  • 15,401
0

The root cause of your problem is Temporary failure resolving 'al.archive.ubuntu.com This means that when you attempted this process the server was temporarily unavilable. You have 2 options.

1) Try again

2) Choose a different mirror By Opening Software & Updates and selecting a different server in the Download from drop down menu. (Choosing Other will run a series of tests to determine which is the best server for you.)

Elder Geek
  • 36,023
  • 25
  • 98
  • 183