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?
2 Answers
The designation /dev/sda and /dev/sdb can be arbitrary as you can see.
From
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.
For file systems it's best to use UUID (/dev/disk/by-uuid/) or labels (/dev/disk/by-label/). For raw drives or unformatted partitions you can use IDs (/dev/disk/by-id/).
To identify your disk/partition, use blkid
sudo blkidThe 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.
3I believe based on my research that the drive designation comes from the BIOS. If you can modify your drive settings in the BIOS to change the drive from primary to secondary then you could change sda (primary) to sdb (secondary). Someone with an Award BIOS that has this ability could confirm. My install is on a Satellite U845t and modifying that setting isn't possible in the BIOS. In the end, it doesn't matter if your install is on the primary or secondary drive except when the read/write speeds are considerably different. I clean installed to /sdb, my SSD drive, and then utilized my platter drive on /sda for storage.
I'm currently running Ubuntu 20.04 on /dev/sdb (SSD) with /home mounted on /dev/sda (HDD). You can modify the /home mount point using the terminal but if you are clean installing, select "Something Other" and then select the mount points for the install on the desired partitions.