Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Here's the problem: My laptop is running Fedora 12. I installed BackTrack 4 onto an external USB hard drive using a LiveCD. Now when I boot my laptop (external HDD ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! KPolulak's Avatar
    Join Date
    Feb 2009
    Location
    New Jersey, USA
    Posts
    42

    [SOLVED] GRUB Error 21


    Here's the problem:

    My laptop is running Fedora 12. I installed BackTrack 4 onto an external USB hard drive using a LiveCD. Now when I boot my laptop (external HDD removed), I get this:

    Code:
    GRUB Loading stage1.5.
    
    GRUB loading, please wait...
    Error 21
    I don't get this. I never touched anything with my internal drive. Well, maybe. When I was reviewing what partitions the installer was going to format, the swap partition for my internal drive (Fedora) was set to be formatted even though I did not specify this. I figured that wouldn't cause any problems.

    Also, Fedora never used to show GRUB loading at all. Screen was blank until Fedora starting loading. Maybe this means that this is a copy of GRUB from my BackTrack disc?

    Also, I ran 'fdisk' to look for anything suspicious and under /dev/sda1 (internal drive, boot partition) it says "Partition 1 does not end on cylinder boundary."

    Please, please help. I have a half-completed research paper on this drive and LOTS of homework and about 70 O'Rielly books.

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Installer of Backtrack has installed its GRUB in MBR of Internal disk. When you unplug External disk, GRUB couldn't locate its conf files and throws error.

    Fedora's GRUB Menu is hidden by default and thats why it doesn't appear at startup. You can remove hiddenmenu option in grub.conf file to make it appear.

    You have to re-install Fedora's GRUB now. Boot up in Rescue Mode using from Fedora Installation CD/DVD and execute this at Shell Prompt :
    Code:
    chroot /mnt/sysimage
    grub-install /dev/sda
    exit
    exit
    Machine will reboot and Fedora's GRUB will be back in business.

    You have re-install Backtrack's GRUB in MBR of External disk too.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined! KPolulak's Avatar
    Join Date
    Feb 2009
    Location
    New Jersey, USA
    Posts
    42
    What's "/mnt/sysimage" supposed to be?

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Its a system image mounted at /mnt/sysimage and chroot set it as a root directory.
    Check the manual of chroot.
    Code:
    man chroot
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined! KPolulak's Avatar
    Join Date
    Feb 2009
    Location
    New Jersey, USA
    Posts
    42
    I can't get my system to boot into Rescue Mode. When I boot using the Fedora 12 Live CD, I have 4 options:

    Boot
    Verify and Boot
    Memory Test
    Boot from local drive

    I choose "Boot" and hit Tab to edit the kernel parameters. Here are the default parameters:

    Code:
    vmlinuz0 initrd=initrd0.img root=live:CDLABEL=Fedora-12-i686-Live rootfstype=auto ro liveimg quiet  rhgb rd_NO_LUKS rd_NO_MD noiswmd
    I add the line:

    Code:
    linux rescue
    to the end but I still boot to a GUI desktop and /mnt/sysimage is nowhere to be found.

    What do I do?

  7. #6
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Quote Originally Posted by devils casper View Post
    Installer of Backtrack has installed its GRUB in MBR of Internal disk. When you unplug External disk, GRUB couldn't locate its conf files and throws error.

    Fedora's GRUB Menu is hidden by default and thats why it doesn't appear at startup. You can remove hiddenmenu option in grub.conf file to make it appear.

    You have to re-install Fedora's GRUB now. Boot up in Rescue Mode using from Fedora Installation CD/DVD and execute this at Shell Prompt :
    Code:
    chroot /mnt/sysimage
    grub-install /dev/sda
    exit
    exit
    Machine will reboot and Fedora's GRUB will be back in business.

    You have re-install Backtrack's GRUB in MBR of External disk too.
    I also got a grub error 21. But I had Windows XP installed first. I installed Ubuntu on my external usb hdd. Then, I got this error. how do I fix it? please help..thank you very much

  8. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Hi and Welcome !

    Installer has installed GRUB in MBR of Internal Disk. It should be installed in External disk only.

    Unplug External Disk. Boot up from Windows XP installation CD and select repair. Execute Fixmbr command at repair prompt. It will remove GRUB and Windows XP will boot up fine.

    Disable Internal Hard disk in BIOS. Plug-in External Disk and re-install Ubuntu. Enable Internal Hard disk after successful Ubuntu installation in External disk.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #8
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Quote Originally Posted by devils casper View Post
    Hi and Welcome !

    Installer has installed GRUB in MBR of Internal Disk. It should be installed in External disk only.

    Unplug External Disk. Boot up from Windows XP installation CD and select repair. Execute Fixmbr command at repair prompt. It will remove GRUB and Windows XP will boot up fine.

    Disable Internal Hard disk in BIOS. Plug-in External Disk and re-install Ubuntu. Enable Internal Hard disk after successful Ubuntu installation in External disk.
    Thank you for the reply. It seems that I can now go to my Windows without getting GRUB Error 21 anymore. I just used an installer of xp sp3. But, I did not choose or execute any fixmbr command. I just quit it before proceeding to the option of deleting contents of my disk or something like that. Then afterwards, the boot went normally. windows started normally.

    If I want to use ubuntu, I need to connect my usb hdd then go to bios setup utility and set the priority order to usb hdd. I wonder if I can just have the option of selecting between windows and ubuntu as I turn on my laptop.

    Regarding this:
    Disable Internal Hard disk in BIOS. Plug-in External Disk and re-install Ubuntu. Enable Internal Hard disk after successful Ubuntu installation in External
    By disabling, do you mean removing the internal disk from the boot priority order? I am not sure if I will follow your suggestion "re-install Ubuntu". If i will do this, then all my files in the external hdd will be deleted right?

    And my external hdd cannot be read by windows. I mean it can be seen in the device manager but cannot be seen in the my computer. How can I fix this without deleting the contents of my usb hdd? I think I want this more to be fixed. It is okay for me to go to BIOS setup just to use my ubuntu.

    Sorry for this long post. Thank you so much for any help!

  10. #9
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Windows OS doesn't recognize Linux Filesystems and data stored in Linux partition won't appear in Windows OS. There are a few tools available to enable read/write access.
    By disabling, do you mean removing the internal disk from the boot priority order?
    There must be an option in BIOS to enable/disable existing hard disks. It has nothing to do with boot order.
    I am not sure if I will follow your suggestion "re-install Ubuntu". If i will do this, then all my files in the external hdd will be deleted right?
    Re-install will remove every thing from Linux partitions of External disk. How many partition do you have in External disk.
    Boot up from Ubuntu LiveCD, open Terminal and execute this
    Code:
    sudo fdisk -l
    Post output here.
    * Its small L in fdisk -l.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  11. #10
    Just Joined!
    Join Date
    Aug 2010
    Posts
    4
    Here is the output:
    ================================================== ======================
    Disk /dev/sda: 60.0 GB, 60011642880 bytes
    240 heads, 63 sectors/track, 7752 cylinders
    Units = cylinders of 15120 * 512 = 7741440 bytes
    Disk identifier: 0x75850bbb

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 7751 58597528+ 7 HPFS/NTFS

    Disk /dev/sdb: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x0006cad8

    Device Boot Start End Blocks Id System
    /dev/sdb1 * 1 38542 309588583+ 83 Linux
    /dev/sdb2 38543 38913 2980057+ 5 Extended
    /dev/sdb5 38543 38913 2980026 82 Linux swap / Solaris
    ================================================== =====================

    The 60 gb is my internal hard disk while the 320 gb is my external hard disk. Can I just make a partition to my external hard disk without deleting the contents of my hdd? The other part will be NTFS or something so that it can be read by windows? Can I do that?

Page 1 of 2 1 2 LastLast

Posting Permissions

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