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?
Asked
Active
Viewed 1,157 times
0
-
1can 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.](http://serverfault.com/questions/48486/what-is-swap-memory) – Michael Lowman Aug 10 '11 at 15:54
3 Answers
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
.
![](../../users/profiles/59925.webp)
quanta
- 50,327
- 19
- 152
- 213
-
-
-
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
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.
![](../../users/profiles/5880.webp)
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
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
![](../../users/profiles/85383.webp)
Zds
- 141
- 2