1

As far I know, my drive is mounted under /dev directory as /dev/sda and the partitions are mounted as /dev/sda1 or /dev/sda2 but I have to go to /media/DATA to access my data on a partition. This page says that /dev/sda is called a drive and /dev/sdb1 is called a partition. I want to ask what /media/DATA is called and how do I find(using command-line of course) /media/DATA if I know of /dev/sdb1 or vice-versa.

  • /media/DATA is a mounted file system that exists on a partition /dev/sda1 that exists on a drive /dev/sda. – jc__ Aug 19 '16 at 18:31
2

/media/DATA is your mounted file system.

/dev/sda1 is the partition.

/dev/sda is the drive.

If you wanted to interact with the file system, say create a file, you would interact with /media/DATA.

If you wanted to interact with the partition, say format or create a file system you would interact with /dev/sda1.

If you wanted to interact with the drive itself, say backup your partition table dd if=/dev/sda of=/media/DATA/partition_table.img bs=512 count=1 you would interact with /dev/sda.

  • :How do I find which partition is linked to which mounted file system or vice-versa? – 7_R3X Aug 19 '16 at 18:54
  • Use the mount command. It will list the mount point to the partition. Depending on your version you may need the list switch. mount -l. – jc__ Aug 19 '16 at 18:56
  • Just one last question: Is it possible to backup a partition same way as you took a backup for the drive? – 7_R3X Aug 19 '16 at 19:00
  • Not sure what exactly you are asking. If you want to create a backup of a partition, say your OS, you could use tools like clonezilla or even dd. – jc__ Aug 19 '16 at 19:03
  • What I want to ask is whether it is possible to use dd to create backup of a partition as in dd if=/dev/sda1 of=/media/somewhere/abc.img? – 7_R3X Aug 19 '16 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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