WiiLoaded.com - Wii Forum and News

Full Version: Let's put linux on something
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I put iPodLinux on my Mini and it went on successfully, it partitioned correctly but the Mini won't recognise the bootloader. You reboot it and it launches straight into its Apple OS, even holding rewind etc. won't boot Podzilla

drew102e Wrote:
was trying to build this old computer from parts (want to spend absolutely $0) to make a linux machine out of it,

so i take this old 8 gig HD, couple 64 mb ram simms, two old cd writers, NIC, pentium 3 motherboard, tower case, etc...

anywho, i get it all together and i keep getting this NTLDR error mssage, which i think means i have BIOS issues, i gave up, will work on it later


LOL pwn3d by BIOS

sry for being a noob...but wth is linux?
No mention of GC linux? For shame!

Although not exactly installed by me I'm being forced to find/compile powerpc binaries for linux on my Tivo. I was having trouble with a ramdisk driver and in the process of troubleshooting I found what I thought was hard disk corruption. I forced a bit that marked the file system dirty to force a GSOD. I think my swap partition is corrupted so Im now stuck in a continual reboot cycle Sad
Ive already bought a 500gb hard drive to replace the failing drive but Im afraid I might have to start the OS from scratch. That means I lose all of my hacks and such. The system has ran nearly 24/7 for four years with two 200gb hard drives so I guess it was time.

f5awp Wrote:
sry for being a noob...but wth is linux?

It usually refers to a group of operating systems as an alternative to Windows (or whatever default OS the system usually runs). One advantage most versions have is that everyone can help to make it better or solve problems - you don't have to wait for a service pack or update for a problem to be fixed.

In case anyone is interested -

The original series 1 tivo only had 16mb of ram and came with very little hard disk space. The kernel didnt even support drives over 137gb. The ROOT and VAR partitions are only 128mb each! The system had a default 64mb swap partition. Hackers at the time thought "we should increase the swap" so the standard was to create a 127mb swap partition.

I hacked my Tivo to have two 200gb drives and replaced the kernel with one that had larger drive support. Unfortunately 127mb of swap is not enough for the file system checker fsfix (similar to fsck) to run.

I literally stayed up all night and found a solution. I couldn't just add another swap partition because the disk was already full. I couldnt add a swap file to the large storage space because it was a custom file system. I tried so many different things that it would take a whole page to explain. Eventually my only hope was to try and get it working on VAR as a small file.

I used the command dd if=/dev/hdc8 of=/9/swap bs=1024k count=80 which copied the swap partition to a file and truncated it at 80mb. I then added a swapon /var/swap to the rc.sysinit right after var got mounted.

VOILA! 207mb of swap and the system is now able to continue the file system check. Previously it would just crash and reboot endlessly.
It's called modding, not hacking Wink

It's almost a shame how loosely the term "hack/hacking" gets tossed around. Oh well.

+rep for having more than a clue in linux (dd ftw) :XD
to hack is to program

just the press put a negative spin on the term back in the '95/'96 era and now its only really used for ugly or shady programming
I thought the term hacking gained a negative feeling in eighties? Maybe that was only phreaking.
So I found a hacked kernel for the Tivo that not only enables LBA48 support but also version 1 swap partitions! Meaning I can now have enough swap for FSFIX (like FSCK) to complete properly.

I am now experimenting on getting a working swap partition on /dev/hdb so that the database access doesnt conflict with swapping.

It was hell finding a tool that respected the byte swapped drives. MKSWAP and most other tools incorrectly initialize the swap partition without byte swapping enabled. The binary of mkswap that shipped with the tivo only supports version 0 swap partitions/files which have a limit of only 127mb.

The utility I used to replace the kernel also has the ability to correctly initialize version 1 swap files but it can only run against the A drive!!! I finally found an updated version of MKSWAP compiled to run directly on the Tivo that supports version 1 swap partitions.

I had 13mb of unpartitioned space left on the B drive so I used it as a test to create a new version 1 swap partition. I edited FSTAB then rebooted.... sigh ts completely ****ing dead.

Time to pull the drives!


Edit: This is getting really lame. I've swapped drives between he PC and Tivo at least 15 times already (perhaps more). Without kernel logs (or any other logs) this is really hard to troubleshoot. I've narrowed it down to a problem with the fstab but I cant figure out what Im doing wrong. Luckily I have a backup of the original hard drive so I finally mounted that drive and made a copy of the factory FSTAB file. Now its finally booting but this doesnt take my new swap configuration active Sad

I do have it connected to a slingbox so I can at least do all this work without tying up the TV the entire time.

edit2:
I wanted to post this for anyone else who finds my post later on.

The Tivo does NOT support more than one swap entry in the FSTAB!

I tried for hours every combination of swap layouts/configurations in the fstab. No matter how you form the entries the tivo will never boot if the fstab is edited to list more than one swap entry. Its hard to troubleshoot because no logs are created (since its so early in the boot process). You have no fricking idea how many times I swapped the drives between my PC and the tivo......

There is a workaround though! I didn't want to only list the swap partition on the B drive so instead I did the following -

Modify the fstab swap line options to give /dev/hda8 a priority number

Code:
/dev/hda8 swap swap    sw,pri=3 0 0


Then at the top of your rc.sysinit add the following line (with the appropriate location)

Code:
swapon -v -p 5 /dev/hdb4


This makes the TV add the extra swap an the -p 5 gives it a higher priority (used first) over the original swap with priority 3

I've tested this on an S1 and verified it works. If you are still using the stock kernel this method allows you to create multiple swap files upto 127mb each and should allow mfsfix GSOD to complete (similar to fsck)

Can anyone verify that the rc.sysinit is started when a GSOD is initiated?

I wanted to post this for anyone else who finds my post later on.


edit3: Kernel log entries to prove this from my most recent reboot

Code:
Jan  1 00:03:18 (none) kernel: Activating swap partitions
Jan  1 00:03:18 (none) kernel: Adding Swap: 716796k swap-space (priority 3)
[i](time passes as other items are loaded)[/i]
Jul 31 06:12:58 (none) kernel: Adding Swap: 13492k swap-space (priority 5)

I believe you duped a couple of paragraphs at the end
I was just making sure you were reading it Wink Dammit the site is slow right now...

I THINK I'VE DONE IT. I can now add the additional swap at the beginning of the /dev/hdb! Here are the steps I took -

My drive layout when connected to the PC is as follows
/dev/hda - 40gb original unmodified Tivo drive
/dev/hdb - MFSLive CD
/dev/hdc - New A drive for Tivo
/dev/hdd - New B drive for tivo
/dev/sda1 - usb stick for files not included on MFSLive cd (new kernel, modified mkswap etc..)

Previously my backup|restore went at around 1.5mbps. I used "hdparm -a 255 -c 1 -k 1 -m 16 -S 0 -u 1 /dev/hda /dev/hdc /dev/hdd" to speed it up. Do not enable DMA as it breaks bite swapping

Create the correct layout on the B drive the long way

Code:
backup -qso - /dev/hda | restore -s 700 -r 4 -xzpi - /dev/hdc /dev/hdd


Delete the Tivo partitions so the B drive only has 1 partition type "apple_partition_map" name "apple

Code:
pdisk /dev/hdd
d (delete)
2 (application partition
d (delete)
3 (media partition


Reimage A drive without B drive (use the up arrow so you don't have to type it again)

Code:
backup -qso - /dev/hda | restore -s 700 -r 4 -xzpi - /dev/hdc


Create new swap partition on B drive

Code:
pdisk /dev/hdd
C (upper case - create partition with type)
64 (starting block of free space)
1440000 (length in blocks - tried to get 700mb end up with 713mb)
"Linux Swap" (name of partition and the quotes are necessary!)
Swap (type of partition)
C (create)
1440064 (start of application partition)
2048 (length results in 1mb)
"New MFS Application" (name, don't forget quotes)
MFS (type)
C (create)
1442112 (start of media partition)
389279856 (rest of remaining space on drive)
"New MFS Media" (name with quotes)
MFS (type)
w (save changes)
Y (yes to overwrite)
q (quit)


Now you can add the new space

Code:
mfsadd -r 4 /dev/hdc /dev/hdd3 /dev/hdd4


Using a modified version of mkswap which supports bite swapping is the only way to accomplish this on the PC. Otherwise even with byte swapping enabled on the boot cd it WON'T WORK. You can skip this step if you have a modified version of mkswap on the tivo that can create version 1 swap partitions.

Code:
mkswap -S /dev/hdd2

thoughts?
edit: Oh yeah don't forget to copy over a modified kernel that supports both lba48 AND version 1 swaps or none of this will work.

Take note of the recording capacity Smile

I finally got the 512mb ram drive and network adapter working right so now I can install the webserver an enable mode0 recording.
damn, I wish TiVo was sold in the UK :'(
Hehe, guess where else I've been posting this information
http://www.tivocommunity.com/tivo-vb/for...y.php?f=14
The TIVO UK forum of course. You can probably grab one cheap if you look around.
If I look around, sure, but not cheap. no way. £400 for an un-modded box. plus a lifetime sub (£200) thats about $1200 right off.
I was reading a post yesterday on that forum about how someone got a lifetime subbed unit for £180

D4rkDrago0n Wrote:
to hack is to program

just the press put a negative spin on the term back in the '95/'96 era and now its only really used for ugly or shady programming


I know. He's talking about Linux though. I saw no mention of programming. Smile

.

ciper Wrote:
I was reading a post yesterday on that forum about how someone got a lifetime subbed unit for £180


geez, really?

*goes to eBay*

Read this http://www.tivocommunity.com/tivo-vb/sho...p?t=354302


Back to the linux topic. Im trying to find a way to benchmark the speed of the hard drives. Can anyone help? So far this is all I can come up with.

Code:
echo "start 50mb write"
time dd if=/dev/zero of=/var/hack/testfile bs=50000k count=1
echo "start 50mb read"
time dd if=/var/hack/testfile of=/dev/null bs=1000k
echo "size of file in kilobytes"
ls -k -s testfile | cut -d ' ' -f 1
rm /var/hack/testfile

Problem is I cant use it to test the B drive since it has no normally writable file system. The only thing I could do was a read test like this
time dd if=/dev/hdb2 of=/dev/null bs=1000k count=50

Pages: 1 2 3 4 5
Reference URL's