dust08 Posted November 9, 2022 Author Report Share Posted November 9, 2022 I'm guessing that it must still just be due to 64mb vs. 128mb ram on my xbox. So I'll try and shrink the size of the kernel and initramfs even further, maybe see if I can free more memory once the initramfs is loaded as well. I'm going to be pretty busy with work the rest of the week but I'll try and compile a new kernel and make a new kernel this weekend, I need to make a new kernel anyways because this one is definitely not as optimized as it could be. Quote Link to comment Share on other sites More sharing options...
Natetronn Posted November 9, 2022 Report Share Posted November 9, 2022 (edited) This might be the excuse I need (and who needs one, right?) to finally do LFS. Edited November 9, 2022 by Natetronn Quote Link to comment Share on other sites More sharing options...
dust08 Posted November 9, 2022 Author Report Share Posted November 9, 2022 I've been thinking of doing the same for the xbox lol. Might be difficult with needing to compile without sse2 though, I need more practice with with setting up the toolchain from scratch with all sorts of custom flags. Quote Link to comment Share on other sites More sharing options...
KaosEngineer Posted November 10, 2022 Report Share Posted November 10, 2022 alpine doesn't boot on my 64MB Xbox either. I'm using the latest xromwell from XboxDev github.com repo - release: build-20220802-bf9dc2a. However, it does seem get a lot further with a standard definition composite AV cable connected then with a high-definition component AV cable. But, reading the text on the screen is near impossible to do. It's so tiny and blurry. Edit: No, it's not. It does get stuck here: tar: can't open '/e_drive/alpine/rootfs.tar.gz' : Connection aborted mount: mounting /dev on /newroot/dev failed: No such file or directory mount: mounting /proc on /newroot/proc failed: No such file or directory mount: mounting /sys on /newroot/sys failed: No such file or directory switch_root: can't execute: '/sbin/init': No such file or directory Is the path to partition1 on the Xbox hard drive to be /e_drive/ or /e/? Quote Link to comment Share on other sites More sharing options...
Natetronn Posted November 10, 2022 Report Share Posted November 10, 2022 (edited) I forgot to mention that I get stuck in different places when using xromwell vs gentoox. Not sure it matters right now, but can post up the spots (errors) if you want that info at some point. That was just my initial testing to see if one worked and the other didn't. I'll just stick to the latest xromwell to stay in sync, though. Edited November 10, 2022 by Natetronn Quote Link to comment Share on other sites More sharing options...
dust08 Posted November 10, 2022 Author Report Share Posted November 10, 2022 (edited) Ok I think I might have figured it out through some testing. I managed to recreate the error even on my 128mb box by stressing the memory in the initramfs. Seems there is some odd behavior with the fuse driver and virtual memory/memory managment that leads to the tar failing to extract/corrupting,or being truncated even with lots of swap, difficult to diagnose exactly what's going on... seems it might have to do with dirty pages or io contention? It even happened with the unchanged initramfs on about 1 out of 50 boots with 128mb of ram. I'm curious if with enough attempts it would eventually boot on a 64mb box because it seems to vary where it fails each time around. So my next idea is to use yet another cache drive to move the archive too before extracting so it can use a filesystem in the kernel should be much more stable, a lot easier than troubleshooting fuse or fatxfs. Also found a way to free another 10mb ish of memory once the initramfs loads which should help. Still pretty busy but I'll try and make the changes and upload when I can If anyone has a 128mb box could you test just to make sure it's at least booting on other 128mb systems? Edit: looking at your screenshot @KaosEngineerI'm wondering if the way the drive is partitioned or bios patched for partitioning makes a difference i.e. the LBA48 patch, XBpartitioner tables, Titan, Cerbios, stock with the f takes all 137gb limit, etc. there's a lot of different ways of formatting the drives, I don't understand completely what fatxfs supports, if anyone understands the code maybe could look into it? https://github.com/mborgerson/fatx I'm on ind-bios with the LBA48 patch and a XBpartitioner table Edited November 10, 2022 by dust08 Quote Link to comment Share on other sites More sharing options...
dust08 Posted November 11, 2022 Author Report Share Posted November 11, 2022 (edited) Alright another version here. I changed up a good bit on the initramfs, everything else is the same. I'm 90% sure this should finally boot now on 64mb xboxes. Sorry about the long startup and shutdown times but maybe I can try squashfs or some other solution in the future and see if I can speed things up. Please give it a try if anyone can: https://drive.google.com/file/d/14C07TJ1an-kwCVvnBnN5vcLLIeKckfSj/view?usp=sharing Edited November 11, 2022 by dust08 Quote Link to comment Share on other sites More sharing options...
dust08 Posted November 11, 2022 Author Report Share Posted November 11, 2022 Well I got a report of someone successfully booting on a 64mb box! Hurray! However they don't have a mouse and keyboard so just fyi you do need a usb cable with mouse and keyboard. And I should have posted before but username is "user", and password is "xbox". Quote Link to comment Share on other sites More sharing options...
Natetronn Posted November 11, 2022 Report Share Posted November 11, 2022 Okay, I'm seeing "neofetch"! I'll report and update this comment after I have some time to login and get things setup... Quote Link to comment Share on other sites More sharing options...
dust08 Posted November 11, 2022 Author Report Share Posted November 11, 2022 So I tested boot over and over again and still hit the tar short read error once. So seems that sometimes for unknown reasons it just fails to make it still but ah well just reboot if you get an error and try again I guess. Quote Link to comment Share on other sites More sharing options...
dust08 Posted November 11, 2022 Author Report Share Posted November 11, 2022 6 minutes ago, Natetronn said: Okay, I'm seeing "neofetch"! I'll report and update this comment after I have some time to login and get things setup... Awesome! Alpine has a huge package repository, a lot need sse2 instructions though... so if you get anything crashing with illegal instruction, SIGILL that's the reason. If you want to more permanently install you can create a G drive then write down the starting sector of it (can find in XBpartitioner in hexidecimal so will need to convert) then remove the G drive and set up a loop partition to run fdisk on with losetup -Pf --offset <offset in bytes which is sectors times 512> /dev/sda. The drive will be on the first loop device available which would you can show by just entering losetup with no arguments. Just run fdisk /dev/loop<number> and you can partition and install whatever distro you want to it as long as you have a rootfs tarball you can extract to it. Gentoo handbook gives you good instructions that can be generalized to other distros. You would probably need to make a custom initramfs though and feed it a custom init script to mount your loopback root because I'm not sure if any tools like dracut support a loopback boot with offset out of the box. Quote Link to comment Share on other sites More sharing options...
Natetronn Posted November 12, 2022 Report Share Posted November 12, 2022 (edited) Yeah, it failed once on a tar error again for me as well, but I did get in and was able to use the GUI. Background image didn't paint in full, only the top half and the dock at the bottom isn't all there and windows go out of screen at the top. This seems to be an issue in most of the Linux distros for Xbox, where you can't see everything on the screen. I think with a couple more touches it will be a nice little distro, though, so thanks for putting out there for us! Edited November 12, 2022 by Natetronn Quote Link to comment Share on other sites More sharing options...
Bowlsnapper Posted November 12, 2022 Report Share Posted November 12, 2022 Yes, for the love of god, don't stop working on this. You're doing frickin fantastic. Keep up the pace you have been, man. I gotta get this going if it boots now. Quote Link to comment Share on other sites More sharing options...
dust08 Posted November 12, 2022 Author Report Share Posted November 12, 2022 (edited) 6 hours ago, Natetronn said: Yeah, it failed once on a tar error again for me as well, but I did get in and was able to use the GUI. Background image didn't paint in full, only the top half and the dock at the bottom isn't all there and windows go out of screen at the top. This seems to be an issue in most of the Linux distros for Xbox, where you can't see everything on the screen. I think with a couple more touches it will be a nice little distro, though, so thanks for putting out there for us! What resolution are you in? I have it set up to paint to the same framebuffer as xromwell/cromwell set up, so whatever dimensions the boot screen is at will be what you get for Alpine as well. The background is a 4:3 one since that's what I was using it on, you can grab a 16:9 one and just name it wallpaper(although I thought I had it set up to auto scale), then put it in the alpine folder to change it. As far as windows going off the screen that's why I had to use fluxbox, you can hold ALT then click and drag it back onto the screen so you are able to resize to where it fits, everything these days is set up to default for 1080p or higher resolutions so most will launch outside the screen like that. If you right click and remember size on the window then it should remember the dimensions the next time it launches. Edit: just to be certain I just tested in 720p and got the same issues with part of the start menu and background being cut off you described. I fixed it by going into the MS dash turning on 720p then turning off 480p and 1080i , left on normal mode. I now get the proper screen size. Edited November 12, 2022 by dust08 Quote Link to comment Share on other sites More sharing options...
dust08 Posted November 12, 2022 Author Report Share Posted November 12, 2022 5 hours ago, Bowlsnapper said: Yes, for the love of god, don't stop working on this. You're doing frickin fantastic. Keep up the pace you have been, man. I gotta get this going if it boots now. Oh I'll keep messing with it but I'll probably slow down some now, I'm pretty limited with what Alpine has since their 32 bit target seems to be pentium 4 or higher and we are on pentium 3. I would need to set up an alpine dev environment for compiling apks from source to get more apps working which would be a big learning curve... or I might look into other distros that have better pentium 3 support like antix, arch 32 bit, t2 linux, etc. but then it would be difficult to squeeze them into the cache partitions and a tar archive for the hacked up boot method I'm using. I think my favorite option is to look into doing an embedded Gentoo their portage package manager makes it so easy to compile from source with the proper flags, make custom ebuilds, a bin host etc. Just need to look into stripping it down for the space constraints. Another issue right now is I can't figure out audio. I'm starting to think it needs a kernel level patch which is a bit beyond me but I'm learning some basic coding now and understanding how to read it better, maybe I'll try and find the old xbox linux patches and see how they fixed Alsa. 1 Quote Link to comment Share on other sites More sharing options...
Natetronn Posted November 12, 2022 Report Share Posted November 12, 2022 6 hours ago, dust08 said: ... Edit: just to be certain I just tested in 720p and got the same issues with part of the start menu and background being cut off you described. I fixed it by going into the MS dash turning on 720p then turning off 480p and 1080i , left on normal mode. I now get the proper screen size. Oh good thought. I always have 1080i turned off, but 480p is for sure turned on. I'll test and report back here shortly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.