can't make install-on-USB.sh executable

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

can't make install-on-USB.sh executable

Post by mimosa »

I wonder if it's something about the directory permissions. As far as I remember I unpacked the cd using whatever thunar uses. Then #chmod +x install-on-USB.sh ... no effect:

Code: Select all

root[boot]# ls -la
total 7888
drwx------ 3 cashew users    4096 Nov 29 20:21 .
drwx------ 5 cashew users    4096 Nov 29 19:57 ..
-r--r--r-- 1 cashew users   24983 Feb  2  2012 eltorito.img
-r--r--r-- 1 cashew users  125163 Feb  2  2012 g2ldr
-r--r--r-- 1 cashew users    8192 Feb  2  2012 g2ldr.mbr
drwx------ 5 cashew users    4096 Nov 29 19:56 grub
-r--r--r-- 1 cashew users    2048 Feb  2  2012 grub.cat
-r--r--r-- 1 cashew users  125675 Feb  2  2012 grub2-linux.img
-r--r--r-- 1 cashew users 1707180 Feb  2  2012 initrd.xz
-r--r--r-- 1 cashew users    1753 Feb  2  2012 install-on-USB.cmd
-rw-r--r-- 1 cashew users    5975 Feb  2  2012 install-on-USB.sh
-rw-r--r-- 1 cashew users    5975 Nov 29 20:21 install.sh
-r--r--r-- 1 cashew users  164504 Feb  2  2012 mt86p
-r-xr-xr-x 1 cashew users   71168 Feb  2  2012 syslinux.exe
-rw-r--r-- 1 cashew users       0 Nov 29 20:03 test
-r--r--r-- 1 cashew users 5797520 Feb  2  2012 vmlinuz
I tried a couple of test files - test created by touch, install.sh by cp. Same thing.

I'm using the RC but it should be equivalent to 14.0 (i486). The Live is xfce 13.37.

EDIT

From the Live CD, everything worked just by double clicking the script in Thunar. I think the root password was requested, Note that the permissions for the test files are also executable:

Code: Select all

one[~]$ cd /media/octogigas/
one[octogigas]$ cd boot
one[boot]$ ls -la
total 7896
drwxr-xr-x 3 one root    4096 Nov 30 00:11 .
drwxr-xr-x 5 one root    4096 Nov 30 00:11 ..
-rwxr-xr-x 1 one root     512 Nov 30 00:11 _dev_sdb.mbr.201211300011
-rwxr-xr-x 1 one root     512 Nov 30 00:11 _dev_sdb.mbr.201211300011.0810
-r-xr-xr-x 1 one root   24983 Feb  2  2012 eltorito.img
-r-xr-xr-x 1 one root  125163 Feb  2  2012 g2ldr
-r-xr-xr-x 1 one root    8192 Feb  2  2012 g2ldr.mbr
drwxr-xr-x 5 one root    4096 Nov 29 19:56 grub
-r-xr-xr-x 1 one root    2048 Feb  2  2012 grub.cat
-r-xr-xr-x 1 one root  125675 Feb  2  2012 grub2-linux.img
-r-xr-xr-x 1 one root 1707180 Feb  2  2012 initrd.xz
-r-xr-xr-x 1 one root    1753 Feb  2  2012 install-on-USB.cmd
-rwxr-xr-x 1 one root    5975 Feb  2  2012 install-on-USB.sh
-rwxr-xr-x 1 one root    5975 Nov 29 20:21 install.sh
-r-xr-xr-x 1 one root  164504 Feb  2  2012 mt86p
-r-xr-xr-x 1 one root   71168 Feb  2  2012 syslinux.exe
-rwxr-xr-x 1 one root       0 Nov 29 20:03 test
-r-xr-xr-x 1 one root 5797520 Feb  2  2012 vmlinuz
one[boot]$ 
User avatar
gapan
Salix Wizard
Posts: 6366
Joined: 6. Jun 2009, 17:40

Re: can't make install-on-USB.sh executable

Post by gapan »

What kind of partition did you unpack it to?
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: can't make install-on-USB.sh executable

Post by mimosa »

A freshly made FAT 32 partition occupying the whole stick.

As a practical problem, this is solved; but I remain puzzled. I also wonder whether it could have something to do with the new mounting arrangements for Salix 14.

Incidentally, maybe this is related:

Code: Select all

cashew[~]$ gmountman
Traceback (most recent call last):
  File "/usr/bin/gmountman", line 636, in <module>
    parse_args(sys.argv[1:])
  File "/usr/bin/gmountman", line 621, in parse_args
    app = GMountMan()
  File "/usr/bin/gmountman", line 586, in __init__
    self.update_list()
  File "/usr/bin/gmountman", line 146, in update_list
    for d in self.devices(): 
  File "/usr/bin/gmountman", line 125, in devices
    icon_filename =     self.icon_theme.choose_icon(v.get_icon().get_names(), 24, 0).get_filename()
AttributeError: 'NoneType' object has no attribute 'get_filename'
cashew[~]$ 
I have your custom udisks2 installed; other than that, nothing non-standard in the mounting department as far as I know.
User avatar
gapan
Salix Wizard
Posts: 6366
Joined: 6. Jun 2009, 17:40

Re: can't make install-on-USB.sh executable

Post by gapan »

mimosa wrote:A freshly made FAT 32 partition occupying the whole stick.
Well, you can't change execute attributes in a FAT32 partition. The exec bit is disabled for all files during mounting and you can't change it in any file unless you remount the device with the exec bit enabled for all files.
mimosa wrote:

Code: Select all

cashew[~]$ gmountman
Traceback (most recent call last):
  File "/usr/bin/gmountman", line 636, in <module>
    parse_args(sys.argv[1:])
  File "/usr/bin/gmountman", line 621, in parse_args
    app = GMountMan()
  File "/usr/bin/gmountman", line 586, in __init__
    self.update_list()
  File "/usr/bin/gmountman", line 146, in update_list
    for d in self.devices(): 
  File "/usr/bin/gmountman", line 125, in devices
    icon_filename =     self.icon_theme.choose_icon(v.get_icon().get_names(), 24, 0).get_filename()
AttributeError: 'NoneType' object has no attribute 'get_filename'
cashew[~]$ 
No, that is not related. What devices do you have? Post your fdisk -l and the output of mount after you have mounted all of them.
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: can't make install-on-USB.sh executable

Post by mimosa »

Regarding gmountman, I'll make a new thread if the problem recurs. The power supply on that machine seems to have blown so I can't access it at the moment.

Regarding the FAT stick, I don't recall having this trouble before - could that be because I used FAT 16? Actually, maybe it was because I was using Salix 13.37; maybe whatever tool does the mounting makes everything executable automatically. Because in 13.37 it just worked and in 14.0 it just didn't. This is an 8GB stick so presumably FAT 16 is not an option.

I do recall having the same trouble with Slackel last June or so. That is, I don't remember just what happened, but I ended up using a live cd to make the file executable - it just wouldn't do anything from Slackel.

The immediate question is perhaps, what procedure would you recoemmend to other users who want to run that script to make a Live USB? What filesystem to format the stick, what steps if any to make the script executable, under Salix 14?

Maybe the gmountman problem is incidentally related in the sense that if I had been able to use gmountman, it *would* have just worked, because gmountman mounts more intelligently than whatever tool I ended up using ...
Post Reply