Large Drive Usage Solution

Talk about anything related to Gentoox or Gentoo.
Thanos
Linux User
Posts: 15
Joined: Tue Nov 11, 2003 9:16 pm

Large Drive Usage Solution

Post by Thanos »

First, I'd like to thank Terra for all her help, as she gave me a starting point to figuring this all out. More information on running Gentoox from drive G: can be found on the following thread:
viewtopic.php?t=406

I noticed that there were a few questions in this forum, and other newsgroups regarding LBA48 support on a few drives that produced odd errors. Dealing with the same problem, and not finding any solutions, I've tried to come up with some kind of explanation and a general guideline to making things work.

First off, I'm working with an Xbox v1.3 with an X-BIT mod, and a W.D. Special Edition 160GB Locked. I'm using Evox M7 w/ LBA48 support Partition 6 uses 137Gb, Partition 7 takes the rest.

When booting up the Linux Kernel, I get an error during the blue boot screen indicating that my drive did not support the LBS48 and it had a max 28bit support (although I know it has LBA48 support). I found out that the LSB stands for Linux Base Project which basically sets guidelines for Linux distributions, but it did nothing to explain this problem. This error may also be some hint to the underline problem.

1) Installation using Shallax Stardust directly onto drive F (non-native) will fail no matter what configuration I use. I have tried Ctrl-C out of the install program and mounting the f drive using FATX, and I noticed that the whole drive appears garbled when doing a simple directory listing. Installation onto drive E works without a problem. I'm not sure what the cause of the installation problem is, but the error involves some kind of write failure to the drive, which could be related to the inappropriate reading of the drive contents. Nonetheless, I installed gentoox on drive E and proceeded.

2) After gentoox was installed, I noticed odd behavior on the FATX partitions. Gentoox could not write filenames that there long and contained characters such as ()_. in them. Short filenames and directory names worked, however. The long filenames worked in the reiserfs partition created in the rootfs as well. Seeing that I like to use my xbox for some applications that use long filenames and use a lot of disk space, I sought out to use my G drive as the storage drive. I also decided that my F drive was plenty of space for my Gentoox installation, games, and general applications, so I would format my G drive as a reiserfs partition.

3) I moved the file system to drive F using magic. I disabled G drive support from the EvolutionX config file, and then formatted and mounted the G drive using:

Code: Select all

mkreiserfs /dev/hda56
mkdir /mnt/gdrive
mount -t reiserfs /dev/hda56 /mnt/gdrive
I wanted to make sure that the mount worked before I added it to the fstab file, since I messed it up once which made me reinstall gentoox because of a boot failure and a superblock error. Once I tested it, I added the following line to /etc/fstab

Code: Select all

/dev/hda56   /mnt/gdrive   reiserfs     defaults        0    0
I also disabled KDE since my box runs MUCH faster without it running in the background. I use just the console, so there was no point to running KDE.

You can also place the rootfs onto the G drive as Terra did in the previous post, but depending on how much room you want to have available, and how big your drive G is, it may benefit you to leave it on drive F if you don't do that many disk operations with it.

I hope this has helped answer some questions and served as a guide for those large hard drive peoples :wink:
Thanos
Thanos
Linux User
Posts: 15
Joined: Tue Nov 11, 2003 9:16 pm

Post by Thanos »

I just wanted to add that it would probably be wise to perform a magic update of the kernel and emerge any updates prior to mounting the G drive. In other words, right after you move the filesystem to whatever drive you want to keep it on, update everything, and THEN mount the G drive.

I'm not sure if there was some kind of instability after mounting my G drive as a reiserfs, but magic crashed in the middle of the update, and I had to reinstall Gentoo again.

An idiot can learn from his own mistakes, but a wise man learns from others'.
Thanos
newjeepr
Linux User
Posts: 10
Joined: Thu Nov 20, 2003 3:55 am

Post by newjeepr »

I would like to point out that, using Terra's research, you can modify the xbox.c program in fs/partitions to add support for 48 (it once had it and "they" removed it). This is what I did and after recompiling the kernel, I was able to read a large (200GB) F partition flawlessly from both linux and evox.

This took care of what you mention in 1. With the garbled directories and such.

I am using my Xbox mostly for games and smb sharing so I did not research much about the g drive. I wanted all the space in F.
Thanos
Linux User
Posts: 15
Joined: Tue Nov 11, 2003 9:16 pm

Post by Thanos »

Well, I think the biggest problem is the compatability of the FATX and the Linux Kernel which doesn't allow long filenames. At least, this was my biggest problem. I'm still trying to find out if it's a general limitation of Fatx or if it's the kernel. I guess a quick way to find out is to FTP a file through Evox's FTP server and see if it accepts an otherwise errored out filename handle in Gentoox.

I understand the use of drive F through recompiling the kernel, but I would rather have a native partition on drive G to speed things up a bit.
Thanos
newjeepr
Linux User
Posts: 10
Joined: Thu Nov 20, 2003 3:55 am

Post by newjeepr »

I haven't really paid attention to the filename lengths that I've copied, but I've done alot through samba within linux to the fatx drive. I'll have to check some of the names.

On a side note, I just got through recompiling my PC's kernel having added in support for the xbox partition and fatx. Hooked up the xbox harddrive to the PC and presto! I know, it's probably boring stuff, but I'm having a good time :-) Now I can backup straight harddrive to harddrive. No more all day transfers over the network.
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

what do you mean by long filenames?
If you mean simply ones with spaces you need to put a \ before the space on the linux filesystem
i.e.

my favourite file.jpg (on fatx) becomes
my\ favourite\ file.jpg (on linux)

This is how samba sorts the names.
If you keep an open mind, will your brain fall out?
Thanos
Linux User
Posts: 15
Joined: Tue Nov 11, 2003 9:16 pm

Post by Thanos »

Actually, my problem is with the software that uses these filenames. The filenames include underscores, periods, and parenthesis in the filenames, and it appears as though the OS can not write the filename to disk on a FATX system, but works perfectly fine in the reiserfs partition.
Thanos
silvr-
Newbie
Posts: 4
Joined: Sat Jan 24, 2004 9:51 am

compiling support for hdd >137gig into the kernel

Post by silvr- »

newjeepr wrote:I would like to point out that, using Terra's research, you can modify the xbox.c program in fs/partitions to add support for 48 (it once had it and "they" removed it). This is what I did and after recompiling the kernel, I was able to read a large (200GB) F partition flawlessly from both linux and evox.
I have a 250 gig hdd and I'm very curious to know the procedure you used to accomplish this, you said you modified xbox.c, I checked out the link to it in Terra's post, it compared v1.11 vs v1.12, 1.11 being the version without the lba28 limitation. Did you just use a prior version of xbox.c or did you add in some of your own code? Could you give me a method for achieving this? I have gentoox v3.0c home and just issued the "magic" command which has updated my system a bit. Thanks for any info.

silvr
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

there is a post about what newjeeper did but to summarise he just commented out the new lines of code in xbox.c then recompiled
If you keep an open mind, will your brain fall out?
knoweffex
Linux User
Posts: 18
Joined: Tue Jan 20, 2004 10:08 pm

Post by knoweffex »

the xbox's fatx filesystem has a 42 character limitation as well as many special characters such as commas and *'s, so it will not let you write a file to it with a larger filename, this includes the extension of the file from what i've seen, hope that helps :)
silvr-
Newbie
Posts: 4
Joined: Sat Jan 24, 2004 9:51 am

boot loader

Post by silvr- »

I'm trying to use newjeeprs method of commenting out the appropriate lines in /usr/src/linux/fs/partions/xbox.c , and recompiling the kernel. I commented out the lines used my old .config file as a reference for the new one and successfully compiled the kernel and made/installed the modules as well. I put my new kernel, config and System.map in /boot and changed the symlinks in boot to point to the new kernel and config, do i now have to edit something in grub? i've never used grub before but i know after compiling on my laptop i edit my lilo.conf and run lilo, when i try to invoke the "grub" command i get a segfault. i tried rebooting my xbox but i think it's still using the old kernel, anyone know how to finish up the new kernel install? thanks.

silvr
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

with gentoox the system is slightly different the kernel goes on the root of the E drive and is named vmlinuz
first off rename vmlinuz on your E drive to something else such as oldlinuz then copy your bzImage file to the E drive as vmlinuz
If you keep an open mind, will your brain fall out?
silvr-
Newbie
Posts: 4
Joined: Sat Jan 24, 2004 9:51 am

Post by silvr- »

I have successfully compiled /usr/src/linux/fs/partitions/xbox.c, version 1.11 into the kernel, this was the first version of the code available before the change was made to limit the size of F to lba28 which would not allow contents of this partition be correctly displayed, read or written if it was greater than 137gig, mine is about 230.

Code: Select all

Xbox root # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/loop/0           3.0G  2.0G  1.1G  65% /
/dev/loop/0           3.0G  2.0G  1.1G  65% /
/dev/hda50            4.8G  3.5G  1.3G  74% /mnt/fatx/e
/dev/hda55            226G   45G  182G  20% /mnt/fatx/f
i was going to show a listing of my contents in F but they are mostly roms/homebrew stuff which might be considered inappropriate content on the board. not sure how stable this is, but if anyone wants to know the exact procedure let me know

silvr
hpmailman
Newbie
Posts: 2
Joined: Tue Dec 30, 2003 11:29 pm

Post by hpmailman »

I need a little help please, I modified the /usr/src/linux/fs/partitions/xbox.c, but I bon't know how to re-compile kernel?

using Home 3c w/250gb drive

Thanks
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

Code: Select all

cd /usr/src/linux
make dep && make clean bzImage modules modules_install
mv /mnt/fatx/e/vmlinuz /mnt/fatx/e/oldlinuz
cp /usr/src/linux/arch/i386/boot/bzImage /mnt/fatx/e/vmlinuz
Watch out for the capital I in bzImage
Then reboot your box, if it fails to boot delete vmlinuz from the E drive and rename oldlinuz to vmlinuz (this restores your old kernel)
If you keep an open mind, will your brain fall out?
Post Reply