Results 1 to 3 of 3

Thread: Automounting and music cds

  1. #1
    Junior Member
    Join Date
    Dec 2003
    Posts
    7

    Automounting and music cds

    Hello all,
    I think automounting is more practical than doing "mount /cdrom" all the time. I know Linux has "autofs" service which can do that. I enabled it using "ksysv". However, automounting of cds and dvds are not working. I have just tried, I was able to mount a CD-R and a DVD-RW disk in my Inspiron 8600's combo DVD+RW/CD+RW drive.

    Moreover, I cannot play nor mount a music cd.

    Trying to explore how automounting is configured in my Debian 2.4.23-xfs-acpi, I found out that /etc/auto.master is like this:
    ------------------------
    # Sample auto.master file
    # Format of this file:
    # mountpoint map options
    # For details of the format look at autofs(5).
    # /var/autofs/misc /etc/auto.misc
    # /var/autofs/net /etc/auto.net
    #
    # KNOPPIX automounts for floppy and cdrom(s), see knoppix-autoconfig
    # /mnt/auto /etc/auto.mnt --timeout=2
    /mnt/auto /etc/automount.sh --timeout=2
    ----------------------------------------
    The file /etc/automount.sh mentioned in the line above is like this:
    ----------------------------------------
    #!/bin/bash
    # Generate an automounter entry automatically
    # for automount /mnt/auto program this_script
    # (C) Klaus Knopper 2002
    # WARNING: This script is used for removable media in KNOPPIX,
    # therefore the mount is always read-write (except for cdroms
    # and ntfs).

    fstype(){
    [ -n "$1" ] || return 1

    # Check if partition is already mounted
    while read device mountpoint filesystem relax; do
    case "$device" in *$1*) echo "$filesystem"; return 0;; esac
    done <<EOT
    $(cat /proc/mounts)
    EOT

    # Check if a device/medium is present at all
    dd if="$1" count=1 bs=1024 >/dev/null 2>&1 || return 2
    FILE="$(LANG=C LC_ALL=C LC_MESSAGES=C file -Ls "$1")"
    [ "$?" = "0" ] || return 2

    # File systems to try first
    FILESYSTEMS=""
    case "$FILE" in
    *[Ff][Aa][Tt]*|*[Xx]86*) FILESYSTEMS="vfat msdos ntfs";;
    *[Rr][Ee][Ii][Ss][Ee][Rr]*) echo "reiserfs"; return 0;;
    *[Xx][Ff][Ss]*) echo "xfs"; return 0;;
    *[Ee][Xx][Tt]3*) echo "ext3"; return 0;;
    *[Ee][Xx][Tt]2*) echo "ext2"; return 0;;
    *[Ss][Ww][Aa][Pp]*) echo "swap"; return 0;;
    esac
    # It seems that only reliable way to identify the filesystem is to attempt a mount
    TMPDIR="/tmp/autmount.${1##*/}.$$.dir"
    mkdir -p "$TMPDIR" || return 3
    FS=""
    # Don't clobber console while attemting a mount
    read LOGLEVEL relax < /proc/sys/kernel/printk
    echo "0" >/proc/sys/kernel/printk
    for f in $FILESYSTEMS $(</etc/filesystems); do
    mount -r -t "$f" "$1" "$TMPDIR" >/dev/null 2>&1 && { umount "$TMPDIR"; FS="$f"; break; }
    umount -f "$TMPDIR" >/dev/null 2>&1
    done
    echo "$LOGLEVEL" >/proc/sys/kernel/printk
    rmdir "$TMPDIR"
    [ -n "$FS" ] && echo "$FS" || return 4
    }

    # Defaults
    rw="rw"
    device="/dev/${1##*/}"
    case "$1" in
    floppy) [ -s /etc/sysconfig/floppy ] || exit 1; device="/dev/fd0";;
    cdrom*) rw="ro";;
    dvd*) rw="ro";;
    esac

    fs="$(fstype "$device")"

    [ "$?" = "0" ] || exit 1

    case "$fs" in
    *fat|msdos) options="${rw},uid=knoppix,gid=knoppix,umask=000"; ;
    ntfs) options="ro,uid=knoppix,gid=knoppix,umask=0222";;
    iso9660) options="ro";;
    *) options="${rw}";;
    esac

    MNTLINE="-fstype=$fs,users,exec,$options :$device"

    # Return line to the automounter
    echo "$MNTLINE"
    ------------------
    I also do have /etc/auto.mnt, like this:
    ------------------
    # Knoppix automounter file for Directory /mnt/auto
    # umask=000 only works for msdos/vfat floppies, but otherwise the floppy is read-only.
    floppy -fstype=auto,user,exec,umask=000 :/dev/fd0
    cdrom -fstype=auto,user,exec,ro :/dev/cdrom
    # The following entries (if any) are auto-generated by knoppix-autoconfig
    -------------------

    I would like your comments as to how to proceed to solve these two problems.

    Thanks a lot for your time and effort.

    Best,

    FCC

  2. #2
    Junior Member
    Join Date
    Dec 2003
    Posts
    7

    SOLVED: Playing the music CD part

    OK, with XMMS, I enter /dev/cdrom at the 'play location' menu, XMMS is able to see and play the music CD. So this part of my problem is solved.

    Automounting issue still remains though.

    Thanks,

    FCC

  3. #3
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    colorado springs, colorado
    Posts
    1,933
    I don't care for automount myself so I'm not experienced with it. Here is a howto for automount. Be advised that automount for a dvd+rw is a bad idea. Why? Everytime you insert a +rw disc it gets mounted which counts as a write! Your expensive disc won't last long at that rate.

Similar Threads

  1. home automounting
    By donnyriyadi in forum General Support
    Replies: 1
    Last Post: 12-10-2004, 01:10 AM
  2. automounting - supermount ?!
    By raptor in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 06-23-2004, 07:52 AM
  3. Segmentation fault after automounting CD/floppy
    By theOL in forum Hardware & Booting
    Replies: 0
    Last Post: 05-18-2004, 02:51 AM
  4. Making a music CD
    By Ewen in forum General Support
    Replies: 16
    Last Post: 09-25-2003, 08:17 AM
  5. music without graphics?
    By andrei in forum General Support
    Replies: 1
    Last Post: 08-15-2003, 10:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


128GB (4x32GB) SK hynix DDR4 PC4-2666V RDIMM ECC Server Ram HMA84GR7CJR4N-VK picture

128GB (4x32GB) SK hynix DDR4 PC4-2666V RDIMM ECC Server Ram HMA84GR7CJR4N-VK

$799.00



lOT OF 4 SKhynix 8GB (4 x 8GB =32GB) HMA41GR7MFR8N-TF 2R8 PC4-2133P DDR4 MEMORY picture

lOT OF 4 SKhynix 8GB (4 x 8GB =32GB) HMA41GR7MFR8N-TF 2R8 PC4-2133P DDR4 MEMORY

$89.00



Microsoft Office 2021 Pro Plus USB for 1PC Windows 10 & 11 picture

Microsoft Office 2021 Pro Plus USB for 1PC Windows 10 & 11

$62.50



TF/SD Card Adapter Camera Reader Android Type-c For iPhone17 Pro Max Plusm lot picture

TF/SD Card Adapter Camera Reader Android Type-c For iPhone17 Pro Max Plusm lot

$573.98



Kingston 32GB 64GB 128GB 256GB USB 3.0 Flash Drive Thumb Memory Stick Pen lot picture

Kingston 32GB 64GB 128GB 256GB USB 3.0 Flash Drive Thumb Memory Stick Pen lot

$285.90



USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack picture

USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack

$826.09



SK Hybix 16GBx16 (256GB kit) 2Rx8 PC4-2933Y RDIMM RAM  picture

SK Hybix 16GBx16 (256GB kit) 2Rx8 PC4-2933Y RDIMM RAM

$1200.00



USB 3.0 Micro SD SDHC TF Card Reader Memory Adapter for PC Laptop Camera lot picture

USB 3.0 Micro SD SDHC TF Card Reader Memory Adapter for PC Laptop Camera lot

$3.75



Dell Precision 3541 Laptop i5-9300H 2.4GHz 256GB SSD 16GB RAM Win 11 Pro picture

Dell Precision 3541 Laptop i5-9300H 2.4GHz 256GB SSD 16GB RAM Win 11 Pro

$189.99



Microsoft Windows 11 Home 64-Bit USB Flash Drive + Key Retail Box - Original picture

Microsoft Windows 11 Home 64-Bit USB Flash Drive + Key Retail Box - Original

$39.88