
Originally Posted by
grunken
For example, the ./hdl_dump query command always yields me a 00000000 (0): Unknown error: 0. I simply use diskutil list instead. Also any attempts to inject/cdvd_info games directly from a CD or DVD is shot down with either a 00000010 (16): Resource busy when the volume is mounted or a Segmentation fault when unmounted. None of this is a problem with disk images. And what I've had least success with, is being able to transfer from one PS2 HD to another, or even perform a cdvd_info for the game partitions on the PS2 HD.
Hmm, since I got no external USB enclosure and I only have an iBook, I only tried out the networking functions of hdl_dump.
Using the Windows command line as a guide:
hdl_dump cdvd_info "hdd1:Midnight Club
I can only think to adapt to this for Unix:
./hdl_dump cdvd_info "/dev/disk1Midnight Club"
Any
/ or space between
/dev/disk1 and
Midnight Club does not seem to make a difference, all resulting in
No such file or directory.
This looks wrong somehow. I'd try something like "/dev/disk1:Game Name". hdd2 is the Windows device name without separator, /dev/disk1 is the Unix name without separator. But again, I can't check that with my setup.
Quotations seem to only be used around the filepath when the PS2 HD behaves as the source, as with this PS2 HD to PS2 HD Windows command line:
hdl_dump inject_cd hdd2: "Midnight Club" "hdd1:Midnight Club" SLES_500.54
And having always substituted
hddx: with a corresponding
/dev/diskx, my logic for producing this Unix counterpart becomes obvious:
./hdl_dump inject_dvd /dev/disk2 "Midnight Club" "/dev/disk1Midnight Club" SLES_500.54
Again, I'd try "/dev/disk1:Midnight Club"
Also fuzzy, if you could or somebody else, explain what the
chmod 755 hdl_dump command does to hdl_dump ?
Thanks again!
Thanks for wondering, more power to you:
Short introduction to unix permissions
When you downloaded and unzipped the hdl_dump.gz file, it probably looked like this, with your username instead of "fuzzy":
Code:
fuzzy@toth:~$ ls -l hdl_dump.gz
-rw-r--r-- 1 fuzzy fuzzy 101288 Dec 16 10:55 hdl_dump.gz
The first field are file permissions, the second is the link count (another story...) followed by the file owner and group. File size and date is obvious.
Every file has an owner and a group. If you belong to more than one group (check with
Code:
fuzzy@toth:~$ id
uid=501(fuzzy) gid=501(fuzzy) groups=501(fuzzy), 507(nethack), 506(oracle), 80(admin)
), you can change the file's group with
Code:
fuzzy@toth:~$ chgrp oracle hdl_dump.gz
fuzzy@toth:~$ ls -l hdl_dump.gz
-rw-r--r-- 1 fuzzy oracle 101288 Dec 16 10:55 hdl_dump.gz
fuzzy@toth:~$ chgrp fuzzy hdl_dump.gz
fuzzy@toth:~$ ls -l hdl_dump.gz
-rw-r--r-- 1 fuzzy fuzzy 101288 Dec 16 10:55 hdl_dump.gz
As root, you can also change the owner of a file using the command chown:
Code:
fuzzy@toth:~$ sudo chown fnord hdl_dump.gz
fuzzy@toth:~$ ls -l hdl_dump.gz
-rw-r--r-- 1 fnord fuzzy 101288 Dec 16 10:55 hdl_dump.gz
Now about the file permissions: There are three groups of permissions, for user, group and others. Each of these groups has three flags, read (r), write (w) and executable(x). With an additional special flag (e.g. d for directory), you'll get the pattern on the left side of ls -l:
special - user - group - others
So in the last example, we have no special flag (-), rw- for user fnord, so this user can read and modify this file and r-- for group fuzzy and others, so everyone else can only read this file.
The file permissions can be changed by the file's owner or by root:
Code:
fuzzy@toth:~$ sudo chown fuzzy hdl_dump.gz ; chmod g+w hdl_dump.gz
fuzzy@toth:~$ ls -l hdl_dump.gz
-rw-rw-r-- 1 fuzzy fuzzy 101288 Dec 16 10:55 hdl_dump.gz
(you can separate multiple commands on the command line with ; )
Using chmod, for the group fuzzy (g) we added (+) write permissions (w), now every user belonging to this group can modify the file.
A file with permissions -rw-rw-rw- could be modified by everyone logged in to your system. But if you want files to be modified by more people, create a group for those, add everyone to that group and grant group write permissions. ^^
Now since I uploaded a binary, you may want to execute it. To make a file executable, you add the x flag for the desired groups of users:
Code:
fuzzy@toth:~$ gunzip hdl_dump.gz
fuzzy@toth:~$ chmod a+x hdl_dump
fuzzy@toth:~$ ls -l hdl_dump
-rwxrwxr-x 1 fuzzy fuzzy 301728 Dec 16 10:55 hdl_dump
Now everyone on the system can execute that unpacked hdl_dump binary. a is a shortcut for ugo, it sets the x flag for all three groups at once.
In my original post (phew), I used
This is actually a shortcut to specify all permission flags in one number.
For the three groups user, group and others, add up:
1: Executable (x)
2: Write (w)
4: Read (r)
So 755 is rwx for user and r-x for group and others. You can read, modfiy and execute the file, everyone else can only read and execute it.