LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 08-21-2011, 10:09 AM   #1
SIcan
LQ Newbie
 
Registered: Mar 2011
Posts: 17

Rep: Reputation: 0
script on USB key ubuntu


I try to run a sript from the usb key but does not run.
the same script run hard disk.
 
Old 08-21-2011, 10:30 AM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Hi,

check the mount permissions of the USB key. Which filesystem format does it have?
 
Old 08-21-2011, 03:45 PM   #3
SIcan
LQ Newbie
 
Registered: Mar 2011
Posts: 17

Original Poster
Rep: Reputation: 0
Tanks crts, here is the mount info: /dev/sdc1 /media/7006-72B1 vfat rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0

an other info: the same key with the same script run on an other PC!
???
 
Old 08-21-2011, 05:10 PM   #4
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by SIcan View Post
rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro 0 0
From the man-page for mount:
Code:
showexec
              If  set, the execute permission bits of the file will be allowed
              only if the extension part of the name is .EXE, .COM,  or  .BAT.
              Not set by default.
Have you tried renaming the script to have a suffix as mentioned above? You might also try to mount it with the 'exec' option. Then renaming the files might not be necessary. Not sure about that since I usually do not run Unix scripts from a windows partition. Try as root
Code:
mount -o remount,rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,exec,utf8,flush,errors=remount-ro /dev/sdXX
where /dev/sdXX is your USB key.
 
1 members found this post helpful.
Old 08-21-2011, 06:30 PM   #5
SIcan
LQ Newbie
 
Registered: Mar 2011
Posts: 17

Original Poster
Rep: Reputation: 0
Hi crts,

when i try your command i get the folowing error:

root@al-N68S3:/home/al# mount -o remount,rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=is o8859-1,shortname=mixed,exec,utf8,flush,errors=remount-ro /dev/sdc1
mount: can not find /dev/sdc1 in /etc/fstab or /etc/mtab

thanks
 
Old 08-21-2011, 07:09 PM   #6
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by SIcan View Post
Hi crts,

when i try your command i get the folowing error:

root@al-N68S3:/home/al# mount -o remount,rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=is o8859-1,shortname=mixed,exec,utf8,flush,errors=remount-ro /dev/sdc1
mount: can not find /dev/sdc1 in /etc/fstab or /etc/mtab

thanks
Try omitting the remount option and supplying a mountpoint:
Code:
mount -o rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,exec,utf8,flush,errors=remount-ro /dev/sdc1 /path/to/mountpoint
The above command assumes that the USB key is not mounted.
 
Old 08-21-2011, 08:01 PM   #7
SIcan
LQ Newbie
 
Registered: Mar 2011
Posts: 17

Original Poster
Rep: Reputation: 0
Thank you crts,


root@al-N68S3:/home/al# mount -o rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,exec,utf8,flush,errors=remount-ro /dev/sdc1 /USBDISK
mount: le point de montage /USBDISK n'existe pas
root@al-N68S3:/home/al# mount -o rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,exec,utf8,flush,errors=remount-ro /dev/sdc1 /media/USBDISK
mount: le point de montage /media/USBDISK n'existe pas
root@al-N68S3:/home/al# mount -o rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,exec,utf8,flush,errors=remount-ro /dev/sdc1 /media
mount: périphérique spécial /dev/sdc1 n'existe pas


I have tried the syntaxes above , but i still get erros.

so i have formated the usb key with ext4 in stead of fat and the script run now

i will reformat it back to FAT and see what`s happen

thank you vey much crts
 
Old 08-24-2011, 07:00 PM   #8
crts
Senior Member
 
Registered: Jan 2010
Posts: 1,604

Rep: Reputation: 446Reputation: 446Reputation: 446Reputation: 446Reputation: 446
Quote:
Originally Posted by SIcan View Post
mount: le point de montage /USBDISK n'existe pas
mount: le point de montage /media/USBDISK n'existe pas
Those messages mean that the directories /USBDISK and /media/USBDISK do not exist. You will have to create them first:
Code:
mkdir /media/USBDISK
The following message
Quote:
mount: périphérique spécial /dev/sdc1 n'existe pas
means that your USB key has probably not been identified as /dev/sdc. Issue the following after you plug in your USB:
Code:
dmesg|tail
The output will tell you that a new device has been recognized and which name it was assigned. You will have to use this name to mount your USB key. Sample output:
Code:
# dmesg |tail
[20935.382010] sd 2:0:0:0: [sdb] Write Protect is off
[20935.382014] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[20935.382016] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[20935.385752] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[20935.385757]  sdb: sdb1
[20935.620217] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[20935.620223] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[20936.446325] kjournald starting.  Commit interval 5 seconds
[20936.452763] EXT3 FS on sdb1, internal journal
[20936.452771] EXT3-fs: mounted filesystem with ordered data mode.
So my USB drive has in this case been recognized as /dev/sdb. It further tells me that there is one partition /dev/sdb1. The latter can be mounted.
 
Old 08-25-2011, 09:39 PM   #9
SIcan
LQ Newbie
 
Registered: Mar 2011
Posts: 17

Original Poster
Rep: Reputation: 0
Hi CRTS,

Thank you for your help.
yes i have there was no directory to mount the the usb key

now it works in FAT too

thanks
 
  


Reply

Tags
script, ubuntu, usb


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make Ubuntu latest edition USB boot key? Arthur Linux - Newbie 4 08-06-2011 12:13 PM
I want my Ubuntu USB key to boot with no menu evansd321 Linux - Newbie 3 03-14-2011 08:20 AM
Windows and Ubuntu on a USB key caa1980 Ubuntu 4 05-17-2010 12:29 PM
howto auto-launch a script when usb key inserted? adamrosspayne Linux - Newbie 3 09-22-2006 04:21 AM
Ubuntu from Usb Key chrisstooss Ubuntu 0 04-11-2005 02:06 PM


All times are GMT -5. The time now is 02:45 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