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?

  • 1
    can you post the output of fdisk -l? – hmontoliu Aug 10 '11 at 14:44
  • No output from disk -l – coffee Aug 10 '11 at 14:50
  • Run it as root. Also give us the output of cat /proc/meminfo. – quanta Aug 10 '11 at 15:37
  • 1
    It's swap. – Michael Lowman Aug 10 '11 at 15:54

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.

| improve this answer | |
  • 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

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.

| improve this answer | |
  • using fsck "fsck.swap: not found". Using file -s "no read permission" – coffee Aug 10 '11 at 14:55
  • You must run the command as root user. – quanta Aug 10 '11 at 15:12
  • Thanks. It's a Linux/i386 swap file (new style). Does this complicate things? Thanks for your help – coffee Aug 10 '11 at 15:28

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

| improve this answer | |
  • "/dev/sda5 looks like swapspace - not mounted" – coffee Aug 10 '11 at 14:50

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.