Installing a native GentooX on a formatted drive

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Installing a native GentooX on a formatted drive

Post by BoricAcid »

Hi,
I've installed Gentoo Linux previously on my xbox and it worked alright, but I've decided to try to install GentooX on it now, as the magic tool sounds great and some other features interest me. My partitions looks like this:

/dev/hda1 256mb swap
/dev/hda2 ~10gb reiserfs

What's the best way for me to install GentooX? I suppose I'll do a native install, but when I look around the docs and see things likes C: E: and F: drives mentioned and I must admit that i dont know how I should partition to create these. Do I do fatx partitions? or reiserfs will do fine? how many partitions?

If I should RTFM, please point me to the correct FM or post :P
Thanks
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

Since your drive is already set up I would burn the stardust CD and boot it in the xbox. Cancel the installer then extact the distro.rar from the CD in to your hda2 partition. Mount the rootfs and copy the contents on to your harddrive with "cp -avx". Patch linuxrc inside the initrd.gz (check the f-drive.b0x script on the main site for clues on how to do this). Flash your bios with the latest gentoox cromwell, and you should be sorted.
If you keep an open mind, will your brain fall out?
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Post by BoricAcid »

Thanks,
I'll look into it tonight and post here to tell how it went.

-edit- the latest gentoox cromwell would be the one with sparkle integration, right? If so, why would one need to download the whole Sparkle package to get just the bios? It would be neat to have a section to download just the gentoox cromwell
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

I think it's the same as the last cromwell with added sparkle so there would be no point in downloading it without sparkle, you may as well just get the old one.
If you keep an open mind, will your brain fall out?
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Post by BoricAcid »

Alright, I am progressing in the install, but I am not used to patching the initrd.gz file. I'm posting this partly to make sure all I do is correct and partly because others could follow these steps with more ease later on.

I've looked at the f-drive.b0x as you recommend.
i gunzipped initrd.gz, mounted it in loopback and edit the linuxrc file. that's where I'm a bit puzzled. It looks like all it does is mount the rootfs correctly so that it's contents are seen as the normal contents of a partition.

To me it looks as though i should simply remove most, if not all of the contents of the file. I already copied the contents of rootfs to my reiserfs partiton on the hard drive. It looks like the file should look like this:

Code: Select all

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/
export PATH

umask 022

mount -t proc none /proc
mount -t devpts none /dev/pts
echo 0x100 > /proc/sys/kernel/real-root-dev

mkdir -p /cdrom /ram /proc

insmod /lib/modules/`uname -r`/fat.o
insmod /lib/modules/`uname -r`/fatx.o

/etc/init.d/devfsd start
Also you dont mention the /etc/fstab file which obviously needs a facelift:
/dev/hda2 / reiserfs defaults,errors=remount-ro 0 1
proc /proc proc defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 defaults,ro,user,noauto 0 0
/dev/hda1 none swap sw

I'll be trying this setup in a couple minutes.. I'll post later on about how it goes.
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Post by BoricAcid »

Hmm. the bios wont let me boot from the hard drive, even if i do have a linuxboot.cfg file in the root of /dev/hda2 and that /dev/hda2 is bootable. help?
Bucko
Power user
Posts: 229
Joined: Mon Aug 11, 2003 4:14 pm
Location: England
Contact:

Post by Bucko »

Im surer this is possible, I know Xebian can format and install a whole hard drive, nobspangle should be able to help out.
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Post by BoricAcid »

I flashed the bios with the regular cromwell 2.30 from xbox-linux.sf.net and i can finally boot from the hard drive. The kernel seems to boot fine but the modules all have errors when loading, so no xpad or network for me when the "first boot" script starts, and I cannot do anything..
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

did you try the latest gentoox cromwell I know Shallax said he had added an option for the next stardust to install to the whole drive. The new cromwell may have that support. You're not supposed to be able to use the standard cromwell with gentoox because it doesn't support a large enough initrd.

If it's any help this is my linuxrc I edited for a belated native install. I don't know what that random "mount" on it's own is for I did this a long time ago, it's probablly my mistake.

Code: Select all

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/
export PATH

umask 022

mount -t proc none /proc
mount -t devpts none /dev/pts
echo 0x100 > /proc/sys/kernel/real-root-dev

mkdir -p /cdrom /ram /proc

insmod /lib/modules/`uname -r`/fat.o
insmod /lib/modules/`uname -r`/fatx.o

mount
mount -t reiserfs /dev/ide/host0/bus0/target0/lun0/part2 /ram
#mount -o loop /cdrom/rootfs /ram

# Switch roots and run init
cd /ram
pivot_root . initrd
/etc/init.d/devfsd start
#/sbin/hdparm -d 0 /dev/hda
if [ ! -p /dev/initctl ]
then
        rm -f /dev/initctl
        mknod -m 600 /dev/initctl p
fi
kill -USR1 1

umount -n /initrd/proc >/dev/null 2>&1
#exec chroot . /sbin/init <dev/console >dev/console 2>&1
exec chroot . sh -c 'umount -n /initrd >/dev/null 2>&1;\
exec -a init.new /sbin/init 2'\
<dev/console >dev/console 2>&1
If you keep an open mind, will your brain fall out?
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Post by BoricAcid »

nobspangle wrote:did you try the latest gentoox cromwell I know Shallax said he had added an option for the next stardust to install to the whole drive. The new cromwell may have that support. You're not supposed to be able to use the standard cromwell with gentoox because it doesn't support a large enough initrd.
I'm not sure which gentoox cromwell you mean when you say the latest, so i went with the one that comes packaged with the latest Sparkle.. that's the latest news I saw that mentioned an updated cromwell.

Now, it still wont let me choose to boot with the hard drive. However I have another tidbit of info that might be relevant.. the standard cromwell seemed to say my hard drive is still locked with a fatx MBR. Now that'd be probably all that's left in fatx in that drive.. should i look into unlocking the drive and update the MBR somewhat?

I suppose that shouldnt be necessary if I was able to go through with the standard cromwell and see it go wrong at modules loading...
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

I've seen a couple of posts that suggest the newest gentoox cromwell (the sparkle one) won't boot with a locked drive, you could maybe try with an older gentoox cromwell like the one in the pro 1.1 release if you haven't got one grab it here
If you keep an open mind, will your brain fall out?
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Post by BoricAcid »

No luck with that cromwell.

I'm thinking of restarting the whole process but switch the two partitions. So hda1 would be the 10 gig reiserfs partition, and hda2 the 256mb swap. I've got nothing to lose now, heh..
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

Give it a go but I wouldn't be too hopeful, I'm sure cromwell is only supposed to boot from the hda2 partition.
If you keep an open mind, will your brain fall out?
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Post by BoricAcid »

True enough, it didnt work. :(
I really wonder what I'm doing wrong..

Thinking back on all that I've done I realize that when i copy the contents of rootfs into the root of /dev/hda2 (lets say that's the reiserfs one), there is another linuxboot.cfg in the /boot directory. Would that confuse cromwell? Which one of the two should I keep?

Update: I tried both files (and renaming the other) and nothing.
BoricAcid
Novice
Posts: 20
Joined: Mon May 03, 2004 9:07 pm

Post by BoricAcid »

I finally made it work!

I needed standard cromwell 2.30. I found out that it uses the linuxboot.cfg located in /boot, and that this file would use a 2.4.20-xbox kernel that was in /boot instead of the 2.4.22-xbox that's in the root. So i changed the reference to the newer kernel. Also, I dont need any initrd.gz *at all*. The linuxboot.cfg in /boot had that correctly setup so I just left it at that. Those things explained my errors when loading modules that I had earlier. Different kernel versions wont like the modules if it isnt made for them :wink:

Now all works just fine and I'm running magic to update the system :)
Thanks for the help, nobspangle.
Post Reply