Hi there,
I know I haven't been posting alot lately, but I came accross some weird problem with fake raid on my Silicon Image 3114 controller. I was trying to reinstall the mbr with grub, because I had installed Windows on the machine as well, on another partition. Normally, when using grub via the cli, you get something like this:
[me@somehost ~]$ grub
Probing devices to guess BIOS drives. This may take a long time.GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub>
Now normally you could do this when using some kind of rescue cd.
grub> root (hd0,1)
grub> setup (hd0)
But unfortunately this simply does not work with fake raid, because when using something like RAID 0, it gives errors that it cannot find the partition. I was really searching for two hours long why it couldn't find my disk layout. Everything was ok, even the device.map. It looked like this:
(hd0) /dev/mapper/sil_agababbifhbg
So how did I fix this problem? The solution lies within grub and pointing out that you give the right geometry of the harddisk layout of your raid 0 setup. It sounds weird, but it worked just great. Just do this:
cfdisk /dev/mapper/sil_agababbifhbg
In my case the output was like this:
Disk Drive: /dev/mapper/sil_agababbifhbg
Size: 148709441536 bytes, 148.7 GB
Heads: 255 Sectors per Track: 63 Cylinders: 18079
As you can see, my heads are 255, sectors are 63, and cylinders are 18079. These are just the settings I need to get around the problem. Now let's get grub going.
[me@somehost ~]$ grub
Probing devices to guess BIOS drives. This may take a long time.GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> grub --device-map=/dev/null
grub> device (hd0) /dev/mapper/sil_agababbifhbg
grub> geometry (hd0) 18079 255 63
grub> root (hd0,1)
grub> setup (hd0,1)
grub> setup (hd0)
And voila! It worked! It's more a bug this problem, which I also found online, with many people having the same issues.
Look at this post for instance!
Anyway, I hope that the search engines are going to archive this correctly, so many people can be helped with this problem. Any comments are welcome of course!
Well, today, I just wanted to know if there was another and also a much smaller utility for monitoring the raid status of my Dell 2950 server. Normally with the tools of Dell with OpenManage you can do it also. But that's a big package, and I wanted a light package cli for this.
Fortunately, somebody made that package. And best of all, it's open source! So this is the deal with Redhat Enterprise 5.2 (CentOS).
First, we install the kernel sources, that are needed to compile the package.
rpm -ivh kernel-2.6.18-92.1.1.el5.src.rpm
Than we need to unpack the packages of the kernel and make it ready to unpack the sources.
rpmbuild -bp --target=$(uname -m) \
/usr/src/redhat/SPECS/kernel-2.6.spec
After waiting you must make a symbolic link like this:
ln -s /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 linux
Now we need to download the package of the CLI and unpack it.
wget http://www.drugphish.ch/~ratz/mpt-status/mpt-status-1.2.0.tar.gz
tar -zxf mpt-status-1.2.0.tar.gz
cd mpt-status-1.2.0
vi mpt-status.h
Now in VI you need to change the following line:
#include linux/compiler.h
to
#include /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 \
/include/linux/compiler.h
Next compile the program:
make
And with no errors, you got a working mpt-status in this directory. Now let's check it out if it works!
./mpt-status
ioc0 vol_id 0 type IM, 2 phy, 231 GB, state OPTIMAL, flags ENABLED
ioc0 phy 3 scsi_id 9 ATA WDC WD2500YS-18S 6C07, 232 GB, state ONLINE, flags NONE
ioc0 phy 2 scsi_id 1 ATA WDC WD2500YS-18S 6C07, 232 GB, state ONLINE, flags NONE./mpt-status -n -s
vol_id:0 OPTIMAL
phys_id:3 ONLINE
phys_id:2 ONLINE
spare_id:0 ONLINE
spare_id:1 ONLINE
scsi_id:3 100%
scsi_id:2 100%
It works! These two examples are simple. The first one is just showing what's running, the other one is showing what is running, but also shows hot-spares and even more. If you do not use the "-s" you will see everything what's needed.
I hope I help some souls with this example! Good luck!
-CoolZero
So, it's Sunday, it also is a rainy day, and you think, hell, let's get to work with a nice Dell 2950 server with Drac 5 in it's system. Now I would like to make a simple console redirection, for the simplicity of remote administration of the machine.
Now you think, hell, that's a easy job, and normally, it really is! But I have spend almost for 2 hours to get this working. So let's see what steps I have taken to get the darn thing moving.
First, install on the server Dell's Openmanage, or just do like I did, just some setup in the bios. With Dell's Openmanage you can do this very easy, just type in the following:
omconfig chassis biossetup attribute=extserial setting=rad
omconfig chassis biossetup attribute=fbr setting=57600
omconfig chassis biossetup attribute=serialcom setting=com2
omconfig chassis biossetup attribute=crab setting=enabled
In your bios setup, just get to the console redirection options, and use the values like here:
BIOS:
on with console redirection via com2
remote access device
57600
vt100/vt220
enabled
Alright, second, get in your Drac 5 and set it up so it can do ssh. When done, connect with ssh, and type in the following:
racadm config -g cfgSerial -o cfgSerialBaudRate 57600
racadm config -g cfgSerial -o cfgSerialConsoleEnable 1
racadm config -g cfgSerial -o cfgSerialHistorySize 2000
These command's simply set the right speed + history size of the console redirection. This was really the easy part. Now the part where I got stuck. I saw everything booting in the serial redirection console, but when the operating system started, it simply did not show anything anymore. The problem was that Xen has a own startup line to get the console going. To get everything working we need to edit the following files:
/boot/grub/grub.conf
/etc/inittab
In grub.conf it looks like this:
serial --unit=0 --speed=57600
terminal --timeout=10 console serial
default=0
timeout=5
title Red Hat Enterprise Linux Server (2.6.18-92.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-92.el5 console=tty0 console=com2 \ com2=57600,8n1
module /vmlinuz-2.6.18-92.el5xen ro root=LABEL=/1 xencons=ttyS1 \ console=ttyS1
module /initrd-2.6.18-92.el5xen.img
And in inittab the following line needs to be added:
# Run gettys in standard runlevels
s1:2345:respawn:/sbin/agetty ttyS1 57600
Now we have everything to get the serial console redirection working. Now let's test it. Get to ssh of your Drac 5, and type in the following:
connect com2
To disconnect use "[CTRL]+[\]" (Press the Control key and the backslash key together to disconnect cleanly from the connection.)
If it says the port is in use by another user that probably means the connection was not cleanly terminated. Best way to clear that up is to reset the drac card with the following command:
racadm racreset
You should see something in your screen. To be sure this is working at all, reboot your server, you really should get the starting up on your screen. If not, then you got already something wrong at your bios setup! If you see your system starting but you don't see your booting process of the os, you need to check the settings of grub.conf, and maybe inittab if you see the booting, but no login screen.
I hope I help some people who are experiencing the same problems I had. For comments, you can mail me at jim (the monkey tale) coolzero dot info.
-CoolZero
Hi there all,
Well, today I was busy looking at vkernel of DragonFlyBSD. When I got it rolling it was really nice to see how easy it was to use, but unfortunately the manual on their own site is a little outdated and not complete. So I decided to write a small quick reference for myself if I want to do this again!
I'm using currently DragonFlyBSD 1.10.1.
First download the iso image:
http://chlamydia.fs.ei.tum.de/pub/DragonFly/iso-images/dfly-1.10.1_REL.iso.gz
Unpack:
gunzip dfly-1.10.1_REL.iso.gz
And burn it on a cd. Now it's time for the installation.
Just hit the ENTER key when asking which choice to make at boot time. Alright, now it's booting to the prompt. Enter as username installer. Then choose as language default then Install DragonFlyBSD and again Install DragonFlyBSD. WARNING for this, it will whipe out the whole hard drive, so if you need multi boot, check the manuals @ the DragonFly website. You will see a list of drives, choose the right hard drive. And then choose Use Entire Disk and then OK and again OK. Alright, you can now fill out the partitioning, just do that your way, you can choose the defaults if you like. When you hit OK, and all is formatted, you get the screen to begin the installation. Just hit ENTER. Again after this you can just hit enter. Works normally, if not, check only the drive you need where the bootmanager can be on. Now you can configure the system, just fill in what you need, and the reboot the computer.
Now log in as root and do the following (and yes ROOT is evil!):
cp /usr/share/examples/cvsup/DragonFly-release1_10-supfile /root
cvsup /root/DragonFly-release1_10-supfile
Because the process of making a new kernel + world really takes a load of time use screen, download it like here:
cd /usr/
cvs -d anoncvs@anoncvs.us.netbsd.org:/cvsroot co pkgsrc
cd /usr/pkgsrc/misc/screen
bmake install clean
Now build the new world / kernel:
If you have a custom kernel config file in /usr/src/sys/i386/conf, replace make buildkernel and make installkernel with make buildkernel KERNCONF=KERNELNAME and make installkernel KERNCONF=KERNELNAME, where KERNELNAME is the name of that configuration file.
cd /usr/src && make buildworld && make buildkernel
make installkernel && make installworld && make upgrade
reboot
Alright, you have now a fresh kernel and made a build world. You need to do this because you need to install the build world in the vkernel file later. Now do the following steps.
Making symlinks because var directory is normally small:
mkdir /home/var.vkernel
ln -s /home/var.vkernel /var/vkernel
Making the vkernel file:
dd if=/dev/zero of=/var/vkernel/rootimg.01 bs=1m count=10240
vnconfig -c -s labels vn0 /var/vkernel/rootimg.01
disklabel -r -w vn0s0 auto
disklabel -e vn0s0Add the following:
a: 20971520 0 4.2BSD # 10240.000Mnewfs /dev/vn0s0a
mount /dev/vn0s0a /mnt
cd /usr/src
make installworld DESTDIR=/mnt
cd etc
make distribution DESTDIR=/mnt
echo '/dev/vkd0s0a / ufs rw 1 1' >/mnt/etc/fstabecho 'console "/usr/libexec/getty Pc" cons25 on secure' \
>/mnt/etc/ttysumount /mnt
vnconfig -u vn0s0a
Compiling the virtual kernel:
In order to compile a virtual kernel use the VKERNEL kernel configuration file residing in /usr/src/sys/config (or a configuration file derived thereof):
cd /usr/src
make -DNO_MODULES buildkernel KERNCONF=VKERNEL
Enabling virtual kernel operation:
A special sysctl, vm.vkernel_enable, must be set to enable vkernel operation:
sysctl vm.vkernel_enable=1
Configuring the network on the host system:
In order to access a network interface of the host system from the vkernel, you must add the interface to a bridge device which will then be passed to the -I option. Also a little notice, the line where rl0 is used should be your ethernet alias. You can find that by doing ifconfig:
kldload if_bridge.ko
kldload if_tap.ko
ifconfig bridge0 create
ifconfig bridge0 addm rl0
ifconfig bridge0 up
Running the kernel:
Finally, the virtual kernel can be run:
cd /usr/obj/usr/src/sys/VKERNEL
./kernel.debug -m 64m -r /var/vkernel/rootimg.01 -I auto:bridge0
Alright, well now you have your vkernel running under DragonFlyBSD. Hope this helps some people having trouble configurating the vkernel. Or at least help some people who want to just hit and run! If you have further questions, just e-mail me. That's jim (themonkeytale) coolzero dot info.
-CoolZero