0

A while ago I installed Ubuntu on a separate drive. I've been booting it from this separate drive ever since. Now I'd like to install Ubuntu on a dedicated partition of my laptop main drive. I've extracted the relevant iso content into my usb drive ready to re-install Ubuntu but unfortunately the installation does't boot up. I thought it was because of the grub terminal I get to see every time I turn on my laptop without inserting the separate drive I've mentioned before, so I researched how to get rid of it and I found and followed a guide that will take you to the win 10 safe mode terminal to run the bootrec/bootsect commands. I've run both of the commands but yet my laptop still boots with the grub terminal screen and the usb drive still doesn't load the Ubuntu installation.

My goal is to install Ubuntu on my main drive and will probably end up re-installing the grub; what can I do to achieve my goal (whether it will take to remove the current grub effectively or not)?

Please help it's urgent.

7
  • 1
    UEFI or BIOS? If Windows drive is gpt then it must be UEFI. IF BIOS you may have the 4 primary partition limit. And with Windows 10 make sure fast start up is off. Only use Windows to shrink its NTFS partition and reboot immediately for it to run chkdsk. help.ubuntu.com/community/DiskSpace & if UEFI but much also applies if BIOS: askubuntu.com/questions/221835/… & askubuntu.com/questions/6328/how-do-i-install-ubuntu
    – oldfred
    May 29, 2017 at 14:47
  • "IF BIOS you may have the 4 primary partition limit". What is that? Thanks for your reply. How can I check the difference(UEFI or BIOS)?
    – n1nsa1d00
    May 29, 2017 at 15:32
  • Post this: sudo parted -l If it says DOS or msdos then you have the 4 primary partition limit and need one extended to allow many logical partitions. askubuntu.com/questions/149821/… IF gpt then you are installed in UEFI mode and gpt limit is 128 partitions which even can be changed to more.
    – oldfred
    May 29, 2017 at 16:09
  • 2
    You say you've "...extracted the relevant iso content into my usb drive ready to re-install Ubuntu but unfortunately the installation does't boot up." Unfortunately, this is unclear. Precisely how are you attempting to boot from the USB drive, and what happens when you do so? In most cases, you must use the computer's built-in boot manager to select the external medium. These vary greatly from one computer to another, and there are several user errors and firmware bugs that can create problems, so it's unclear which of these many conditions is preventing you from booting.
    – Rod Smith
    May 29, 2017 at 16:37
  • @RodSmith I've use this software unetbootin to extract the content of the iso file ubuntu-16.10-desktop-amd64.iso to a usb in order to boot it and install Ubuntu... I've set the booting order from the BIOS to boot first from usb drive. What happens is that a grub terminal appears as usual where normally I hit exit and the installed win 10 os loads as regular... when the external drive where I've installed ubuntu is connected to the laptop this screen doesn't show up but a dual but choice screen appears which after the countdown it boot ubuntu.
    – n1nsa1d00
    May 29, 2017 at 17:22

2 Answers 2

2

To begin, you don't have a BIOS; you have an EFI (a UEFI, really; UEFI is EFI version 2.x). EFIs boot in a very different way from BIOSes. Unfortunately, many people, and even manufacturers, apply the term "BIOS" to their EFIs. This leads to confusion because people try to apply BIOS concepts to their EFIs, and this often leads to mistakes. That may not be the cause of your problems, but it might be playing a minor factor. I recommend you read a couple of pages on EFI-mode Linux installations before you do anything else:

The old BIOS boot-order options are more sophisticated under EFI, because under EFI, you boot from a file, so you can have multiple boot options on a single hard disk. These are typically named, not just identified by a disk; but in the case of removable disks, the entries are likely to be identified by the disk's manufacturer and/or model. Furthermore, most EFIs support both native EFI-mode boots and boots of BIOS-mode boot loaders via a component known as the Compatibility Support Module (CSM; aka "legacy mode" booting). Thus, setting your external medium to boot first is somewhat ambiguous; it might be trying to boot in BIOS mode or in EFI mode. Many EFIs are flaky even there, and may not do what you expect. They might forget to boot from the external medium first if you unplug that boot medium, for instance.

Instead, I recommend you learn to use the computer's built-in boot manager. This may require disabling the firmware's "fast startup" features. You can usually get to the boot manager by hitting a function key (usually a high-numbered one), Esc, or Enter; but details vary from one computer to another, so you may need to consult the computer's manual to learn how to get to this menu. Once you've found it, you should be able to launch the installer by selecting its option on the menu -- but if two such options appear, select the one that includes the string "UEFI." The one that does not include that string likely boots in BIOS/CSM/legacy mode, which you do NOT want to do on your computer!

If you can only launch the boot medium in BIOS mode, it's probably missing an EFI-mode boot loader. This can happen because some programs used to create boot media omit the EFI-mode boot loader. Thus, you may need to try another tool, like Linux's dd command or Rufus.

The symptoms you describe (getting a grub> prompt if you try to boot with the external disk disconnected) are caused by the weird way Ubuntu configures GRUB, in conjunction with your external-disk installation. In particular, the main GRUB binary resides on the EFI System Partition (ESP), which in your case is on the internal disk; but this program relies on configuration files in the /boot/grub directory, which in your case is on the external disk. When GRUB can't read its configuration file, it presents a grub> prompt; and exiting from GRUB will then launch whatever's next in the EFI's boot order. This boot-time quirk will go away when you install Ubuntu to your internal disk; but if you wanted to keep Ubuntu on the external disk, you could work around the problem in various ways, such as by moving Ubuntu's /boot directory to a small dedicated /boot partition on the internal disk or by switching to another boot program that doesn't split its configuration file off in the way GRUB does.

If you continue to struggle, you might consider installing my rEFInd boot manager. As I've noted, some EFIs have flaky built-in boot managers, and rEFInd is likely to do a better job, with the caveat that you may need to hit the Esc key once the rEFInd menu appears to get it to scan your external media. rEFInd will also not be affected by the GRUB multi-disk configuration file issue, so it would be a way around that problem, if you decide to keep Ubuntu on the external disk.

6
  • Thank you for such an exhaustive answer! Will soon try to do what you suggest but first I'd like to try the efibootmgr -v command first to see if external hdd is the first entry in the bootorder. I've learnt that the latter command can be use to modify the bootorder. Would it be possible to modify it in order to have window booting first and making so that my installation medium boots as it should normally do? Also the parted -l command displayed so many other partition I have no clue of; could the installation on the ext_drive have cause the addition of other partitions on the main drive?
    – n1nsa1d00
    May 30, 2017 at 7:52
  • Alright I've managed to install Ubuntu on a separate partition on my main HDD through the boot manager, though the problem I'm having now is that windows boots straight away I don't even get to choose. Here is the output of efibootmgr -v now text-share.com/view/3a00e5c3. How can I fix changing the boot order?
    – n1nsa1d00
    May 30, 2017 at 10:32
  • Try sudo efibootmgr -o 0001,0007,0003,0005,0000,0004,0006,000A,000B. If that doesn't work, you've got a defective EFI, as described here.
    – Rod Smith
    May 30, 2017 at 12:51
  • Right. The only thing is that I'm curently running commands from the try Ubuntu first termina on the installation medium. Would changes persist?
    – n1nsa1d00
    May 30, 2017 at 13:08
  • 1
    The efibootmgr command reads or changes NVRAM entries, so efibootmgr -o... should work whether you boot from the regular installation or from an emergency disk.
    – Rod Smith
    Jun 1, 2017 at 12:32
0

with win10 you probably have UEFI boot, unless you upgraded from win7. some windows 7 computers had legacy boot some had UEFI boot.win8 and above are UEFI boot.

look at the contents of your flash drive. if there is a folder named EFI, then it is UEFI bootable.If not, get the ubuntu image for UEFI boot. I believe UEFI support stared with 16.04 64-bit.secondly, the flash drive must be formatted FAT16 or FAT32.

if you are legacy booting, then you MUST burn the image to the flashdrive. boot info is in the MBR and can only be written by burning the image.

2
  • I've checked and there is as that was the same iso I used first and back then it worked... Also the usb (v3) I'm using is formatted FAT32.
    – n1nsa1d00
    May 30, 2017 at 7:32
  • usb3, hmmm. try a standard usb or usb2 port
    – ravery
    May 30, 2017 at 13:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .