0

I was looking at my harddrive with gparted, and noticed a small partition at /dev/sda5. I cannot cd into that folder directly, but I was hoping to find out what is on that partition. How do I do this? Do I need to mount it?

coffee
  • 3
  • 2

3 Answers3

2

Yes, determine the file system type with fsck -N /dev/sda5 or file -s /dev/sda5 and mount by executing mkdir /mnt/sda5 && mount -t <type> /dev/sda5 /mnt/sda5.

quanta
  • 50,327
  • 19
  • 152
  • 213
2

From reading everything you've posted, it's swap space. You cannot mount it, and there is nothing interesting to see there anyway. All that it contains is memory pages that needed to be moved from RAM to disk to make room for actively running processes.

Read Here for more info on swap space.

Zypher
  • 36,995
  • 5
  • 52
  • 95
  • Right, what Zypher said. If the information is needed for some kind of investigation, then processing the data in swap may actually be useful. If that's the case then @coffee needs to clarify his intent. – Scott Pack Aug 10 '11 at 15:59
  • Interesting, thanks! I am trying to figure out if I can remove this partition. I am trying to extend my main partition, but this bit is in the way.. – coffee Aug 10 '11 at 17:09
  • 1
    I wouldn't recommend it. – Zypher Aug 10 '11 at 17:23
1

You need to mount the partition to see what's inside. However, you can mount it read-only to prevent even accidentally changing anything. This is done like this

mount --read-only /dev/sda5 tmp

Zds
  • 141
  • 2