LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2001, 11:26 PM   #1
jlcork
LQ Newbie
 
Registered: Nov 2001
Location: Houston, Texas
Posts: 3

Rep: Reputation: 0
Question Auto Mount


Looking for a way to mount a DVD-ROM driver if found during startup. I'm using the following command to return the device name but don't know how to include it in the mount command

dmesg | grep 'DVD-ROM' | cut -c 1-3 ' returns hdd

In short I'm try to build a bootable DVD, which boots to Linux and has access to the files on the DVD.

Any help would be appreciated.

Thanks

John
 
Old 11-25-2001, 12:32 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
if that does work properly and give hdd, then you should be able to say;

mount /dev/`that-dmesg-thing` /mnt/dvd

using BACK quotes...
 
Old 11-26-2001, 12:04 AM   #3
jlcork
LQ Newbie
 
Registered: Nov 2001
Location: Houston, Texas
Posts: 3

Original Poster
Rep: Reputation: 0
I get bash errors when I try to use anything after /dev/.

mount: can't find /dev/dmesg in /etc/fstab or /etc/mtab

tried mount /dev/dmesg | grep 'DVD-ROM' | cut -c 1-3 /mnt/dvd
tried (mount /dev/;dmesg | grep 'DVD-ROM' | cut -c 1-3 /mnt/dvd)
tried mount /dev/|dmesg | grep 'DVD-ROM' | cut -c 1-3 /mnt/dvd

John
 
Old 11-26-2001, 09:30 AM   #4
Thymox
Senior Member
 
Registered: Apr 2001
Location: Plymouth, England.
Distribution: Debian + Ubuntu
Posts: 4,358

Rep: Reputation: 57
I think what kewps means is:

mount /dev/`dmesg | grep 'DVD-ROM' | cut -c 1-3` /mnt/dvd

I'm not much of a CLI person, myself, but I think I remember reading that the backwards-quote marks (i.e. ` instead of ') will inset the output of the command expressed between them. Thus, the above line would do your dmesg thing, and use it's output (you said hdd?) after /dev/
 
Old 11-26-2001, 08:36 PM   #5
jlcork
LQ Newbie
 
Registered: Nov 2001
Location: Houston, Texas
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks acid_kewpie for the solution and thanks Thymox for pointing out my obvious stupidity. After you pointed out the "back quotes" I went back and looked at acid_kewpie answer again, and there it was "using BACK quotes...". Sorry guys it just didn't register.

btw: it worked!

Thanks again.
 
  


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
Auto mount. non root mount canyon289 Linux - Hardware 1 02-21-2005 11:05 PM
Auto Mount?? PICOspark Linux - Newbie 3 11-27-2004 01:05 AM
mount permmissions and auto mount mokojin Slackware 3 02-28-2004 11:47 AM
autofs enabled in kernel but auto.mount and auto.master are NOT in /etc! Alybyzrp Linux - General 0 11-11-2003 01:26 PM
SCRIPT: check if auto-mount mount-points are still mounted markus1982 Linux - Software 0 05-25-2003 06:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration