Slackware This Forum is for the discussion of Slackware Linux.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
10-21-2015, 07:55 PM
#1
Member
Registered: Oct 2015
Location: Ecuador
Distribution: Slackware
Posts: 62
Rep:
A very rare thing
Sorry for my English ...
I have a problem :
First, I installed Slackware
Second: I run the fdisk -l command Result: My drive
Third: I upgrade Slackware
Fourth, I run the fdisk -l command again and do not understand why I appear / dev / ram0 to / dev / ram15
This is bad?
Lacks RAM to my computer
I have a PC with 8GB RAM i5 2.80 Ghz
10-21-2015, 08:15 PM
#2
Member
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890
Rep:
Hello and welcome to the forums.
Which Slackware version are you upgrading from and to which version?
Can you post the current fdisk -l output?
Regards.
10-21-2015, 08:21 PM
#3
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
What you are seeing are virtual partitions created by the kernel in /proc, as opposed to physical partitions. This is the relevant bit from
man 8 fdisk :
Code:
-l, --list
List the partition tables for the specified devices and then exit. If no devices are given, those mentioned in /proc/partitions (if that file exists) are used .
Here's the content of my /proc/partitions:
Code:
ls /proc/partitions
/proc/partitions
bash-4.3# cd /proc/partitions
bash: cd: /proc/partitions: Not a directory
bash-4.3# ls
README doinst.sh hardinfo-0.5.1.tar.bz2 hardinfo.SlackBuild hardinfo.info slack-desc
bash-4.3# cat /proc/partitions
major minor #blocks name
1 0 16384 ram0
1 1 16384 ram1
1 2 16384 ram2
1 3 16384 ram3
1 4 16384 ram4
1 5 16384 ram5
1 6 16384 ram6
1 7 16384 ram7
1 8 16384 ram8
1 9 16384 ram9
1 10 16384 ram10
1 11 16384 ram11
1 12 16384 ram12
1 13 16384 ram13
1 14 16384 ram14
1 15 16384 ram15
8 0 488386584 sda
8 1 48829536 sda1
8 2 4883760 sda2
8 3 434673256 sda3
11 0 1048575 sr0
8 16 1953514584 sdb
8 17 1023999133 sdb1
8 18 1 sdb2
8 21 929512836 sdb5
Here's part of what happens when I run fdisk -l (I have snipped a bunch of extraneous data for purposes of brevity):
Code:
fdisk -l
Disk /dev/ram0: 16 MiB, 16777216 bytes, 32768 sectors
Disk /dev/ram1: 16 MiB, 16777216 bytes, 32768 sectors
Disk /dev/ram2: 16 MiB, 16777216 bytes, 32768 sectors
Disk /dev/ram3: 16 MiB, 16777216 bytes, 32768 sectors
Disk /dev/ram4: 16 MiB, 16777216 bytes, 32768 sectors
Disk /dev/ram5: 16 MiB, 16777216 bytes, 32768 sectors
Disk /dev/ram6: 16 MiB, 16777216 bytes, 32768 sectors
Disk /dev/ram7: 16 MiB, 16777216 bytes, 32768 sectors
Disk /dev/ram8: 16 MiB, 16777216 bytes, 32768 sectors
(snip)
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 97659134 97659072 46.6G 83 Linux
/dev/sda2 967005648 976773167 9767520 4.7G 82 Linux swap
/dev/sda3 97659135 967005647 869346513 414.5G 83 Linux
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Device Boot Start End Sectors Size Id Type
/dev/sdb1 63 2047998329 2047998267 976.6G 83 Linux
/dev/sdb2 2047998330 3907024064 1859025735 886.5G 5 Extended
/dev/sdb5 2047998393 3907024064 1859025672 886.5G 83 Linux
I want to thank you for asking that question. I learned a lot in trying to find an answer.
Last edited by frankbell; 10-21-2015 at 08:23 PM .
2 members found this post helpful.
10-21-2015, 08:31 PM
#4
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661
Rep:
Next logical question would be why are these ramdisks needed?
10-21-2015, 09:04 PM
#5
Member
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375
Rep:
I never noticed them before either, it looks like these are the kernel options (they appear to match what I'm seeing).
Code:
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
2 members found this post helpful.
10-21-2015, 09:17 PM
#6
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661
Rep:
Of course this is changed kernel configuration and these ramdisks are really not using any RAM when unused. Just curious, why this option was turned on?
10-21-2015, 09:22 PM
#7
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Why the Linux kernel does what it does is well above my pay grade, but I found this:
https://www.e2enetworks.com/linux-in...fs-vs-ramdisk/
It seems relevant.
2 members found this post helpful.
10-21-2015, 09:37 PM
#8
Member
Registered: Oct 2015
Location: Ecuador
Distribution: Slackware
Posts: 62
Original Poster
Rep:
Thanks for rapid answer.
bash-4.3# fdisk -l
Disco /dev/ram0: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram1: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram2: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram3: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram4: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram5: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram6: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram7: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram8: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram9: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram10: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram11: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram12: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram13: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram14: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Disco /dev/ram15: 16 MiB, 16777216 bytes, 32768 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
it's necesary?
it's a bug?
My version is 14.1, I made a package upgrade.
And the last question.
Why is this happening now and not before?
This comes to pass from the update from the kernel 4.1.6, I did not happen before with other versions.
10-21-2015, 09:40 PM
#9
Member
Registered: Oct 2015
Location: Ecuador
Distribution: Slackware
Posts: 62
Original Poster
Rep:
Why?
Quote:
Ramdisks allocate memory when they are put to use by formatting them as ext2 or some other non-journaling filesystem. ( no not ext3, there is no use of journaling for an filesystem that is transient )
i have ext4
10-21-2015, 09:49 PM
#10
Member
Registered: Sep 2015
Posts: 733
Rep:
I checked and there's a recent patch to turn off CONFIG_BLK_DEV_RAM. Seems that it got enabled on as the default. This happens too often in the kernel. To fix it might require a kernel rebuild depending on your kernel.
10-21-2015, 09:53 PM
#11
Member
Registered: Oct 2015
Location: Ecuador
Distribution: Slackware
Posts: 62
Original Poster
Rep:
Thank you all for your quick answers
Greetings from Ecuador
And again apologize my ignorance and my English LoL
10-21-2015, 09:54 PM
#12
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
No, it's not a bug. It's how fdisk works, as the man page points out.
Normal usage of fdisk is to specify a target, normally a drive, such as
Code:
#bash-4.3# fdisk -l /dev/sda <--/dev/sda is the target.
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00090121
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 63 97659134 97659072 46.6G 83 Linux
/dev/sda2 967005648 976773167 9767520 4.7G 82 Linux swap
/dev/sda3 97659135 967005647 869346513 414.5G 83 Linux
If there's no target, it reads
/proc/partitions .
Read up on
/proc . It's bunch of runtime virtual stuff which I don't pretend to understand I just know it's there, not real physical stuff.
You might compare it with the output of
cat /etc/mtab .
Afterthought :
Don't apologize for your English. LQ is an international forum and members are not graded on their English.
You got your point across clearly and economically. That's far more than many of my fellow countrymen can do.
Last edited by frankbell; 10-21-2015 at 10:14 PM .
4 members found this post helpful.
10-21-2015, 11:43 PM
#13
Member
Registered: Sep 2004
Location: USA
Distribution: Slackware
Posts: 163
Rep:
Good question, informative answers! I also learned something new with this.
1 members found this post helpful.
10-22-2015, 01:06 AM
#14
Member
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375
Rep:
CONFIG_BLK_DEV_RAM is set to 'y' in the default 14.1 kernel as well as the current kernel, but the 16 ramdisks only appear in fdisk on current (at least on my systems). Maybe the displaying of the ramdisks in fdisk is due to a change in util-linux between versions 2.21.2 to 2.26.2 (so cosmetic only)?
10-22-2015, 06:14 PM
#15
Member
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890
Rep:
Well, I got late to check LQ and found that I learnt something new today with this thread.
Glad it worked well for everybody.
PS: Your English is fine.
Regards.
1 members found this post helpful.
All times are GMT -5. The time now is 04:01 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News