Author Topic: Using CD drives?  (Read 7638 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Using CD drives?
« on: September 21, 2005, 04:44:05 pm »
Alright, I have Slackware. I have two CD-ROM drives. I'm probably going to be using KDE instead of WMaker. Anyhow, how would I mount D: to /mnt/cd1 and E: to /mnt/cd2? Or would it be /mnt/cda1 and /mnt/cdb1, being two totally different drives?

Offtopic:
Also, Linux has an autoexec.bat-type shellscript to start programs on kernel startup, right? Where is this, if so?

Note: This post is set in the future. I stil don't have Slackware.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline iago

  • Leader
  • Administrator
  • Hero Member
  • *****
  • Posts: 17914
  • Fnord.
    • View Profile
    • SkullSecurity
Re: Using CD drives?
« Reply #1 on: September 21, 2005, 05:03:01 pm »
Your cd drives, assuming they're ide, will be in /dev/hda, hdb, hdc, or hdd.  To figure out which one is which, do "dmesg | grep hda", "dmesg | grep hdb", etc.  That should give you the information you need. 

In Linux, the "kernel startup" is the first couple seconds.  All the rest is programs being run and modules being loaded.  Pretty much everything you see while it's booting is programs/shellscripts outputting their stuff.  Depending on what you want to do, you want your stuff to run at different points during startup, which you can check out in the /etc/rc.d/ folder.  If you view each file in there (especially rc.0, rc.1, etc.) they'll tell you what happens when. 

The easiest way is to put your programs in /etc/rc.d/rc.local.  As it says in its comment, rc.local is the last script to be run on boot. 

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Using CD drives?
« Reply #2 on: September 21, 2005, 05:18:16 pm »
Interestingly enough, the 250GB HDD I ordered for my server just came in today.  I didn't even have to ask for help -- it was already here!

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Using CD drives?
« Reply #3 on: September 21, 2005, 05:18:35 pm »
/dev/cdrom is linked to your main CDRom most of the time.

newby@impaler:~$ ls -l /dev/cdrom
lrwxrwxrwx  1 root root 8 2005-07-03 15:21 /dev/cdrom -> /dev/hda
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Using CD drives?
« Reply #4 on: September 21, 2005, 05:30:20 pm »
Alright, slick! Also, how well does this handle removing+inserting different CDs?

/dev/hda1 = C:\
/dev/hdb1 = D;\
/dev/hdc1 = E:\

Setup:
*login as root*
cd /mnt
mkdir cd1
mkdir cd2

On box start:
mount /dev/hdb1 /mnt/cd1
mount /dev/hdc1 /mnt/cd2

Right?
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Using CD drives?
« Reply #5 on: September 21, 2005, 05:32:58 pm »
No.

/dev/hda = CD-Rom for me ("D:")
/dev/hdc = CD/DVD-Rom for me ("E:")
/dev/sda = Hard-drive
/dev/sdb = Hard-drive

/dev/sda1 = Windows partition ("C:")
/dev/sda2 = Linux partition (/)
/dev/sdb1 = Windows Partition ("S:")

Again, it will differ on your system.

Most of the directories come premade with your Slackware installation. I made dvdrom for myself, but cdrom was already there.

newby@impaler:~$ ls /mnt
cdrom/   external/  hd/    old-drive/   windows/
dvdrom/  floppy/    ipod/  thumbdrive/

/etc/fstab can link some of the drives to a specific mount point if you wish.
newby@impaler:~$ cat /etc/fstab | grep "cdrom"
/dev/cdrom       /mnt/cdrom       iso9660     noauto,owner,ro  0   0

You really don't want to mount a drive on boot. That's just retarded.

Mount them when you stick a CD in. Unmount (umount) them when you don't.

See, Joe, this is why you weren't a moderator of this board. This is really just a basic of *nix. As much as you may be relatively knowledged in *nix, you aren't totally knowledged enough to moderate issues revolving around it. You are all knowledge, hardly any experience. :)
« Last Edit: September 21, 2005, 05:40:36 pm by Newby »
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Using CD drives?
« Reply #6 on: September 21, 2005, 06:27:06 pm »
root@tehserver:~# dmesg | grep hdb
    ide0: BM-DMA at 0xe000-0xe007, BIOS settings: hda:DMA, hdb:DMA
hdb: WDC WD2500JB-00GVA0, ATA DISK drive
hdb: attached ide-disk driver.
hdb: host protected area => 1
hdb: 488397168 sectors (250059 MB) w/8192KiB Cache, CHS=30401/255/63, UDMA(100)
 hdb: unknown partition table


Ok, so that's the harddrive.  Now what do I do to access it?

Offline Ergot

  • 吴立峰 ^_^ !
  • x86
  • Hero Member
  • *****
  • Posts: 3724
  • I steal bandwidth. p_o
    • View Profile
Re: Using CD drives?
« Reply #7 on: September 21, 2005, 07:09:23 pm »
I'm guessing you need to partition it...
cfdisk /dev/hdb/

Then mount it
mount /dev/hdb1 /mnt/location
mount /dev/hdb2 /mnt/location2
etc.

* Ergot laughs at Joe. ^^
Who gives a damn? I fuck sheep all the time.
And yes, male both ends.  There are a couple lesbians that need a two-ended dildo...My router just refuses to wear a strap-on.
(05:55:03) JoE ThE oDD: omfg good job i got a boner thinkin bout them chinese bitches
(17:54:15) Sidoh: I love cosmetology

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Using CD drives?
« Reply #8 on: September 21, 2005, 07:19:08 pm »
Don't forget to make a file system on the partitions!
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Using CD drives?
« Reply #9 on: September 21, 2005, 07:27:35 pm »
How? =p

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Using CD drives?
« Reply #10 on: September 21, 2005, 07:32:15 pm »
If I recall correctly, mkfs.

(type man mkfs for more info)
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Using CD drives?
« Reply #11 on: September 21, 2005, 07:45:22 pm »
Thanks, Newby!

In case anyone's interested:


root@tehserver:~# mkfs.ext2 /dev/hdb1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
30539776 inodes, 61049000 blocks
3052450 blocks (5.00%) reserved for the super user
First data block=0
1864 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872

Writing inode tables: done                           
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@tehserver:~#
« Last Edit: September 21, 2005, 07:47:21 pm by Sidoh »

Offline Sidoh

  • x86
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Using CD drives?
« Reply #12 on: September 21, 2005, 07:51:56 pm »
Another problem.  Maybe I'm stupid?

root@tehserver:~# mount /dev/hdb1 /mnt/hdb1
mount: mount point /mnt/hdb1 does not exist

Offline Ergot

  • 吴立峰 ^_^ !
  • x86
  • Hero Member
  • *****
  • Posts: 3724
  • I steal bandwidth. p_o
    • View Profile
Re: Using CD drives?
« Reply #13 on: September 21, 2005, 08:09:25 pm »
mkdir /mnt/hdb1

ext2 and not ext3 :S?
Who gives a damn? I fuck sheep all the time.
And yes, male both ends.  There are a couple lesbians that need a two-ended dildo...My router just refuses to wear a strap-on.
(05:55:03) JoE ThE oDD: omfg good job i got a boner thinkin bout them chinese bitches
(17:54:15) Sidoh: I love cosmetology

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Using CD drives?
« Reply #14 on: September 21, 2005, 08:43:01 pm »
You should do ext3. It's journaling!
- Newby
http://www.x86labs.org

Quote
[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT.