LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-30-2012, 11:49 PM   #1
RJwen
LQ Newbie
 
Registered: Aug 2012
Distribution: Slackware
Posts: 25

Rep: Reputation: 2
Cool Meaning of # on #/dev/cdrom


Hi All,

Just get my first installation of Slackware done.
It is the very first migration from Windows to Linux, and I'm hooked.

KDE looks cool.

From google and this forum, I managed to get everything working:
1. Wireless (I had fwcutter and b43-firmware installed, using Slackbuilds)
2. I had wineHQ installed.
3. I had QQ working by installing Linux QQ
4. I managed to get flash-player to play the youtube.
5. Managed to get the sound of flash-player on youtube working by running alsaconf.

Everything works fine. But I just have small little curiosity, I try to google it and didn't find any information, on my etc/fstab it shows:
/dev/sda4 swap swap defaults 0 0
/dev/sda1 / ext4 defaults 1 1
/dev/sda2 /usr ext4 defaults 1 2
/dev/sda3 /home ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
/dev/sdb1 /media/SD1 auto noauto,owner,users,rw,sync,exec 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0

I wonder why there is # on /dev/cdrom (become #/dev/cdrom) ?

On other hand, when I run df, it shows:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 19228276 3416480 14835048 19% /
/dev/sda2 38448304 6282168 30213036 18% /usr
/dev/sda3 94195848 2646632 86764256 3% /home
tmpfs 504696 0 504696 0% /dev/shm

I wonder why /dev/sda1 suddenly change to /dev/root ?
I didn't remember I changed it.

These are just small annoyance that I do not find the answer on the net.

Any Expert could give a little enlightenment ?

Thanks for all the Linux Gurus out there.

Cheers...

RJ
 
Old 08-30-2012, 11:58 PM   #2
NeoMetal
Member
 
Registered: Aug 2004
Location: MD
Distribution: Slackware
Posts: 101

Rep: Reputation: 18
'#' sign in some contexts denotes a comment, i.e. comments out the line making it non-functional but leaving the text available
 
Old 08-31-2012, 12:16 AM   #3
RJwen
LQ Newbie
 
Registered: Aug 2012
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 2
Hi NeoMetal,

Thanks for your reply

As I understand, # follow by space and text is a comment, like below.
# this is comment

But I believe # follow by text right away mean something ? (script?)
#/dev/cdrom

Cheers...

RJ
 
Old 08-31-2012, 12:34 AM   #4
NeoMetal
Member
 
Registered: Aug 2004
Location: MD
Distribution: Slackware
Posts: 101

Rep: Reputation: 18
Having a space shouldn't necessarily matter - one simple way to check this out is to open a file in an editor that does syntax highlighting (vim should do this from a command line for example) and you can try out inserting comment delimiters and see how they work in various types of files by how the color of text on that line changes. (just remember not to save arbitrary changes to important files if you do that)


What you might be thinking of as indicating a script is the special #! interpreter directive on the first line of a script: http://en.wikipedia.org/wiki/Shebang_(Unix)

Last edited by NeoMetal; 08-31-2012 at 12:36 AM.
 
2 members found this post helpful.
Old 08-31-2012, 01:25 AM   #5
RJwen
LQ Newbie
 
Registered: Aug 2012
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 2
I see.

So '#' that preceded '/dev/cdrom' makes '/dev/cdrom' becomes a comment,
but the weird thing is my /dev/cdrom that is mounted on /mnt/cdrom function just fine.

here is the etc/fstab:
/dev/sda4 swap swap defaults 0 0
/dev/sda1 / ext4 defaults 1 1
/dev/sda2 /usr ext4 defaults 1 2
/dev/sda3 /home ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
/dev/sdb1 /media/SD1 auto noauto,owner,users,rw,sync,exec 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0

Thanks NeoMetal for your clarification
 
Old 08-31-2012, 02:01 AM   #6
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,042

Rep: Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977
Quote:
Originally Posted by RJwen View Post
but the weird thing is my /dev/cdrom that is mounted on /mnt/cdrom function just fine.
That's not weird.

You don't need this line because "udev" takes care of creating the mount point and mounting the drive "on the fly" when you insert a disk.
 
1 members found this post helpful.
Old 08-31-2012, 09:20 AM   #7
RJwen
LQ Newbie
 
Registered: Aug 2012
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 2
Aha , Merci Didier, learn something new today (which is udev).

This forum is really a wonderful place to learn, indeed.

Cheers....

RJ
 
Old 08-31-2012, 11:32 AM   #8
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,042

Rep: Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977
Quote:
Originally Posted by RJwen View Post
I wonder why /dev/sda1 suddenly change to /dev/root ?
I didn't remember I changed it.
It seems that I overlooked that question...

In fact /dev/root is only a symbolic link to /dev/sda1 (sda1 being your root file system, that is to say the file system under which the / partition is mounted).

You can check that with following command:
Code:
ls -l /dev/root
This symbolic link is created by an udev rule that you may display with following command:
Code:
cat /udev/.udev/rules.d/61-dev-root-link.rules
This rule in turn was written when the script /etc/rc.d/rc.udev was executed.

You can check that with following command, typed as root:
Code:
grep 61-dev-root-link.rules /etc/rc/d/*
Now you want to know which package included the file /etc/rc.d/rc.udev? Just type:
Code:
grep rc.udev /var/log/{packages,scripts}/*
Did you learn something new again? Then you may forget it immediately, as in the upcoming Slackware 14 the symlink /dev/root won't be created any more, as says the changelog for Slackware-current:
Code:
a/sysvinit-scripts-2.0-noarch-5.txz:  Rebuilt.
       Removed my convoluted /dev/root workaround in favor of a much more simple,
       elegant solution.  Thanks to Gary Langshaw.
Now if you want to know why the /dev/root symlink was ever created, I have two answers for you, both valid:
(1) For historical reasons.
(2) Better ask Patrick Volkerding, our BDFL. He knows.

Hope you didn't completely loose your time reading this post

Last edited by Didier Spaier; 09-01-2012 at 11:00 AM.
 
2 members found this post helpful.
Old 08-31-2012, 12:40 PM   #9
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 582

Rep: Reputation: 129Reputation: 129
Code:
a/sysvinit-scripts-2.0-noarch-5.txz:  Rebuilt.
       Removed my convoluted /dev/root workaround in favor of a much more simple,
       elegant solution.  Thanks to Gary Langshaw.
Yes, but when you are using grub2 and want to run grub2-mkconfig you get an error, /usr/sbin/grub2-probe: error: failed to get canonical path of /dev/root. And you have to recreate the link to get rid of the error.
 
1 members found this post helpful.
Old 08-31-2012, 01:19 PM   #10
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,042

Rep: Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977Reputation: 977
Yes, but that doesn't seems me be to be a very serious problem as:
- it's easy to fix
- IIRC only grub, not grub2, is included in /extra
- lilo is the default Slackware's bootloader.
 
1 members found this post helpful.
Old 08-31-2012, 01:48 PM   #11
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 582

Rep: Reputation: 129Reputation: 129
Quote:
- IIRC only grub, not grub2, is included in /extra
- lilo is the default Slackware's bootloader.
But when you want to use gpt partitions you have to use elilo or grub2.
 
1 members found this post helpful.
Old 08-31-2012, 02:35 PM   #12
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 582

Rep: Reputation: 129Reputation: 129
I did some more research in the matter of booting gpt on bios machines and theoretical lilo should work. In practice there seem still to be problems.
 
1 members found this post helpful.
Old 08-31-2012, 03:55 PM   #13
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,806

Rep: Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810Reputation: 810
Quote:
Originally Posted by whizje View Post
But when you want to use gpt partitions you have to use elilo or grub2.
You can also use extlinux (part of syslinux). It is included in Slackware, though you will need the version from the upcoming Slackware 14 (at the moment in RC4 status) to support GPT. On the plus side this package can be installed in 13.37.
 
1 members found this post helpful.
Old 09-01-2012, 10:17 AM   #14
RJwen
LQ Newbie
 
Registered: Aug 2012
Distribution: Slackware
Posts: 25

Original Poster
Rep: Reputation: 2
Hi All and especially Didier,

Thanks for such a detailed information

I'm closing this thread as SOLVED.

Just an update from me. Just managed to install virtualbox today as the barcode printer software doesn't work pretty well in wine. (and btw, the cracked Photoshop CS5 refuse to install thru wine LOL).

More people shall try Linux and especially Slackware, it is not that hard, but it just takes a lot lot of time Googling to solve problems or to learn something. Me myself am not programmer, not an IT professional, just someone generally literate on general computing.

Thanks once for all the Linux Gurus above.

Cheers...

RJ
 
Old 09-01-2012, 12:55 PM   #15
dr.s
Member
 
Registered: Feb 2010
Distribution: Slackware64
Posts: 129

Rep: Reputation: 19
Quote:
Originally Posted by RJwen View Post
More people shall try Linux and especially Slackware, it is not that hard, but it just takes a lot lot of time Googling to solve problems or to learn something.
Once you get used to Slackware (and Linux in general) I doubt you'll ever go back (to Windows?).
I come from the world of Win95/98/XP and *gulp* DOS6 , now I run nothing but Slackware on any desktop/laptop I get my hands on (including my personal desktop/laptops) while also running Slackware on VM's to compile/test anything, I only keep an XP VM (in Virtualbox) in case I need to run some old game or software that's not available.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
CDROM mounting problem => /dev/cdrom is not a valid block device Vizy Linux - Hardware 8 11-04-2010 04:46 PM
Simulate mounting ISO to /dev/cdrom (populate /dev/scd0 with data) bogdan_rec Linux - Software 2 06-30-2009 04:32 AM
meaning of sda1 , dev ? SemperFidelis Linux - Newbie 3 12-26-2007 03:27 AM
/dev/cdrom links to /dev/sg0 instead of /dev/sr0 -why? Yalla-One Slackware 3 10-01-2006 07:02 PM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM


All times are GMT -5. The time now is 10:47 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration