TSOP Flasher Project (Based on Chimp)
Posted: Wed Mar 29, 2017 1:22 pm
Yet again I'm making another attempt at improving my TSOP Flashkit basing it on Rocky5's Chimp Loader and Chimp261812
What inspired me the most was how Rocky was able to automate Gentoox Loader to boot Linux without any input...
CHIMP LOADER:
Firstly I would have to figure out how to get Chimp Loader to include the save game exploit directory of
E:/UDATA/21585554/000000000000/
I found this quiet easily by going into the directory of the Chimp Loader Source and ran the following command
grep -rnw './' -e "Chimp"
The result (below) gave me the location of the file that I would need to edit "LoadLinux.c"
./boot/LoadLinux.c:93: //Try in /Applications/Chimp on E
./boot/LoadLinux.c //Try in /Apps/Chimp on E
./boot/LoadLinux.c:107: //Try in /Chimp on E
./boot/LoadLinux.c:114: //Try in /Applications/Chimp on E
./boot/LoadLinux.c:121: //Try in /Apps/Chimp on E
./boot/LoadLinux.c:128: //Try in /Chimp on E
Looking at the code on this file I can see where Rocky added the additional directory's from here I can add yet another.
Next I would have to compile the source and this is where I ran into a little trouble...
It has been a while since I've compiled anything but generally you go into the directory and use the "make" command
But this seemed to fail for me and I cant really gather where I'm going wrong at this point maybe I need an older version
of Linux for this to be compiled successfully but I'm not really sure,
Any assistance would be appreciated...
CHIMP261812 (Linux):
Automating as much as possible is my main objective and to achieve that I want to be able to run a script once Chimp Loader
has booted Linux. I was able to easily mount the image by using the following steps:
gzip -d initrd.gz (uncompress gzip)
mkdir /mnt/chimp (make mount directory)
mount initrd /mnt/chimp (mount to directory)
From here I could look into the contents of the image and the best way I could figure out how to run a script was to tap into the end
of the rcS. Here I just added a couple of simple commands to see if I was going in the right direction.
busybox
sleep 10
raincoat
sleep 10
find /ramdisk/mnt
sleep 10
reboot
Adding the reboot would end the script without it going into the Chimp user interface.
I then umounted and compressed the initrd and transferred to one of my consoles using FileZilla
umount /mnt/chimp (unmount image)
gzip initrd (compress gzip)
Now when I run Chimp I can see the results of my editing and confirms that busybox and raincoat binaries are responsive,
however I didnt get a result for "find" which told me that no partitions are being mounted to Linux. Re-mounting the image and
having another look I ran the "ls -l" command on the /etc/init.d directory which showed that the S20automount file was not executable.
"chmod 755 S20*" solved this. So I tested it once again...
Even though it seems to fail as shown above, it still managed to mount all partitions and got a positive result with "find"
Next I added a small text file to the initrd to see if I could copy it to one if not all of the mounted partitions.
cp /temp/test.txt /ramdisk/mnt/E/test.txt
This obviously failed giving me "Read-only File System"...
Going back to the initrd image I could see that the "mnt" and "var" sym-links where broken but am aware that the "S10ramdisk" file
populates the "ramdisk" directory but to be sure I created the directories and new sym-links:
rm mnt
rm var
mkdir /ramdisk/mnt
mkdir /ramdisk/var
chmod 755 /ramdisk/mnt
chmod 755 /ramdisk/var
ls -n /ramdisk/mnt mnt
ls -l /ramdisk/var var
But this had no effect, It would be a huge advantage if I could get the mounted partitions writable
Again, any assistance would be much appreciated...
What inspired me the most was how Rocky was able to automate Gentoox Loader to boot Linux without any input...
CHIMP LOADER:
Firstly I would have to figure out how to get Chimp Loader to include the save game exploit directory of
E:/UDATA/21585554/000000000000/
I found this quiet easily by going into the directory of the Chimp Loader Source and ran the following command
grep -rnw './' -e "Chimp"
The result (below) gave me the location of the file that I would need to edit "LoadLinux.c"
./boot/LoadLinux.c:93: //Try in /Applications/Chimp on E
./boot/LoadLinux.c //Try in /Apps/Chimp on E
./boot/LoadLinux.c:107: //Try in /Chimp on E
./boot/LoadLinux.c:114: //Try in /Applications/Chimp on E
./boot/LoadLinux.c:121: //Try in /Apps/Chimp on E
./boot/LoadLinux.c:128: //Try in /Chimp on E
Looking at the code on this file I can see where Rocky added the additional directory's from here I can add yet another.
Next I would have to compile the source and this is where I ran into a little trouble...
It has been a while since I've compiled anything but generally you go into the directory and use the "make" command
But this seemed to fail for me and I cant really gather where I'm going wrong at this point maybe I need an older version
of Linux for this to be compiled successfully but I'm not really sure,
Any assistance would be appreciated...
CHIMP261812 (Linux):
Automating as much as possible is my main objective and to achieve that I want to be able to run a script once Chimp Loader
has booted Linux. I was able to easily mount the image by using the following steps:
gzip -d initrd.gz (uncompress gzip)
mkdir /mnt/chimp (make mount directory)
mount initrd /mnt/chimp (mount to directory)
From here I could look into the contents of the image and the best way I could figure out how to run a script was to tap into the end
of the rcS. Here I just added a couple of simple commands to see if I was going in the right direction.
busybox
sleep 10
raincoat
sleep 10
find /ramdisk/mnt
sleep 10
reboot
Adding the reboot would end the script without it going into the Chimp user interface.
I then umounted and compressed the initrd and transferred to one of my consoles using FileZilla
umount /mnt/chimp (unmount image)
gzip initrd (compress gzip)
Now when I run Chimp I can see the results of my editing and confirms that busybox and raincoat binaries are responsive,
however I didnt get a result for "find" which told me that no partitions are being mounted to Linux. Re-mounting the image and
having another look I ran the "ls -l" command on the /etc/init.d directory which showed that the S20automount file was not executable.
"chmod 755 S20*" solved this. So I tested it once again...
Even though it seems to fail as shown above, it still managed to mount all partitions and got a positive result with "find"
Next I added a small text file to the initrd to see if I could copy it to one if not all of the mounted partitions.
cp /temp/test.txt /ramdisk/mnt/E/test.txt
This obviously failed giving me "Read-only File System"...
Going back to the initrd image I could see that the "mnt" and "var" sym-links where broken but am aware that the "S10ramdisk" file
populates the "ramdisk" directory but to be sure I created the directories and new sym-links:
rm mnt
rm var
mkdir /ramdisk/mnt
mkdir /ramdisk/var
chmod 755 /ramdisk/mnt
chmod 755 /ramdisk/var
ls -n /ramdisk/mnt mnt
ls -l /ramdisk/var var
But this had no effect, It would be a huge advantage if I could get the mounted partitions writable
Again, any assistance would be much appreciated...