How to Force our 500 GB Drive to be the SDA drive instead of our Raid Array
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to Force our 500 GB Drive to be the SDA drive instead of our Raid Array
We are going in cricles to try to get our Ubuntu installation (14.04.1) to allow us to load Ubuntu's operating system to the 500 GB drive which is always set up somehow as SDC. We do not want the BOOT LOADER on the RAID Arrays, but on the 500 GB drive. We have two sets of RAID arrays in one box/enclosure.
/dev/sda - 18 TB RAID Array
/dev/sdb - 12 TB RAID Array
/dev/sdc - 500 GB Raptor Drive <-- We want this one to be the sda drive and where we'd load the BOOT LOADER also.
How do we do this?
Last edited by cecilchamp; 01-28-2015 at 11:52 AM.
You don't need it to be your sda drive... All you have to do is to install your bootloader to the sdc drive, and the BIOS should be able to boot it from there.
That being said, on my computer, sda was SATA port 0, sdb was port 1, and so on. So if you wanted to make it sda, you would swap the physical ports around.
Why do you want it to be sda? This is not like Windows where C:\ has to be the main OS. You can stick the OS and boot loader on any drive you want. What's sdc today might be sde tomorrow, the names are arbitrary, which is why all mounting is done using disk label or UUID instead.
When you boot, the kernel detects the disks and assigns them as they are noticed.
If you were to switch Disk A with Disk B, it is very likely their /dev/sdx would be swapped.
"Generally" the /dev/sda is the primary install - because on most systems, it IS the primary disk.
But if you had a usb plugged in first on boot one day, it's possible /dev/sda would be assigned to the usb, making your hdd /dev/sdb.
To get past this, use Universally Unique IDentifier's (or UUID). A uuid will stay the same, regardless of where it's inserted into the system.
If setting it up in fstab, the format would be like this:
You are right; it doesn't have to be sda. I wasn't aware of that.
We disconnected the Raid card cables and then rebooted and the 500 GB drive was assigned as sda. We then reconnected the RAID array and rebooted, and the 500 gb was bumped to sdc and was still considered the bootable drive by the system. We got it working, but we had to manually mount the RAID arrays, two of them.
We got it working, but we had to manually mount the RAID arrays, two of them.
I'm curious if you have something specified somewhere saying that it must be booted from sda
If it works only when all other drives are disconnected (essentially forces assignment of sda) I would consider that unstable - especially since it probes other drives first normally. What happens when you reboot with them connected?
Since it's giving you trouble, mount the main hdd via uuid.
Also, if you're doing it via script (not fstab) you can always refer to UUID's located in this directory:
No, we have nothing saying that we have to have sda as the boot drive; it was my mistaken understanding.
We have one 500 GB drive that we did load the OS to after disconnecting the RAID Array Card's cables.
However, we could not get the installation program to automatically or even manually take care of setting the 500 GB drive as bootable. It kept wanting the 18 TB RAID array as its bootable device. We've been through the installation maybe 8 times today.
Then either you're doing something wrong, or the installer is broken (I wouldn't put it past Ubuntu). What was wrong with the installation you did with the RAID arrays disconnected? Why can't you just use that one? Is there some reason you need to use Ubuntu?
You might try going into the BIOS and seeing if you can change the BIOS drive ordering such that the 500 GB drive is always reported first. Some BIOSes will allow you to change the drive order, some won't. Since (as others have mentioned) Linux uses the BIOS drive order and doesn't really care where the MBR is, this doesn't matter too much, but you can try it. You could also try a custom device mapping the GRUB, but I haven't played with that in ages (and it really should not be necessary).
Then either you're doing something wrong, or the installer is broken (I wouldn't put it past Ubuntu).
Broken installer gets my vote.
With the RAID disconnected (during install), no support would be built in the initramfs - should be easy enough to fix up later (I don't use Ubuntu, a quick search should find how). Then it should be easy enough to get automatically mounted.
Quote:
Originally Posted by cecilchamp
Our boss (IT Director) prefers Ubuntu.
There's no hope for some people ....
Quote:
However, we could not get the installation program to automatically or even manually take care of setting the 500 GB drive as bootable. It kept wanting the 18 TB RAID array as its bootable device. We've been through the installation maybe 8 times today.
I used to have the devils own job (with Ubuntu) when I had a mix of IDE and SATA drives. I forced the install and then added the drives back - think I had to mangle the udev scripts to make it work (after install).
As suggested by-uuid or (by-id) might be the way to go after the install has finished - I might check if the boot-loader has been installed on the MBR of the RAID during one of the installs - if so, erase it.
With a hardware raid, it can identify itself immediately, even though the disks attached may not yet be ready (the information can come from flash) - thus coming up as sda...
But there should be no problems with mounting - though sometimes identifying which physical disk is which may get tricky.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.