Page 1 of 15

ps2 linux on usb memory

Posted: Tue Apr 08, 2008 11:02 am
by devilinside128
Hello, as I install linux on my ps2 v 12. Using as hard disk in a usb memory, run with Kernelloade 1.7.

Posted: Tue Apr 08, 2008 9:58 pm
by baggacfreak
Which Linux do you install? Black Rhino? I am installing Black Rhino on my hdd with lan adapter and apa support. Perhaps we can exchange information on our progress. Wish you good luck.

Posted: Sat Apr 12, 2008 12:03 am
by devilinside128
I have a 2-gb pendrive and launched the elf Kernelloade 1.7. From the east. This elf is for istalar your linux using your pendrive to install linux on your hdd.
Pudes your download it from here and as a tutorial istalar your linux.
Http://mitglied.lycos.de/ps2dev/linux.html
And the Black Rhino
Http://lamadrigueradeconejo.blogspot.co ... ebian.html
My problem is that I do not have a hdd and want to install and my pendrive. If surveys information on this haceme know

Posted: Sat Apr 12, 2008 9:48 am
by Mega Man
Until now I wasn't sure if you wanted to report success or are asking a question.
I don't know what "istalar" or "haceme" is. I believe that you want to know how to install PS2 Linux on a USB memory stick.

The offical way to change the root file system is not working. Currently the only way is to start Linux using an Initrd and then mount a USB stick as described in my tutorial (steps 1 - 6). Then you can use "chroot" to change the root file system to the USB memory stick.
Before you do this you need to install PS2 Linux on the memory stick using a running Linux system. You need to do it as described in my tutorial (steps 7 - 17). You can't use "ide/host0/bus0/target0/lun0/" you need to use the USB device "sda" or "scsi/host0/bus0/target0/lun0".

http://mitglied.lycos.de/ps2dev/tutoria ... linux.html

Additional note: There are reports that USB is not working with slim PS2, but you have an early model, so it could be possible that it is working. Can you do the first 6 steps of the tutorial and tell me if USB keyboard is working?

Posted: Mon Apr 14, 2008 3:16 am
by pip25
Hi Megaman!

First of all, thanks for that awesome loader! I am also trying to boot from an USB memory stick, and I am attempting the root changing method with initrd as well. The thing is, in order to do that well, I needed the pivot_root command, which wasn't included both in PS2 Linux and Blackrhino. So perhaps I can save some of your time by providing you with the executable (it took me quite a few headaches to make it compile):

http://www.mediafire.com/?xmemcmy7t2g

I hope I was able to help.

Posted: Fri Apr 18, 2008 8:48 am
by devilinside128
Hello, Mega Man
I ulizando the Kernelloade 1.7, and if you can do steps 1 through 6.
I am looking at the possibility of buying a keyboard for the ps2. Does any keyboard is compatible? What I suggest?
Thanks

Posted: Sat Apr 19, 2008 9:42 pm
by citronalco
The kernelloader is excellent, also the Linux install howto. Thank you Mega Man!
I'm trying to get linux running on a mod-chipped ps2 slim v15, dreaming of something like loading kernel & initrd from usb or cd and mounting the rootfs via nfs.
After some try and error which modules to load and which not I got the kernel running from usb and get to the point where the init process should start - but nothing happens. The initrd gets loaded from the kernelloader.
Could anyone please post his/her working config.txt?
Are there some docs around for the modules and their purpose?

Posted: Sat Apr 19, 2008 9:44 pm
by citronalco
@devilinside128:
You can use any usb keyboard, but only the standard keys will work. So take a cheap one ;-)

Posted: Sat Apr 19, 2008 9:53 pm
by Mega Man
Keyboard supported in:
Kernelloader:
- USB Keyboards with bootstrap support (CLASS=HID, SUBCLASS=BOOT(1))

Linux 2.4.17:
- All keyboards should work within Linux.

WARNING: It is possible that USB is not working on your slim PS2. I've an idea how to fix it (by a workaround and a kernel patch), but I can't assure that this will work.

Posted: Sun Apr 20, 2008 8:29 pm
by Nikkis
Im trying to install Linux (BlackRhino) on my PS2 using USB Memory Stick and the tutorial by Mega Man. Everything is going alright until step 14. When I write "tar -xzf /usb/ps2linux/black~1.gz" and press enter, it only gives me a bunch of errors and tells that the directory does not exist. Have I done something wrong on the steps before the 14? (Or what I should do on the steps before the 14 when using USB memory?)

Posted: Sun Apr 20, 2008 9:04 pm
by Mega Man
Nikkis wrote: Im trying to install Linux (BlackRhino) on my PS2 using USB Memory Stick and the tutorial by Mega Man.
I am not sure if you want to install from USB memory stick on the internal hard disc. The tutorial covers only this. Parameters are different when you don't use the internal hard disc, but an other device like a USB hard disc. The slim PSTwo doesn't support the internal hard disc (there is no hard disc case), but there are adapters available to connect an external hard disc to the internal IDE connector. This thread currently discusses the slim PSTwo. My following answer assumes that you use the big PS2 with an internal hard disc. Sometimes people use "PS2" when they mean "PSTwo", so I am not sure.
Nikkis wrote: When I write "tar -xzf /usb/ps2linux/black~1.gz" and press enter, it only gives me a bunch of errors and tells that the directory does not exist.
I believe you mounted /mnt readonly or forgot step 13.

Code: Select all

Step 10.
mount /dev/ide/host0/bus0/target0/lun0/part2 /mnt
Don't use parameter "-r" here. This parameter is used in step 11 to protect the USB memory against write accesses.

Posted: Sun Apr 20, 2008 9:34 pm
by Nikkis
Well, I have fat PS2 and USB Memory Stick. I have done everything like the tutorial says, but instead of using the "/dev/ide/..." I have used the /dev/scsi/.." because of the USB memory. In step 11. it says that I can't use that directory because its for the swap thing, but I have just ignored it :D. I'm pretty much lost with this thing so hope that you (or someone else) understand whats the problem.

Posted: Sun Apr 20, 2008 11:59 pm
by pip25
Are you trying to use the usb stick both for storing the blackrhino archive and the would-be Linux partitions? If so, then you need to be careful with partition numbers. For instance, my usb stick looks like this:
4GB VFAT - blackrhino.gz, vmlinux, initrd.gz, etc. - /dev/scsi/.../part1
3GB ext2 - extracted blackrhino - /dev/scsi/.../part2
1GB swap - - /dev/scsi/.../part3

If you see complaints about the swap then perhaps you have the swap partition on part1, and the ext2 and vfat partitions on part2 and/or part3.

Posted: Mon Apr 21, 2008 1:03 am
by Nikkis
pip25 wrote:Are you trying to use the usb stick both for storing the blackrhino archive and the would-be Linux partitions?
Yup, thats right. But now I'm having trouble creating the partitions. I should create 3 partitions; 1 swap partition, 1 for the files and 1 for the extracted Linux distribution, right? But when I try to create the third partition, it says something about the available sectors and gives an error.

Posted: Mon Apr 21, 2008 1:04 am
by Mega Man
citronalco wrote: I'm trying to get linux running on a mod-chipped ps2 slim v15, dreaming of something like loading kernel & initrd from usb or cd and mounting the rootfs via nfs.
After some try and error which modules to load and which not I got the kernel running from usb and get to the point where the init process should start - but nothing happens. The initrd gets loaded from the kernelloader.
Could anyone please post his/her working config.txt?
Are there some docs around for the modules and their purpose?
I already explained, how it need to be configured:
http://forums.ps2dev.org/viewtopic.php?t=9930

The default configuration should already work. My tutorial is based on it. To get the default configuration, you need to delete the file mc0:kloader/config.txt or just plug out your memory card before starting kernelloader. You need just to select the vmlinux file and set the kernel parameter to something like:

Code: Select all

ip=dhcp root=/dev/nfs rootfstype=nfs rootflags=0 nfsroot=172.22.0.9:/netboot
When you don't have a DHCP server, you can set the ip address directly instead of "ip=dhcp". Sometimes DHCP is not working and you need to use "ip=BOOTP" with some DHCP servers.
None of my provided kernels have nfs support. You need to recompile it (see README).

The module documentation is in the README of the source package and is also part of the release notes:
http://sourceforge.net/project/shownote ... _id=591602

Posted: Mon Apr 21, 2008 1:16 am
by Mega Man
Nikkis wrote: But when I try to create the third partition, it says something about the available sectors and gives an error.
When you do it as described in the tutorial, then the second partition takes all the remaining hard disc space. You need to make it smaller. The tutorial uses "+128M" to make the swap partition smaller. You need to do this also for the second partition. The available size depends on the size of your USB stick.

Kernel panic. No initrd. No network?

Posted: Wed Apr 23, 2008 4:57 am
by citronalco
Ok, mega man:
Today I've found some time to play a little on my v15.
What I expected was that I should at least get the initrd from the usb memstick started. I really hope I can provide you at least some useful information.

Using your default settings, the kernel comes up, unpacks the initrd.gz and then panics. Same result with the minimal modules set (sio2man or xsio2man).
Leaving away the initrd the kernel starts up and, after some time, panics because of the missing rootfs, just as expected. Additionally I can read few lines (can't scroll up any further) "sbios_rpc: RPC failes, func=191, result=-1" , followed by "ps2sysconf: can't open osd, res=0 stat=0x8025b7ac". Then the line that bothers me most: "Playstation 2 HDD/Ethernet device NOT present."
Ouch. Does this mean what it says?

Then I tried the same after exchanging the old modules (without "X) with the new modules (with "X), again without initrd:
What I see is that 2 usb ports are detected, the HID driver loaded, the Pegassus USB ethernet driver gets registered,..., everything looks quite fine, but then ps2pad failes to initialize, a line "sbios_rpc: RPC failed, func=176 result=-1", ps2cdvd can't be initialized, the PS2 sound driver again works, but then again "sbios_rpc: RPC failed, func=112 result=-1", "ps2sd: init failed". Then a last line: "Playstation 2 Memory Card driver".
That's it. Nothing more. But as far as I understand the new modules aren't really suggested.

The questions now are: Is network support possible? Why does the initrd
crash the kernel?
The next thing I would try is to throw everything out of the initrd and rename the shell to "init". Or do you have any other suggestions? Am I missing something? And: Should we start a new topic for this?

Re: Kernel panic. No initrd. No network?

Posted: Wed Apr 23, 2008 7:19 am
by Mega Man
citronalco wrote: Using your default settings, the kernel comes up, unpacks the initrd.gz and then panics. Same result with the minimal modules set (sio2man or xsio2man).
When the init process got killed or mounting is not correctly working, you will see such behaviour. I see this behaviour when I try to mount a USB device as root device (without initrd).
citronalco wrote: Leaving away the initrd the kernel starts up and, after some time, panics because of the missing rootfs, just as expected. Additionally I can read few lines (can't scroll up any further) "sbios_rpc: RPC failes, func=191, result=-1" , followed by "ps2sysconf: can't open osd, res=0 stat=0x8025b7ac".
The messages are normal.
citronalco wrote: Then the line that bothers me most: "Playstation 2 HDD/Ethernet device NOT present."
Ouch. Does this mean what it says?
Yes, it is disabled. There is also a menu entry in Kernelloader where network and hard disc need to be enabled. The detection is done in Kernelloader before booting Linux. There is still an open issue, because there are some modules loaded in Kernelloader just to get later hard disc access working. I executed the IOP code on EE side, but it seems that this is not really working.
citronalco wrote: Then I tried the same after exchanging the old modules (without "X) with the new modules (with "X), again without initrd:
What I see is that 2 usb ports are detected, the HID driver loaded, the Pegassus USB ethernet driver gets registered,..., everything looks quite fine, but then ps2pad failes to initialize, a line "sbios_rpc: RPC failed, func=176 result=-1", ps2cdvd can't be initialized, the PS2 sound driver again works, but then again "sbios_rpc: RPC failed, func=112 result=-1", "ps2sd: init failed". Then a last line: "Playstation 2 Memory Card driver".
That's it. Nothing more. But as far as I understand the new modules aren't really suggested.
You need to select the SBIOS for new modules. Currently the normal behaviour is that Linux hangs at startup.
112 is a failed sound driver call.

Did you look at the file KNOWNPROBLEMS.txt included in the source package? There is my last experience described:
Only working if XMCMAN.IRX, XMCSERV.IRX and XPADMAN.IRX is not loaded. At least padman.irx from RTE is working.
The problem is that it seems that it is not really possible to use it that way that Linux does. I believe that something was changed or fixed in the modules especially for Linux. So the modules included in RTE are the most stable ones available. The old ROM modules seems to be next in stability.
Did you see any message telling something about lost interrupts or USB device reconnect? I thought interrupts are not working with slim PSTwo.
citronalco wrote: The questions now are: Is network support possible?
There is a report that the code, which I've copied from PS2SDK IOP to EE side was working before with slim PSTwo. But there are also reports that the PHY chip in new consoles changed.
citronalco wrote: Why does the initrd crash the kernel?
The next thing I would try is to throw everything out of the initrd and rename the shell to "init". Or do you have any other suggestions?
When you remove the last bytes from your initrd.gz (make it smaller), then the kernel must tell you that the initrd.gz is invalid. Please test this. So you can see if the error happens before mounting initrd or after.
citronalco wrote: Am I missing something? And: Should we start a new topic for this?
I think this topic is about slim PSTwo problems.

Posted: Thu Apr 24, 2008 5:53 am
by citronalco
Today I found some time to do some further "research".

Startup with the new modules really looks much nicer after enabling SBIOS, nevertheless I did the following with the old modules:
"Playstation 2 HDD/Ethernet device NOT present."
I had Net/HDD support enabled in Kernelloader when I got this.

Booting with an invalid initrd, the kernel complains about that as expected, so it crashes when executing something from the initrd. Then I tried to start with the additional kernelparam init=/bin/bash and, guess what, bash started! The first time I tried it lasted 3 or 4 seconds until the kernel paniced, the second time it run for a few minutes (until I switched it off). And you're right, usb interrupts don't seem to work: complaints filled the screen saying "new usb device connected", "bulk message timeout", "unlink URB timeout", "device not accepting new address" again and again.
No surprise that the usb keyboard doesn't work. I plugged out both the keyboard and the memory stick and there were no new messages appearing, so usb support is at least somehow working ;-)

mega man

Posted: Tue May 27, 2008 10:03 am
by devilinside128
hola,mega man
I count him that I finally bought myself an adactador two in one, to connect the mouse and the keyboard via usb. now I do have the problem that the Kernelloade 1.7, it is not compatible with my ps2 v12. several messages behind you told me that parcherlo is needed. as I make it work? . thank you

Re: mega man

Posted: Wed May 28, 2008 6:50 am
by Mega Man
devilinside128 wrote:hola,mega man
I count him that I finally bought myself an adactador two in one, to connect the mouse and the keyboard via usb. now I do have the problem that the Kernelloade 1.7, it is not compatible with my ps2 v12. several messages behind you told me that parcherlo is needed. as I make it work? . thank you
Slim PSTwo Linux is still under test. You should try the following:

Testversion of kernelloader only for slim PSTwo:
http://rapidshare.com/files/112377238/kloader.elf.html

Testversion of Linux kernel only for slim PSTwo.
http://rapidshare.com/files/112377834/vmlinux.gz.html

It is possible that there will be a message at startup that eromdrvloader can't be started. When you see this message you need to disable the following modules:

ROM0:ADDDRV
host:eromdrvloader

It is possible that it freezes at boot. I need to know what is happening on your console for further development, because I currently have only results for v15 consoles.

Posted: Fri May 30, 2008 1:44 am
by cullum14
Could someone please tell me how do you use the linux install tutorial to install onto a USB Hard Drive? What parts do you have to change? Also, does ps2 linux require access to network/internet?

Cheers

mega man

Posted: Sun Jun 01, 2008 4:50 am
by devilinside128
hi, mega man
I execute the kloader_1.8.elf, and it shows the error message that you told me.
disable the modules.
acontinuacion load the kernel for slim PSTwo from the usb memory and the initrd.
I execute the "boot current config", it shows an error "rom1:libsd: (rv = -203) ", but the screen of the linux is loaded, but I continue without being able to utilisar the keyboard.

Posted: Sun Jun 01, 2008 7:03 am
by Mega Man
cullum14 wrote:Could someone please tell me how do you use the linux install tutorial to install onto a USB Hard Drive? What parts do you have to change?
The USB hard disc has a different device name (/dev/hd* -> /dev/sd*, /dev/ide/* -> /dev/scsi/*). Check disscussion above about device names.
When you use USB hard disc and USB memory stick, you will have 2 scsi devices. The first connected will get the lower number (or lower ASCII letter).

After installation you can't boot directly from USB. First you need to load initrd, mount the USB hard disc and then change the root file system to USB hard disc by runining pivot_root provided by pip25 above.

I don't have tested this.

You can also do the installation on the USB hard disc using Windows, but you need a partitioning program and a file system driver for ext2 file system. You need just generate the 2 partitions and extract the blackrhino*.tgz on the USB hard disc.
cullum14 wrote:Also, does ps2 linux require access to network/internet?
No. You don't need network or internet. Without an internet connection it is very difficult to update it after installation.
devilinside128 wrote:I execute the kloader_1.8.elf, and it shows the error message that you told me.
disable the modules.
acontinuacion load the kernel for slim PSTwo from the usb memory and the initrd.
I execute the "boot current config", it shows an error "rom1:libsd: (rv = -203) ", but the screen of the linux is loaded, but I continue without being able to utilisar the keyboard.
You also need to disable all modules from rom1 like "rom1:libsd", because ADDDRV can't be loaded.

What are the last messages on the screen?

Can you use the keyboard within Kernelloader (before loading Linux)?

mega man

Posted: Sat Jun 07, 2008 4:52 am
by devilinside128
I can not use the keyboard with Kernelloader, before running on Linux, nor during loading linux.

Re: mega man

Posted: Sat Jun 07, 2008 7:30 am
by Mega Man
devilinside128 wrote:I can not use the keyboard with Kernelloader, before running on Linux, nor during loading linux.
There is some general problem.

Did the adapter work with your computer? Did you connected it properly (keyboard and mouse exchanged)?

Posted: Fri Jun 13, 2008 10:54 am
by devilinside128
Hello, Mega Man
I'm happy because they might operate, the keyboard.
What happens is that a need modulate the UN "USBKEYBD.IRX." WITH LAUNCHELF runs it USBKEYBD.IRX and then the kloader_1.8.elf and runs on Linux and kloader_1.8.elf.


Now, I have to install the usb memory.
the format it is necessary usb and create partitions?.
I can say how it should do to install the usb?.

Posted: Tue Jun 17, 2008 8:07 am
by Mega Man
devilinside128 wrote:Now, I have to install the usb memory.
the format it is necessary usb and create partitions?
I can say how it should do to install the usb?.
You need to generate at least 2 partitions when you only have one USB memory stick.

1. MS DOS VFAT for storing blackrhino_baseimage-1.0.tar.gz and vmlinux*.
2. ext2 partition for installing Linux.
3. [optional] swap partition for more virtual memory (Don't expect that this would be fast).

See post by pip25 above.

You can create the partitions using your favorite Windows Partition Manager.

Posted: Tue Jun 17, 2008 10:17 am
by devilinside128
Hello, mega man
I count him that now I am using the kloader_1.7, because in the kloader_1.8, to weigh that the keyboard works in the kloader, he/she doesn't make it in the usb memory in the linux.

With the kloader_1.7 I can make the steps from 1 to the 9.
Next I describe him the steps that he/she carries out
7) to enter to the memory usb I place the following address:
fdisk / dev/scsi/host0/bus0/target0/lun0/disc
Then I proceed to eliminate all the partitions. Creating two partitions the first one with a space of 128 M, for a system of linux swap, and the second partition with VFAT system, with a remaining space of the disk.
8) I proceed to formatear the partition 1 of the system swap
fdisk / dev/scsi/host0/bus0/target0/lun0/part1
9) I proceed to formatear root partition
fdisk / dev/scsi/host0/bus0/target0/lun0/part2
10)creo a directory
mkdir / usb
--until here all well but when I Want to mount the usb memory...
I enter this way
mount - r / dev/scsi/host0/bus0/target0/lun0/part1/usb
... and it shows the following message:
mount: can`t find / dev/scsi/host0/bus0/target0/lun0/part1/usb in / etc/fstab or / etc/tap

--- * *... do I think that it is necessary to change the directory or something así,¿que can be passing in the step 11, mega man? .
Excuse for the nuisances and I wait a brief answer thank you

Posted: Wed Jun 18, 2008 8:42 am
by Mega Man
devilinside128 wrote:
mount - r / dev/scsi/host0/bus0/target0/lun0/part1/usb
... and it shows the following message:
mount: can`t find / dev/scsi/host0/bus0/target0/lun0/part1/usb in / etc/fstab or / etc/tap
There is a space missing before /usb and I think it is better to use part2:
mount - r / dev/scsi/host0/bus0/target0/lun0/part2 /usb

You need another partition for the source files (*.tar.gz).