LinuxQuestions.org
Visit Jeremy's Blog.
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 06-08-2013, 09:13 PM   #1
13stein.j
Member
 
Registered: May 2013
Location: Brooklyn, New York
Distribution: Linux Mint 15/Ubuntu 13.10/Debian 7/SUSE 11.x/openSUSE 12.3/RHEL 6.4/Fedora 18/Slackware, and 5 more
Posts: 111

Rep: Reputation: 6
switch sd* with sd*


Is there any way I can switch sda(1,2,5) and sde(1,2). Not the data within them, but the letters a and e(permanently), I need this because my opensuse install was on sda but then it changed to sde and won't boot properly. Changing the letters in the dev folder was only temporary and worked for one session, after restart, it undid itself.
 
Old 06-08-2013, 10:46 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Fix the problem, not the symptom.
Describe, in detail, what you mean by "won't boot properly". How did you change the /dev entries if it won't boot ?.

Have you checked the obvious places - fstab and boot config ?.
 
Old 06-08-2013, 10:56 PM   #3
13stein.j
Member
 
Registered: May 2013
Location: Brooklyn, New York
Distribution: Linux Mint 15/Ubuntu 13.10/Debian 7/SUSE 11.x/openSUSE 12.3/RHEL 6.4/Fedora 18/Slackware, and 5 more
Posts: 111

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by syg00 View Post
Fix the problem, not the symptom.
Describe, in detail, what you mean by "won't boot properly". How did you change the /dev entries if it won't boot ?.
My signature is the real deal, and when installing opensuse, sda and sde were mixed up, so now when I boot into sde, it boots to ubuntu, but a weird version of it. On the real ubuntu, I changed those entries, and it was temporary only.
Quote:
Originally Posted by syg00 View Post
Have you checked the obvious places - fstab and boot config ?.
I have tried to edit opensuse's fstab to go by sde instead of sda, and also by uuid, but, no luck.
 
Old 06-08-2013, 11:08 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
The BIOS determines the drive order at boot - but each Linux uses udev to assign the /dev/ nodes.
Is this a mix of one IDE and one ATA drive by any chance ?. I had all sorts of trouble with different distros using different names.

UUID should be the answer, especially with grub2.

From a Linux (even a liveCD) go here untar the download and run it - post the RESULTS.txt here.
 
Old 06-09-2013, 09:35 AM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
On most systems these days devices are created by udev.

http://www.reactivated.net/writing_udev_rules.html

You can write your own udev rules for creating devices if you want, but it's generally NOT recommended to try altering the default settings. It should be safe to additionally create your own personal symlinks to them, however. Indeed, your system should already have several preset symlinks set up for you in /dev/disk.

For fstab and related mount settings, however, you're better off just configuring them to use UUID, or perhaps LABEL, instead of the dev entry, as syg00 mentioned.
 
Old 06-09-2013, 10:06 PM   #6
13stein.j
Member
 
Registered: May 2013
Location: Brooklyn, New York
Distribution: Linux Mint 15/Ubuntu 13.10/Debian 7/SUSE 11.x/openSUSE 12.3/RHEL 6.4/Fedora 18/Slackware, and 5 more
Posts: 111

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by David the H. View Post
On most systems these days devices are created by udev.

http://www.reactivated.net/writing_udev_rules.html

You can write your own udev rules for creating devices
This seems the most useful so check if what I have to add is wrong
Code:
KERNEL=="sda", NAME="sde"
KERNEL=="sda1", NAME="sde1"
KERNEL=="sda2", NAME="sde2"
KERNEL=="sda5", NAME="sde5"
KERNEL=="sde", NAME="sda"
KERNEL=="sde1", NAME="sda1"
KERNEL=="sde2", NAME="sda2"
And, where would I write these rules?
 
Old 06-09-2013, 10:18 PM   #7
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,493

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
A question to all who have more experience than I have.

Changing drive letters with udev is nice and fine, but most Linux systems use initrd. So rewriting udev rules does not change the drive letters during boot. Only afterwards if the system has booted, and then the udev rules are carried out according to the /etc/udev settings. But it seems to me that that is too late.

I agree that using UUIDs in grub.conf is the correct way to go.

jlinkels
 
1 members found this post helpful.
Old 06-09-2013, 10:25 PM   #8
13stein.j
Member
 
Registered: May 2013
Location: Brooklyn, New York
Distribution: Linux Mint 15/Ubuntu 13.10/Debian 7/SUSE 11.x/openSUSE 12.3/RHEL 6.4/Fedora 18/Slackware, and 5 more
Posts: 111

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by jlinkels View Post
A question to all who have more experience than I have.

Changing drive letters with udev is nice and fine, but most Linux systems use initrd. So rewriting udev rules does not change the drive letters during boot. Only afterwards if the system has booted, and then the udev rules are carried out according to the /etc/udev settings. But it seems to me that that is too late.

I agree that using UUIDs in grub.conf is the correct way to go.

jlinkels
Grub's configuration is not the problem, I have already tried using uuid, but, I will try the udev rules, post if it did not work, and then ask how to do the same with initrd.
 
Old 06-10-2013, 07:56 PM   #9
13stein.j
Member
 
Registered: May 2013
Location: Brooklyn, New York
Distribution: Linux Mint 15/Ubuntu 13.10/Debian 7/SUSE 11.x/openSUSE 12.3/RHEL 6.4/Fedora 18/Slackware, and 5 more
Posts: 111

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by 13stein.j View Post
This seems the most useful so check if what I have to add is wrong
Code:
KERNEL=="sda", NAME="sde"
KERNEL=="sda1", NAME="sde1"
KERNEL=="sda2", NAME="sde2"
KERNEL=="sda5", NAME="sde5"
KERNEL=="sde", NAME="sda"
KERNEL=="sde1", NAME="sda1"
KERNEL=="sde2", NAME="sda2"
And, where would I write these rules?
These rules fixed everything! But, I had to make a few tweaks, 1, name this as 50-udev.rules, 2, do the same thing, but add DISPLAY:"0" at the end if each line and name it 10-local.rules, 3, copy these rules to each install except for OpenSuse, 4 start/restart udev, 5, update grub. Works like a charm, many thanks.
 
  


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
10/100 switch vs 1000 switch kitek Linux - Networking 3 07-21-2011 05:30 PM
Iptables + Forwarding + Vlan + OpenVPN & L2 junk switch /L3 extreme networks switch feloniousj Linux - Networking 3 03-15-2010 10:27 PM
tell me the process router to router, hub to hub and switch to switch communication. yakuza003 Linux - Networking 4 06-21-2008 08:55 AM
thread switch results in kernel stack switch superstition Linux - General 1 05-18-2005 12:48 AM
set up DSL thru SWITCH - winXp connected to SWITCH too husz Linux - Newbie 5 04-22-2004 01:08 AM


All times are GMT -5. The time now is 04:21 PM.

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