Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install Windows 7 on /dev/sda but whatever drive I install Windows 7 on becomes /deb/sdb. I havent changed any boot priorties in the BIOS.

Could someone please help me understand how Ubuntu 12.04 chooses /dev/sda and /dev/sdb?

share|improve this question
up vote 11 down vote accepted

The designation /dev/sda and /dev/sdb can be arbitrary as you can see.


If your machine has more than one SATA, SCSI or IDE disk controller, the order in which their corresponding device nodes are added is arbitrary. This may result in device names like /dev/sda and /dev/sdb switching around on each boot, culminating in an unbootable system, kernel panic, or a block device disappearing. Persistent naming solves these issues.

and Debian

If you have more than one disk controller (IDE or especially SCSI/SATA), or even if you just have variable numbers of removable USB/firewire storage devices attached from day to day, the order in which they are detected may not be deterministic. The result is that device names like /dev/sda1 and /dev/sdb1 may switch around randomly on each boot. Persistent naming allows you not to worry about this at all.

Best to use UUID or labels.

To identify your disk/partition, use blkid

sudo blkid

The Ubuntu information is here:

It may be best to temporarily remove your windows hard drive while you install Ubuntu, then configure your windows partition(s) to mount post install. You can then select which OS to boot in your BIOS.

share|improve this answer
Sorry- a lot of that went over my head :) I am trying to install Windows on sda and Ubuntu on sdb because otherwise if Windows is on sdb it won't hibernate correctly (Windows 7 has to be the first disk):… – user997112 Nov 4 '13 at 19:21
If you are having a problem with Windows, best ask on stack-exchange ;) – bodhi.zazen Nov 4 '13 at 19:46
On my system, blkid gave no result, but sudo blkid gave the desired list of disks, including UUID and Label values. – Jim DeLaHunt Jun 25 '14 at 18:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.