1

I have a Dell Inspiron 15R 64-bit laptop. I had Windows 8.1 on it. While installing Ubuntu 13.04, I accidentally selected the option to erase everything on the disk and install Ubuntu, and as a result, my entire hard-disk was formatted as one partition on which Ubuntu was installed(Thus, no Windows now).

After booting up the laptop, an error comes as "No boot device found. Press any key to reboot." This probably happens because Windows is no longer there, and it's bootloader is still there(?). To boot to Ubuntu, I have to either select it manually in the boot options menu during startup by pressing the F12 key, or by setting up the boot option in my BIOS settings to UEFI instead of Legacy. If I select the UEFI boot option, then it directly boots up into Ubuntu, and this is what I'm currently using. I recently upgraded my Ubuntu to 14.04, and the situation is still the same.

Now, I want to install Windows 8.1 over my current system(along with Ubuntu 14.04). The problem is I already have a Windows bootloader(?) that's somehow left because of formatting of the hard-disk previously. I don't want to take any chances, so I'm posting this question.

I have the image file(iso) of Windows 8.1. How do I go about installing Windows 8.1 along side with Ubuntu 14.04(Already present)?

Thanks! This is the output of df-h in terminal:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       451G  163G  265G  38% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            3.9G  4.0K  3.9G   1% /dev
tmpfs           786M  1.3M  785M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            3.9G  788K  3.9G   1% /run/shm
none            100M   52K  100M   1% /run/user
/dev/sda1       487M  7.3M  479M   2% /boot/efi

-EDIT- Added information in response to Rod Smith's answer. Here's the output for sudo parted /dev/sda print :

Model: ATA WDC WD5000LPVT-7 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End    Size    File system     Name  Flags
 1      1049kB  512MB  511MB   fat32                 boot
 2      512MB   492GB  491GB   ext4
 3      492GB   500GB  8453MB  linux-swap(v1)
1
  • @rajan - The separate partition should be created of which format? May 7, 2014 at 14:04

4 Answers 4

2

From your description, it sounds like you've installed Linux in EFI mode, but you've somehow set your firmware to boot in BIOS/CSM/legacy mode by default. This results in the "No boot device found" error message, because there's no BIOS/CSM/legacy boot loader. (Windows 8 and later are almost always installed in EFI mode on new hardware, so there would be no BIOS-mode boot loader when you bought the computer.) Adjusting your boot options to boot in EFI/UEFI mode by default (or equivalently, to disable BIOS/CSM/legacy support; the phrasing varies from one EFI to another) would probably get rid of the issue.

Moving forward, if I'm right about this, it's critical that you install Windows in EFI/UEFI mode. If you attempt to install in BIOS/CSM/legacy mode, Windows will complain about your GUID Partition Table (GPT) and refuse to install. Leaving BIOS-mode boot options active in your firmware might cause this to happen.

If I'm right, your computer already has the EFI System Partition (ESP) to which oldfred alluded. Windows and Ubuntu can share a single ESP. You will need to have either unallocated space or a ready-made NTFS partition for Windows' use, so you'll probably have to use GParted, as mrsud suggests, to prepare your disk. You'll need to do this from an Ubuntu live disk, since GParted can't modify any partition that's currently in use. Rather than use Boot Repair to restore GRUB, I recommend using bcdedit in Windows, since this is a more minimal option that's less likely to cause follow-on problems.

As a precaution, back up your ESP (/boot/efi from Ubuntu) to a USB flash drive or some other removable medium. That way, you can restore it in case the Windows installer trashes it. For that matter, backing up all your important user data is also advisable.

Before proceeding, you may want to check your boot mode and partition table type. When you boot Ubuntu in EFI mode, a directory called /sys/firmware/efi should be present. Look for it to verify that you're in EFI mode. To check your partition table, type sudo parted /dev/sda print. You should see output resembling the following:

$ sudo parted /dev/sda print
Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                 Flags
 1      20.5kB  577MB   577MB   fat32        EFI System           boot
 2      578MB   1102MB  524MB   ext2         Ubuntu /boot
 3      1102MB  1626MB  524MB                Unused /boot
 4      1626MB  3001GB  2999GB               Linux LVM            lvm

Yours will be different in many details from mine, but note the Partition Table line, which identifies the partition table as GPT or MBR (which shows as msdos, IIRC). Note also the FAT32 partition with the boot flag set -- that's the ESP. (Its entry in the Name column is descriptive for humans, and might not read EFI System, as mine does.)

If you don't have a /sys/firmware/efi directory and/or if your disk does not use GPT, then my interpretation of what you've written is wrong, and you should post back with details. (Edit your original question.) In this case, ignore everything I've written here -- or file it away for future reference -- since it doesn't apply if you've actually installed Linux in BIOS/CSM/legacy mode.

2
  • My computer came pre-installed with Win7, that's why I must be having a legacy option too. And yes, I have the /sys/firmware/efi directory, and I have edited the original question to include further details. So from what I've understood, these are the steps that I would have to take: 1. Backup /boot/efi and valuable data. 2. Use LiveUSB to reduce existing ext4 partition to create an ntfs partition. 3. Install Windows in EFI/UEFI mode. I'm confused on this step. How will I know whether I'm installing in this mode or not? 4. Use bcdedit in windows to restore GRUB. May 9, 2014 at 6:47
  • Your outlined procedure sounds good. How to install Windows 7 in EFI mode is a question best addressed on a Windows site; or you can try a Web search to find answers. It can be a bit tricky because many Windows 7 DVDs tend to boot more readily in BIOS mode than in EFI mode, and as with Linux installations, it's really the firmware that determines the boot mode, so the solution can be firmware-specific.
    – Rod Smith
    May 10, 2014 at 1:17
0

Create a partition using gparted and then install windows in it. Later you may use boot-repair to get your grub back.

0

Windows in UEFI mode also needs a reserved partition and it must be just before the NTFS partition.

I would suggest just to install Windows into unallocated space.

Microsoft suggested partitions including reserved partition for gpt & UEFI:

http://technet.microsoft.com/en-us/library/dd744301%28WS.10%29.aspx

Order on drive is important: msftres

http://en.wikipedia.org/wiki/Microsoft_Reserved_Partition

The efi partition still has the old entries which a new install should overwrite. But UEFI also remembers settings from efi partition in its NVRAM. Windows should also refresh that or you may need to update it manually with efibootmgr or from inside your UEFI if you have an UEFI with better menu options.

0

If you are using the EFI / UEFI boot instead of the boot loader (eg. GRUB) of the HD, please disregard this answer.

I would burn the .iso to DVD, then follow the advice above concerning setting the BIOS the way you want it. I would install the Windows 8.1 first, having it delete all partitions and then create one partition from half the drive. Do all the Windows stuff first, ignoring the unused half of the drive, and once the Windows is working and updated then install the Linux.

You must log in to answer this question.

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