Sites

Wikipedia
SlashDot
Gentoo Linux
Loop-AES Encryption
Geoiptool
Showing posts with label Gentoo. Show all posts
Showing posts with label Gentoo. Show all posts

Tuesday, June 9, 2009

Getting More Functionality From A PS3 W/Gentoo


I know sony has left us in the dark as far as hardware 3d acceleration because they are not allowing us to directly access the graphics hardware. So to still use the ps3 with more functionality you can with the use of another PC. Instead of running the Xwindows Server locally on the ps3, you can run it over ethernet on a PC. To even up that one I use a pc with dual monitor support and attach my 42in LCD TV. Ok so you are thinking how is this going to work? Well Xwindows in linux is the graphic user interface and it can be run on a remote machine, even Xwindows applications can be loaded on a remote Xwindows server without loading the whole Xwinows Theme. So what does this mean u can use the processor and space on the ps3 all while using the graphics card on your PC to display linux on your Windows PC. Forexample you may load firefox from a shell/terminal window from the PS3 and it will load firefox on my Windows PC running this product X-Win32. So I am going to help you with this process, I will not be going into the actual install of Linux on the PS3 this must already have been completed. Read this guide first to get gentoo on your PS3.


First you must download the evalution or Purchase a copy of X-Win32. This Product is great it has 3d hardware acceleration, OpenGL support Full Screen. Install the Xwin32 software once installed you need to creat a new Session in X-Config (X-Win32 Configuration).
Next you want to select SSH from the drop down menu, and give it a name mine is called PS3. Then Click Next,
On the next page it asks for host. This is going to be the ip of your ps3. Normally it will be in the 192.168.x.x range as most routers use this by default. Login and passwd is the user information on the PS3 gentoo box. Make sure you do not use the root account because this can be dangerous. On the Last page select the first in the List LINUX then click Finish. Now you need to make sure you have the XWin32 Server loaded there should be a icon in the system tray next to the time. Right Click on it Highlight My Sessions -> PS3 this should launch a xterm Terminal Window. You Have DONE IT! now u can just issue any command from this window. Issueing the command startx will load the full Graphical GUI and it will be all displayed over the lan onto your Windows PC. Also to Load another Xterm window type, xterm.

One more thing if you are receiving a 'Connection Refused Error' then make sure the sshd server is loaded and running on the ps3 gentoo machine. (On Gentoo, Issue a /etc/init.d/sshd start) To start the sshd daemon.


Have FUN!

Bookmark and Share

Monday, June 8, 2009

Installing Gentoo Linux (x86)

Ok, so lets get down to installing the best linux distro available. Some things we will need:
  • Internet Connection
  • CD/DVD Burner
  • PC
  • Minimum 4GB of Space
  • One Human
Alright now we are ready to rock n roll. Get the gentoo Install CD from HERE.
There is also a list of mirrors available Here.
Burn this onto a blank CD-R and then insert the cd into the PC we are installing
gentoo on.

Make sure the Bios is setup to boot from the CDROM before the HDD's.
The Bios can usually be accessed by pressing one of these keys on bootup:
F1 , F2 , F10 , F12 , del
Usually the bios will say press BLANK to enter setup. That is the key you should press
to enter the bios and change the boot sequence.

Now the PC should boot off the Gentoo Install CD, If its working correctly you should see
This:














Press enter It will continue to boot the Gentoo Install CD.
Once its done booting you need to configure your ethernet card to access the internet, most common cards will be detected on bootup. Issueing the Command:
ifconfig -a should show atleast one ethX interface.

After You have configure your ethernet card and can access the internet you may continue on.

I like to finish the installed from another PC over a ssh terminal.(/etc/init.d/sshd start) This makes it easy to just copy and paste the commands I will be listing. If not you can manually issue them one at a time.
So lets get started.....

Preparing the Disks

Now we are going to partition and format the Disks.
livecd ~ # fdisk /dev/sda  (/dev/sda is the main
harddisk in this case, but it can be different,
forexmple PATA drives are labeled HDx instead of SDx.)


Your Output May Vary
but as you

can see here
this disk has
no partitons yet.




Now we are going to create a 7gigabyte Partition for gentoo.




Now we need to do the same but this time we are creating about a 1Gigabyte Partition
for the swap system. Follow the same steps as above but you will now be specifying a smaller Size and after you will need to issue these commands to change the partition type
to Linux Swap. After follow the steps in the image below, issuing the w saves the changes to the
disk drive.
















Next Step, Create the file systems and activate swap

livecd ~ # mke2fs -j /dev/sda1
(sda1 is the first partition we created)
livecd ~ # mkswap /dev/sda2 && swapon /dev/sda2
(sda2 should be your swap partition)

Mounting the file systems:

livecd ~ # mount /dev/sda1 /mnt/gentoo
livecd ~ #
cd /mnt/gentoo


livecd gentoo # wget http://distfiles.gentoo.org/releases/x86/2008.0/stages/stage3-i686-2008.0.tar.bz2

livecd gentoo #
tar xjpf stage3*
(this extracts the file we downloaded)
livecd gentoo #
cd /mnt/gentoo/usr


livecd usr # wget http://distfiles.gentoo.org/snapshots/portage-latest.tar.bz2

livecd usr # tar xjf portage-lat*
(same thing extracting the file)

livecd usr #
cd /
livecd / #
mount -t proc proc /mnt/gentoo/proc
livecd / #
mount -o bind /dev /mnt/gentoo/dev
livecd / #
cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / #
chroot /mnt/gentoo /bin/bash
livecd / #
env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...


Time To Set Your TimeZone
(Using US/Eastern as an example)


livecd / # cp /usr/share/zoneinfo/US/Eastern /etc/localtime

Now We need to edit the /etc/fstab file,
all we are doing here is replacing the parition
names where there are currently /dev/ROOT,
and /dev/SWAP.

Should look something like this:












Almost done, Now we need to set the root password again
At the prompt type passwd root, then enter your desired
password.

livecd #
emerge syslog-ng (this installs syslog)

One last step before we take out the Boot CD and
reboot the PC. We need a bootloader to
load linux and or other OS's.

I think lilo is the easiest to work with so,
issue: emerge lilo this will download
and install the latest version of lilo.

now we need to edit the lilo.conf located in /etc/
nano /etc/lilo.conf


#lilo.conf
boot=/dev/sda
map=/boot/map
install=/boot/boot.b
compact
prompt
timeout=50
image=/boot/vmlinuz
label=Gentoo
root=/dev/sda1
read-only
other=/dev/sdb1
label=win
#end lilo.conf

now save it, and type lilo at the prompt
reboot and remove the CD and you are done.
Now you can move on to installing the
software you want.

Bookmark and Share

Gentoo PS3 Installation Continued

Ok, So now we have Gentoo running on our PS3. Now we can now install extra software, this is done by logging in and opening a terminal window.
From the Root Prompt# you can search for software by name with this command emerge --search package-name-here.
So if we want OpenOffice installed which is a office suite, we would issue this command:
emerge -av openoffice, this will then prompt us to continue with yes or no and it will also display the packages to be installed. This may list other software other then just openoffice which is require for OpenOffice to function. So go have fun!! enjoy your new found PS3 abilities.

Installing Gentoo on the PS3

I Love gentoo, it has to be the best linux distribution available & not to mention the fastest. Gentoo is known for speed mostly, because just about everything you install is compiled from source while being optimized for your specific Hardware. This is not the most user friendly distribution but once you have it configured it is easy to do upgrades/updates. Ok so here we go.
Things you need:
  • cd/dvd burner
  • blank disc
  • WIRED internet connection (wireless can be enabled after OS install)
Get the Gentoo Install CD Here
First Burn the ISO to the CD. Then Insert it into the drive.

Now you need to partition the ps3 harddrive to your liking which is dependent on how much space you require for the GameOS and Linux. This can be any of the options except All Space Reserved for GameOS(This would leave nothing for linux)
Now boot the game OS on the PS3, goto Settings ---> System Settings ---> Install Other OS
At this point the Ps3 should read the gentoo boot cd and install the bootloader.

After this is done, select Default OS Option from the System Settings Menu and select Other OS.
It will prompt you to boot the other OS now, select yes.

Now the ps3 should reboot and show a boot: prompt, press enter
Once finishes loading and you are at the root# prompt issue these commands one at a time.

First we Partion the Drive and Format it under Linux:
We are creating 2 partions one for the applications and storage the other for swap space.(In linux the swap space is created into a seperate partion on the harddrive instead of a file like windows uses.
livecd ~ # fdisk /dev/ps3da

The number of cylinders for this disk is set to 1305.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1305, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK
(1-1305, default 1305): +9000M

+9000M = 9GB or 9 gigabytes of space for the linux os.
Here we create the swap partition:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1096-1305, default 1096):
Using default value 1096
Last cylinder or +size or +sizeM or +sizeK
(1096-1305, default 1305):
Using default value 1305

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 82
Changed system type of partition 2 to 82
(Linux swap / Solaris) This changes the partition
type for swap.
Command (m for help): a
Partition number (1-4): 1
Command (m for help): p

Disk /dev/ps3da: 10.7 GB, 10737414144 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/ps3da1 * 1 1095 8795556 83 Linux
/dev/ps3da2 1096 1305 1686825 82 Linux swap / Solaris

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
livecd ~ #

Now its time to format the OS partition and the swap.

mkfs.ext3 -j /dev/ps3da1  (formats the Linux OS partition as EXT3)
mkswap /dev/ps3da2 (formats Swap Partition)
swapon /dev/ps3da2 (enables the Swap Partiton)

Ok now its time to get ready for the os to install, enter these commands one at a time
at the command prompt.

livecd ~ # mount /dev/ps3da1 /mnt/gentoo/
livecd ~ # cd /mnt/gentoo/
livecd ~ # wget http://gentoo.osuosl.org/experimental/ppc64/
stages/stage4-970-ps3_32ul.tar.bz2
the above command downloads a portion of the OS.
livecd ~ # tar -xjpf stage4*
livecd ~ # mount -t proc none /mnt/gentoo/proc
livecd ~ # mount -o bind /dev /mnt/gentoo/dev
livecd ~ # cp /etc/resolv.conf /mnt/gentoo/etc
livecd gentoo # chroot /mnt/gentoo/ /bin/bash
livecd / # env-update && source /etc/profile
livecd / # export PS1="(chroot) $PS1"
--- 'profiles/arch.list' is empty or not available.
Empty portage tree?
>>> Regenerating /etc/ld.so.cache...
Now we update the database of applications and software for Gentoo
(chroot) / # emerge --sync
After issuing this command it will download all the newest
Ebuilds(instruction files used by the software manager emerge)


Set the timezone

You first need to select your timezone so that your system knows where it is located. Look for your timezone in /usr/share/zoneinfo, then copy it to /etc/localtime. Please avoid the /usr/share/zoneinfo/Etc/GMT* timezones as their names do not indicate the expected zones. For instance, GMT-8 is in fact GMT+8.

(chroot) ls /usr/share/zoneinfo (Suppose you want to use GMT)
(chroot) cp /usr/share/zoneinfo/GMT /etc/localtime
the command ls lists a directory
the command cp copys a file
e2label /dev/ps3da1 /
Now we need to edit the bootloader config file
(chroot) / # cd /etc
(chroot) / # nano kboot.conf

Here is my Kboot.conf( only options that need to change is the
resolution this dependson the TV set you are using,
This is the format)
label='device:
initrd=device: kernel_options'
here is a list of different tv options
# 480i = ps3fb:mode:1
# 576i = ps3fb:mode:6
# 720p = ps3fb:mode:3
# 1080i = ps3fb:mode:4
# 1080p = ps3fb:mode:5
My kboot.conf:
default=gentoo

timeout=5
#This LINE BELOW SHOULD BE ALL ON ONE LINE!!!
gentoo='ps3da1:/boot/kernel initrd=ps3da1:/boot/initrd
root=/dev/ram0 real_root=/dev/ps3da1 init=/linuxrc
video=ps3fb:mode:1 rhgb'

#end kboot.conf

Ok now edit the /etc/fstab file with this command,
nano /etc/fstab

Change it to look like this:
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

#


# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/BOOT /boot ext2 noauto,noatime 1 2
/dev/ps3da1 / ext3 noatime 0 1
/dev/ps3da2 none swap sw 0 0
/dev/cdrom /mnt/cdrom audo noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
# use almost no memory if not populated with files)
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
none /spu spufs defaults 0 0

Now we need to set the root password
type passwd root then enter your password


Exit the chroot, unmount filesystems, and reboot

You can now exit the chroot in order to reboot. Be sure to unmount the filesystems prior to rebooting.

(chroot) etc # exit
# cd /mnt/ livecd mnt
# umount gentoo/proc/ gentoo/dev/ gentoo/ livecd mnt
# umount /mnt/usb/ livecd mnt
# reboot

Eject the Install CD when the PS3 power-cycles.

On Reboot Linux should load, Login with User : root and the password you picked.

First we need to edit your make.conf, this is located in /etc/

nano /etc/make.conf , Will open the file to be edited to exit the editor after finishing

press ctrl+x and say yes to saving the file. Here is my example make.conf for the PS3:

CFLAGS="-O2 -pipe -mcpu=970 -mtune=970 -mabi=altivec"
CXXFLAGS="-O2 -pipe -mcpu=970 -mtune=970 -mabi=altivec"

CHOST="powerpc-unknown-linux-gnu"

USE=" curl xml xmlreader apache2 cgi force-cgi-redirect php5 usb -cups altivec X fbcon ps3 gnutls opengl dbus jpeg png gnome eds esd
ssl spell glitz svg gtk gtk2 alsa oss hal truetype ldap fam server"

ACCEPT_KEYWORDS="~ppc ~ppc64"

#end make.conf



Then Issue a emerge --update --deep world

That will then download compile and upgrade all installed packages on your PS3