Grub problems after How To Set Up Software RAID1 On A Running LVM System

Discussion in 'HOWTO-Related Questions' started by newfield_no1, Mar 4, 2012.

  1. newfield_no1

    newfield_no1 New Member

    I have set up a server acording to How To Set Up Software RAID1 On A Running LVM System and it works fine to start normaly but when I test to start it with only one disk I get a problem.

    When I start it from one of my disks (sda) I can start in Degraded mod and after a restart and connecting the other disk mount the other hardisk, then it is OK.

    But when I start it from the other disk (sdb) it does not work.
    I get this:
    grub rescue no such device 52a5fd6-... and so.

    The number is the UUID that i have a # before in fstab.

    It looks as grub has different files on the disks.
    I have done this:
    grub-install /dev/sda
    grub-install /dev/sdb

    Here is my files.
    mdadm.cfg

    # mdadm.conf
    #
    # Please refer to mdadm.conf(5) for information about this file.
    #

    # by default, scan all partitions (/proc/partitions) for MD superblocks.
    # alternatively, specify devices to scan, using wildcards if desired.
    DEVICE partitions

    # auto-create devices with Debian standard permissions
    CREATE owner=root group=disk mode=0660 auto=yes

    # automatically tag new arrays as belonging to the local system
    HOMEHOST <system>

    # instruct the monitoring daemon where to send mail alerts
    MAILADDR root

    # definitions of existing MD arrays

    # This file was auto-generated on Sun, 04 Mar 2012 11:51:14 +0100
    # by mkconf $Id$
    ARRAY /dev/md0 level=raid1 num-devices=2 UUID=2d2b37df:2feded7d:f3eca3b8:8dd14187
    ARRAY /dev/md1 level=raid1 num-devices=2 UUID=bbca8913:3dfba770:f3eca3b8:8dd14187

    fstab:
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc nodev,noexec,nosuid 0 0
    /dev/mapper/webb6-root / ext4 errors=remount-ro 0 1
    # /boot was on /dev/sda1 during installation
    #UUID=52a5fd61-2696-49cd-8118-ca315a15a29d /boot ext2 defaults 0 2
    /dev/md0 /boot ext2 defaults 0 2
    /dev/mapper/webb6-swap_1 none swap sw 0 0

    mtab:

    /dev/mapper/webb6-root / ext4 rw,errors=remount-ro 0 0
    proc /proc proc rw,noexec,nosuid,nodev 0 0
    none /sys sysfs rw,noexec,nosuid,nodev 0 0
    none /sys/fs/fuse/connections fusectl rw 0 0
    none /sys/kernel/debug debugfs rw 0 0
    none /sys/kernel/security securityfs rw 0 0
    none /dev devtmpfs rw,mode=0755 0 0
    none /dev/pts devpts rw,noexec,nosuid,gid=5,mode=0620 0 0
    none /dev/shm tmpfs rw,nosuid,nodev 0 0
    none /var/run tmpfs rw,nosuid,mode=0755 0 0
    none /var/lock tmpfs rw,noexec,nosuid,nodev 0 0
    none /lib/init/rw tmpfs rw,nosuid,mode=0755 0 0
    /dev/md0 /boot ext2 rw 0 0


    /boot/grub/grub.cfg:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #

    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
    load_env
    fi
    set default="0"
    if [ ${prev_saved_entry} ]; then
    set saved_entry=${prev_saved_entry}
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi

    function savedefault {
    if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
    fi
    }

    function recordfail {
    set recordfail=1
    if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
    }
    insmod raid
    insmod mdraid
    insmod lvm
    insmod ext2
    set root='(webb6-root)'
    search --no-floppy --fs-uuid --set 280a3f6e-fc66-4633-bda3-385a35401aac
    if loadfont /usr/share/grub/unicode.pf2 ; then
    set gfxmode=640x480
    insmod gfxterm
    insmod vbe
    if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
    fi
    fi
    insmod raid
    insmod mdraid
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 326cfd25-e5aa-415f-86dd-9d4077c60fe2
    set locale_dir=($root)/grub/locale
    set lang=sv
    insmod gettext
    if [ ${recordfail} = 1 ]; then
    set timeout=-1
    else
    set timeout=10
    fi
    ### END /etc/grub.d/00_header ###

    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    ### END /etc/grub.d/05_debian_theme ###

    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Ubuntu, med Linux 2.6.32-33-server' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod raid
    insmod mdraid
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 326cfd25-e5aa-415f-86dd-9d4077c60fe2
    linux /vmlinuz-2.6.32-33-server root=/dev/mapper/webb6-root ro quiet
    initrd /initrd.img-2.6.32-33-server
    }
    menuentry 'Ubuntu, med Linux 2.6.32-33-server (återställningsläge)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod raid
    insmod mdraid
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 326cfd25-e5aa-415f-86dd-9d4077c60fe2
    echo 'Läser in Linux 2.6.32-33-server ...'
    linux /vmlinuz-2.6.32-33-server root=/dev/mapper/webb6-root ro single
    echo 'Läser in initial ramdisk ...'
    initrd /initrd.img-2.6.32-33-server
    }
    ### END /etc/grub.d/10_linux ###

    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
    insmod raid
    insmod mdraid
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 326cfd25-e5aa-415f-86dd-9d4077c60fe2
    linux16 /memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod raid
    insmod mdraid
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 326cfd25-e5aa-415f-86dd-9d4077c60fe2
    linux16 /memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###

    ### BEGIN /etc/grub.d/30_os-prober ###
    if [ ${timeout} != -1 ]; then
    if keystatus; then
    if keystatus --shift; then
    set timeout=-1
    else
    set timeout=0
    fi
    else
    if sleep --interruptible 3 ; then
    set timeout=0
    fi
    fi
    fi
    ### END /etc/grub.d/30_os-prober ###

    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###
     
  2. newfield_no1

    newfield_no1 New Member

    Solved

    Dont mind this post, I have started all over again.
     

Share This Page