Changes

Jump to navigation Jump to search
1,892 bytes added ,  11:05, 9 November 2013
Line 1: Line 1:     
==Grub==
 
==Grub==
Sometime you can issue some problems with your grub often when your server doesn't want to start, there are no needs to reinstall it, just to fix your grub.
+
There may be an occasion when an issue with grub will cause your server to not boot, there is no need to reinstall the system, you just need to repair the installation of grub.
 +
 
 
==Fix the GRUB from the startup command line==
 
==Fix the GRUB from the startup command line==
 +
Normally if grub can not start and your system is not damagaed, you will have a basic system prompt ... otherwise go to [[grub#fix_the_GRUB_with_the_systemrescuecd|Chapter 2]].
   −
Normally if grub can not start and your system is nice, you have a minimum order prompt ... otherwise go to [[grub#fix_the_GRUB_with_the_systemrescuecd|Chapter 2]].
+
I presume that your SME Server is using a RAID1 of two disks, otherwise you have to adapt this HOWTO to your setup.
 +
 +
In a terminal at the command prompt issue the following commands
   −
I suppose that your SME Server is on a RAID1 of two disks, otherwise you have to adapt this HOWTO.
+
grub
 
  root (hd0,0)
 
  root (hd0,0)
 
  Filesystem type is ext2fs, partition type 0xfd
 
  Filesystem type is ext2fs, partition type 0xfd
 
+
 
  setup (hd0)
 
  setup (hd0)
   Line 24: Line 28:  
  reboot
 
  reboot
   −
to /dev/sdb you implement of one, similar to the following disks (sdc, sdd, sde ....)
+
to /dev/sdb you issue the following commands, using one of the following disk labels (sdc, sdd, sde ....)
    +
grub
 
  root (hd1,0)
 
  root (hd1,0)
 
  setup (hd1)
 
  setup (hd1)
   −
We must install grub on all other drives to give the capacity to operate the system. to reach the boot menu of the bios, well it depends on your hardware ... F12 under dell, Acer Esc, F11 from msi .... my sme is with Raid1 so I have two drives, you will need to adapt my example to your the number of disks.
+
grub must be installed on all other drives to give the capacity to operate the system. To reach the boot menu of the bios, will depend on your hardware ... F12 under dell, Acer Esc, F11 from msi .... my sme is with Raid1 so I have two drives, you will need to adapt my example to your the number of disks.
 +
 
 +
==Fix the GRUB with the official SME Server CDROM ==
 +
I presume that your SME Server is on a RAID1 of two disks (sda, sdb), otherwise you will have to adapt this HOWTO.
 +
 
 +
* start the system with your official SME Server CDROM
 +
* give at prompt : '''linux rescue'''
 +
* set your language and your keyboard
 +
* set to '''no''' the start of network interfaces
 +
* set to '''continue''' the question about how the system is mounted in /mnt/sysimage
 +
* set to '''ok'''
 +
* give at prompt :
 +
chroot /mnt/sysimage
 +
su -
 +
 
 +
* then you can perform
 +
grub-install /dev/sda
 +
grub-install /dev/sdb
 +
 
 +
do it for each disk you have on your server
 +
 
 +
* to exit
 +
exit
 +
exit
 +
halt
 +
 
 +
then you can test if the grub is present on your drives.
 +
 
    
==Fix the GRUB with the systemrescuecd ==
 
==Fix the GRUB with the systemrescuecd ==
   −
{{note box| We go to work with [http://www.sysresccd.org/SystemRescueCd_Homepage SystemRescueCd] which is a Linux system rescue disk available as a bootable CD-ROM or USB stick for administrating or repairing your system and data after a crash.[http://www.sysresccd.org/Download Download]. The goal is to get mounted your logical volumes on /mnt where you can save them on a usb disk.}}
+
{{note box| We go to work with [http://www.sysresccd.org/SystemRescueCd_Homepage SystemRescueCd] which is a Linux system rescue disk available as a bootable CD-ROM or USB stick for administrating or repairing your system and data after a crash.[http://www.sysresccd.org/Download Download]. The goal is to mount your logical volumes on /mnt where you can save them on a usb disk.}}
I suppose that your SME Server is on a RAID1 of two disks, otherwise you have to adapt this HOWTO.
+
I presume that your SME Server is on a RAID1 of two disks, otherwise you will have to adapt this HOWTO.
 
*start the system with your system rescue cd or you usb stick, choose your keyboard settings
 
*start the system with your system rescue cd or you usb stick, choose your keyboard settings
   Line 63: Line 95:  
*afterward if the LVM is launched without error messages, we can mount the LVM in /mnt
 
*afterward if the LVM is launched without error messages, we can mount the LVM in /mnt
   −
{{tip box|if you have a name of logical volume who is not '''/dev/main/root''', you can type this command for knowing all your logical volume, and adapt this to your configuration.}}
+
{{tip box|if you have a logical volume that is not named '''/dev/main/root''', you can type the following command to list all your logical volumes, and then adapt this to your configuration.}}
    
  lvdisplay
 
  lvdisplay
   −
*Now you have successfully mounted your LVM then do this
+
*Now you have successfully mounted your LVM do the following
    
  mkdir /mnt/sysimage
 
  mkdir /mnt/sysimage
Line 88: Line 120:  
you can restart and continue the tutorial
 
you can restart and continue the tutorial
   −
===Installation of grub on the other disks===
+
===Installation of grub on other disks===
   −
*once your Sme started, you need to login in Root
+
*once your Sme started, you need to login in as root
 
then type
 
then type
 
  grub
 
  grub
Line 105: Line 137:     
from there you can reboot your server and check that the grub is installed on each hd. it is simple, with the boot menu or bios, you say on what hd you want to boot .
 
from there you can reboot your server and check that the grub is installed on each hd. it is simple, with the boot menu or bios, you say on what hd you want to boot .
to reach the boot menu of the bios, well it depends on your hardware ... F12 under dell, Acer Esc, F11 from msi ....  
+
to reach the boot menu of the bios, well it depends on your hardware ... F12 under dell, Acer Esc, F11 from msi ....
 +
 
 +
==Installation of grub on a new disk==
 +
 
 +
When your system is started you can install grub by the command Line on any other disk you want. You have to change by the name of your new disk.
 +
 
 +
[root@sme8dev64 ~]# 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> device (hd0) /dev/sdb
 +
device (hd0) /dev/sdb
 +
 
 +
grub> root (hd0,0)
 +
root (hd0,0)
 +
Filesystem type is ext2fs, partition type 0xfd
 +
 
 +
grub> setup (hd0)
 +
setup (hd0)
 +
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)"...  15 sectors are embedded.
 +
succeeded
 +
Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd1,0)/grub/stage2 /grub/grub.conf"... succeeded
 +
Done.
 +
 
 +
grub> quit
 +
quit
    
==Fix Grub on a HP Proliant DL380 G2==
 
==Fix Grub on a HP Proliant DL380 G2==
Line 122: Line 189:  
  Compaq Hot-swappable 36.4GB, 10k or 15k RPM (mixed set) (BF03664664)
 
  Compaq Hot-swappable 36.4GB, 10k or 15k RPM (mixed set) (BF03664664)
   −
To re-configure GRUB, I followed these steps
+
To re-configure GRUB, follow these steps
    
1. Rename /etc/grub.conf  to /etc/grub.old
 
1. Rename /etc/grub.conf  to /etc/grub.old
Line 128: Line 195:  
2. edit /etc/grub.conf       
 
2. edit /etc/grub.conf       
 
  nano etc/grub.conf
 
  nano etc/grub.conf
3. uncommented the line that starts with #boot=
+
3. uncomment the line that starts with #boot=
   −
4. edited the boot= line to read
+
4. edit the boot= line to read
 
  boot=/dev/cciss/c0d0
 
  boot=/dev/cciss/c0d0
 
This line previously read (if i remember correctly) #boot=/dev/md0
 
This line previously read (if i remember correctly) #boot=/dev/md0
   −
5. opened /boot/grub/device.map  
+
5. open /boot/grub/device.map  
 
  nano /boot/grub/device.map
 
  nano /boot/grub/device.map
5a. I don't remember if the (hd0) line was correctly set.  It SHOULD read  
+
5a. You SHOULD read  
 
  (hd0)    /dev/cciss/c0d0
 
  (hd0)    /dev/cciss/c0d0
  

Navigation menu