Active Topics

 


Reply
Thread Tools
Posts: 255 | Thanked: 107 times | Joined on Nov 2010
#21
it's a bit too late now anyway but why did you need to become root to chmod scripts that are going to be run as user?

also you can't use nano if you don't have it

sudo apt-get install nano

although I'd recommend leafpad as an alternative for you

sudo apt-get install leafpad

just replace "nano" with "leafpad" in all the commands

===
however if you DO have nano and you're seeing that it means you were inside the chroot when you tried to nano, and nano isn't inside the chroot. you'll have to exit the chroot first and THEN edit the file
 

The Following User Says Thank You to Char For This Useful Post:
Posts: 94 | Thanked: 3 times | Joined on Jul 2010
#22
i think i already have nano installed.. well i used your download command and retraced my steps.i managed to get nano running and i managed to save the closearch file. the weird thing is, after saving and exit:

#!/bin/sh
# By Juand
sudo qumount /.archlinux

in the closearch file, i should be able to type closearch after closing the terminal and opeing a new one so that the Fedora rootfs will umount. but every time i type closearch, nothing happens.
 
Posts: 94 | Thanked: 3 times | Joined on Jul 2010
#23
Originally Posted by Mentalist Traceur View Post
Hmmm... Well, it actually sounds like your command line isn't able to find the "nano" command for some reason - it sees the file, just doesn't see the program itself. I'm really not sure why that would be, assuming you're sure you typed everything correctly. Unless for some reason nano got uninstalled, or had it's binary renamed or deleted/moved? *Shrug* What do
Code:
ls -l /usr/bin/nano
and
Code:
dpkg -l | grep nano
give as output?
hmm that's strange. i managed to run nano for the first few commands before this.. i typed everything according to the instructions. for the first command it wrote:

lrwxrwxrwx 1 root root 9 Feb 20 6.35 /usr/bin/nano -> /usr/bin

as for the second command, it wrote:

ii nano
2.0.
7-4-maemo5-2 free Pico clone with some new features

i followed Char's instructions and i managed to get it running, as well as managing to copy lines in the closearch file and saving it. the issue now i face is after closing terminal and opening a new one, i get nothing after typing "closearch".
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#24
Ohhh. If you were running those commands from within the chroot, then that would make sense. I guess I assumed you would've been doing all these steps outside the chroot by default (like maybe the instructions you were following told you to first exit the chroot).

Anyway, then yeah, don't worry about it, nano should still be installed just fine.

As for typing closearch - it's at /usr/bin/closearch, right? In that case, are you use you chmod'ed it properly? ("chmod +x /usr/bin/closearch" - as root, so "sudo gainroot" first.)
 
Posts: 94 | Thanked: 3 times | Joined on Jul 2010
#25
i tried that line, but it still didn't mount anything. well, i decided to flash my emmc and firmware to try and install it from scratch so that i can identify any mistakes i made before. i also installed root, nano, easy chroot and easy debian. okay, this are the commands after copying the archlinux scripts in /home/user/archlinux (the scripts are archlinux, chrootarch and startarch):


sudo gainroot
cd /home/user/archlinux
chmod +x /home/user/archlinux/archlinux
chmod +x /home/user/archlinux/chrootarch
chmod +x /home/user/archlinux/startarch
exit
cd /home/user/archlinux
./chrootarch

and i got:


Mounting...
using image file: /home/user/MyDocs/archmobile.img.ext2
fs type is ext2
Using ext2 file system
mounting /home/user/MyDocs/archmobile.img.ext2 on loop
.../home/user/MyDocs/archmobile.img.ext2 mounted on loop0
.
..
...
....
mount: mounting /var/run/pulse on /.archlinux/var/run/pulse
failed: No such file or directory
cannot sync; chroot not mounted!
Everything set up, running chroot...
[root@archmobile: /]


why did it fail? am i short of anything?
 
Posts: 94 | Thanked: 3 times | Joined on Jul 2010
#26
Originally Posted by Mentalist Traceur View Post
Ohhh. If you were running those commands from within the chroot, then that would make sense. I guess I assumed you would've been doing all these steps outside the chroot by default (like maybe the instructions you were following told you to first exit the chroot).

Anyway, then yeah, don't worry about it, nano should still be installed just fine.

As for typing closearch - it's at /usr/bin/closearch, right? In that case, are you use you chmod'ed it properly? ("chmod +x /usr/bin/closearch" - as root, so "sudo gainroot" first.)

yes, the closearch is in /usr/bin/. i followed everything exactly. i'm just not sure on how to launch it. and if you don't mind, can you explain to me what does "chmod" do?

well, after reflashing, i went on ahead anyway with the commands from over here and now i am back to this situation. what did he mean exactly when he said:


Copy this
Code:

#!/bin/sh
# By Juand
sudo qumount /.archlinux

Save and exit, now you can type closearch in xterminal and the fedora rootfs will be umounted


i have copied it and saved. out of nowhere he says type closearch and the fedora image will be mounted. i typed it, but nothing happened.
 
Posts: 255 | Thanked: 107 times | Joined on Nov 2010
#27
chmod a+x /usr/bin/closearch
from outside the chroot
 
Posts: 94 | Thanked: 3 times | Joined on Jul 2010
#28
so after saving that text i:

sudo gainroot
chmod a+x /usr/bin/closearch

or

sudo gainroot
cd /usr/bin
chmod a+x /usr/bin/closearch

?
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#29
Originally Posted by Armand360 View Post
so after saving that text i:

sudo gainroot
chmod a+x /usr/bin/closearch

or

sudo gainroot
cd /usr/bin
chmod a+x /usr/bin/closearch

?
Either one. You need to use cd if you're specifying a file path "relatively" (like when you type ./filename, that's a relative path to "filename" if you're in the same folder as the file "filename". When a path starts with / it's an absolute path, going all the way from the root folder "/" to where it actually is. You can specify absolute paths from anywhere and they'll be the same, but you have to specify a different relative path for the same file whenever you're in a different directory.)

As for chmod, I explained that command to you a while ago. It's the one that changes the file's permissions. If that doesn't ring a bell, you can read the post I originally posted to help you with one of your first questions.

Also, here's a really good tutorial on the basics of using x-terminal/command-line in Linux. I strongly recommend you read through it over the next few days/weeks, whenever you get the time, because it's explains all of the basics:
http://linuxcommand.org/learning_the_shell.php

Also, the instructions didn't say it will be "mounted", the instructions said "UNmounted". That basically means that it 'shuts down' the chroot. It's just something you do after you finish using it, so that it turns it off/disconnects the chrooted file system, as I understand it. I'm not sure if anything WOULD happen, actually, that you would see.
 

The Following User Says Thank You to Mentalist Traceur For This Useful Post:
Posts: 94 | Thanked: 3 times | Joined on Jul 2010
#30
okay so by using "cd", i will stay on that particular folder's directory? any command entered will be in that folder? thank you very much Mentalist. i'm very interested in learning about it. i'll definitely give it a go once i have the time. my schedule this month is a bit tight.. just free enough to go in TMO to read and write.

in the mean time, i'll try and understand the archlinux process first. so the command won't really show me anything? then how do i know if my installation is successful? there's no icon or whatsoever. or must i create an icon for it manually..?
 
Reply


 
Forum Jump


All times are GMT. The time now is 13:04.