Relating HDA1 / 2 to HDA55 / 56 for native partition

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
Post Reply
icon
Newbie
Posts: 4
Joined: Tue Jan 13, 2004 1:03 pm

Relating HDA1 / 2 to HDA55 / 56 for native partition

Post by icon » Tue Jan 13, 2004 1:21 pm

Sorry if this is going to be a brainless noob question but I am a linux virgin. Ive been searching and not found anything to answer my question.

I basically want to install my gentoox to G: natively
Im running a 1.3 xbox with Xecutor 2.3 + X2 4980.67 bios 160 gig HD split with F & G and booting gentoox from evox dash. Kernel is 2.4.240 i think from memory probably wrong

I have read the various posts from Terra and Nobspangel and im starting to pick up what i have to do but i am at a total loss as to how to relate the /dev/hda55 / 56 drives to the native linux partitions HDA1 / 2

Is HDA 1 / 2 like a virtual partition within the xboxes physically partitioned drives hDA55 / 56

I am trying to work out how I can partition the g: drive so it will have a swap and rootfs. All the commands ive tried so far has resulted in me banging my head :) eg...
FDISK /dev/hda56 - created a partition called /dev/hda56p1 ... then if it try to format that it says it doesnt exist.

Also tried the mkpartition script that shallax created... The xbox does somathing but I cant tell if it had created the relevant partitions..Once that is done how do i access them ? do I use the mount command

Once i have them created i hope i can copy all the rootfs files accross and then edit the fstab file and possibly linux.cfg ???

Thanks for any pointers Im going round in circles :(

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

Post by nobspangle » Tue Jan 13, 2004 5:48 pm

First let me say this is only a theory as I don't have a HD > 137GB to test it on. Secondly all this is just rehashed from other info already posted

The xbox partitions are set in the xbox bios these are the hda50-hda56 the linux partitions are like standard partitions set on the disk itself. The 'trick' is to create the linux partitions in the same space normally occupied by hda56. The last sector you can address with LBA28 is FFFFFFF in hexidecimal or 268435455 in decimal. Therefore I am assuming the first sector of the fatx g drive is 268435456.

First off zero the partition table

Code: Select all

dd if =/dev/zero of=/dev/hda seek=268435456 bs=512 count=1
Then you need to use fdisk to create you partitions the gentoo install manual on http://www.gentoo.org has a very good explanation on how to use fdisk I suggest reading it here I will just give the commands enter each one followed by enter if there are already partitions on the disk you will need to delete them this can be done by borrowing a section from shallax's script

Code: Select all

echo -e "d\n1\nd\n2\nd\n10\nd\n9\nd\n8\nd\n7\nd\n6\nd\n5\nd\n4\nw" > /tmp/make.fdisk
fdisk /dev/hda < /tmp/make.fdisk
then you need the code for fdisk

Code: Select all

fdisk -u /dev/hda
n
p
1
268435456
+256M
n
p
2
268935457
<just hit enter her for default>
t
1
82
a
2
w
then the following code to make the swap and reiser partitions

Code: Select all

mkswap /dev/hda1
yes | mkreiserfs /dev/hda2
now you have two partitions ready for you to move your gentoox data into. You will have to boot into the stardust installer to copy the data over from the rootfs into the /dev/hda2 partition and you will need to edit the initrd.gz and your fstab
Last edited by nobspangle on Sat Sep 11, 2004 9:35 am, edited 2 times in total.
If you keep an open mind, will your brain fall out?

icon
Newbie
Posts: 4
Joined: Tue Jan 13, 2004 1:03 pm

Post by icon » Tue Jan 13, 2004 11:23 pm

Aha thanx nobspangel you have found the bit i was missing... :)

The DD command to zero the partition table....

I take it this points the start of HDA1 to the sector 268435456 which hopefully is the G partition :)

I will give that a go

Can i come back and ask advice again if i come a cropper with the last bit of copying the filesystem over..

Thanx very much :)

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

Post by nobspangle » Wed Jan 14, 2004 8:14 am

zeroing the partition table simply removes the FATX string from the start of the g partition.
The important bits are the sector start values in the fdisk section, also when you tried fdisk before you were using "fdisk /dev/hda56" when you use fdisk you just enter the drive (not the partition) so "fdisk /dev/hda" here it is also important to use the -u switch so that fdisk works in sectors rather than cylinders
If you keep an open mind, will your brain fall out?

ZhivaRebirth
Newbie
Posts: 3
Joined: Tue May 09, 2006 7:22 pm

Done that but...

Post by ZhivaRebirth » Mon May 15, 2006 9:25 pm

Trying to do it.

But how do i mount rootfs as a loopback if gentoox MCE doesnt has one.

Instead it has a MCE.tar file which i can not mount as a loopback using:

# mount -o loop /mnt/hda2/MCE.tar /mnt/loopback

Should i try to :

# tar -x -v /mnt/hda2/MCE.tar ????


And then cp the contents of the TAR ????

orochi
Gentoox Guru!
Posts: 606
Joined: Sun Oct 24, 2004 8:11 am

Post by orochi » Tue May 16, 2006 5:19 am

you would need to mount "rootfs" as a loopback, typically this is in /mnt/fatx/e/rootfs if your booting from it, else you would need to locate where your rootfs is and mount it

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests