This is a static archive of the old Zorin Forum.

The information below may be outdated. Visit the new Zorin Forum here ›

If you have registered on the old forum, you will need to create an account on the new forum.

.sh

PhutureX

Fri Sep 27, 2013 6:49:51 am

ok so im trying to run a bootinst.sh file and it wont do anything but open a text editor... i've tried the GUI making it executable by Files > Preferences > Behaviour and by right clicking >properties > permissions and clicking the check box but it unchecks right away and i get nothing... i need this .sh for my usb bracelet to be bootable... can someone help me please

Wolfman

Fri Sep 27, 2013 7:01:34 am

Hi,

can you tell us what file you are trying to install/run, there may be a deb package available, if it is a Tar/RPM package, you can convert it to a "deb" package using "Alien".

See also:

https://help.ubuntu.com/community/RPM/AlienHowto

Regards Wolfman :D

PhutureX

Fri Sep 27, 2013 7:34:38 am

ok so im setting up a usb katana drive and in order to be bootable i have to run the bootinst.sh file on the drive...

madvinegar

Fri Sep 27, 2013 8:02:10 am

Do it in terminal. Navigate to the folder where the bootinst.sh file is and run it as follows:
Code:
sudo ./bootinst.sh


For example if bootinst is located in your Downloads folder, you do it as follows:
Code:
cd /home/$USER/Downloads
sudo ./bootinst.sh

PhutureX

Fri Sep 27, 2013 9:25:44 am

tried that and i get "sudo: ./bootinst.sh: command not found" thats why im like WTF?

sketch@TimelineX:~$ cd /media/sketch/E43B-D864/boot
sketch@TimelineX:/media/sketch/E43B-D864/boot$ sudo ./bootinst.sh
[sudo] password for sketch:
sudo: ./bootinst.sh: command not found
sketch@TimelineX:/media/sketch/E43B-D864/boot$

madvinegar

Fri Sep 27, 2013 10:11:48 am

Try this:
Code:
cd /media/sketch/E43B-D864/boot
chmod +x bootinst.sh
./bootinst.sh

PhutureX

Fri Sep 27, 2013 4:35:56 pm

sketch@TimelineX:~$ cd /media/sketch/E43B-D864/boot
sketch@TimelineX:/media/sketch/E43B-D864/boot$ chmod +x bootinst.sh
sketch@TimelineX:/media/sketch/E43B-D864/boot$ ./bootinst.sh
bash: ./bootinst.sh: Permission denied
sketch@TimelineX:/media/sketch/E43B-D864/boot$ sudo ./bootinst.sh
[sudo] password for sketch:
sudo: ./bootinst.sh: command not found
sketch@TimelineX:/media/sketch/E43B-D864/boot$

Auldyin

Fri Sep 27, 2013 6:00:07 pm

Hi PhutureX

Your in the wrong directory.
sketch@TimelineX:/media/sketch/E43B-D864/boot$ ./bootinst.sh
should be.
sketch@TimelineX:/media/E43B-D864/boot$ ./bootinst.sh

You can only boot from the root of the USB not from a partition or folder.

Cheers Auldyin

:D :D :D :D :D :D

PhutureX

Fri Sep 27, 2013 6:18:51 pm

sketch@TimelineX:~$ cd /media/E43B-D864/boot
bash: cd: /media/E43B-D864/boot: No such file or directory
sketch@TimelineX:~$

for some reason i cant make it executable in properties either... check wont stay...
anyone got teamviewer so i can just watch and learn?

Wolfman

Sat Sep 28, 2013 5:32:59 am

Hi,

I found this:

https://forums.hak5.org/index.php?/topi ... ng-katana/

Hope it helps.

Regards Wolfman :D

Linx

Tue Oct 08, 2013 9:46:04 am

Sorry for the lengthy post, just alot of information.

a ".sh" file denotes the file is a shell script (kinda, Linux is not dependent on the file extension like windows.)

depending on the contents of the file you made need to run it a few different ways, If you can post the ".sh" file I can download it and take a look. Or I can explain most of what you might need here.

Step one: Covering the basics.
A. Verify you are in the correct directory but running the "ls" command. You should see the file name listed as a result of the command.
a:If you are in the wrong directory, you are able to use the "cd" command to change directory, it will likely look something like this "cd ./Downloads/"
B. Verify the you own and have permission to execute the file, this can be quickly determined by running "ls -l" The first few charters should be listed as "-rwx" what this means is that the the owner of the file has read write and execute permissions to the file. There should also be 2 usernames listed, the first is the owner of the file, and the second is the user that created the file.
a:If you are not the owner of the file there are 2 ways to resolve this:
a-0:run the "chown <current username> <file location>" which will likely look something like this "sudo chown $(whoami) ./bootinst.sh"
a-1:run chmod "chmod 777 ./bootinst.sh" This will change the file to be readable, writable and executable by the owner, the group and everyone one else on the computer, making it not matter if you own the file or not.
b:if you do not have permission to read and execute the file you can correct this by typing "chmod 700 ./bootinst.sh", or "chmod 777 ./bootinst.sh"

Step two: What I actually think is wrong
assuming you know where the file is at and you have permission to read and execute the file, then there are a few simple possible causes. There it no declared interpreter in the file, to determine if this is the cause type "head -n 1 ./bootinst.sh" this is going to read the first line or the file to you, if it starts with "#!/" without the quotes, then what follows should be the location of the interpreter. Most commonly this will be wither the sh interpreter or the bash interpreter, and they would appears as "#!/bin/sh" and "#!/bin/bash" respectively. If you see anything else, then the computer doesn't know what to do with the file. To resolve this you can do one of 2 things, open up the file and "#!/bin/bash" to the first line of the file (and moving everything else down). Or you can manually declare the interpreter to be used this can be does as "bash ./bootinst.sh" or "sh ./bootinst.sh". I would suggest trying bash first as it is most common.

Hope it helps!