Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well, first a bit of background:
I got an old HP DL380 G4 to run a minecraft server on, but I mostly got it to learn about linux server architecture, so don't tell me it's old and slow, because believe me, I know. First off, I tried installing Fedora 18, Centos 6.4, archlinux, and Ubuntu. Fedora, Centos, and Ubuntu couldn't resolve the display driver properly and the monitor kicked an error which I spent several days trying to fix. With Archlinux, I was able to boot to the disk prompt, and from there I could install the system and chroot in. However, when I tried to boot the the drive itself, I got the monitor error again. Finally I tried an older version of CentOS (5.9), and that worked all the way through the graphical install with one important caveat. When I had installed Arch, I used GPT for the partition tables, but CentOS 5.9 doesn't support that, so I had to go and change it to MBR. After CentOS was installed, I booted the system, and got a
Code:
grub
Error, no such partition
Grub rescue>
So, eventually, I figured out how to see and change the boot device from the rescue prompt. the set command returned that grub was looking for (hd0, gpt1) as the root device, but I don't think that's valid. My partitions are like so:
#1 4GB Swap /dev/cciss/c0d0p1
#2 10GB ext3 /dev/cciss/c0d0p2 (this is where the grub files are)
#3 340GB ext3 /dev/cciss/c0d0p3 (This is where /boot, /home, /var etc. are) Also this is flagged as the boot device.
In /grub/device.map it shows hda0 /dev/cciss/c0d0, which is the main raid controller device. I tried to set the root partition from the grub rescue prompt with set root=(hda0,2) but it was not persistent through a reboot. It just went back to (hda0, gpt1). It seems like grub is leftover from the arch install when the partition table was GPT, and it hasn't changed the device map. I tried
Code:
grub-install /dev/cciss/c0d0p2
from the arch disk prompt, but I got an error (something like cannot create file x, sorry I don't remember the actual message). Any idea how I might re-install grub to get it to see the proper partitions for boot?
Boot from rescue disk and chroot into installation.
Double check your parttion schema to detect /boot.
Check that /boot have kernel, initrd, grub, grub/*stage*, grub/grub.conf
Use (hd1,0) if your /boot is first partition on cciss, (hd1,1) if second; see below
Now update grub record like:
# grub
grub> device (hd1) /dev/cciss/c0d0
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd1)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd1)"... failed (this is not fatal)
Running "embed /grub/e2fs_stage1_5 (hd1,0)"... failed (this is not fatal)
Running "install /grub/stage1 (hd1) /grub/stage2 p /grub/grub.conf "... succeeded
Done.
Then I re-installed CentOS 5.9 to p3 and selected "install grub on first sector of /dev/cciss/c0d0p1". Am I correct in thinking that the grub files should be on the /boot partition? Anyway, after doing this, I booted and the partition error is gone, but it just sits at "Grub Loading" forever. I also tried installing CentOS with the default option of installing grub on /dev/sda, but no dice. Same grub loading screen. I can't chroot (arch-chroot) into p3 (mounted on /mnt) because it says /mnt/run doesn't exist. I tried grub-install on /dev/cciss/c0d0p1, but it says
Code:
'/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting.
Any ideas what might be the issue now? Also I should mention that I can't figure out how to get to the grub prompt to execute the setup command like you mentioned. There's no "grub" command, if that's what you mean.
Last edited by InventiousTech; 10-07-2013 at 05:54 PM.
at the grub prompt what is the output of set,set will show what partition grub is looking for /boot/grub on and the root partition among other things. ls will list the partitions present and ls /, ls /boot, and ls /boot/grub will display what is in the directories of the partition that grub has for root.
Ahh, but therein lies the problem. I never get to a grub prompt, it hangs at "grub loading". Is there a way to get the grub prompt from the arch DVD command line? I can't chroot into the system because there's no /mnt/run mount point (with the CentOS drive being mounted at /mnt), so I can't actually get to a local system terminal. How is the grub prompt normally reached?
Well, I tried "grub-install --root-directory=/mnt/boot" (That's where I mounted partition 1), but I got an error "ext2 file system does not support embedding". So, I tried it with the --force option and it seemed to work, but the boot sequence still stops at "grub loading".
mount /dev/cciss/c0d0p1 /mnt
grub-install --root-directory=/mnt /dev/cciss/c0d0
After I did that, the system boots into the grub prompt. How do you boot to linux from the prompt? Also, since there's only one install, why would grub not boot to it automatically?
My recepie (one of first replies) was relevant for inital situation, when you had rescued
chrooted environment. Then in this environment, you have command grub.
Now, you reinstall over and over, and have no even rescue system.
I had no problem with G4 and RH4 and RH5 on it. I think RH6 will run also.
So CentOS6, probably, good.
Make fresh install, choose text mode, accept wipe all disks and default layout.
Everything should work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.