mounting problems...
hello there again guys, i had already started a bash script that opens the hdd...im having trouble with the mounting part, it produces an error like:
mount: can't find /cdrom in /etc/fstab or /etc/mtab my script enables the user to place his cd-rom for 5 seconds before it will close, then it will mount and open the cd-rom with nautilus(since im using GNOME) then after 5 seconds it will unmount and then eject the hdd... here is my code #!/bin/bash echo -n "Enter password: " read -s password if [ "$password" = "jaepi" ]; then eject /dev/hdd fi sleep 5 eject -t /dev/hdd mount /dev/cdrom if [ "$?" -eq "0" ]; then nautilus /cdrom sleep 5 umount /dev/cdrom eject /dev/hdd sleep 5 eject -t /dev/hdd else exit 1 fi what do you think is wrong?? did i miss to set a path or something?? please help...thanks :D |
Replace:
Code:
mount /dev/cdrom Code:
mount /dev/cdrom /mnt/cdrom P.S.: the password thing is more or less useless |
the problem seems to be that you haven't defined in /etc/fstab where the mount-command should mount '/dev/cdrom' !
so 'mount /dev/cdrom' doesn't know the mount-target, see line 9 of your code (empty lines skipped) |
you also won't be able to unmount the cdrom after running nautilus on it. why don't you use automount?
|
i got it...thanks guys...i was not able to see what's inside my /etc/fstab directory...that's why i missed the mount point of the hdd...weeee...thanks again... :D
now, i know how to open the hdd and close it then open the nautilus...the problem that im undergoing right now is how to write files into the cdrom...like for example, after placing the cdrom, i want to burn some mp3 files located at the /home/username directory... |
You can use cdrecord, it's easy to use, ships with your distro and there are lots of tutorials online.
|
All times are GMT -5. The time now is 03:34 PM. |