Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

That is the current configuration

/dev/sda1 : ntfs primary 200GiB
/dev/sda3 : extended     400GiB
  /dev/sda5 : ext4       396GiB
  /dev/sda6 : linux-swap   4GiB

and that is the wanted configuration :

/dev/sda1 : ntfs primary 200GiB 
/dev/sda3 : extended     400GiB
  /dev/sda5 : linux-swap   4GiB
  /dev/sda6 : ext4       396GiB

I would like to inverse partition numbers of /dev/sda5 and /dev/sda6.

share|improve this question
To clarify your question you might want to include answers to the following questions. Are you just asking for numbers to be reversed or also the physical location of the partitions? What is your motivation for wanting to do this? – N.N. Sep 29 '11 at 7:00

Perhaps instead you'd like to use UUIDs to identify the file systems so that their numbers doesn't matter at all?

That way, even if you mount it in a usb3 external chassis and move it to another computer, everything would still work as expected since the disks won't be changed. It's easy to do. Your filesystems are defined in /etc/fstab. You might see something like:

/dev/sda1 /media/windows ntfs defaults 0 0

If you wanted to make it independent of its path, then you'd replace it with its UUID so that it became:

UUID=37bd1971-5b00-e923-2f3f-c1000972a254 /media/windows defaults 0 0

In order to get the UUID for a file system, you can use

sudo blkid /dev/sda1

which will return something similar to

/dev/sda1: UUID="37bd1971-5b00-e923-2f3f-c1000972a254" TYPE="linux_raid_member" 
share|improve this answer
I'm not sure if you attempted to modify your own system information to use as an example, or if you are actually mounting a disk of type=linux_raid_member. That type means the partition is part of an mdadm array and should not be mounted directly. A normal disk partition will have a type of "ext4". – psusi Sep 29 '11 at 13:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.