LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-08-2009, 01:29 AM   #1
Romanus81
Member
 
Registered: Feb 2008
Posts: 201

Rep: Reputation: 31
Manually changing sda(x) order from left to right.


I recently found myself needing some more partitions, and have decided to create a second extended partition from my third primary partition, I just wanted to know, because I believe I've done something like this before and it went wrong;
When I repartition my hard drive, I would like them to be numbered from left to right, but I believe last time I tried it numbered them from latest to newest.
So...
If my setup is like this
sda1 sda2 sda3 (sda4(sda5 sda6 sda7 sda8))
And I turn sda3 into an extended partition, can I force it to end up like this:
sda1 sda2 (sda3(sda4 sda5)) (sda6(sda7 sda8 sda9 sda10))
as opposed to this
sda1 sda2 (sda4(sda9 sda10)) (sda4(sda5 sda6 sda7 sda8))

What would be the best tool for the job? Because I believe gparted left me with the later format, which really confused me for awhile.
 
Old 01-08-2009, 02:13 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Still in the world of theory but if you boot of a live CD, wipe the disk clean of partitions and then recreate them exactly the same size, it should work and you should not lose data.

But why bother? You will have to change you fstab and probably other things might be affected by the change for nothing really.
 
Old 01-08-2009, 03:22 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Romanus;
In terms of the visible extended partition, you can only have one. The extended partition is really the beginning of a linked list which starts in the MBR and then continues thru the first sector of each logical partition, with each logical partition pointing to the next. (If you dig into the details, you'll find that this linked list includes additional "extended partition" entries in the partition table within each successive logical partition. These, however, are not visible to the typical tools.)

Partitions are numbered according to the position in the main (MBR) partition table and then according to the position in the linked list. This normally matches the order of creation, but the numbering will be the same regardless of how they were created.

The entries in the main (MBR) partition table are numbered 1-4, and the logical partitions start at 5 (regardless of the number of entries in the MBR table).

Finally, to first order, the partitions can point to areas of the disk that are neither in order, nor contiguous. Also, the size of the extended partition is useful only to partitioning tools---there is no actual disk area involved.
 
Old 01-08-2009, 03:49 AM   #4
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
As pixellany said, you can only have one extended partition. And the logical drives inside it will start from 5 to whatever (to a max of 63, though I think scsi disks have a much lower limit around 15 or so).

There's really no point in playing around with partition just to change how they are labeled. Too much risk for no real benefit. But next time you can just create an extended partition (sda1) and then create logical drives inside it. At least that way you will have three less things to worry about when you need to modify something.
 
Old 01-08-2009, 11:35 AM   #5
Romanus81
Member
 
Registered: Feb 2008
Posts: 201

Original Poster
Rep: Reputation: 31
Ahh, ok. I figured it couldn't hurt to ask. Thank you everyone for the help.
 
  


Reply



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
Which files in Gnome to modify in order to set Preferences manually? lqv Linux - Desktop 4 01-06-2009 12:13 PM
How do I keep sda from changing its name to sdb? kinetic Linux - Hardware 3 06-22-2008 08:01 PM
Changing sda to sdb mickeyboa Fedora 4 04-21-2008 12:22 AM
mount USB devices, sda, manually/statically assign sda? Oxyacetylene Debian 3 12-20-2004 02:45 PM
SQL query and left join order Kostko Programming 1 04-24-2004 05:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:58 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
Open Source Consulting | Domain Registration