Page 1 of 12 12311 ... LastLast
Results 1 to 10 of 115

Thread: 11.04 server, GRUB and software raid issue

  1. #1
    Join Date
    Jul 2011
    Beans
    43

    11.04 server, GRUB and software raid issue

    Hi There!

    Anybody who is familiar with GRUB and
    software raids may be can help me to solve issue.

    Enviroment:
    Ubuntu server is 11.04 64 bit, 2 HDD, 500gb each. Each HDD has 3 partitions:
    /boot, root and swap. Each of the partitions joined to software RAID1, mirroring.

    I install 11.04 64 bit and after reboot I have got "invalid arch independent elf magic" in GRUB. Ubuntu 9.04 works fine in the he same enviroment.

    Looking forward any help and suggestions.

  2. #2
    Join Date
    Jul 2011
    Beans
    43

    Re: 11.04 server, GRUB and software raid issue

    I read a lot of hints, don't put SWAP to the raid1, no sense, I reconfigured and made fresh install.
    Now I have /dev/md0/ - /boot (ext4) and /dev/md1 - / (ext4), but GRUB throws me exception again after reboot : "no such disk". According hints from other threads I boot from Live CD and start Boot Info Script 0.60. See RESULTS.txt from it. What is wrong again ?
    Last edited by b0ba; July 28th, 2011 at 02:38 PM.

  3. #3
    Join Date
    Jul 2011
    Beans
    43

    Re: 11.04 server, GRUB and software raid issue

    Code:
    RESULTS.txt
                        Boot Info Script 0.60    from 17 May 2011
      
      
      ============================= Boot Info Summary: ===============================
      
       => Grub2 (v1.97-1.98) is installed in the MBR of /dev/sda and looks at sector 
          1 of the same hard drive for core.img. core.img is at this location and 
          looks for (md0)/boot/grub on this drive.
       => Grub2 (v1.97-1.98) is installed in the MBR of /dev/sdb and looks at sector 
          1 of the same hard drive for core.img. core.img is at this location and 
          looks for (md0)/boot/grub on this drive.
      
      sda1: __________________________________________________________________________
      
          File system:       
          Boot sector type:  -
          Boot sector info:  
          Mounting failed:   mount: unknown filesystem type ''
      
      sda2: __________________________________________________________________________
      
          File system:       Extended Partition
          Boot sector type:  -
          Boot sector info:  
      
      sda5: __________________________________________________________________________
      
          File system:       linux_raid_member
          Boot sector type:  -
          Boot sector info:  
      
      sda6: __________________________________________________________________________
      
          File system:       linux_raid_member
          Boot sector type:  -
          Boot sector info:  
      
      sda7: __________________________________________________________________________
      
          File system:       swap
          Boot sector type:  -
          Boot sector info:  
      
      sdb1: __________________________________________________________________________
      
          File system:       
          Boot sector type:  -
          Boot sector info:  
          Mounting failed:   mount: unknown filesystem type ''
      mount: unknown filesystem type ''
      
      sdb2: __________________________________________________________________________
      
          File system:       Extended Partition
          Boot sector type:  -
          Boot sector info:  
      
      sdb5: __________________________________________________________________________
      
          File system:       linux_raid_member
          Boot sector type:  -
          Boot sector info:  
      
      sdb6: __________________________________________________________________________
      
          File system:       linux_raid_member
          Boot sector type:  -
          Boot sector info:  
      
      sdb7: __________________________________________________________________________
      
          File system:       swap
          Boot sector type:  -
          Boot sector info:  
      
      ============================ Drive/Partition Info: =============================
      
      Drive: sda _____________________________________________________________________
      
      Disk /dev/sda: 500.1 GB, 500107862016 bytes
      255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      
      Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
      
      /dev/sda1               2,048         4,095         2,048  fd Linux raid autodetect
      /dev/sda2               6,142   976,771,071   976,764,930   5 Extended
      /dev/sda5               6,144     1,957,887     1,951,744  fd Linux raid autodetect
      /dev/sda6          21,694,464   976,771,071   955,076,608  fd Linux raid autodetect
      /dev/sda7           1,959,936    21,688,319    19,728,384  82 Linux swap / Solaris
      
      
      Drive: sdb _____________________________________________________________________
      
      Disk /dev/sdb: 500.1 GB, 500107862016 bytes
      255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      
      Partition  Boot  Start Sector    End Sector  # of Sectors  Id System
      
      /dev/sdb1               2,048         4,095         2,048  fd Linux raid autodetect
      /dev/sdb2               6,142   976,771,071   976,764,930   5 Extended
      /dev/sdb5               6,144     1,957,887     1,951,744  fd Linux raid autodetect
      /dev/sdb6          21,694,464   976,771,071   955,076,608  fd Linux raid autodetect
      /dev/sdb7           1,959,936    21,688,319    19,728,384  82 Linux swap / Solaris
      
      
      "blkid" output: ________________________________________________________________
      
      Device           UUID                                   TYPE       LABEL
      
      /dev/loop0                                              squashfs   
      /dev/sda5        5db37a62-21c8-bcab-9522-eb6bc2319155   linux_raid_member dbs12:0
      /dev/sda6        a424d895-07ae-012b-8a3d-c2f8435e4a95   linux_raid_member dbs12:1
      /dev/sda7        2eb5aea8-aa35-491b-a3c1-87690641d83e   swap       
      /dev/sdb7        4f6a56f7-d808-45d7-a56e-f37913246674   swap
    Attached Files Attached Files
    Last edited by b0ba; July 28th, 2011 at 02:55 PM.

  4. #4
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: 11.04 server, GRUB and software raid issue

    Erm.
    You seem to have 4 partitions set up. What is the fourth?
    I suspect Grub's kernel cannot find a file it needs. So it is looking in the wrong place. It may be possible to manually boot from the rescue> prompt and then you can reinstall Grub.
    Have a look at: https://wiki.archlinux.org/index.php..._command_shell section "Using the rescue console".
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  5. #5
    Join Date
    Jul 2011
    Beans
    43

    Re: 11.04 server, GRUB and software raid issue

    so as I told sda5 and sda6 partitions could be mount to md0.
    from grub panel:

    grub> insmod raid
    grub> set root=(md0)
    grub> linux /boot/vmlinuz26 root=/dev/md0

    I have got again "no such disk"

    I have tried to add :grub> insmod mdraid
    and I have error : file not found. May be this is reason.
    Last edited by b0ba; July 28th, 2011 at 06:23 PM.

  6. #6
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: 11.04 server, GRUB and software raid issue

    When you installed 11.04 did you also reinstall Grub to the MBRs? 11.04 uses Grub 1.99 and your bootinfoscript is showing an earlier version. I think they need to match.

    It may be possible to boot the 11.04 live CD and see if it sees the RAID arrays (install mdadm if not). Then use it to reinstall Grub to the MBRs. I would assume you can do it the normal way like this:
    sudo mount /dev/md0 /mnt
    sudo grub-install --root-directory=/mnt /dev/sda
    sudo grub-install --root-directory=/mnt /dev/sdb


    I also see that in bootinfoscript the Grub core looks for (md0)/boot/grub which seems wrong to me if you have a separate boot partition: it should be (md0)/grub. So there may be a couple of things wrong here. I'm not sure why it worked with 9.10 unless, as I suggest, Grub was not reinstalled when 11.04 was installed.

    I have booted a non-RAID from the rescue prompt. I have not tried to boot a RAID. For a non-RAID without separate boot partition you do this (assuming your root patition is hd0,2):
    rescue> ls
    to see what partitions Grub can detect. Does yours see (md0) and (md1)?
    rescue> set prefix=(hd0,2)/boot/grub
    rescue> insmod (hd0,2)/boot/grub/linux.mod
    rescue> set root=(hd0,2)
    rescue> linux /vmlinuz root=/dev/sda2 ro
    rescue> initrd /initrd.img
    rescue> boot

    If yours sees (md0) you might try:
    rescue> insmod raid
    rescue> set prefix=(md0)/grub
    rescue> insmod (md0)/grub/linux.mod
    rescue> set root=(md0)
    rescue> linux /vmlinuz root=/dev/md0 ro
    rescue> initrd /initrd.img
    rescue> boot
    Last edited by YesWeCan; July 29th, 2011 at 01:15 AM.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

  7. #7
    Join Date
    Jul 2011
    Beans
    43

    Re: 11.04 server, GRUB and software raid issue

    Thank you very much for quick answer. I loaded again from LIVE CD ( Ubuntu Desktop 11.04 ). See log, step by step what I did.
    I have following question:
    I dont see mdadm.mod file in the grub folder, but grub config file has it. is it OK ?
    Seem not, because grub throws error : no such file

    Code:
    ubuntu@ubuntu:~$ uname -a
    Linux ubuntu 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
    ubuntu@ubuntu:~$ cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=11.04
    DISTRIB_CODENAME=natty
    DISTRIB_DESCRIPTION="Ubuntu 11.04"
    ubuntu@ubuntu:~$ sudo mount /dev/md0 /mnt
    mount: special device /dev/md0 does not exist
    ubuntu@ubuntu:~$ sudo apt-get install mdadm
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed:
      mdadm postfix
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    ……………………..
      Setting up mdadm (3.1.4-1+8efb9d1ubuntu4) ...
       * Starting MD monitoring service mdadm --monitor                                                            [ OK ] 
    Setting up postfix (2.8.2-1ubuntu1) ...
    Done.
    ubuntu@ubuntu:~$ sudo mdadm --assemble --scan
    mdadm: /dev/md/0 has been started with 2 drives.
    mdadm: /dev/md/1 has been started with 2 drives.
    ubuntu@ubuntu:~$ sudo mount /dev/md0 /mnt
    ubuntu@ubuntu:~$ ls /mnt/
    abi-2.6.38-8-server     initrd.img-2.6.38-8-server  memtest86+_multiboot.bin    vmlinuz-2.6.38-8-server
    config-2.6.38-8-server  lost+found                  System.map-2.6.38-8-server
    grub                    memtest86+.bin              vmcoreinfo-2.6.38-8-server
    ubuntu@ubuntu:~$ ls /mnt/grub
    acpi.mod                     ext2.mod             hello.mod        ntfscomp.mod         sleep.mod
    affs.mod                     extcmd.mod           help.mod         ntfs.mod             squash4.mod
    afs_be.mod                   fat.mod              hexdump.mod      ohci.mod             tar.mod
    afs.mod                      fixvideo.mod         hfs.mod          part_acorn.mod       terminal.lst
    aout.mod                     font.mod             hfsplus.mod      part_amiga.mod       terminal.mod
    appleldr.mod                 fshelp.mod           iorw.mod         part_apple.mod       terminfo.mod
    ata.mod                      fs.lst               iso9660.mod      part_bsd.mod         test_blockarg.mod
    ata_pthru.mod                functional_test.mod  jfs.mod          part_gpt.mod         testload.mod
    at_keyboard.mod              gcry_arcfour.mod     jpeg.mod         partmap.lst          test.mod
    befs_be.mod                  gcry_blowfish.mod    keylayouts.mod   part_msdos.mod       tga.mod
    befs.mod                     gcry_camellia.mod    keystatus.mod    part_sun.mod         trig.mod
    bitmap.mod                   gcry_cast5.mod       linux.mod        part_sunpc.mod       true.mod
    bitmap_scale.mod             gcry_crc.mod         loadbios.mod     parttool.lst         udf.mod
    blocklist.mod                gcry_des.mod         loadenv.mod      parttool.mod         ufs1.mod
    boot.mod                     gcry_md4.mod         locale           password.mod         ufs2.mod
    bsd.mod                      gcry_md5.mod         loopback.mod     password_pbkdf2.mod  uhci.mod
    btrfs.mod                    gcry_rfc2268.mod     lsacpi.mod       pbkdf2.mod           usb_keyboard.mod
    bufio.mod                    gcry_rijndael.mod    lsefimmap.mod    pci.mod              usb.mod
    cat.mod                      gcry_rmd160.mod      lsefisystab.mod  play.mod             usbms.mod
    chain.mod                    gcry_seed.mod        lsmmap.mod       png.mod              usbserial_common.mod
    cmp.mod                      gcry_serpent.mod     ls.mod           probe.mod            usbserial_ftdi.mod
    command.lst                  gcry_sha1.mod        lspci.mod        raid5rec.mod         usbserial_pl2303.mod
    configfile.mod               gcry_sha256.mod      lssal.mod        raid6rec.mod         usbtest.mod
    core.efi                     gcry_sha512.mod      lvm.mod          raid.mod             video_bochs.mod
    cpio.mod                     gcry_tiger.mod       mdraid09.mod     read.mod             video_cirrus.mod
    cpuid.mod                    gcry_twofish.mod     mdraid1x.mod     reboot.mod           video_fb.mod
    crypto.lst                   gcry_whirlpool.mod   memdisk.mod      regexp.mod           videoinfo.mod
    crypto.mod                   gettext.mod          memrw.mod        reiserfs.mod         video.lst
    cs5536.mod                   gfxmenu.mod          minicmd.mod      relocator.mod        video.mod
    datehook.mod                 gfxterm.mod          minix2.mod       scsi.mod             videotest.mod
    date.mod                     gptsync.mod          minix.mod        search_fs_file.mod   xfs.mod
    datetime.mod                 grub.cfg             mmap.mod         search_fs_uuid.mod   xnu.mod
    dm_nv.mod                    grub.efi             moddep.lst       search_label.mod     xnu_uuid.mod
    echo.mod                     grubenv              msdospart.mod    search.mod           xzio.mod
    efi_gop.mod                  gzio.mod             multiboot2.mod   serial.mod           zfsinfo.mod
    efi_uga.mod                  halt.mod             multiboot.mod    setjmp.mod           zfs.mod
    elf.mod                      hashsum.mod          nilfs2.mod       setpci.mod
    example_functional_test.mod  hdparm.mod           normal.mod       sfs.mod
    ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sda
    Installation finished. No error reported.
    ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt/ /dev/sdb
    Installation finished. No error reported.
    ubuntu@ubuntu:~$ ls /mnt/grub
    acpi.mod                     ext2.mod             hello.mod        ntfscomp.mod         sleep.mod
    affs.mod                     extcmd.mod           help.mod         ntfs.mod             squash4.mod
    afs_be.mod                   fat.mod              hexdump.mod      ohci.mod             tar.mod
    afs.mod                      fixvideo.mod         hfs.mod          part_acorn.mod       terminal.lst
    aout.mod                     font.mod             hfsplus.mod      part_amiga.mod       terminal.mod
    appleldr.mod                 fshelp.mod           iorw.mod         part_apple.mod       terminfo.mod
    ata.mod                      fs.lst               iso9660.mod      part_bsd.mod         test_blockarg.mod
    ata_pthru.mod                functional_test.mod  jfs.mod          part_gpt.mod         testload.mod
    at_keyboard.mod              gcry_arcfour.mod     jpeg.mod         partmap.lst          test.mod
    befs_be.mod                  gcry_blowfish.mod    keylayouts.mod   part_msdos.mod       tga.mod
    befs.mod                     gcry_camellia.mod    keystatus.mod    part_sun.mod         trig.mod
    bitmap.mod                   gcry_cast5.mod       linux.mod        part_sunpc.mod       true.mod
    bitmap_scale.mod             gcry_crc.mod         loadbios.mod     parttool.lst         udf.mod
    blocklist.mod                gcry_des.mod         loadenv.mod      parttool.mod         ufs1.mod
    boot.mod                     gcry_md4.mod         locale           password.mod         ufs2.mod
    bsd.mod                      gcry_md5.mod         loopback.mod     password_pbkdf2.mod  uhci.mod
    btrfs.mod                    gcry_rfc2268.mod     lsacpi.mod       pbkdf2.mod           usb_keyboard.mod
    bufio.mod                    gcry_rijndael.mod    lsefimmap.mod    pci.mod              usb.mod
    cat.mod                      gcry_rmd160.mod      lsefisystab.mod  play.mod             usbms.mod
    chain.mod                    gcry_seed.mod        lsmmap.mod       png.mod              usbserial_common.mod
    cmp.mod                      gcry_serpent.mod     ls.mod           probe.mod            usbserial_ftdi.mod
    command.lst                  gcry_sha1.mod        lspci.mod        raid5rec.mod         usbserial_pl2303.mod
    configfile.mod               gcry_sha256.mod      lssal.mod        raid6rec.mod         usbtest.mod
    core.efi                     gcry_sha512.mod      lvm.mod          raid.mod             video_bochs.mod
    cpio.mod                     gcry_tiger.mod       mdraid09.mod     read.mod             video_cirrus.mod
    cpuid.mod                    gcry_twofish.mod     mdraid1x.mod     reboot.mod           video_fb.mod
    crypto.lst                   gcry_whirlpool.mod   memdisk.mod      regexp.mod           videoinfo.mod
    crypto.mod                   gettext.mod          memrw.mod        reiserfs.mod         video.lst
    cs5536.mod                   gfxmenu.mod          minicmd.mod      relocator.mod        video.mod
    datehook.mod                 gfxterm.mod          minix2.mod       scsi.mod             videotest.mod
    date.mod                     gptsync.mod          minix.mod        search_fs_file.mod   xfs.mod
    datetime.mod                 grub.cfg             mmap.mod         search_fs_uuid.mod   xnu.mod
    dm_nv.mod                    grub.efi             moddep.lst       search_label.mod     xnu_uuid.mod
    echo.mod                     grubenv              msdospart.mod    search.mod           xzio.mod
    efi_gop.mod                  gzio.mod             multiboot2.mod   serial.mod           zfsinfo.mod
    efi_uga.mod                  halt.mod             multiboot.mod    setjmp.mod           zfs.mod
    elf.mod                      hashsum.mod          nilfs2.mod       setpci.mod
    example_functional_test.mod  hdparm.mod           normal.mod       sfs.mod
    
    ubuntu@ubuntu:~$ sudo umount /dev/md0
    ubuntu@ubuntu:~$  sudo reboot

  8. #8
    Join Date
    Jul 2011
    Beans
    43

    Re: 11.04 server, GRUB and software raid issue

    After reboot I have again GRUB console. See attached picture from server room.
    May be was bad idea set up insmod mdadm09, but folder with grub has no mdadm at all.
    Anyway something is wrong here. Found one task:
    http://savannah.gnu.org/task/?10513
    task #10513: Split mdraid.mod into mdraid09.mod and mdraid10.mod
    P.S. Forget to answer:
    for (md0)/boot/grub which seems wrong to me if you have a separate boot partition:
    (md0) is /boot partitions. it is RAID1.
    Attached Images Attached Images
    Last edited by b0ba; July 29th, 2011 at 04:11 PM.

  9. #9
    Join Date
    Jul 2011
    Beans
    1

    Re: 11.04 server, GRUB and software raid issue

    Hi there,

    I am having the exact same problem. My setup is slightly simpler than yours in that I'm just using raid0 to stripe two drives in my laptop. I have one raid partition (/dev/md0) for my root filesystem and am able to boot as long as the /boot partition is installed on another drive (for me, /dev/sda1). However, if I change grub to look for (md0), it drops me to a rescue prompt with "file not found". I believe (and at this point am fairly certain) that grub does not insmod raid and mdraid1x (I'm using 1.2 superblocks) and therefore has no idea what (md0). I know this because when I 'ls' at the rescue prompt, (md0) isn't there, but as soon as I insert those modules, it is.

    I've added the insmods everywhere I can find in grub.cfg, but to no avail. Which makes sense because how can grub load raid modules on which are located on a raid array. Which one's the chicken and which one's the egg? I don't know how you can get grub's core.img to understand raid and I can't find anything on the web about it. I'm just going to install the boot part on /dev/sda1 and be done with it...

  10. #10
    Join Date
    Oct 2009
    Beans
    2,199
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: 11.04 server, GRUB and software raid issue

    I believe there is a way of installing Grub with the raid module included but I can't recall the command.

    Try a chroot reinstall. See section 12.4 here: https://help.ubuntu.com/community/Grub2#ChRoot
    You have to install mdadm in live CD first. Don't forget to mount the boot partition.

    BTW Grub 1.99 can (is designed to) boot a RAID without needing a separate boot partition.
    Last edited by YesWeCan; July 30th, 2011 at 11:13 AM.
    ASRock P67 Extreme6, Intel i5 2500K, 8GB RAM, nVidia 6600GT, 4x1TB RAID1+0

Page 1 of 12 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •