Replace Dvd w/hardrive, why hardly mentioned? Really easy.

Talk about anything related to Gentoox or Gentoo.
Post Reply
antiflag1980
Novice
Posts: 23
Joined: Thu May 27, 2004 9:59 am
Location: cincinnati, OH U.S.
Contact:

Replace Dvd w/hardrive, why hardly mentioned? Really easy.

Post by antiflag1980 » Tue Aug 03, 2004 6:08 pm

So I just decided a few minutes ago to try to hook up a second harddrive to the xbox that was formatted with ext3 and has a manrake installation on it from my pc. Cromwell didn't detect the second harddrive, but I let Gentoox boot anyway, so I figured I'd try to mount it, so I typed:
mkdir /mnt/hdb1
mount /dev/hdb1 /mnt/hdb1
And what do ya know, it works perfectly, I can browse my mandrake installation in gentoox, haven't tried copying any files back and forth yet, but I don't see why I would be able to check out the files or even mount it in the first place if it wasn't going to work totally. So what I want to know is, since this works perfectly, why does cromwell not detect it and say error 4 or something like that. Also why are there no options ever even mentioned about a possible hdb installation, because anyone with an upgraded hardrive of course has and xtra 8-10gb harddrive left over that could replace the dvd drive if they wanted to and have a native installl and still leave their xbox filesystem intact. My god a hdb installation would be great for a MCE installation too for anyone with an xtra 20gb+ hardrive laying around also, it could be legal/ native, while still leaving the xbox filesystem on the first drive completly intact, providing the user had a modchip so they could boot either cromwell or their xbox bios. I for one would love to see an option for a second hardrive install so I could go native instead of loopback. If it can be mounted I don't see why gentoox can't be installed to it. Am I missing something?

antiflag1980
Novice
Posts: 23
Joined: Thu May 27, 2004 9:59 am
Location: cincinnati, OH U.S.
Contact:

Post by antiflag1980 » Thu Aug 05, 2004 10:15 am

Hey, I've been trying to move my install to my hdb since this, I've edited etc fstab correctly, but I can't seem to get my linuxrc in initrd.gz edited correctly, If anyone knows what to do please let me know.
What I'm trying to do is leave it booting from linuxboot.cfg on the e: drive unlike a native install but without a rootfs, I've already eliminated my swap file, I just need to be able to load from the other hardrive so I can eliminate rootfs on the e: partition.Here is my fstab and origional linuxrc and what I've tried so far. The I copied everything from rootfs over to hdb1 and fstab works fine, but I can't get the linuxrc to work.

fstab

Code: Select all

# /etc/fstab: static file system information.
#
# <file system>         <mount point>   <type>          <options>                               <dump>  <pass>
/dev/hdb1         /   reiserfs   defaults,errors=remount-ro               1   1
/dev/loop/0             /mnt/loop0               reiserfs        defaults,errors=remount-ro              0    0
proc                    /proc           proc            defaults                                0    0
/dev/cdrom              /mnt/cdrom      iso9660         defaults,ro,user,noauto                 0    0
/dev/hdb2             none         swap      sw         0     0
#/mnt/fatx/e/swap        none            swap            sw                                      0    0

/dev/hda51      /mnt/fatx/c    fatx       defaults,noauto=0000       0    0
/dev/hda50      /mnt/fatx/e    fatx       defaults,umask=0000          0    0
/dev/hda55      /mnt/fatx/f    fatx       defaults,umask=0000          0    0



linuxrc

Code: Select all

#!/bin/sh -x
###
#  Gentoox initrd
#  Copyright (C) Thomas "ShALLaX" Pedley (gentoox@shallax.com)
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
###


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 fatx /dev/ide/host0/bus0/target0/lun0/part50 /cdrom
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


tried

Code: Select all

mount 
mount -t fatx /dev/ide/host0/bus0/target0/lun0/part50 /cdrom
mount -t reiserfs /dev/ide/host0/bus0/target1/lun0/part1 /ram


tried

Code: Select all

mount 
mount -t reiserfs /dev/ide/host0/bus0/target1/lun0/part1 /ram
#mount -t reiserfs /dev/ide/host0/bus0/target1/lun0/part1 /ram


I get kernel panic /dev/console doesn't exist or something like that.

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

Post by nobspangle » Thu Aug 05, 2004 10:21 pm

the second one would be right if it was going to work, but I don't think it will. I reckon the fact that cromwell doesn't detect the harddrive means you can't jump across to it from the initrd.

One thing to check though, make sure the partition you are trying to mount is bootable
If you keep an open mind, will your brain fall out?

antiflag1980
Novice
Posts: 23
Joined: Thu May 27, 2004 9:59 am
Location: cincinnati, OH U.S.
Contact:

Post by antiflag1980 » Fri Aug 06, 2004 6:32 am

Well, that sucks. It's bootable, you mean bootable as in, when you choose to make it bootable when you make the partition in fdisk correct?

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

Post by nobspangle » Fri Aug 06, 2004 8:53 pm

that was what I meant, I guess it doesn't work. You could create a small root partition as a loopback on E and use that as mount points for the second drive.
If you keep an open mind, will your brain fall out?

antiflag1980
Novice
Posts: 23
Joined: Thu May 27, 2004 9:59 am
Location: cincinnati, OH U.S.
Contact:

Post by antiflag1980 » Fri Aug 06, 2004 11:14 pm

I think I gave up for now, I'm not too experienced with linux anyway. I didn't think of it before but couldn't I do the thing like you just said, I don't mind keeping my rootfs, I just don't have enough space in 3GB to keep everything and I have to constantly delete the portage distfiles and emerge --prune to have enough space, because gentoox seems to break if you run out of space. Ok, I just broke off from what I was saying, couln't I keep a rootfs and then chroot, env-update, source /etc/profile with a script after every boot to move / over to the other harddrive, or would that not work right, I'm not really familiar with chrooting, I just know it from having to do it when installing gentoo. Will that mess anything up? If not, where should I go about putting the script so that the change occours before gdm, well actually so that it occours as soon as possible. Now that I think about it that may be way too complicated, because I would still have to have a gentoox installation on the rootfs for modules and X and everything else to load from. But I just realized I think your saying have the actual files on hdb but have them all mounted to rootfs on the e: drive wich would still be mounted as /, god I'm confusing myself here. I think your idea of just mounting them to the rootfs would probably be the easiest, I think I will try that.

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

Post by nobspangle » Sat Aug 07, 2004 8:02 am

I was thinking more along the lines of having a tiny rootfs with a few mount points then having seperate partitions over on the other drive, but if you don't mind having a 3 gb rootfs you could also just create partitions for /usr and /var since they tend to be the biggest (+ maybe /home)
If you keep an open mind, will your brain fall out?

antiflag1980
Novice
Posts: 23
Joined: Thu May 27, 2004 9:59 am
Location: cincinnati, OH U.S.
Contact:

Post by antiflag1980 » Sun Aug 08, 2004 12:18 pm

Is it ok to move /var /tmp /home and whatever else I decide over to hdb1 and just use a symbolic link to them for example:

Code: Select all

ln -s /mnt/hdb1/var /

or is it necessary to actually make separate partitions for each of them and mount them in fstab like so:

Code: Select all

/dev/hdb3 /var   reiserfs defaults,nosuid,nodev       0 2

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

Post by nobspangle » Sun Aug 08, 2004 10:39 pm

do the second one.
If you keep an open mind, will your brain fall out?

antiflag1980
Novice
Posts: 23
Joined: Thu May 27, 2004 9:59 am
Location: cincinnati, OH U.S.
Contact:

Post by antiflag1980 » Mon Aug 09, 2004 4:10 am

Yeah, tried the first and it didn't work right. I'm using the second right now, but I didn't feel like making multiple partitions so I just used the second harddrive for /usr which was over 2GB and solved all my space problems. I could definitely resize rootfs now since it has like 2.6GB free.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest