LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-21-2015, 07:55 PM   #1
ndavilam
Member
 
Registered: Oct 2015
Location: Ecuador
Distribution: Slackware
Posts: 62

Rep: Reputation: 14
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
 
Old 10-21-2015, 08:15 PM   #2
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Rep: Reputation: 186Reputation: 186
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.
 
Old 10-21-2015, 08:21 PM   #3
frankbell
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
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
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.
Old 10-21-2015, 08:31 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Next logical question would be why are these ramdisks needed?
 
Old 10-21-2015, 09:04 PM   #5
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
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.
Old 10-21-2015, 09:17 PM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
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?
 
Old 10-21-2015, 09:22 PM   #7
frankbell
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
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
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.
Old 10-21-2015, 09:37 PM   #8
ndavilam
Member
 
Registered: Oct 2015
Location: Ecuador
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 14
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.
 
Old 10-21-2015, 09:40 PM   #9
ndavilam
Member
 
Registered: Oct 2015
Location: Ecuador
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 14
Smile

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
 
Old 10-21-2015, 09:49 PM   #10
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
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.
 
Old 10-21-2015, 09:53 PM   #11
ndavilam
Member
 
Registered: Oct 2015
Location: Ecuador
Distribution: Slackware
Posts: 62

Original Poster
Rep: Reputation: 14
Thank you all for your quick answers

Greetings from Ecuador

And again apologize my ignorance and my English LoL
 
Old 10-21-2015, 09:54 PM   #12
frankbell
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
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
Quote:
it's a bug?
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.
Old 10-21-2015, 11:43 PM   #13
Hangaber
Member
 
Registered: Sep 2004
Location: USA
Distribution: Slackware
Posts: 163

Rep: Reputation: 51
Good question, informative answers! I also learned something new with this.
 
1 members found this post helpful.
Old 10-22-2015, 01:06 AM   #14
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
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)?
 
Old 10-22-2015, 06:14 PM   #15
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Rep: Reputation: 186Reputation: 186
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.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sometimes, in rare cases, it might be better to re-install jlinkels Debian 5 01-11-2014 08:59 AM
download rare to use xubuntu ?? llmi187 Ubuntu 5 01-27-2012 04:50 AM
Rare American plants. Mr-Bisquit General 2 05-08-2010 06:30 PM
my fstab is rare Gran_Maestre Linux - General 3 06-13-2008 04:03 PM
Hello; kppp rare simbols - H e l p -please carrie Linux - Hardware 1 09-30-2004 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration