Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo on Alpha with initrd + fibre channel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
griffypoo
n00b
n00b


Joined: 28 Jan 2005
Posts: 16

PostPosted: Fri Jan 28, 2005 1:35 am    Post subject: Gentoo on Alpha with initrd + fibre channel Reply with quote

The base install of gentoo went very smoothly, and now I am looking to update my configuration to what it will ultimately be. Here's the issue:

I have a VERY old and noisy 2gb SCSI disk that I currently have the distribution installed to (I cannot sleep with this disk running two rooms away). I have gotten a fibre channel controller to work on my alpha, but the problem is that the driver is limited to being a module, and cannot boot. I'd like to have the kernel on the SCSI drive, and after the machine completes booting up, the bootup scripts power down the drive using hdparm and runs happily using the fibre channel drive as the root device.

As I understand it, I need to use an initrd to load this module. I've tried creating my own initrd.img specifying the lpfc and xfs modules to be loaded, but when I try and bring the machine up, it loads the initrd and then is unable to find the root filesystem even though I have copied all the data from SCSI to FC.

Here's what I have for my SRM options:

-fi /boot/vmlinux.gz -flags "ro init=/linuxrc real_root=/dev/sdb1 initrd=/boot/initrd.img root=/dev/ram0"

I have tried setting root=/dev/sdb1, but that does not seem to help things. Any help would be appreciated!
Back to top
View user's profile Send private message
Redhatter
Retired Dev
Retired Dev


Joined: 20 Sep 2003
Posts: 548
Location: Brisbane, QLD, Australia

PostPosted: Fri Jan 28, 2005 4:18 am    Post subject: Reply with quote

Have you set up a /linuxrc inside the initrd?

I'd have a guess that you'd be needing something along these lines:

Code:
#!/bin/sh

# Handler -- if things go wrong
die () {
    echo "A fatal error has occurred"
    echo $*
    echo "Dropping you to a shell to rectify the problem."
    echo "Run /linuxrc when everything's sorted."
    exec /bin/sh -i
}

# Load modules
modprobe lpfc || die "modprobe lpfc failed: $!"
modprobe xfs || die "modprobe xfs failed: $!"

# Mount root fs on /initrd
mount /dev/sdb1 /initrd

# Call pivot_root to bring us into the new root fs.
cd /initrd
pivot_root . /initrd/initrd
exec chroot . sh -c 'umount /initrd; exec /sbin/init' \
    <dev/console >dev/console 2>&1


This might need some tinkering (some of it is pinched from the pivot_root(8) manpage... none of it is tested)

Also, I don't have an alpha myself, so as to the boot loader options, I wouldn't have a clue. I'd have a guess root=/dev/sdb1 is correct.
_________________
Stuart Longland (a.k.a Redhatter, VK4MSL)
I haven't lost my mind - it's backed up on a tape somewhere...

Gentoo/MIPS Cobalt developer, Mozilla herd member.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum