Error 21...

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Error 21...

Postby coltz on Mon May 04, 2009 3:44 pm

Hey! I'm entirely new to Linux, as I've used Windows ( :oops: ) for about 5 years now.
But when I installed the Linux Mint, I got the Error 21, I did choose "Use the whole disk" at the partitioner and yeah, I've tried using manual by reading a guide, but no change.
I've also tried reinstalling grub several times
grub> root (hd0,1)
grub> setup (hd0,1)
grub> quit

or something like that.
I've managed to come to the "Grub bash" sometimes, but that's very uncommon..
Here's my menu.lst entries:
Code: Select all
title      Linux Mint 6, kernel 2.6.27-7-generic
root      (hd0,1)
kernel      /boot/vmlinuz-2.6.27-7-generic root=/dev/sda2 ro quiet splash
initrd      /boot/initrd.img-2.6.27-7-generic
quiet

title      Linux Mint 6, kernel 2.6.27-7-generic (recovery mode)
root      (hd0,1)
kernel      /boot/vmlinuz-2.6.27-7-generic root=/dev/sda2 ro single
initrd      /boot/initrd.img-2.6.27-7-generic

title      Linux Mint 6, kernel Last successful boot
root      (hd0,1)
kernel      /boot/last-good-boot/vmlinuz root=/dev/sda2 ro quiet splash  last-good-boot
quiet

title      Linux Mint 6, memtest86+
root      (hd0,1)
kernel      /boot/memtest86+.bin
quiet


Any ideas, please? :)
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Linux Mint is funded by ads and donations.
 

Re: Error 21...

Postby emorrp1 on Mon May 04, 2009 8:40 pm

Hi, you say you selected the use entire disk option, but the menu.lst indicates there is more than just mint on that drive (should be (hd0,0) otherwise). To be honest, if I ever have a problem like this, I just do a completely fresh reinstall after verifying that the disc itself is ok (afterall it only takes about 15mins).

In terms of actually diagnosing the problem, where abouts did you get the error? In the install stage or what? Also which version (and edition) of mint are you trying to install?
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Error 21...

Postby coltz on Tue May 05, 2009 10:14 am

I've tried to reinstall it like 100 times :S But no sucess.. and the sda1 partition is SWAP..
Sorry, I got it when i rebooted my computer..

Grub... loading stage 1.5

Loading stage2.....

Grub: Error 21

And then I have to restart and boot from the CD... any ideas? :S
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Re: Error 21...

Postby emorrp1 on Tue May 05, 2009 10:23 am

ok, basically I'm stumped. Looking at other people who've had this issue, they've solved it by either re-installing, or re-loading grub (but you say you've done that). A sanity check would be to ensure that grub is available in sda2 (at the grub prompt):
Code: Select all
find /boot/grub/stage1

Which should return (hd0,1)
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Error 21...

Postby coltz on Tue May 05, 2009 10:27 am

grub> find /boot/grub/stage1
(hd0,1)

:S Any ideas? Maybe Ive done wrong when Im reinstalling it.. can you guide me?

Thank you SO MUCH for taking your time!
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Re: Error 21...

Postby emorrp1 on Tue May 05, 2009 10:41 am

You could try installing using the default partitioning options (rather than manual), and also make sure you don't change anything from the advanced button either. If that doesn't work, I would suspect the cd media is corrupted, or the iso didn't burn properly. That's easy to check, just enter the following with the cd in the drive (might work from the live CD, might not, I've never tried:
Code: Select all
cd /media/cdrom0
md5sum -c md5sum

Which should return stuff with "OK" at the end of each line.

Also, the new gloria RC is out, which has a disk-verify boot option, so you could install from that.
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Error 21...

Postby coltz on Tue May 05, 2009 1:35 pm

Ive reinstalled to Linux Mint Gloria now, but no change.. Still Error 21..
Any ideas or do I need to buy a new hdd?
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Re: Error 21...

Postby nick on Tue May 05, 2009 2:34 pm

nick
Level 5
Level 5
 
Posts: 686
Joined: Sat Dec 02, 2006 8:04 am

Re: Error 21...

Postby coltz on Tue May 05, 2009 3:22 pm

Thanks for trying to help, but I can't access those links as they are not complete..
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Re: Error 21...

Postby Aging Technogeek on Tue May 05, 2009 3:53 pm

Error 21 means "Selected disk does not exist." I think your Grub is working OK, but it can't find your Mint partition. Can you run the live CD and launch Partition Editor from the desktop? If you can, please post a copy of the partition table. This may point us in the right direction
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4605
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Error 21...

Postby coltz on Tue May 05, 2009 4:15 pm

Alright, I attached a screenshot of it, thank you again for helping me!
Attachments
Screenshot.png
Screenshot.png (198.58 KiB) Viewed 1055 times
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Re: Error 21...

Postby Aging Technogeek on Tue May 05, 2009 5:10 pm

Your grub is set to boot partition sda1. If you look at the partition table, sda1 is a 227 Gb partition mounted as "/media/disk" . It looks like Mint is in there (5.94 Gb used) and the boot flag is set, so theoretically it should boot.

This may not have anything to do with the problem, but why is your swap space in a separate extended partition? Normally it would be installed in the same primary or extended partition as root.

If no one else can see anything wrong that I missed, your best option may be to erase the disk using dban or a similar program to ensure that nothing is retained from the failed installations and try a clean reinstall using the Manual install option and setting up partitions as described here:

viewtopic.php?f=90&t=11872&start=0&st=0&sk=t&sd=a

EDIT It just hit me. your Grub is looking to boot from (hd0,1) - this is sda2 - your swap partition. If you look at the grub menu in your original post, you will see this
kernel /boot/vmlinuz-2.6.27-7-generic root=/dev/sda2 ro quiet splash
Look at the entry immediately following the=. It states that grub should look for Mint on sda2

Reset grub to boot from (hd0,0) - sda1 and you should be good to go.

You edit grub in terminal by entering
Code: Select all
 gksu gedit /boot/grub/menu.lst


In the active menu, change all references to (hd0,1) to (hd0,0).and all sda2 to sda1. Save the changes and close the terminal. If I'm right Mint should boot normally on restart
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4605
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Error 21...

Postby Fred on Tue May 05, 2009 5:38 pm

coltz,

I am assuming you made the gparted screen shot from the live cd. If that isn't the case, please correct me. If it is from the live cd do the below steps. Open a terminal and type:

sudo grub

root (hd0,0)

setup (hd0)

quit

Close the terminal and open it again, then type:

gksu gedit /media/disk/boot/grub/menu.lst

This will open your menu.lst file for editing. Please post the entire contents of that file to the forum and we can go from there.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Error 21...

Postby Aging Technogeek on Tue May 05, 2009 6:10 pm

The Master has arrived. I will settle back and learn along with everyone else.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4605
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Error 21...

Postby coltz on Wed May 06, 2009 10:08 am

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-legacy-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## Graphical boot menu location
gfxmenu=/boot/gfxmenu/linuxmint.message

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(single-user) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## specify if running in Xen domU or have grub detect automatically
## update-grub will ignore non-xen kernels when running in domU and vice versa
## e.g. indomU=detect
## indomU=true
## indomU=false
# indomU=detect

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Linux Mint 7 Gloria, kernel 2.6.28-11-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda1 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet

title Linux Mint 7 Gloria, kernel 2.6.28-11-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sda1 ro single
initrd /boot/initrd.img-2.6.28-11-generic

title Linux Mint 7 Gloria, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

I did what you said and there's my menu.lst :)
Thank you again for helping me, everyone!
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Re: Error 21...

Postby Aging Technogeek on Wed May 06, 2009 10:14 am

Have you tried booting using the modified Grub? If so, did it work?
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4605
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Error 21...

Postby coltz on Wed May 06, 2009 10:28 am

What modified grub? :S
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Re: Error 21...

Postby Aging Technogeek on Wed May 06, 2009 11:03 am

When you followed Fred's instructions

sudo grub

root (hd0,0)

setup (hd0)

quit

Close the terminal and open it again, then type:

gksu gedit /media/disk/boot/grub/menu.lst

This will open your menu.lst file for editing. Please post the entire contents of that file to the forum and we can go from there.

Fred


you changed the location Grub looks at to boot Mint from sda2 to sda1. Compare the boot list at the end of the new menu with the one you entered in your original post.

You should now be able to use Grub to boot into Mint on your hard drive. Just remove the live CD (if it's in the CD drive) and restart the computer. If everything is right, it should load and boot normally.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4605
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: Error 21...

Postby Fred on Wed May 06, 2009 11:38 am

Thanks Aging Technogeek. That is exactly what I was going to ask him to do next. :-)

I think the confusion was coming from the fact that he was running from the live cd when he took the screen shot and posted the wrong menu.lst the first time.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Error 21...

Postby coltz on Wed May 06, 2009 2:54 pm

Won't work, this is my GParted screen now:

Any ideas of how to fix this?:S
Attachments
Screenshot.png
Screenshot.png (161.69 KiB) Viewed 969 times
coltz
Level 1
Level 1
 
Posts: 12
Joined: Mon May 04, 2009 3:33 pm

Linux Mint is funded by ads and donations.
 
Next

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 15 guests