Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with a Gentoo install on an Xserve (early 2008)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Wed Nov 06, 2013 8:44 pm    Post subject: Problems with a Gentoo install on an Xserve (early 2008) Reply with quote

Hello all,

Long time no post. I'm back at Gentoo after a many-year hiatus, but this time in a professional capacity.

For practice I set up a system on a Dell Optiplex 960 with essentially no difficulty. I'm trying to build a system on an old Xserve now, but have had no end of difficulty. The bloody thing did not want to boot any installation media in the first place - of course, it uses EFI, which in itself isn't the problem. For a while, it had me convinced that its quad-core Xeon couldn't handle a 64-bit instruction set. I had tried a tool built by Christopher Smart (christophersmart.com) that is a simple EFI-bootable USB stick containing installers for Debian, Fedora, and Ubuntu in both 32- and 64-bit flavors. Only the 32-bit kernels would load successfully. Attempting to use one of the 64-bit kernels spat back a couple bootloader messages and then hung the system.

I finally found some success with sysrescuecd. Grub was loaded successfully from the firmware bootloader, but the default kernel wouldn't load. Blinking cursor and nothing more. I had worried that this was because the kernels provided were 64-bit as well. Turns out, that was never the problem. After some trial and error, I found that everything booted just fine (if a little slow and with some bizarre error messages about BIOS misreporting CPU clock frequencies or some such) when I selected the nomodeset boot option. Ok, I thought, on with the show and I'll remember to always pass that option to my kernel. So I built the Gentoo system, configuring my own kernel and making sure to build in the appropriate EFI stub loading options. I built two kernels, one with kernel command string built in (just root=UUID=blah nomodeset) and one without, both otherwise identical. I installed rEFInd, copied both images to the EFI partition's root, set up a menuentry in rEFInd's .conf for the non-built-in-command-string kernel to pass command strings from rEFInd, and rebooted. Like black magic, rEFInd loaded fine and was able to detect the kernel I built with command strings built in (I gave it a .efi extension) as well as the systemrescuecd USB stick I left in the slot. But attempting to load my kernels just gives a screen with a simple print out: "Loading <kernel> with options ''". System hangs there.

I've since booted from the USB stick (but through rEFInd) just fine, rebuilding the kernels and even copying a 32-bit build over just to see if it would load (it doesn't). But since the darn thing doesn't get far enough to give me error messages, I'm stumped as to what to try next. I am worried I may be specifying the root incorrectly, but I have tried going back to the older root=/dev/sdXX style with no luck.

I'm happy to provide any more information that could be useful. At this point, I really don't know what I should try next to find the problem, so any ideas are greatly appreciated. Thanks in advance for your help!

Cheers,
Dachnaz
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Wed Nov 06, 2013 9:03 pm    Post subject: Reply with quote

A brief update: I added panic=10 to boot options. That at least got the system to reboot after 10 seconds! So the kernel is panicing and I need to sort out why - how should I do this?
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Wed Nov 06, 2013 9:11 pm    Post subject: Reply with quote

Use genkernel, include busybox support. See if busybox will give any additional info, ie after hang does it boot to busybox
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Thu Nov 07, 2013 4:57 pm    Post subject: Reply with quote

To add to the saga, I found out that genkernel does not build itself with EFI stub loader support. So, I couldn't boot it from rEFInd. That's ok, though, because the sysrescuecd EFI-boots grub! I was able to handily open up a grub command line and boot the genkernel from there. I'll have to work on streamlining this boot process in the future.

Because I foresaw this issue were I to build a non-EFI stub loading kernel, I had attempted to install grub2 yesterday so I could have some more familiar tools than rEFInd offers. Going about it as suggested in the guide, and the same way I set stuff up on this Dell workstation, I ran # grub2-install and got the following error message:

/usr/lib/grub/x86_64-efi doesn't exist. Please specify --target or --directory

Boo hoo! Only directory in /usr/lib/grub is i386-pc/; did I emerge grub with the wrong USE flags? I checked my work on the Dell, and the same is true, but grub2-install worked swimmingly on it! (Of course, it isn't an EFI-capable machine.) So I tried

# grub2-install --target=i386-pc --efi-directory=/boot/EFI/ --boot-directory=/boot/ /dev/sda

which returned

/usr/sbin/grub2-bios-setup: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
/usr/sbin/grub2-bios-setup: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub2-bios-setup: error: will not proceed with blocklists.

It didn't copy anything over to the EFI boot directory. I'll try manual installation, because all I need is grub's EFI binary to load my non-EFI kernel. If in the meantime there are any ideas floating out there for how to improve this process, I am all ears. I would like to be able to boot a kernel directly from rEFInd (although, true, this will not happen often with this server), and I would like to build my own working kernel for this stupid Apple Xserve. Hopefully documenting every step of the struggle will help others who have similar difficulty.
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Thu Nov 07, 2013 5:22 pm    Post subject: Reply with quote

See the GRUB2 Wiki

You need to set the GRUB_PLATFORMS variable probably to efi-64...
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Thu Nov 07, 2013 8:36 pm    Post subject: Reply with quote

Thanks for the tip. I completely missed that! We will give it a whirl...

Looks like with a little fiddling I got it. I added GRUB_PLATFORMS="efi-64 pc" to make.conf and rebuilt GRUB2. I ran:

# grub2-mkconfig -o /boot/grub/grub.cfg
# grub2-install --target=x86_64-efi --efi-directory=/boot/EFI --boot-directory=/boot
(at this point I realized that grub2 rearranged the EFI boot order, so the next command was to swap the order so rEFInd is booted first. that way, I can try EFI stub loading as well as grub-loading a kernel)
# efibootmgr -o 0,1,80

Time to go test out my new kernel! I'll report back shortly.
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Fri Nov 08, 2013 4:59 pm    Post subject: Reply with quote

No dice. When I tried booting back into my genkernelled system, the ethernet cards decided to stop working on me. I know they use module e1000e, but modprobing this driver and then trying to start them with the init script that had worked yesterday just tells me the interfaces aren't available and that I should try modprobing the right driver. Could they have become renamed somehow? How would I figure out their new names if so?

I also tried booting my own kernel and got some error messages. I'll post a screenshot of them soon.
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Fri Nov 08, 2013 5:05 pm    Post subject: Reply with quote

If your using the new udev they have been renamed.

Gentoo: Udev upgrade wiki
Quote:
Fixing network interfaces

This shows how you can fix your network-interfaces, if they don't work anymore (or before they stop working, if you didn't switch to the new udev yet). It is only applicable to simple setups, like one ethernet and one wifi interface. If you have a more complicated setup (like more ethernet adapters) I assume you already know what to do.
Renaming init scripts
If you are still running the old udev and are up to enabling the new one, execute
user $
udevadm test-builtin net_id /sys/class/net/eth0 2> /dev/null
ID_NET_NAME_MAC=enxd4a8xxxxxxxx
ID_NET_NAME_PATH=enp1s0f1
Take the ID_NET_NAME_PATH-item (here enp1s0f1) and execute
user $
ln -s net.lo /etc/init.d/net.enp1s0f1
If you have a wifi-interface do this for this interface,too!
If you are already running the new udev and the network is down, execute
user $
ls -la /sys/class/net
total 0
drwxr-xr-x 2 root root 0 Apr 2 19:42 ./
drwxr-xr-x 49 root root 0 Apr 2 19:42 ../
lrwxrwxrwx 1 root root 0 Apr 2 19:42 enp1s0f1 -> ../../devices/pci0000:00/0000:00:1c.1/0000:02:00.0/net/enp1s0f1/
lrwxrwxrwx 1 root root 0 Apr 2 19:42 lo -> ../../devices/virtual/net/lo/
lrwxrwxrwx 1 root root 0 Apr 2 19:42 sit0 -> ../../devices/virtual/net/sit0/
Look which link points to a pci-device (here enp1s0f1) and execute
user $
ln -s net.lo /etc/init.d/net.enp1s0f1
If you have a wifi-interface do this for this interface,too!
Replacing init scripts in runlevels (via rc-update)
user $
rc-update delete net.eth0 default
user $
rc-update add net.enp1s0f1 default
Same for the wifi-interface again, if necessary.


The liveCD has the naming rules disabled, so the old init scripts work until you reboot
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Fri Nov 08, 2013 6:19 pm    Post subject: Reply with quote

I'm pretty sure that's not the problem. The first time I booted my genkernel, everything was fine. The interface name is enp9s0f0 and that shouldn't have changed between boots. The init script I used to get it going the first time does not work anymore. Modprobing e1000e gives no error messages but the module does not load as far as I can tell using lsmod. dmesg also does not report the interfaces as it does when, for instance, I boot using systemrescuecd.

The kernel I built panics, giving the following: https://drive.google.com/a/germanschool-mn.org/file/d/0B4zRV7XX4LGgUTg2UE1CZnVVVXc/edit?usp=sharing

No idea. I've never had such a hard time getting Gentoo up and running!
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Fri Nov 08, 2013 6:27 pm    Post subject: Reply with quote

Are you sure you are using a 64 bit kernel :?: After Cut Here I see arch/x86/

The other thing to check is that Support for your Filesystem is static, and that the command line has the proper root partition

Please:
Code:
cat /etc/fstab
mount /boot
cat /boot/grub/grub.cfg

_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Fri Nov 08, 2013 6:55 pm    Post subject: Reply with quote

Yeah, funny, I know! I'm positive. I compiled the kernel with the 64 bit kernel option enabled, and cp'd it from arch/x86_64/boot/bzImage.

I know I am having real difficulties with my filesystems. Actually, this most recent time when I booted the genkernel, /dev/ is nearly empty. There ought to be 3 sdX devices, and none appear. This is a nightmare.

My fstab lists the wrong partitions. I corrected them to /dev/sdaX, as usually the appropriate drive is /dev/sda... but not everytime.

I'll try booting systemrescuecd again just so I can mount my boot partition... Ugh.
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Fri Nov 08, 2013 7:20 pm    Post subject: Reply with quote

Ah, I ran out of time. I'll take it home and keep working on it over the weekend. (Who ever heard of taking a server home?!)

I'm pretty sure this xserve HATES all things 64-bit.
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Mon Nov 11, 2013 9:38 pm    Post subject: Reply with quote

Finding a monitor that displays a few more console lines REALLY helps sometimes! Here's what I found.

The kernel panics because it can't find the root device. Every time the thing boots, it wants to change the order of the drives. It seems to place the hard drive with the root system last every time, so right now, for instance, the USB drive I have booted the sysrescue system from is /dev/sda or hd0. I'm sure it's not that I forgot ext4 support. Checked that. Given the unknown-block(0,0) part of the message, I guess it is not recognizing the SATA controller. Time to reboot the sysrescue and see if I can figure out which module it has been using for the device.
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Mon Nov 11, 2013 10:21 pm    Post subject: Reply with quote

Go to your Kernel Config :arrow: Device Drivers :arrow: Make Sure ATA/ATAPI/MFM/RLL Support is empty, the clue is DEPRECATED. Then compile as built-in Serial ATA and Parallel ATA Drivers, along with the actual Driver for the board
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Tue Nov 12, 2013 12:40 am    Post subject: Reply with quote

I tried everything I could think of. I can boot the genkernel system pretty well now, which is a vast improvement over the sporadic results of last week, I can't for the life of me figure out what driver I am missing. If I pass root=/dev/sda3 during boot, the panic indicates that the device is accessed but the filesystem is not recognized.

Code:
VFS: Cannot open root device "sda3" or unknown-block(8,3): error -123


There is nothing special about the ext4fs on the root partition. What could it be?
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Tue Nov 12, 2013 7:31 pm    Post subject: Reply with quote

I think the Xserve's hard drives are all controlled with its RAID controller, regardless of configuration. (Does this make sense?) I noticed that the genkernel system is using a kernel module called mptsas, and I had a hard time finding the kernel config option that uses this. With some digging, it looks like it is CONFIG_FUSION_SAS, so I'll try activating this and letting her rip. Could this problem be an issue with initializing the drive too late? The genkernelled system uses an initrd and dmesg timestamps the root drive's detection at 15.ish...
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Tue Nov 12, 2013 9:10 pm    Post subject: Reply with quote

Big success! I managed to get it to tell me that it couldn't find /dev/sda3, but the hard drive was listed as /dev/sdb! I will try to have GRUB2 pass root=UUID=blah to make sure it is selecting the appropriate root partition. This all being sorted, I still have to slap the other two hard drives in and configure RAID. Is there a way to make sure /etc/fstab is pointing at the appropriate devices? If I boot the genkernel system, everything works well and the root is /dev/sda3, while with my kernel the root is at /dev/sdb3 and /dev/sda does not exist.
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Tue Nov 12, 2013 9:30 pm    Post subject: Reply with quote

Code:
cat /boot/grub/device.map

Update hdX to match sdX and reboot.
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Tue Nov 12, 2013 9:36 pm    Post subject: Reply with quote

No such file, alas. I think I'll just update my fstab to use UUID= as well. This server is going to see a few drives and this should streamline everything.
Back to top
View user's profile Send private message
eyoung100
Veteran
Veteran


Joined: 23 Jan 2004
Posts: 1428

PostPosted: Tue Nov 12, 2013 9:47 pm    Post subject: Reply with quote

Dachnaz wrote:
No such file, alas. I think I'll just update my fstab to use UUID= as well. This server is going to see a few drives and this should streamline everything.


Did you forget to mount boot, or run grub2-install :?: Look at the Grub2 Migration Guide. Follow the example and create a device.map file. This is easier than updating /etc/fstab as you are doing because the uuid's are handled by grub2. Doing it your way means that each time a drive in your array fails you will need to update fstab by hand.
_________________
The Birth and Growth of Science is the Death and Atrophy of Art -- Unknown
Registerd Linux User #363735
Adopt a Post | Strip Comments| Emerge Wrapper
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Tue Nov 12, 2013 10:27 pm    Post subject: Reply with quote

I have mounted /boot (my first thought too) and run grub2-install, though every time it outputs "EFI distributor id isn't specified." No idea what to make of this.

EDIT: Specifying
Code:
 # grub2-install --target=x86_64-efi --efi-directory=/boot/EFI --boot-directory=/boot
solved the problem. Still, device.map does not exist. Am I misunderstanding - should I be generating my own?
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Tue Nov 12, 2013 11:19 pm    Post subject: Reply with quote

Progress: the system boots, now, using my kernel. The generic keyboard, however, does not work. Oops.

I had to pass root=/dev/sdb3 from GRUB2, since UUID does not work. Turns out, the kernel needs a PARTUUID, but at least it was nice enough to tell me so. I think tonight is the night!!

EDIT: USB HID compiled as a module. Fixed, compiling....

EDIT MKII: Victory. Now on to making the awesomes happen. eyoung100, a million thanks. We did it.
Back to top
View user's profile Send private message
Dachnaz
Tux's lil' helper
Tux's lil' helper


Joined: 01 Apr 2005
Posts: 76
Location: Minneapolis, MN, USA

PostPosted: Thu Nov 14, 2013 11:21 pm    Post subject: Reply with quote

Continuing on, I'm trying to get xorg going for users who aren't as CLI-ready as I. However, modesetting from the radeon driver seems to be a sticking point on this machine. It causes panics. Should I go to an old kernel which allows for toggling radeon modesetting?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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