LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-28-2015, 12:49 PM   #1
cecilchamp
LQ Newbie
 
Registered: Jan 2015
Location: Texas and Arizona
Posts: 6

Rep: Reputation: Disabled
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 12:52 PM.
 
Old 01-28-2015, 12:53 PM   #2
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 810

Rep: Reputation: 264Reputation: 264Reputation: 264
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.

Hope this helps
 
Old 01-28-2015, 01:18 PM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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.

Here's the df output from one of my systems
Code:
$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb3             212G  5.8G  196G   3% /
tmpfs                 7.8G   13M  7.8G   1% /dev/shm
/dev/sdb1             477M  146M  306M  33% /boot
/dev/sda1              73T   36T   37T  50% /home
tmpfs                 7.8G   68K  7.8G   1% /tmp
sda is the 80 TB RAID mounted at /home, sdb is the OS drive, and the actual root partition is sdb3. It makes no difference.

Last edited by suicidaleggroll; 01-28-2015 at 01:19 PM.
 
Old 01-28-2015, 01:28 PM   #4
Miati
Member
 
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
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:
Code:
UUID=stringofnumbers /mountpoint filesystem options dumpoption passoption
To identify what the UUID is, use blkid as root.
Either by itself or with device name.
Code:
blkid
blkid /dev/sdx

Last edited by Miati; 01-28-2015 at 01:33 PM.
 
Old 01-28-2015, 01:29 PM   #5
cecilchamp
LQ Newbie
 
Registered: Jan 2015
Location: Texas and Arizona
Posts: 6

Original Poster
Rep: Reputation: Disabled
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.

Thanks for the explanation.
 
Old 01-28-2015, 01:47 PM   #6
Miati
Member
 
Registered: Dec 2014
Distribution: Linux Mint 17.*
Posts: 326

Rep: Reputation: 106Reputation: 106
Quote:
Originally Posted by cecilchamp View Post
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:
Code:
/dev/disk/by-uuid/
 
Old 01-28-2015, 03:42 PM   #7
cecilchamp
LQ Newbie
 
Registered: Jan 2015
Location: Texas and Arizona
Posts: 6

Original Poster
Rep: Reputation: Disabled
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.

Cecil
 
Old 01-28-2015, 03:47 PM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
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?
 
Old 01-28-2015, 04:33 PM   #9
cecilchamp
LQ Newbie
 
Registered: Jan 2015
Location: Texas and Arizona
Posts: 6

Original Poster
Rep: Reputation: Disabled
Our boss (IT Director) prefers Ubuntu.

As to your questions, I will have to come back to this to answer, since my time is short today.
 
Old 01-28-2015, 10:05 PM   #10
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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).
 
Old 01-29-2015, 01:06 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,838

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
Originally Posted by suicidaleggroll View Post
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.
 
Old 01-29-2015, 09:28 PM   #12
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,604

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Linux identifies the disks as they come online.

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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Raid 10 Array - Replaced Faulty Drive, Won't Assemble! notaprogrammer Ubuntu 1 10-03-2013 05:33 PM
Unable to replace drive in software RAID-5 array (Fedora 14) Ta-mater Linux - Newbie 1 11-18-2011 11:22 AM
Boot from USB Drive - force device as sda m.lukas Linux - Hardware 10 05-13-2011 04:55 PM
can't boot raid array after drive failure Rascale Linux - Hardware 4 02-12-2006 07:41 PM
I removed a drive from my raid array, how can I get it to boot alone? abefroman Linux - Hardware 2 10-04-2005 09:40 AM


All times are GMT -5. The time now is 08:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration