View previous topic :: View next topic |
Author |
Message |
fu. n00b
Joined: 31 Jan 2005 Posts: 21 Location: over:here:over:there
|
Posted: Wed Apr 06, 2005 6:00 am Post subject: Current State of FireWire? (2005.0) |
|
|
Did anyone got FireWire-booting working with the new release (2005.0)? _________________ ..hey kids: rock 'n' roll..! |
|
Back to top |
|
|
Pylon Retired Dev
Joined: 17 Jan 2003 Posts: 279 Location: Cologne
|
Posted: Wed Apr 06, 2005 9:04 pm Post subject: |
|
|
Booting with firewire enabled or booting from a firewire device? _________________ hacking is not a crime |
|
Back to top |
|
|
fu. n00b
Joined: 31 Jan 2005 Posts: 21 Location: over:here:over:there
|
Posted: Fri Apr 08, 2005 4:00 am Post subject: |
|
|
Booting from a FireWire Device...
Like booting from a FireWire HD...
I'm wondering cause with earlier releases, booting from FW wasn't really working... _________________ ..hey kids: rock 'n' roll..!
Last edited by fu. on Wed Apr 27, 2005 1:47 am; edited 1 time in total |
|
Back to top |
|
|
Little Nemo l33t
Joined: 29 Mar 2004 Posts: 623 Location: Berlin, Germany
|
Posted: Fri Apr 08, 2005 6:22 am Post subject: |
|
|
I'm in the process of making it happen here. It's my first install on a PPC, so I had to learn things about Open Firmware, yaboot and stuff. Yaboot now works from the external firewire drive (I get a boot prompt, and bootup starts), but I still need to find out how to make a proper initrd for firewire detection so that the root partition is mounted. Others have reported success in this forum. And I didn't modify the internal hard disk at all, so when the fw drive is not plugged in, I can boot OS X like before. |
|
Back to top |
|
|
FearlessSpiff n00b
Joined: 26 Sep 2004 Posts: 69
|
Posted: Fri Apr 08, 2005 6:24 am Post subject: |
|
|
Did you make it happen? If so, could you post a "How-to" or "Tutorial" for noobs like me?
Thanks |
|
Back to top |
|
|
Little Nemo l33t
Joined: 29 Mar 2004 Posts: 623 Location: Berlin, Germany
|
Posted: Fri Apr 08, 2005 10:28 am Post subject: |
|
|
FearlessSpiff wrote: | Did you make it happen? If so, could you post a "How-to" or "Tutorial" for noobs like me? |
You posted just two minutes after me - please be patient
I'll post a howto as soon as I'm done. If you'd like to start with the yaboot stuff, just follow the PPC installation handbook and use genkernel to compile your kernel. Write down the location of the kernel and initrd. Then use yabootconfig to generate a config file and install yaboot into partition /dev/sdb2 (it'll ask for the location of kernel and initrd). Then edit /etc/yaboot.conf and add the kernel append stuff: Instead of "root=/dev/sda5" (or whereever you installed the root partition), say "root=/dev/ram0 real_root=/dev/sda5 init=/initrc". If you run "ybin -v" now, it'll complain about not finding the correct ofboot line. Just copy the "device=/pci..." line and change "device" into "ofboot". Then run "ybin -v".
Now you should have a working yaboot, but I'll have to work on the initrd. As it is, no modules are copied into the initrd image by genkernel at all (don't know why, as the Installation handbook seems to suggest that you get an fairly complete initrd much like the install CD boot image). We need firewire support, sbp2 and so on to recognize and mount the root partition.
The only thing that is affected here is the boot-device entry in NVRAM. The internal hard disk of your Mac (a 12" Powerbook in my case) is not touched at all. |
|
Back to top |
|
|
Little Nemo l33t
Joined: 29 Mar 2004 Posts: 623 Location: Berlin, Germany
|
Posted: Fri Apr 08, 2005 2:02 pm Post subject: |
|
|
I've run into another problem. I told genkernel which modules to include by listing them in /usr/share/genkernel/ppc/modules_load. Then I edited the append= line in /etc/yaboot.conf to include "udev nodevfs". Now ieee1394, ohci1394, and sbp2 are loaded and udev is activated, but it doesn't create the /dev/sdaX device files, so I still get "Block device /dev/sda5 is not a valid root device...".
Do I need anything else to activate SCSI emulation for the Firewire hard disk? When opening a shell at the prompt where I'm asked for the boot device, I can even see my disk in /proc/scsi/scsi. I'm not familiar with udev - what should I do to create the devices?
Edit: When creating the device files by hand and exiting the shell to tell the boot process about /dev/sda5, the system boots fine. I feel bad about this, though. Isn't udev about not having to create these files but generating them on the fly? |
|
Back to top |
|
|
FearlessSpiff n00b
Joined: 26 Sep 2004 Posts: 69
|
Posted: Fri Apr 08, 2005 3:56 pm Post subject: |
|
|
Maybe you have to make a rule for udev to create the files when the drive is plugged in? I have no idea, but what i am seeing from you is, that it is time to buy an external hd this weekend...
It won't make any difference if it is a firewire or USB HD? |
|
Back to top |
|
|
Little Nemo l33t
Joined: 29 Mar 2004 Posts: 623 Location: Berlin, Germany
|
Posted: Fri Apr 08, 2005 4:29 pm Post subject: |
|
|
Oh, you can buy the drive alright. It definitely works. This last step is a minor one. My drive supports both USB and Firewire. I'd go for a solution like this. |
|
Back to top |
|
|
Little Nemo l33t
Joined: 29 Mar 2004 Posts: 623 Location: Berlin, Germany
|
Posted: Sat Apr 09, 2005 11:19 am Post subject: |
|
|
As promised, here are the steps to install Gentoo to an external firewire disk and boot from there without touching the internal disk. I tried this on a 12" PowerBook which is known to boot from FW (some earlier models from Apple are not).
I tried to keep this a simple as possible, so I followed the Gentoo PPC installation handbook at http://www.gentoo.org/doc/en/handbook/2005.0/handbook-ppc.xml step by step with only a few additional measures. I did a stage 3 install and did not touch /etc/make.conf in order to use the GRP (Gentoo Reference Platform). I also used genkernel to take care of kernel configuration. The reason for this is that I was mainly interested in a proof of concept for this machine. My next step will be to configure my own kernel and initrd and maybe do a stage 1 install later (as I have on x86 and x86_64 systems).
I also wanted to try another MacOS installation on the firewire disk, so I first partitioned it using mac-fdisk from the install CD, then installed MacOS, then continued with the Gentoo installation. This is the output of mac-fdisk -l /dev/sda on my system:
Code: | /dev/sda
# type name length base ( size ) system
/dev/sda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
/dev/sda2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
/dev/sda3 Apple_UNIX_SVR2 swap 1306272 @ 1664 (637.8M) Linux swap
/dev/sda4 Apple_HFS Apple_HFS_Untitled_3 83886080 @ 1307936 ( 40.0G) HFS
/dev/sda5 Apple_UNIX_SVR2 root 234976992 @ 85194016 (112.0G) Linux native
Block size=512, Number of Blocks=320171008
DeviceType=0x0, DeviceId=0x0
|
Of course you can do it differently, but that's why I'll assume that the root partition is /dev/sda5 in the following examples.
The interesting part begins in chapter 7 "Configuring the Kernel". Choose 7.e "Using genkernel". Before you call genkernel, you'll have to modify some of its configuration files and scripts. First open /usr/share/genkernel/ppc/modules_load in an editor and make sure it contains the following line:
Code: | MODULES_FIREWIRE="ieee1394 ohci1394 sbp2" |
Then edit /usr/share/genkernel/generic/linuxrc and insert some lines that will create the necessary /dev/sdaX nodes for your firewire disk. Place the code immediately before the line that echoes "Determining root device":
Code: | echo -e "${GOOD}>>${NORMAL}${BOLD} Making SCSI nodes...${NORMAL}"
/sbin/mknod /dev/sda b 8 0
for i in 1 2 3 4 5
do
/sbin/mknod /dev/sda$i b 8 $i
done
sleep 5
|
Of course if you don't have five partitions, you don't need to create five node files, and if you have more, create more
The reason for inserting this little code fragment is that the node files are not automatically created by udev, so that the linuxrc script will not be able to determine the root device. It'll drop you to a shell where you can create them by hand, but you'll have to do it on every boot as you're creating them on a ramdisk (remember we have to work with an initrd in order to detect the firewire disk before we can mount it). Detection takes a while, that's why I inserted "sleep 5". I consider this a bad hack and would be happy if someone would point me in the right direction how to achieve automatic creation of the node files.
Now call "genkernel --udev all" as told by the installation handbook. If you modify the initrd configuration later, it suffices to say "genkernel --udev initrd", or you'll compile the whole kernel with its extensive number of modules each time.
Let's consider chapter 10 "Configuring the bootloader" now. Of course you can immediately create your own /etc/yaboot.conf, but for simplicity I chose yabootconfig to help me do that. From outside the chroot, call "yabootconfig --chroot /mnt/gentoo" as in the installation handbook. This should create /mnt/gentoo/etc/yaboot.conf for you and install yaboot in /dev/sda2. However, the generated config file will not work with the kernel and initrd we created with genkernel. Re-enter the chroot environment, edit /etc/yaboot.conf, and call "ybin -v" to update yaboot. Unfortunately, ybin was unable to find the correct ofboot option on my system, but there's an easy remedy. Simply replace "device=" by "ofboot=" to point ybin to the firewire disk in your machine's open firmware.
As we are booting from a ramdisk, we have to change "root=/dev/sda5" into "root=/dev/ram0". We also use an "append=" line to provide several boot parameters to the kernel: "udev nodevfs init=/linuxrc real_root=/dev/sda5". This is what /etc/yaboot.conf looks like on my system:
Code: | ofboot=/pci@f4000000/firewire@e/node@0010b920008959f8/sbp-2/disk@0:
boot=/dev/sda2
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
image=/boot/kernel-2.6.10-gentoo-r8
label=Linux
read-only
root=/dev/ram0
append="udev nodevfs init=/linuxrc real_root=/dev/sda5"
initrd=/boot/initrd-2.6.10-gentoo-r8
initrd-size=8192
|
After editing /etc/yaboot.conf, call "ybin -v", and if you don't see any suspicious errors, leave the chroot environment, unmount all partitions, and reboot. Good luck! |
|
Back to top |
|
|
FearlessSpiff n00b
Joined: 26 Sep 2004 Posts: 69
|
Posted: Mon Apr 11, 2005 11:06 am Post subject: |
|
|
hey thanks! This should be a sticky one... I found out, that i can resize my HFS+ partition with parted, so i won't buy a HD. Thanks anyway. |
|
Back to top |
|
|
fu. n00b
Joined: 31 Jan 2005 Posts: 21 Location: over:here:over:there
|
Posted: Wed Apr 27, 2005 1:44 am Post subject: |
|
|
Thank you for sharing your workaround Little Nemo...
very short + simple
i'll give it a try and post an update here
anyone else having successful installations following Little Nemo's tips, please keep this thread updated...
[indeed, this should be a sticky, so we can keep updating on how to perform Gentoo installations on FireWire drives] _________________ ..hey kids: rock 'n' roll..! |
|
Back to top |
|
|
sdidier n00b
Joined: 23 May 2004 Posts: 46 Location: Idaho, USA
|
Posted: Tue May 17, 2005 6:10 pm Post subject: firewire working |
|
|
Thanks Little Nemo, I have bounced back and forth between YDL, Ubuntu and Gentoo over the last year or so in the hope that i would finally be able to get my external FW drive functional and booting Linux. i knew it would take someone a lot smarter than me to lead the way!
I am writing this while being booted from my fw drive. Got a lot of upgrading to do but HOORAY!!!! your mini how to did the trick. Thank you!
Steve _________________ Steve Didier |
|
Back to top |
|
|
minuo n00b
Joined: 25 Aug 2005 Posts: 1
|
Posted: Thu Aug 25, 2005 8:50 pm Post subject: Success! |
|
|
@Little Nemo
Thank you! Worked like a charm. FWIW, the sleep 5 seems just a it too short on my TiBook, so I upped it to 10. A better solution would be nice, but not the end of the world. Again, thanks much for this handy hint it is most appreciated.
--m |
|
Back to top |
|
|
FearlessSpiff n00b
Joined: 26 Sep 2004 Posts: 69
|
Posted: Sat Aug 27, 2005 7:31 am Post subject: |
|
|
Finally i found time to do this on an usb drive. But it's not working! I have no idea. Followed the way you described, but had some problems with yabootconfig. Had to manually get the ofpath and the took your yaboot.conf and adapted it to my needs. ybin -v worked like a charm then. (The Holy Penguine Pee was especially funny! ) But now nothing happens when booting! I have to hold the 'CMD' key when booting, haven't I? There is just nothing... Always OS X booting. Maybe someone has an idea?
Thanks |
|
Back to top |
|
|
Little Nemo l33t
Joined: 29 Mar 2004 Posts: 623 Location: Berlin, Germany
|
Posted: Sat Aug 27, 2005 9:54 am Post subject: |
|
|
You do not have to press the command key while booting if the USB drive is properly connected and 'ybin -v' has modified the openfirmware as desired. I guess that last part didn't work for you, maybe you should experiment with the 'ofboot=' line.
Normally openfirmware should be looking for the USB drive to boot from. On my machine, when my firewire drive is not connected, openfirmware will look in vain (it'll display a file symbol with a question mark on it) and boot from the internal disk instead. When the FW disk is connected, however, it will always automatically boot from there. |
|
Back to top |
|
|
FearlessSpiff n00b
Joined: 26 Sep 2004 Posts: 69
|
Posted: Sat Aug 27, 2005 4:06 pm Post subject: |
|
|
I don't get it. Maybe you see an obious mistake. Heres the output of ofpath:
Code: |
ofpath /dev/sda
/pci@f2000000/usb@1b,0/hub@1/3/0:0:0:disk@0:
|
and then yaboot.conf:
Code: |
ofboot=/pci@f2000000/usb@1b,0/hub@1/3/0:0:0:disk@0:
boot=/dev/sda2
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
image=/boot/kernel
label=Linux
read-only
root=/dev/ram0
append="udev nodevfs radeonfb init=/linuxrc real_root=/dev/sda4"
initrd=/boot/initramfs
initrd-size=8192
|
and the output of ybin -v:
Code: |
ybin: Installing first stage bootstrap /usr/lib/yaboot/ofboot onto /dev/sda2...
ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/sda2...
ybin: Installing /etc/yaboot.conf onto /dev/sda2...
ybin: Setting attributes on ofboot...
ybin: Setting attributes on yaboot...
ybin: Setting attributes on yaboot.conf...
ybin: Blessing /dev/sda2 with Holy Penguin Pee...
ybin: Updating OpenFirmware boot-device variable in nvram...
|
i really don't know where the problem is... |
|
Back to top |
|
|
FearlessSpiff n00b
Joined: 26 Sep 2004 Posts: 69
|
Posted: Sun Aug 28, 2005 9:39 pm Post subject: |
|
|
Ok, have it booting now with the usb drive until i get a kernel "incorrupt filesystem" or something. But this must be another problem... Thats what i did:
First of all i hooked the drive directly into the mac, then i booted to the live cd and did:
Code: |
find /proc/device-tree/ -name disk@\*
/pci@f2000000/usb@1b,1/disk@1
|
Now i rebooted and started Openfirmware (OPT-CMD-o-f) and made 'devalias'. This gives a list of all devices. Now i looked to the usb entries where i found that:
Code: |
usb0 /pci@f2000000/usb@1b,1
|
Now i restarted to the live cd, chrooted, mounted /proc and /sys and then changed the ofboot in yaboot.conf to
Code: |
ofboot=usb0/disk@1:
|
Now it is booting from the drive! Hopefully i will fix the other things too...
(edit: It is finally booting until this: "Mounting /dev/sda4 on /newmount: No such device or address"! I have no idea why. Somehow dmesg tells me in the LiveCD, that it found an SCSI drive and added /dev/sda, sda2, ..., but not on the usb drive. It should be the last entry of dmesg... )
Btw, here the working yaboot.config:
Code: |
ofboot=usb0/disk@1:
boot=/dev/sda2
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
image=/boot/kernel
label=Linux
read-only
root=/dev/ram0
append="rootdelay=10 radeonfb init=/linuxrc real_root=/dev/sda4"
initrd=/boot/initramfs
initrd-size=8192
|
|
|
Back to top |
|
|
|