LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-08-2012, 05:44 PM   #1
Blackened Justice
Member
 
Registered: Jun 2011
Posts: 82

Rep: Reputation: Disabled
Changing the number of an sd*# partition, is it possible?


Hey everyone,

I've recently made some changes in my partioning scheme in order to free up some space to try out another distro. It's now something like this, in an extended partition:

sda5 - swap
sda6 - / - distro 1
sda8 - / - distro 2
sda7 - /home, both distros

Now, the OCD in me is going a bit crazy at the sudden lack of order So is there any way to switch up the numbers of the partitions? Making sda7 into sda8 and vice-versa?

Cheers
 
Old 02-08-2012, 06:28 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
No, but you have the option to use uuid (/sbin/blkid) as partition identifier if you want
 
Old 02-08-2012, 06:35 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,848

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Or even labels - more human friendly.
 
Old 02-08-2012, 08:17 PM   #4
Blackened Justice
Member
 
Registered: Jun 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
So there's actually no way to change the sda number? How can it be so "set to stone"?
 
Old 02-08-2012, 08:28 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,848

Rep: Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823Reputation: 1823
Of course it can be changed. You just have to hack the code that assigns the device nodes on boot (easy enough), and any code that follows the chaining for logical partitions. That adds up to a fair bit of code.
Or you delete the partitions and re-allocate in the order you want - how obsessive are you ?.
 
Old 02-08-2012, 08:31 PM   #6
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Quote:
Originally Posted by Blackened Justice View Post
So there's actually no way to change the sda number? How can it be so "set to stone"?

It's just an index, why pretend the 7th partition is the 8th partition, that would make no sense

Last edited by Cedrik; 02-08-2012 at 08:32 PM.
 
Old 02-08-2012, 08:36 PM   #7
Blackened Justice
Member
 
Registered: Jun 2011
Posts: 82

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by syg00 View Post
Of course it can be changed. You just have to hack the code that assigns the device nodes on boot (easy enough), and any code that follows the chaining for logical partitions. That adds up to a fair bit of code.
Or you delete the partitions and re-allocate in the order you want - how obsessive are you ?.
I guess not obsessive enough to move around 500GB of data...
 
Old 02-08-2012, 09:14 PM   #8
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,252

Rep: Reputation: 313Reputation: 313Reputation: 313Reputation: 313
You can just delete entry in partition table (with logical partions on extended partition in mind) and recreate it with proper order. It is quite dangerous and some useless, how often you access drives by /dev/sda*.
 
  


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
[SOLVED] Changing pattern using sed [number] to number. xpto09 Linux - General 2 06-22-2011 04:32 PM
Urgent help, on changing Partition Number mickeyboa Fedora 8 03-14-2009 10:39 PM
changing Major Number binumohanr AIX 1 07-28-2006 08:59 AM
changing IP number for new webserver AZDAVE Linux - Networking 1 12-10-2003 05:13 PM
Changing port number cli_man Linux - General 2 04-20-2002 09:50 AM


All times are GMT -5. The time now is 06:55 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