Grub2 om Ubuntu 10.04

Discussion in 'HOWTO-Related Questions' started by newfield_no1, Nov 8, 2011.

  1. newfield_no1

    newfield_no1 New Member

    I have followed the guide:
    How To Set Up Software RAID1 On A Running System (Incl. GRUB2 Configuration) (Ubuntu 10.04)
    But I cant get the option to start from the other hd in the menue.
    When I start without the first hd then it says that it is missing and I dont get any option to start from the other.
    I have done this earlier with 8.04 and Grub but not on my server with 10.04 that has Grub2.

    I thougt that 09_swraid1_setup should fix that.
    Am I missing some thing?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Is this an Ubuntu 10.04 system? Did you run
    Code:
    grub-install /dev/sda
    grub-install /dev/sdb
    to install GRUB on both drives?
     
  3. newfield_no1

    newfield_no1 New Member

    Yes, two times to be sure :)

    When I disconnect on disk the server just reboots befor i can se anything on the screen.
    When I disconnect the oter disk the server starts with the initramfs promt.

    I will try to reinstall (again) and make the raid-set by the installer to see if that works.
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Are both disks in sync before you try to disconnect one?

    What's in /boot/grub/grub.cfg and /etc/fstab?

    This system doesn't use LVM, right?
     
  5. newfield_no1

    newfield_no1 New Member

    No I have test a new setup and created the RAID1 by setting up the disks manualy in the installation of Ubuntu 10.04.

    /boot /dev/md0 1 GB
    swap /dev/md1 20 GB
    / /dev/md2 275 GB

    It works fine but I think that Bios dont like to start from the second disk.
    I have tested to pull one sata cables and when I disconnect one of the cables it starts with a degraded array.
    But when I switch the cable and try to start on the other disk it says something like "/boot is not ready" but I can press S and the system starts without /boot.
    I dont use LMV

    By the way, fdisk -l says:
    Disk /dev/md0 innehåller inte en giltig partitionstabell
    Disk /dev/md1 innehåller inte en giltig partitionstabell
    Disk /dev/md2 innehåller inte en giltig partitionstabell
    "not a guilty parttitiontable" in english.
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Maybe it really is a problem with your BIOS, but to go sure, can you post the contents of /boot/grub/grub.cfg and /etc/fstab?
     
  7. newfield_no1

    newfield_no1 New Member

    ### 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 ext2
    set root='(md2)'
    search --no-floppy --fs-uuid --set e368b85a-a578-45e0-9cd4-7aaebdfe7098
    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 4afb2fd1-1573-4e89-96a1-77b51d05c452
    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 4afb2fd1-1573-4e89-96a1-77b51d05c452
    linux /vmlinuz-2.6.32-33-server root=UUID=e368b85a-a578-45e0-9cd4-7aaebdfe7098 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 {s {
    recordfail
    insmod raid
    insmod mdraid
    insmod ext2
    set root='(md0)'
    search --no-floppy --fs-uuid --set 4afb2fd1-1573-4e89-96a1-77b51d05c452
    echo 'Läser in Linux 2.6.32-33-server ...'
    linux /vmlinuz-2.6.32-33-server root=UUID=e368b85a-a578-45e0-9cd4-7aaebdfe7098 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 4afb2fd1-1573-4e89-96a1-77b51d05c452
    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 4afb2fd1-1573-4e89-96a1-77b51d05c452
    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 ###

    -------------------------------------------------------------------
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc nodev,noexec,nosuid 0 0
    # / was on /dev/md2 during installation
    UUID=e368b85a-a578-45e0-9cd4-7aaebdfe7098 / ext4 errors=remount-ro 0 1
    # /boot was on /dev/md0 during installation
    UUID=4afb2fd1-1573-4e89-96a1-77b51d05c452 /boot ext4 defaults 0 2
    # swap was on /dev/md1 during installation
    UUID=ec2c57fc-3816-4469-991c-1b6aa14a2a74 none swap sw 0 0
     
  8. falko

    falko Super Moderator ISPConfig Developer

    I think your fstab should look as follows:

    Code:
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    /dev/md2 /               ext4    errors=remount-ro 0       1
    /dev/md0 /boot           ext4    defaults        0       2
    /dev/md1 none            swap    sw              0       0
     

Share This Page