Pl/Metoda programowa HOWTO
From Xbox-Linux
boccchiou
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:
- 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.)
- 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Ä.)
|
|---|
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:
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:
- 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.
- 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.
- 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.
- Insert the MechAssault game
- Select "CAMPAIGN"
- Select "Emergency Linux"
- 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, passwordxbox, and type xbox_tool -a Then write down the hard disk key and pass.
Making the Xbox Linux-compatible
- Insert the MechAssault game
- Select "CAMPAIGN"
- 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

