Installation of Ubuntu 16.04 blocked: cannot find hard disk

9,761

If you have a Dell XPS that does not come with Linux pre-installed, there are a few things that you need to do before you can install Ubuntu 16.04 on it.

Change SATA mode in BIOS to 'AHCI'

Dell XPS laptops are not usually shipped in AHCI mode (according to this thread) but that means that Ubuntu will not be able to see your disk and you will not be able to install anything.

In order to enable AHCI, you must go into the BIOS (press F2 at startup to enter the BIOS), then choose Settings -> System Configuration -> SATA Configuration. You will see three options: Disabled, AHCI, and RAID ON. Choose the second one.

You will be warned that this may prevent your computer from booting and that you may lose all your data. As you have a backup of all your data (because you do, don't you?) and therefore you have nothing to lose, Apply the setting and Exit.

(If you are worried that this change may affect the performance of your laptop, check your this Reddit thread for extra information on AHCI and RAID, including benchmarks, to dispel your fears).

If you want to get rid of Windows there is nothing else to do. If you want to keep your Windows and have a dual-boot laptop, read on.

Load the AHCI drivers on Windows

Let your computer restart. If you changed the SATA mode to AHCI, your Windows may not be able to boot at all and you will get a (magenta?) screen of death. This is because Windows does not load the AHCI drivers at startup to save on boot up time.

Telling Windows to load the AHCI drivers at startup can be done in more than one way, including this way and this other way. I will base my solution on the latter below as it seems to work in most situations and it is easier:

  1. Restart the computer once again.
  2. Enter the BIOS again. Choose SATA mode: RAID ON.
  3. Restart. Windows should load normally.
  4. Run Command Prompt as Admin
  5. Invoke a Safe Mode boot with the command: bcdedit /set {current} safeboot minimal
  6. Restart the PC again and enter your BIOS during bootup.
  7. Change the SATA mode to AHCI mode for the last time (hopefully). Apply & Exit.
  8. Windows 10 will launch in Safe Mode.
  9. Right click the Window icon and select to run the Command Prompt in Admin mode from among the various options.
  10. Cancel Safe Mode booting with the command: bcdedit /deletevalue {current} safeboot
  11. From this point on, Windows should boot up normally on AHCI mode and you should be able to boot up linux (or install it if you have not yet).

Note: it is possible that you will have to repeat these steps more than once.

Other details to bear in mind

  • There is no need to change any other parameters on the BIOS to install Ubuntu but, in case you are reading this after doing a bit of tweaking yourself, this page from Dell can help you to make sure that you have the right settings.
  • When Windows hibernates, the disk cannot be read or mounted. This is a problem with Windows 10 because Shutdown usually means Hibernate (because of something called Fast Startup or Hybrid Boot). To avoid this, always Restart or Shutdown while pressing the Shift key.
Share:
9,761

Related videos on Youtube

sergut
Author by

sergut

Updated on September 18, 2022

Comments

  • sergut
    sergut over 1 year

    I am trying to install Ubuntu 16.04 LTS on a Dell XPS 13 (9350). The laptop came with Windows 10 pre-installed. I am installing from a pendrive but I think the issue would be the same if I used e.g. a USB DVD drive.

    Dude, where's my hard drive?

    I am blocked because the installation program cannot find 8.6Gb of free space on my hard drive despite the fact that there are hundreds of Gb free according to Windows. Digging a bit into the problem, it seems that Ubuntu cannot see my hard disk at all.

    This is the output of GParted: output of Gparted

    I am not sure what that drive mounted at /cdrom is, but it seems the only device that exists in the system that is not a RAM disk or a loop device:

    Content of /proc/partitions:

    ubuntu@ubuntu:~$ cat /proc/partitions
      major minor  #blocks  name
        1        0      65536 ram0
        1        1      65536 ram1
        1        2      65536 ram2
        1        3      65536 ram3
        1        4      65536 ram4
        1        5      65536 ram5
        1        6      65536 ram6
        1        7      65536 ram7
        1        8      65536 ram8
        1        9      65536 ram9
        1       10      65536 ram10
        1       11      65536 ram11
        1       12      65536 ram12
        1       13      65536 ram13
        1       14      65536 ram14
        1       15      65536 ram15
        7        0     130048 loop0
        7        1    1104188 loop1
        8        0    1970239 sda
        8        1    1953439 sda1
    

    Summary of fdisk -l:

    ubuntu@ubuntu:~$ sudo fdisk -l |grep Disk
    Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors
    Disk /dev/loop0: 127 MiB, 133169152 bytes, 260096 sectors
    Disk /dev/loop1: 1.1 GiB, 1130688512 bytes, 2208376 sectors
    Disk /dev/sda: 1.9 GiB, 2017525248 bytes, 3940479 sectors
    Disklabel type: dos
    Disk identifier: 0x00000000
    

    Result of fdisk of the only non-loop non-RAM device (not sure this is relevant):

    ubuntu@ubuntu:~$ sudo fdisk -l |grep -A 50 sda
    Disk /dev/sda: 1.9 GiB, 2017525248 bytes, 3940479 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: 0x00000000
    
    Device     Boot Start     End Sectors  Size Id Type
    /dev/sda1  *      129 3907007 3906879  1.9G  c W95 FAT32 (LBA)
    

    I am blocked at this point. Any help will be much appreciated.

    Additional information (following comments):

    • Running dmesg |grep -i sata shows (among others) eight lines that suggest some kind of error:

      ata1: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
      ata2: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
      ata3: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
      ata4: SATA link down (SStatus 0 SControl 0)
      ata5: SATA link down (SStatus 0 SControl 0)
      ata6: SATA link down (SStatus 0 SControl 0)
      ata7: SATA link down (SStatus 0 SControl 0)
      ata8: SATA link down (SStatus 0 SControl 0)
      
    • I have "Restarted" windows instead of only "Shutdown" it to avoid problems with "fast startup", following some recommendations I have read of other users having problems installing Linux on Windows 10 laptops.ago

    • Regarding SATA, the BIOS says: "SATA Operation: RAID ON". The other two options available are "Disabled" and "AHCI".

  • aap
    aap over 7 years
    Good stuff. But about shutdown, permanently disabling fast shutdown is more convenient, if it works for you. superuser.com/a/495390/111150