Pl/Metoda programowa HOWTO

From Xbox-Linux

boccchiou

The Xbox-Linux website is also available in: English , Deutsch , French , Polski

autor: Michael Steil

Polskie tłumaczenie artykułu jest we wczesnej wersji alfa oraz w znacznej mierze jest niekompletne - wiele akapitów pozostaje nadal nieprzetłumaczone, inne mogą być przetłumaczone częściowo. Jeśli możesz, przetłumacz akapity z języka angielskiego na polski. Jeżeli przetłumaczony już akapit mógłbyś przetłumaczyć lepiej, wprowadź odpowiednie poprawki po konfrontacji z oryginałem.

Ten dokument HOWTO opisuje, jak przygotować twojego Xboksa dla instalacji Linuksa bez otwierania obudowy.

Jeżeli kupisz Xboksa, i włożysz płytę instalacyjną systemu Linux, z reguły nie zostanie ona zaakceptowana - nie dlatego, że Xbox nie jest PeCetem (jest!), ale dlatego, że Microsoft nie chciał, żebyś uruchamiał na nim Linuksa.

Korzystając ze sztuczki MechInstaller, możesz uczynić swojego Xboksa kompatybilnym z Linuksem, bez otwierania obudowy!

Table of contents

Na czym polega "Metoda programowa" ?

"Metoda programowa", jeśli wykonana poprawnie, modyfikuje panel kontrolny Xbox Dashboard na dwa sposoby:

  1. Panel kontrolny Xbox Dashboard będzie miał możliwość uruchomienia płyt CD lub DVD z dystrybucją Xbox Linux. (Jeśli włożysz płytę Xbox Linux do napędu DVD podczas działania panelu kontrolnego Dashboard, the Xbox szczęśliwie zaakceptuje płytę i uruchomi z niej system.)
  2. Opcja "Xbox Live" zniknie z menu panelu kontrolnego Dashboard. Zamiast niej uzyskasz nową opcję "Linux" w tym samym miejscu. (Oczywiście ta zmiana jest odwracalna.) Poprzez wybranie opcji "Linux", panel kontrolny Dashboard uruchomi wybraną dystrybucję Linuksa z dysku twardego. (Jedynie mini-dystrybucja oparta na tekstowej linii poleceń, zwana Emergency Linux, jest uruchamiana domyślnie, możesz jednak samodzielnie zainstalować na dysku twardym w pełni sprawny system Linux, taki jak Xebian lub GentooX.)

Te modyfikacje są w pełni programowe (stąd też nazwa "Metoda programowa"!); nie ma potrzeby otwierania obudowy twojego Xboksa bądź lutowania czegokolwiek.

Missing image
Icon-admonition-question.png
FAQ

Dlaczego "Metoda programowa" wyłącza opcję Xbox Live?

Wyłączenie tej opcji menu zabezpiecza cię przed przypadkowym podłączeniem do sieci Xbox Live podczas działania zmodyfikowanego oprogramowania Xboksa. (System gier online Xbox Live znany jest z nakładania stałej blokady na Xboksy ze zmodyfikowanym systemem. Lepiej być ostrożnym, niż później żałować.)

Moreover, from a hacker's viewpoint, the Xbox Live menu option is a just a convenient placeholder where to attach a hook for launching Linux.

Czy twój Xbox jest kompatybilny?

Metoda programowa wykorzystuje dziurę w panelu Microsoft dashboard by uczynić Xboksa kompatybilnym z Linuksem. Niestety ta dziura została "załatana" w nowszej wersji panelu Dashboard. Wymagany jest panel Dashboard w wersji 4920 lub niższej.

  • Jeżeli wersja twojego panelu Dashboard jest większa niż 4920 a wersja kernela mniejsza niż 5713, wówczas jest możliwe obniżyć wersję Microsoft Dashboard do 4920.
  • Jeżeli twój kernel jest w wersji 5713 lub późniejszej, wówczas jest niemożliwe by wgrać panel Dashboard do wersji 4920, i nie będziesz miał możliwości użycia Metody Programowej. WSZYSTKIE Xboksy w wersji 1.6 (zobacz Wersje_Xboksa_HOWTO by określić numer wersji twojego Xboksa) mają kernele w wersji >=5713, zatem nie są (EN) kompatybilne z Linuksem przy użyciu metody programowej.

Nawet jeśli wersja twojego kernela to 5713 lub późniejsza, nie wszystko stracone: jest nadal możliwe uruchomienie mini-dystrybucji Emergency Linux zawartej w MechInstaller. Możesz jej użyć, by telnetować się do Xboksa by zdobyć informacje takie jak klucz twojego dysku twardego, oraz unikalne hasło do dysku twardego, które pozwolą ci wykonać inne operacje.

Missing image
Icon-admonition-example.png
Example

Sprawdzenie wersji panelu dashboard oraz kernela. By dowiedzieć się jaką masz wersję kernela i panelu Dashboard twojego Xboksa, uruchom panel Dashboard (innymi słowy włącz Xboksa bez płyty DVD w napędzie), wybierz Settings a następnie System Info. Once the text starts scrolling, powinieneś zobaczyć coś na kształt:
K:1.00.XXXX.01
D:1.00.YYYY.01

XXXX jest wersją kernela Xboksa oraz YYYY jest wersją panelu Dashboard.

Co będzie ci potrzebne?

  • dowolny Xbox, z dwoma wyjątkami: wersji japońskiej i werji 1.6 bez modchipa
  • gra MechAssault dla Xboksa. Jedynie oryginalne wydanie zadziała; patrz poniżej.
  • komputer ze złączem USB i zainstalowanym systemem Linux, BSD, Mac OS X lub Windows
  • pamięć przenośna na złączu USB (będziesz musiał skasować jej zawartość) lub inne urządzenie USB, które zgodne jest ze specyfikacją "Pamięć masowa USB", takie jak czytnik kart SD lub cyfrowy aparat fotograficzny (spójrz na Listę kompatybilności USB z Xboksem (EN))
  • adapter pozwalający podłączyć urządzenie pamięci masowej USB do twojego Xboksa. (Gniazda pamięci oraz kontrolerów do gier Xboksa są zwykłymi portami USB, mają jednak udziwnione, inne gniazda i wtyczki. Adaptery konwertujące to udziwnione złącze do standardowego portu USB są dostępne w sprzedaży, możesz jednak zbudować taki samodzielnie.)

Kilka innych opcji:

  • Możesz użyć Xboksową wersję Action Replay zamiast standardowej pamięci masowej USB z adapterem, jeśli zapoznasz się z tym przewodnikiem (EN).
  • albo, jeżeli masz już adapter, który umożliwia podłączenie kontrolera Xboksa do twojego peceta, i jeżeli posiadasz również Xbox Memory Unit który podłączasz do gniazda w kontrolerze Xbox, możliwe jest skopiowanie specjalnych plikow stanu gry MechInstaller bezpośrednio do Memory Unit gdy kontroler jest podłączony do twojeg komputera PC. Więcej szczegółów tego zagadnienia można znaleźć w tym niekompletnym HOWTO (EN).
Missing image
Icon-admonition-note.png
Note

Potrzebujesz oryginalnej wersji gry MechAssault game – a nie wersji "Xbox Game of the Year" lub "Platinum Hits". Nowsze wydania zostały poprawione i nie zadziałają w metodzie programowej. Etykiety płyt CD są zazwyczaj identyczne, jednak wersja która zawiera "Platinum Hits" jest ZAWSZE NIEWŁAŚCIWA. Spójrz na nadruk laserowy na odwrocie. W nowych płytach (NIEWŁAŚCIWYCH) zawiera on MS02308L podczas gdy oryginalna (WŁAŚCIWA) zawiera MS02301L. Wspaniałym źródłem do zdobycia właściwej wersji jest twój lokalny sklep z używanymi grami lub wypożyczalnia gier taka jak Blockbuster.
Missing image
Icon-admonition-tip.png
Tip

Pliki MechInstaller, gdy raz zostaną zapisane na dysku twardym twojego Xboksa, mogą być również skopiowane na standardowy Xbox Memory Unit.. Wówczas po prostu zabierz ten memory unit i grę MechAssault ze sobą, i możesz przerobić także Xboksy twoich znajomych.

Nie będziesz wówczas potrzebował specjalnych urządzeń USB mass storage, specialnych adapterów, bądź specjalnych programów na PC. Nadal będziesz potrzebował oryginalnej gry MechAssault w celu to actually use the savegames, but kopiowanie ich wśród znajomych jest możliwe przy użyciu zwykłych, nie modyfikowanych Xboksów oraz zwykłych pamięci Memory Unit. W ten sposób nawet ci, którzy nie życzą sobie aby modyfikować ich konsole, lub inwestować w specjalne wyposażenie, mogą pomóc w przechowywaniu i rozprzestrzenianiu plików MechInstaller wśród swoich znajomych.

Wymagania

  • klient Telnet na twoim komputerze
  • hub/switch oraz dwa proste przewody LAN lub krosowany kabel LAN

Będzie ci to potrzebne, jeżeli chcesz zrobić kopię cyfrowego klucza twojego dysku twardego (zalecane). Wymaga to użycia połączenia Telnet z Xboksem (klawiatura USB nie działa w dystrybucji Emergency Linux).

Poznaj MechInstaller

"Metoda Programowa" opiera się na prostej idei: uruchamiasz specjalny instalator, który modyfikuje systemowe oprogramowanie Xboksa, dzięki czemu Xbox zaakceptuje i uruchomii Linuksa.

Problem polega na tym, że sam instlator byłby odrzucony przez niezmodyfikowanego Xboksa. Nie zadziała to, jeżeli po prostu wypalimy obraz na płycie CD/DVD i spróbujemy uruchomić z niej Xboksa. Dlatego w celu uruchomienia należy skorzystać z pewnej sztuczki.

Gry pod Xboksem zazwyczaj pozwalają zachować stan gry, tak abyś nie musiał przejść całej gry podczas jednej sesji. Odkryto, że gra MechAssault – opublikowana w wersji dla Xbox w roku 2002 – posiada lukę bezpieczeństwa w procedurach zapisu stanu gry. Luka ta pozwala na dołączenie dowolnego kodu wykonywalnego w plikach stanu gry MechAssault, oraz na uruchomienie tego kodu na nie modyfikowanym Xboksie.

Poszerzyło to znacznie nasze pole możliwości. Kod modyfikujący pliki systemowe Xboksa mógł być zawarty w pliku stanu gry MechAssault. Kiedy odpowiednio spreparowany plik stanu gry załadujesz na Xboksa i wybierzesz opcję "Load Game" w grze MechAssault, uruchomiony zostanie nasz instalator. Rozwiązanie to nazwaliśmy jako MechInstaller.

Where does MechInstaller live? How does it get to your Xbox?

Trudnym zadaniem jest wgranie specjalnie przygotowanego stanu gry na twoją konsolę Xbox. Or, actually, a bunch of savegames, since MechInstaller consists of several of them.

Xbox umożliwia przechowywanie stanu gry zarówno na wbudowanym twardym dysku, lub na specjalnych "Xbox Memory Units". (Są to specjalne moduły pamięci dla Xboksa, które można zakupić osobno. Podłączane są do gniazd w przedniej części kontrolera Xpad, and act as vehicles with with you can transfer savegames from one Xbox to the other.)

Nie jesteśmy zainteresowani twardym dyskiem, ponieważ dostęp do niego wymagałby otwarcia obudowy oraz przeróbek w sprzęcie – a to powinna być programowa metoda, pamiętasz? Memory Units, brzmią jednak bardziej obiecująco.

As it turns out, the "Memory Units" are actually just USB flash memory devices in disguise. Likewise, the slots on the controllers in which they plug into are just USB 1.1 ports with a proprietary connector.

Pick your poison

Now, we have two options:

  1. We can try and find a way to connect a genuine Xbox Memory Unit to a PC. If we can pull this off, we can then access the contents of the Memory Unit and copy the MechInstaller savegames on it.
  2. We can try and find a way to connect an ordinary USB memory stick to an Xbox (and convince the Xbox that this generic USB memory device is, in fact, an Xbox Memory Unit.) Before doing this, of course, we would have preloaded the USB stick with the MechInstaller savegames.

The first option isn't a problem: there are USB adapter cables with which you can connect the Xbox controller (and Memory Units plugged into that controller) to an ordinary PC.

The second option isn't a problem, either: there are USB adapter cables with which you can connect standard USB devices (such as flash drives, memory keys, even keyboards and other USB devices) to your Xbox.

Both ways will work, but the latter one has been more popular this far.

FATX

There is still an added complication on our way: the filesystem on the Memory Units is FATX, Xbox's own proprietary format. It is possible to access FATX volumes on a PC with a suitable FATX-aware application program (or with suitable FATX drivers), but this isn't actually necessary in this case, as we have prepared a binary image of a FATX volume containing the MechInstaller savegames for you. This way it will be enough to simply copy the binary image to the flash device: you don't need to worry about the filesystem.

Copying the MechInstaller Files on a USB Memory Stick

If you have the MechInstaller on an Xbox memory unit already or know someone who has, you can skip the following section, else you have to use a Linux, BSD or Mac OS X computer, a USB stick and an Xbox USB adaptor cable to get the savegame onto your Xbox.

  • Download MechInstaller images from SourceForge [1] (http://sourceforge.net/project/showfiles.php?group_id=54192)
  • If you have a less than 2000 blocks USB stick, use the image "MechInstaller-1.0-FATX-8MB-to-32MB.img".
  • If you have a memory stick with at least 2000, but less than 4000 blocks, use "MechInstaller-1.0-FATX-64MB.img".
  • If you have a memory stick with at least 4000, but less than 8000, use "MechInstaller-1.0-FATX-128MB.img".
  • If you have a memory stick with at least 8000, but less than 16000, use "MechInstaller-1.0-FATX-256MB.img".
  • If the correct image didn't work, please try all other images one by one.
  1. Please enter the brand and type of the USB stick, as well as the size and the detected number of blocks into the Xbox USB Compatibility List - just click "edit" on that page.

Alternative to the procedure mentioned above (tested for Mac OS X 10.3):

  • plug in the stick and find out what device it is by typing mount in the Terminal. The stick should appear as /dev/diskXsY where XsY is most certainly the highest number.
  • Read the data on the stick by typing cat /dev/diskXsY > backup.img. You now have a disk image of your original stick as a backup.
  • Write the downloaded images to the stick by typing cat MechInstaller-1.0-...-.img > /dev/diskXsY. Try out which one works for you by verifying if the savegames appear in the xbox or not.

Nb: for Linux (Debian/Knoppix) need to remove usb-storage module with modprobe -r usb-storage in order to enable write of disk image. the command was: cat MechInstaller-1.0-FATX-128MB.img > /dev/sda

  • Once you copied the savegames to your xbox's hard drive you can restore the data on the stick by typing cat backup.img > /dev/diskXsY
  • There is no need to be admin or root to do this, as you have full write permissions to the stick.

Windows 95/98/SE/ME/NT/2000/XP


(If you have a 32 mb stick, you can skip all of this, and get the MXK software from http://www.megaxkey.com, and use the Action Replay files from the download page since Action Replay files are compatible with MXK software.)


For Windows users there is a great program called OzXMemory Stick Explorer (http://xbox-linux.sourceforge.net/down/ozxmemory.exe) , which can write the MechInstaller FATX images files to your memory stick. You will need a .rar extractor (http://www.rarlab.com/). The program has a GUI so it's quite easy to use.

  • Connect the USB stick to your X-box goto memory then controller the x-box will erase and format the stick for you.
  • Connect the USB stick to your PC and launch the program.
  • Press Open 32MB image button and locate the 32MB FATX image file
  • Press Write to xxx MB Stick button and the program should write the image file to the USB stick (you should choose the button corresponding your USB stick size). (If you choose the right size and but it doesn't work, try "Write to 32 MB Stick")

Now you have a USB stick that looks like an Xbox memory unit to the Xbox and contains the savegame that starts the MechInstaller.

Copying the MechInstaller Files to the HDD of your Xbox

In order to actually launch the MechInstaller, you will first need to copy the savegame files from the USB memory stick over to your Xbox HDD. Trying to launch them directly from the USB memory stick will not work.

Copying is done by using the savegame management features on the original Xbox Dashboard. You will need to navigate to your USB stick and copy each savegame on it one by one to your HDD. (You will get the "copy" option by moving to the right in the menu. The MechInstaller savegames should have little penguin icons on them.)

Missing image
Icon-admonition-note.png
Note

You can't copy the savegames as a group. You will need to select the individual saves, one by one. Move to the right in the menu in order to get options.

Backing up your Xbox Hard Disk Key

In case of problems, it is important that you have your Xbox hard disk key.

  1. Insert the MechAssault game
  2. Select "CAMPAIGN"
  3. Select "Emergency Linux"
  4. Get the key: Using a telnet connection to 192.168.0.3 (a USB keyboard will not work in the Emergency Linux) telnet 192.168.0.3 log in as root, password xbox, and type xbox_tool -a Then write down the hard disk key and pass.

Making the Xbox Linux-compatible

  1. Insert the MechAssault game
  2. Select "CAMPAIGN"
  3. Select "Install Linux"

Your Xbox will now be prepared. This will take some time. Afterwards, your Xbox is fully Linux-compatible, and there is an item "LINUX" in the Dashboard main menu which boots a minimal Linux system. Use an installation CD from http://xbox-linux.org to install a full Linux system.

Undoing the changes

You can always fully undo the changes by selecting "Restore Dashboard" in the "CAMPAIGN" menu of MechAssault. NOTE: from bagaudron54321@hotmail.com if this does not restore your dashboard, you may have to reimage your drive using XBOXHDM.

Removing the Savegames

You can delete the "Install Linux" savegame from hard disk, if you wish, it is not needed any more. If you don't plan to undo the changes, or if you can have the MechInstaller memory unit again when you wish to undo them, you can also delete the "Restore Dashboard" savegame.


Using your Modified Xbox

You can use the Xbox as before, you can play games and video DVDs (if you have the dongle), and you can run Linux. But you have to be cautious with the following:

  • Video DVDs will not work if they are already in the DVD drive when you turn on the Xbox. Instead, insert them when the Dashboard is running.
  • If you select "LINUX" on the Dashboard, a minimal Linux system with text mode only will start. After you install a full Linux system to E:, this will be booted if you select "LINUX".
  • You can install a full Linux system by inserting an Xbox Linux installation CD (at the moment, only Xebian (Ed's Debian) works with this modification). As with video DVDs, only insert them when the Dashboard is running.

Creating a MechInstaller Xbox Memory Unit

With the savegames on your Xbox hard disk, you can easily copy them to a standard Xbox Memory Unit using the Dashboard, which you can give to your friends, so that they don't need a USB stick and the USB adaptor cable to prepare their Xboxes.

Troubleshooting

Flickering Screen

If your screen starts flickering after you select "Emergency Linux" and you can't see anything on the screen, then you have an Xbox manufactured since August 2003 (version 1.4+ Xbox) NOTE: from bagaudron54321@hotmail.com You may also have recieved updates to your kernel if you have used xbox live recently some times this can cause the flickering screen error /END NOTE. There is nothing wrong with that, a full Linux system such as Xebian will work without any problems, just the Emergency Linux shipped with MechInstaller does not support the new video encoders yet. Which also means you won't be able to use the method below to fix the blackscreen.

Error Message

Also, some users noticed that Emergency Linux prints the line "sh: can't access tty: job control turned off" at the end. Just ignore this message...



If anyone had any information on this it would be very helpful. It seems that after the line is printed Emergency Linux halts. Any suggestions would be greatly appreciated.

USB Keyboard

No, USB keyboards cannot be used with MechInstaller 1.0 Emergency Linux yet. Just telnet connections work. A full Linux supports the use of a USB Keyboard.

Black Screen

If you get a black screen when selecting "Install Linux", your Xbox is very new (or your monitor (TV) is having a hard time displaying it. If you're using the HD-AV pack, try using the regular one. Or try it on a different monitor). Try this workaround:

Notice: If your Dashboard version is >= 1.00.5659.0, you need to downgrade the Dashboard first (See the section 'Install Linux' Fails below)!

  • start MechAssault
  • plug in Ethernet cable and connect it to another NIC (this is necessary for the upgrade option to become available)
  • "Multiplayer" -> "Xbox Live" -> A button -> "MechWarrior" -> "Create new account" -> Xbox will say it is restarting to dashboard and will update.
  • start MechAssault again
  • "Campaign" -> "Emergency Linux"
  • upload fonts-2004-01-15.tar.gz (http://www.xbox-linux.org/down/fonts-2004-01-15.tar.gz) to ftp://192.168.0.3/mnt/E
  • telnet 192.168.0.3 (user: root, pass: xbox)
cd /mnt/C/fonts
tar xzf /mnt/E/fonts*.tar.gz
mv XBox\ Book.xtf XBox\ Book.bak
mv Xbox.xtf Xbox.bak
mkdir /mnt/C/Linux
cd /mnt/E/UDATA/4d530017/E8FF68C9193B
cp -p default.xbe linuxboot.cfg vmlinuz initrd /mnt/C/Linux
umount /mnt/C
  • reboot and remove the game

This is the equivalent to "Install Linux". Your Dashboard will now include the menu item "LINUX".

'Install Linux' fails

If your Dashboard version is >= 1.00.5659.0, you need to downgrade the Dashboard first. Get the 500 MB image of a pre-5659 C: drive (/dev/hda51; this is legal if you have possessed an old version before, if not, we can't tell and it is up to you), upload it to ftp://192.168.0.3/mnt/E, telnet 192.168.0.3 (user: root, pass: xbox) and type:

umount /mnt/C
cat /dev/discs/disc0/part51 > /mnt/E/backup-C.raw

Then if you have an old version image you can type

cat /mnt/E/Xbox_Dashboard_pre_Live_C_FATX_image.raw > /dev/discs/disc0/part51

If you don't have an image, but have the files then upload the file xboxdash.xbe and the directory xboxdashdata.hhhhhhhh (and all its contents) to /mnt/E and

mount /mnt/C
cp /mnt/E/xboxdash.xbe /mnt/C/xboxdash.xbe 
rm -rf /mnt/C/xboxdashdata.xxxxxxxx
cp -R /mnt/E/xboxdashdata.hhhhhhhh /mnt/C/xboxdashdata.hhhhhhhh

where xxxxxxxx is the old one and hhhhhhhh is the new one.

In case anything goes wrong, you can restore the old version:

umount /mnt/C
cat /mnt/E/backup-C.raw > /dev/discs/disc0/part51

Clock Loop Problem

It's best not to unplug the Xbox from power after the modification. If you do, you may experience the Clock Loop Problem. NOTE: from bagaudron54321@hotmail.com if the clock loop problem does occur, it does not mean your xbox is broken!!! If you cant get out of the loop by any of the ways listed in the Clock Loop Problem HowTO page refer to the image your hard drive section in this page, and downgrade your drive, or if you have a 5713 kernel the image will just restore your dashboard and get rid of the clock loop problem. /END NOTE.