Red HatThis forum is for the discussion of Red Hat Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have a working server running CentOS 5.5 (similar to RedHat EL) with the 2.6.18-194.el5 kernel. The hardware is a few years old, but we were able to accomplish this following goal using CentOS 4.4. What I'm trying to do is to back the system up to an external USB hard drive such that it can be booted from for recovery or to then take that drive and restore its contents to a second server with identical hardware. We have been successful implementing this on other server pairs, but I'm having a great deal of trouble getting this to work on this hardware and OS. I'm not using LVM or dual-booting with another OS.
The USB drive is set up with identical partitions to the RAID set, and all the files have been successfully copied over, but I can't get the system to boot from it. Below is what I get when trying to boot from the USB drive:
Booting 'CentOS (2.6.18-194.el5)'
Filesystem type is ext2fs, partition type 0x83
kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/
Error 13: Invalid or unsupported executable format
Press any key to continue...
I saw that the 'root=LABEL=/' is wrong for the USB drive, so I entered the menu and edited that entry to read 'root=LABEL=/root-backup' and tried again, but got the same results.
Here are the config files and details:
The RAID set is on /dev/i2o/hda.
The USB drive is /dev/sda.
I used the Boot Info Script (http://sourceforge.net/projects/bootinfoscript/) to provide some helpful info for troubleshooting. Everything looks right to me, but I don't have a lot of experience with grub. Here are the script's results:
I'm still having no luck with booting from the USB drive, however, something that has been done in the past was to create a boot floppy with grub installed on it that would then boot from the USB drive. I've made an attempt or two at this, but I'm not getting anywhere. It seems to still be trying to boot from the RAID set, yet fails even that.
Can anyone give me some pointers on properly configuring grub for the floppy to load the OS on the USB drive?
I've gotten to a point booting from the USB drive, and it fails. Here is the last bit of activity from the screen:
Scanning and configuring dmraid supported devices
Trying to resume from LABEL=SWAP-i2o/hda5
No suspend signature on swap, not resuming.
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: moving /proc failed: No such file or directory
setuproot: moving /sys failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
First off, it looks like "LABEL=SWAP-i2o/hda5" is incorrect - I'm not wanting to involve the RAID set when booting from USB, so somehow this is wrong, yet it's not the main problem.
For whatever reason, it can't find the root partition on the USB drive, so it freaks out. After many attempts to configure grub, fstab and other files, I can't train it to boot properly.
I'm trying to use this as a method to build a boot floppy to then start the boot process on the USB drive.
I've gotten a little (?) further, I think, but it still fails. This opens up a few more avenues to explore. I never knew that the initrd file could be de-constructed and reconfigured, so that helped a bit, but the only thing that changed from the previous result is choosing the correct swap label (however, it couldn't find it). Below is my current init file so far:
echo Preparing to boot from USB drive...
mount -t proc /proc /proc
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/urandom c 1 9
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/rtc c 10 135
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
echo Setting up hotplug.
echo Creating block device nodes.
echo "*** Loading usb-storage ***"
echo "Loading ehci-hcd.ko module"
echo "Loading ohci-hcd.ko module"
echo "Loading uhci-hcd.ko module"
mount -t usbfs /proc/bus/usb /proc/bus/usb
echo "*** Sleeping 5 seconds ***"
echo "Loading jbd.ko module"
echo "Loading ext3.ko module"
echo "Loading i2o_core.ko module"
echo "Loading i2o_block.ko module"
echo "Loading dm-mem-cache.ko module"
echo "Loading dm-mod.ko module"
echo "Loading dm-log.ko module"
echo "Loading dm-region_hash.ko module"
echo "Loading dm-message.ko module"
echo "Loading dm-raid45.ko module"
echo Scanning and configuring dmraid supported devices
echo Creating root device.
mkrootdev -t ext3 -o defaults,ro sda6
echo "*** Reread partition table ***"
/sbin/sfdisk -R /dev/sda
echo Mounting root filesystem.
echo Setting up other filesystems.
echo Switching to new root and running init.
Any ideas on why it still can't find my root partition in the USB drive?