-1

I installed ubuntu automatically using a jump flash, however it cannot boot without usb. I tried the way of typing "sudo grub-install/dev/sda", and it just doesn't work! Also I am still confused where I install the grub2. Hope someone can help me. The terminal screen is showed as followed:

ubuntu@ubuntu:~$ sudo fdisk -l

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: 0xa62b4079

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: 7858 MB, 7858028544 bytes
90 heads, 30 sectors/track, 5684 cylinders, total 15347712 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: 0xc3072e18

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *          24    15347711     7673844    c  W95 FAT32 (LBA)

ubuntu@ubuntu:~$ sudo grub-install/dev/sda
sudo: grub-install/dev/sda: command not found
Wei Huang
  • 1
  • 1

1 Answers1

1

You are missing a space between grub-install and /dev/sda:

sudo grub-install/dev/sda

Hence sudo looks for grub-install/dev/sda as command. Command should follow these patterns:

sudo [sudo-option] command [command-arguments]

So in your case:

  • Command is grub-install
  • Command argument just one which is /dev/sda (device node)

BTW, To fix the boot you need to mount your root partition then add as --root-directory option. Example:

sudo grub-install --root-directory=/media/username/rootpartiton /dev/sda

References:

Open terminal from dash or using Ctrl+Alt+t, then run these to see the manuals

  • man sudo
  • man grub-install

To quit, press q

user.dz
  • 48,105
  • 1
    Hi, I found the real problem is that the ubuntu installation is incomplete, and the pc asked me to restart for new installation. And I did as it told me, however the installation was still the one that I have installed, I even chose to reinstall overwrite the previous ubuntu, it still showed the installation was incomplete. Appreciate for you help. – Wei Huang Sep 11 '15 at 09:01
  • Ok, it is an XY problem. I see you've created another post. I flag this one to be closed as a problem that can't be reproduced – user.dz Sep 11 '15 at 10:19