[email protected] on Mon Feb 14 2005 at 16:38 -0400 wrote:
>I'm new to this list. I'm willing about installing a Debian into a
>external 
>usb hdd ( Lacie 40GB ) for my iBook G4. But I don't know if it's possible.
>
>I don't want to break the actual MacOSX installation, so I would to know:
>1) is possible to install Debian into a External USB HDD?
>2) could I use a key-combination when booting to access to that drive
>whenever 
>I want to run Debian?
>3) does anybody got it?
>
>I have search about it but I didn't found any guide. Maybe you could help
>me 
>with a link or so.

** a html formatted version of the following is available at
http://www.orawski.com/~timon/debianppc-usb/index.php I highly reccomend
looking at it there for legibility reasons **

You're in luck, I just set up debian on my iBook G4 this way yesterday. I
can tell you it's working beautifully (i boot to linux by holding option
down on boot and selecting the linux drive) and can try to help you
through setting up your debian install on the drive. There are three
things you need to do.

1. install debian onto the drive, setting up the partitioning like you
would a normal internal drive (including apple bootstrap partition). d-i
should do this automatically.

2. build a new initrd with usb modules and a modified linuxrc
- i did this after letting the system reboot and booting from the cd again
- in the installer, proceed up to the partitioning step then go to virtual
console 2 (alt-fn-f2)

i assume your target partition is /dev/sdb3 and your bootstrap partition
is /dev/sdb2

now, mkdir /target
mount /dev/sdb3 /target
mount -t proc proc /target/proc
chroot /target

now, here comes the magic: you need to set up your mkinitrd scripts to
build your initrd (and you'll need to remember to build a new initrd if
you upgrade your kernel)

using your favorite editor (vi or pico):

edit /etc/mkinitrd/modules and add the lines:
ehci-hcd
usb-storage
scsi_mod
sd_mod

create a new file /etc/mkinitrd/scripts/sleep as follows

#!/bin/sh
cp /bin/sleep $INITRDDIR/bin

case "$VERSION" in
        2.4.*)
                LD_ASSUME_KERNEL=2.4
                export LD_ASSUME_KERNEL
                ;;
esac

for i in `ldd /bin/sleep /usr/bin/awk | sort -u | awk '{print $3}'`
do
        mkdir -p `dirname $INITRDDIR/$i`
        cp $i $INITRDDIR/$i
done
#EOF

edit /usr/share/initrd-tools/linuxrc
and insert the following lines after mount -nt proc proc proc

echo "Loading USB Modules"
/sbin/modprobe usbcore
/sbin/modprobe scsi_mod
/sbin/modprobe sd_mod
/sbin/modprobe usb-storage
/sbin/modprobe ehci-hcd
sleep 5

then run
mkinitrd -o /boot/usbinitrd-`uname -r`.img `uname -r`
3. install yaboot onto your usb hdd's bootstrap partition.
you need to find out the openfirmware path of your usb hdd

cd /proc/device-tree
find * | grep usb | grep disk

as an example, mine is: /[EMAIL PROTECTED]/[EMAIL PROTECTED],1/[EMAIL PROTECTED]

so, now you're going to want to create /etc/yaboot.conf

mine is as follows:

--- begin file yaboot.conf ---

boot=/dev/sda2
ofboot=/[EMAIL PROTECTED]/[EMAIL PROTECTED],1/[EMAIL PROTECTED]:2
device=/[EMAIL PROTECTED]/[EMAIL PROTECTED],1/[EMAIL PROTECTED]:

init-message="Welcome to USB Debian PPC\n\n"

partition=3
timeout=10

install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
default=linux-usb

image=/[EMAIL PROTECTED]/[EMAIL PROTECTED],1/[EMAIL 
PROTECTED]:3,/boot/vmlinux-2.6.8-powerpc
        label=linux-usb
        read-only
        initrd=/[EMAIL PROTECTED]/[EMAIL PROTECTED],1/[EMAIL 
PROTECTED]:3,/boot/usbinitrd-2.6.8-powerpc.img
        root=/dev/sda3

defaultos=linux
delay=10
enablecdboot

--- end file yaboot.conf ---

then just run ybin -v and reboot
 ** i think you can run ybin -v --nonvram instead and not have to reset
the pmu to restore os/x as the default boot




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to