View Single Post
Maemish's Avatar
Posts: 1,702 | Thanked: 4,752 times | Joined on Apr 2018 @ Helsinki, Finland.
#27
Becoming a hacker: The hard way.

I told before in this thread how I used over 20 hours trying to get kali img mounted to sdcard with losetup loop without success. Now I was finally able to spare couple of hours trying it again. Almost nothing had stuck in my mind from previous effort copy pasting scripts to terminal to get priviledge to read and write to sdcard or over the img so I had to google them again. I have now started to think that it could be wise to save these scripts somewhere but not yet got that done.

This is part of the instructions which I have followed.

1. On your PC/laptop issue the following commands:
Code:
sudo losetup /dev/loop0 /where/your/.img/file/is -o 128974848
sudo mount -o loop -t ext4 /dev/loop0 /where/you/want/to/mount/kali
sudo mount -t devpts devpts /where/you/mounted/kali/dev/pts
sudo mount -t proc proc /where/you/mounted/kali/proc
sudo mount -t sysfs sysfs /where/you/mounted/kali/sys

These commands will mount kali image file on your PC's/laptop's

Again I used two hours to get these two lines to work. After two hours (with the previous over twenty which I have spent with these) I finally managed to make them work - and understood why it didn't work before. Just started laughing to myself.

So the reason for my failure has been partly because I don't know what I'm doing and partly how it is said in the instruction about the path to the img. By the way, I really suggest that if anyone is giving instructions more publicly and writes as everybody normally writes /the/path/to/the/file/you/want/to/mount you should always add an example path after that. It helps so much. But even though justmemory who has really really tried to help me have used these example paths it didn't help.

The reason for my failure was misunderstanding. I had got in my mind that these two lines are enough to do what we are after: move the img files in open form to sdcard.

sudo losetup /dev/loop0 /where/your/.img/file/is -o 128974848
sudo mount -o loop -t ext4 /dev/loop0 /where/you/want/to/mount/kali

I had never before bumped into mysterious losetup so I thought this dude is mighty with powers and can do magic to img file and then just loop and its opened in the sdcard.

And because of this understanding of mine when in the instruction it says on the line two /where/you/want/to/mount/kali I put the path to the sdcard partition where I wanted it to be.

Do you see the problem?

I have been all the time made a loop mount point with the same name which I have named the sdcard partition where I have then tried to mount it. I just didn't get it the last time because I thought that I'm already trying to copy img to sdard (now I understand that this is not yet that far). And all the time there appeared a mounting point folder with the same name named folder as which was my sdcard mount point name. And because of that I always changed the name of the sdcard but it just did it again and in the end I had mountpoint folders named kali, kalini, kalia, kalaa. etc. cause didn't want to change the name too much. It just drived me crazy! I was haunted by my own computer who was mocking me by creating these folders. And in reality I was fighting against my own stupidity. Started to make sense all the errors I got: device busy (so I umount sdcard but in reality umount the loop mount point with the files) and then get error can't find file, no such directory etc.

But it took about 25 hours for me to start to really think what am I doing instead of just copy pasteing. In my mind started to first time form a folder which has a name linux terminal on it. From this day it is possible that some of this stuff could start to stay in my mind a bit longer.

Being persistent without real knowledge of things you want to do and try to do is a pain in the ... well, the whole body actually. Next line gave a bunch of errors though so I'm not through this yet. And just as a contrast I have masters degree and can comprehend and analyze very complex matters. But it is not masters degree in IT.

Becoming a hacker - may take a bit longer for me. Just can't wait to learn to throw some scripts and try to get access to some really serious places. My destiny is to be famous - but I think it ain't gonna happen the cool way.

Last edited by Maemish; 2019-03-01 at 15:52.
 

The Following 5 Users Say Thank You to Maemish For This Useful Post: