Announcement

Collapse
No announcement yet.

GRUB error 21 on RAID 0 with both kubuntu and win xp

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GRUB error 21 on RAID 0 with both kubuntu and win xp

    PC specifications: 2 HDD Western Digital 250 GB, in a RAID 0 array. I have 6 NTFS partitons, one ext3 for kubuntu and a swap one, obviously. I had a lot of problems making kubuntu to work on this raid array with win xp, but finally i did it, with a tutorial on the net( i basically installed the dmraid package and then i installed GRUB on (hd0,2) if i remember well)
    A couple of days ago, I was on the net in kubuntu and the power went off. After I cursed the damned electric company a few times, the power went back on and I reopened my pc, when I noticed that my bootloader, GRUB got the error 17 in stage 1.5 . OK then, I took my livecd and searched the forums for solutions. I found a couple of tips, but they all didn't work in my case:
    1) changes in BIOS: the Primary Master (Type:user, Mode:LBA), Primary Slave(Type=Auto, Mode=Auto)
    2) configuring the menu.lst file
    This could seem the ideal solution, but I cannot find the /boot/grub folder. I also used locate to find the menu.lst file, but nothing. Very weird, but I said it's probably because of my RAID 0 array.
    3) the worst solution: reinstalling kubuntu and GRUB. I used the same steps as before, I installed dmraid on RAM with the livecd, but all the ntfs and the swap partitions were recognizied, except the ext3, which was there(i recognised it by its size), but it wasn't recognised as ext3. I tried to format it and used / as mount point, but I got error every time, when it started doing the formatting.

    After trying these with no use, today the error changed and now it says error 21 instead of 17. Strange, but still , it's the same for me. :P
    Can you give me any advice or point me into the right direction? I still think the error is somewhere with the linux partitions , but i don't understand why and why i cannot format it!
    PS: The Windows XP cd is borrowed to a friend, i hope to get it back tomorrow. I haven't tried to boot from it yet.

    #2
    Re: GRUB error 21 on RAID 0 with both kubuntu and win xp

    GRUB was giving me the "error 21" message a couple of weeks ago; I don't have a RAID array, but the way I fixed it should still work for you. Basically, you boot from the Live CD and just delete everything in the /boot/grub directory of your hard drive, then, reinstall all of it with the command sudo grub-install hd0. I had to try several times, rebooting between attempts to see if I was successful, but I eventually got it right. I've never messed with RAID arrays, so I'm not sure what to do with dmraid, but if it requires you to configure your menu.lst file, I would suggest doing that after reinstalling GRUB, but before rebooting.

    NOTE: You must mount your hard drive before you can work on it with the Live CD.

    Edit: Be sure to leave your /boot/grub directory in tact, just delete all its contents; it must exist to reinstall GRUB to your hard drive.
    Asus G1S-X3:
    Intel Core2 Duo T7500, Nvidia GeForce 8600M GT, 4Gb PC2-5300, 320Gb Hitachi 7k320, Linux ( )

    Comment


      #3
      Re: GRUB error 21 on RAID 0 with both kubuntu and win xp

      But where should I mount the hard drive?
      Should I do something like:
      mount -t ext3 /dev/sdax /folder ?
      where x is the number of the ext3 partition?

      Comment


        #4
        Re: GRUB error 21 on RAID 0 with both kubuntu and win xp

        Don't worry about the FS type, just create a directory and mount it with the command
        Code:
        mkdir /media/sdax && mount /dev/sdax /media/sdax
        where "x" is the number of the partition (NOTE: You can name the mount point anything you want).

        To me, it was easiest to use the Alt. CD (as compared to the Live CD); if you boot to the "Rescue a broken system" option, it will ask you a few questions about your system and give you several options about how you would like to go about fixing it. Choose the option that lets you execute a shell (terminal) in your root partition, and you can run the commands from there just as if you had booted to your hard drive. It's both a quicker and easier solution
        Asus G1S-X3:
        Intel Core2 Duo T7500, Nvidia GeForce 8600M GT, 4Gb PC2-5300, 320Gb Hitachi 7k320, Linux ( )

        Comment


          #5
          Re: GRUB error 21 on RAID 0 with both kubuntu and win xp

          I just tried the way you suggested, but I get this error:
          ubuntu@ubuntu:~$ sudo mount /dev/sda /mnt/sda
          mount: unknown filesystem type 'nvidia_raid_member'

          I remember that when I installed kubuntu on the RAID array, the dmraid picked the name LVM VG nvidia_gabccjbi3 for the ext3 partition. On the tutorial about installing kubuntu with RAID 0, it said that gabccjbi should be the <RAID_SET_NAME> and 3 the <PARTITION_NUM>.

          By the way, in my /dev folder, I only have one sda directory, no sda1, sda2 etc

          PS: I only have the live cd, no alternare, unfortunately

          Comment


            #6
            Re: GRUB error 21 on RAID 0 with both kubuntu and win xp

            What does the command
            Code:
            sudo fdisk -l
            give you? It should show all the drives (internal & external) connected to your system, and their partitions.

            Edit: Check out this HowTo.
            Asus G1S-X3:
            Intel Core2 Duo T7500, Nvidia GeForce 8600M GT, 4Gb PC2-5300, 320Gb Hitachi 7k320, Linux ( )

            Comment


              #7
              Re: GRUB error 21 on RAID 0 with both kubuntu and win xp

              ubuntu@ubuntu:~$ sudo fdisk -l
              Warning: ignoring extra data in partition table 5
              Warning: ignoring extra data in partition table 5

              Unable to seek on /dev/sda


              Regarding the tutorial you posted as link, I get this message:

              ubuntu@ubuntu:~/device-mapper.1.00.21$ ./configure
              checking build system type... x86_64-unknown-linux-gnu
              checking host system type... x86_64-unknown-linux-gnu
              checking target system type... x86_64-unknown-linux-gnu
              checking for gawk... no
              checking for mawk... mawk
              checking for gcc... gcc
              checking for C compiler default output... configure: error: C compiler cannot create executables
              See `config.log' for more details.



              config.log looks like this


              This file contains any messages produced by compilers while
              running configure, to aid debugging if configure makes a mistake.

              It was created by configure, which was
              generated by GNU Autoconf 2.57. Invocation command line was

              $ ./configure

              ## --------- ##
              ## Platform. ##
              ## --------- ##

              hostname = ubuntu
              uname -m = x86_64
              uname -r = 2.6.22-14-generic
              uname -s = Linux
              uname -v = #1 SMP Sun Oct 14 21:45:15 GMT 2007

              /usr/bin/uname -p = unknown
              /bin/uname -X = unknown

              /bin/arch = unknown
              /usr/bin/arch -k = unknown
              /usr/convex/getsysinfo = unknown
              hostinfo = unknown
              /bin/machine = unknown
              /usr/bin/oslevel = unknown
              /bin/universe = unknown

              PATH: /usr/local/sbin
              PATH: /usr/local/bin
              PATH: /usr/sbin
              PATH: /usr/bin
              PATH: /sbin
              PATH: /bin
              PATH: /usr/games


              ## ----------- ##
              ## Core tests. ##
              ## ----------- ##

              configure:1320: checking build system type
              configure:1338: result: x86_64-unknown-linux-gnu
              configure:1346: checking host system type
              configure:1360: result: x86_64-unknown-linux-gnu
              configure:1368: checking target system type
              configure:1382: result: x86_64-unknown-linux-gnu
              configure:1417: checking for gawk
              configure:1446: result: no
              configure:1417: checking for mawk
              configure:1433: found /usr/bin/mawk
              configure:1443: result: mawk
              configure:1499: checking for gcc
              configure:1515: found /usr/bin/gcc
              configure:1525: result: gcc
              configure:1769: checking for C compiler version
              configure:1772: gcc --version </dev/null >&5
              gcc (GCC) 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
              Copyright (C) 2006 Free Software Foundation, Inc.
              This is free software; see the source for copying conditions. There is NO
              warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

              configure:1775: $? = 0
              configure:1777: gcc -v </dev/null >&5
              Using built-in specs.
              Target: x86_64-linux-gnu
              Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu
              Thread model: posix
              gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
              configure:1780: $? = 0
              configure:1782: gcc -V </dev/null >&5
              gcc: '-V' option must have argument
              configure:1785: $? = 1
              configure:1809: checking for C compiler default output
              configure:1812: gcc conftest.c >&5
              /usr/bin/ld: crt1.o: No such file: No such file or directory
              collect2: ld returned 1 exit status
              configure:1815: $? = 1
              configure: failed program was:
              | #line 1788 "configure"
              | /* confdefs.h. */
              |
              | #define PACKAGE_NAME ""
              | #define PACKAGE_TARNAME ""
              | #define PACKAGE_VERSION ""
              | #define PACKAGE_STRING ""
              | #define PACKAGE_BUGREPORT ""
              | /* end confdefs.h. */
              |
              | int
              | main ()
              | {
              |
              | ;
              | return 0;
              | }
              configure:1854: error: C compiler cannot create executables
              See `config.log' for more details.

              ## ---------------- ##
              ## Cache variables. ##
              ## ---------------- ##

              ac_cv_build=x86_64-unknown-linux-gnu
              ac_cv_build_alias=x86_64-unknown-linux-gnu
              ac_cv_env_CC_set=
              ac_cv_env_CC_value=
              ac_cv_env_CFLAGS_set=
              ac_cv_env_CFLAGS_value=
              ac_cv_env_CPPFLAGS_set=
              ac_cv_env_CPPFLAGS_value=
              ac_cv_env_CPP_set=
              ac_cv_env_CPP_value=
              ac_cv_env_LDFLAGS_set=
              ac_cv_env_LDFLAGS_value=
              ac_cv_env_build_alias_set=
              ac_cv_env_build_alias_value=
              ac_cv_env_host_alias_set=
              ac_cv_env_host_alias_value=
              ac_cv_env_target_alias_set=
              ac_cv_env_target_alias_value=
              ac_cv_host=x86_64-unknown-linux-gnu
              ac_cv_host_alias=x86_64-unknown-linux-gnu
              ac_cv_prog_AWK=mawk
              ac_cv_prog_ac_ct_CC=gcc
              ac_cv_target=x86_64-unknown-linux-gnu
              ac_cv_target_alias=x86_64-unknown-linux-gnu

              ## ----------------- ##
              ## Output variables. ##
              ## ----------------- ##

              AWK='mawk'
              CC='gcc'
              CFLAGS=''
              CLDFLAGS=' -Wl,--version-script,.export.sym'
              COMPAT=''
              COPTIMISE_FLAG='-O2'
              CPP=''
              CPPFLAGS=''
              DEBUG=''
              DEFS=''
              DEVICE_GID=''
              DEVICE_MODE=''
              DEVICE_UID=''
              DM_LIB_VERSION=''
              ECHO_C=''
              ECHO_N='-n'
              ECHO_T=''
              EGREP=''
              EXEEXT=''
              GROUP=''
              INSTALL_DATA=''
              INSTALL_PROGRAM=''
              INSTALL_SCRIPT=''
              INTL=''
              INTL_PACKAGE=''
              JOBS=''
              LDDEPS=' .export.sym'
              LDFLAGS=''
              LIBOBJS=''
              LIBS=''
              LN_S=''
              LOCALEDIR=''
              LTLIBOBJS=''
              MSGFMT=''
              OBJEXT=''
              OWNER=''
              PACKAGE_BUGREPORT=''
              PACKAGE_NAME=''
              PACKAGE_STRING=''
              PACKAGE_TARNAME=''
              PACKAGE_VERSION=''
              PATH_SEPARATOR=':'
              RANLIB=''
              SET_MAKE=''
              SHELL='/bin/bash'
              SOFLAG='-shared'
              STATIC_LINK=''
              ac_ct_CC='gcc'
              ac_ct_RANLIB=''
              bindir='${exec_prefix}/bin'
              build='x86_64-unknown-linux-gnu'
              build_alias=''
              build_cpu='x86_64'
              build_os='linux-gnu'
              build_vendor='unknown'
              datadir='${prefix}/share'
              exec_prefix='NONE'
              host='x86_64-unknown-linux-gnu'
              host_alias=''
              host_cpu='x86_64'
              host_os='linux-gnu'
              host_vendor='unknown'
              includedir='${prefix}/include'
              infodir='${prefix}/info'
              interface=''
              kerneldir=''
              kernelvsn=''
              libdir='${exec_prefix}/lib'
              libexecdir='${exec_prefix}/libexec'
              localstatedir='${prefix}/var'
              mandir='${prefix}/man'
              missingkernel=''
              oldincludedir='/usr/include'
              prefix='NONE'
              program_transform_name='s,x,x,'
              sbindir='${exec_prefix}/sbin'
              sharedstatedir='${prefix}/com'
              sysconfdir='${prefix}/etc'
              target='x86_64-unknown-linux-gnu'
              target_alias=''
              target_cpu='x86_64'
              target_os='linux-gnu'
              target_vendor='unknown'
              tmpdir=''

              ## ----------- ##
              ## confdefs.h. ##
              ## ----------- ##

              #define PACKAGE_BUGREPORT ""
              #define PACKAGE_NAME ""
              #define PACKAGE_STRING ""
              #define PACKAGE_TARNAME ""
              #define PACKAGE_VERSION ""

              configure: exit 77



              Weird...

              Comment


                #8
                Re: GRUB error 21 on RAID 0 with both kubuntu and win xp

                It’s neat how there are so many different users, PC setups, special needs, etc., in this Linux-computing thing we are into. So, not meant to be any sort of criticism, but why not just trash the RAID? What good is it for? The hardware/back-up experts I’ve been reading now for 3 years say it doesn’t have much use for everyday, typical, individual user needs. (Not so, perhaps, for server configurations & others.) One thing about it, where there's RAID in a simple PC setup, there's usually all sorts of weird BIOS/software/config issues. But then, it is challenging--fun at times--trying to get things to work right.
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  Re: GRUB error 21 on RAID 0 with both kubuntu and win xp

                  I'm guessing the RAID partition is not being read because the Live CD does not know how to read it. Did you check out the link I gave you? It should prove useful in configuring your setup to mount the partition. If you can, you may want to get a copy of the Alt. CD (any version of *buntu will do); it will allow you to execute commands from within the partition, since you already have your system configured to use it, and would be much easier than configuring the Live CD to read and mount your RAID partition. Also, if you continue to use the Live CD, you will have to reconfigure it to work with your hard drive each time you reboot.

                  But then, it is challenging--fun at times--trying to get things to work right.
                  The things we do for amusement

                  Edit: Sorry, I somehow missed your
                  Regarding the tutorial you posted as link, I get this message:
                  comment (forget about my "Did you check out the link I gave you?" reply), I just skipped right over it :P You should be able to fix the compilation error just by installing the build-essential package. Use Adept to install it, or use the command
                  Code:
                  aptitude install build-essential
                  Asus G1S-X3:
                  Intel Core2 Duo T7500, Nvidia GeForce 8600M GT, 4Gb PC2-5300, 320Gb Hitachi 7k320, Linux ( )

                  Comment

                  Working...
                  X