Начало Вход/Регистрация Помощ Tazi stranica s latinski bukwi
Области
 Новини
 Актуална тема
 Linux портали
 Какво е Линукс?
 Въпроси-отговори
 Форуми
   •Трудова борса
   •Конкурс
 Статии
 Дистрибуции
   •Поръчка на CD
 Made In BG
 Файлове
 Връзки
 Галерия
 Конференции
Настройки
 Външен вид
 Предложения
 Направи си сам
И още ...
 За нас
 Линукс за българи ЕООД
 Линк към нас
 Предложения

Подкрепяно от:
TelePoint - Място за хора със свободни идеи

SiteGround

initLab

Adsys Group

SAP Bulgaria

Въпроси отговори
Въпрос: Error 17 в GRUB ?
[Търси: ]

ВНИМАНИЕ: Използвайте форумите на сайта за дa зададете вашите въпроси.

Към началото |Добави въпрос |Отговори
 
Въпрос
От: ??? Дата: 04/27/2006
Не желае да зарежда GRUB поради "Error 17" ?-на какво се 
дължи това?


Отговор #1
От: :ПпПпП Дата: 04/27/2006
дължи се на ерор 17 !!!


Отговор #2
От: ??? Дата: 04/27/2006
Това е ясно, ама какво ще рече тази грешка.


Отговор #3
От: ~ Дата: 04/27/2006
Не ти е настроен правилно.
Трябва да boot-неш от някое LiveCD, да монтираш /boot дяла 
и като root да изпълниш:
grub
root (hdx,y)
setup (hdz)
quit

 където (hdx,y) и (hdz) са ти съответно /boot дяла (където е

 конфигурацията на grub с всичките му там файлове) и мястото

където да се запише Grub - нещо от рода на:
root (hd0,1)
setup (hd0)
Ако не знаеш какви стойности да сложиш, напиши кои са ти 
дяловете и къде искаш да си инсталираш Grub-a (setup (hd0) 
означава в MBR-a на първия диск).
За повече информация виж:
http://www.gentoo.org/doc/en/handbook/h...
или
http://www.gnu.org/software/grub/grub-f...


Отговор #4
От: emigranta33 (emigranta33 (a) yahoo< dot >com) Дата: 04/27/2006
                      Здравей,


           Getting a Grub boot diskette 

 To do this we need two files which are available from one of
our moderator's (Dolda2000) web site. 

http://www.dolda2000.com/~fredrik/grub.... 
http://www.dolda2000.com/~fredrik/rawri... 

 note:- the rawwrite.exe file is available from the
 /dosutils/ folder on most Linux distributions, but I'm
writing this part as a "if all else fails" type of thing. 

Download these onto your PC (or any PC for that matter). 

 Run the rawrite program to copy the grub.img file onto a
 pre-formatted floppy diskette. The Grub.img file contains
the first stages in loading the Grub boot loader. 

 note:- once this has been done, you will not be able to read
that diskette. This is how it should be). 

 Now, boot your PC with the floppy diskette you just created
 (*see footnote) . You will get a text based screen looking
something like this :- 


 
Code:


     GRUB  version 0.92  (640K lower / 3072K upper memory) 

  [ Minimal BASH-like line editing is supported.  For the
first word, TAB 
    lists possible command completions.  Anywhere else TAB
lists the possible 
   completions of a device/filename.] 

grub> 


   You can now start looking for the Grub files that are
already on your PC's hard disk drive. 

 First you will need to know what Grub calls the hard disk
drive partition that holds the required files. 

 A quick aside :- There are three ways of defining hard disk
 drives and their partitions. The first, that you're most
 probably familiar with, is Windows/MS-DOS letters (such as
C: or D: ). 

 The second is Linux's method, which is to give the first
 device (hard disk drive or CD-ROM drive) on the first IDE
 (ribbon) cable the name /dev/hda, the second device (hard
 disk drive or CD-ROM drive) on the first cable is called
 /dev/hdb, the first device (hard disk drive or CD-ROM drive)
 on the second cable is called /dev/hdc and the second device
on the second cable is called /dev/hdd . 

 So, you've got the names hda, hdb, hdc, and hdd for all of
 your four possible IDE attached devices, although you
 probably only have a hard disk on hda and a CD ROM / DVD
drive on hdb. 

 The hard disks are, probably, cut up into partitions that
 are numbered from one. So the first partition on the first
 hard disk attached to the first IDE cable will be called
 /dev/hda1, while the second will be called /dev/hda2 and,
 for further example, the fifth partition on the second hard
disk on the second IDE cable would be called /dev/hdd5. 

Get the idea? 

 Now to the third way of naming a hard disk and partition.
 Grub uses the letters "hd" followed by a number starting at
 zero to name the hard disks. To denote a particular partion
 a commar and a further number, again starting at zero is
added. All of this is surrounded by brackets (). 

 So to Grub, the first hard disk drive attached to the first
 IDE cable is called (hd0) , and to specify the first
partition on that drive you would need to type (hd0,0) 

And here is a list of equivalence : 
Code:

  Linux      Grub      Description 

 /dev/hda   (hd0)      First storage device on first IDE
cable 
 /dev/hdb   (hd1)      Second storage device on first IDE
cable 
 /dev/hdc   (hd2)      First storage device on second IDE
cable 
 /dev/hdd   (hd3)      Second storage device on second IDE
cable 

   And when partitions are also included (I've only shown the
first three partitions) 
Code:

   /dev/hda1   (hd0,0)      First hard disk on first IDE
cable, first partition 
 /dev/hda2   (hd0,1)      First hard disk on first IDE cable,
second partition 
 /dev/hda3   (hd0,2)      First hard disk on first IDE cable,
third partition 
 /dev/hdb1   (hd1,0)      Second hard disk on first IDE
cable, first partition 
 /dev/hdb2   (hd1,1)      Second hard disk on first IDE
cable, second partition 
 /dev/hdb3   (hd1,2)      Second hard disk on first IDE
cable, third partition 
 /dev/hdc1   (hd2,0)      First hard disk on second IDE
cable, first partition 
 /dev/hdc2   (hd2,1)      First hard disk on second IDE
cable, second partition 
 /dev/hdc3   (hd2,2)      First hard disk on second IDE
cable, third partition 
 /dev/hdd1   (hd3,0)      Second hard disk on second IDE
cable, first partition 
 /dev/hdd2   (hd3,1)      Second hard disk on second IDE
cable, second partition 
 /dev/hdd3   (hd3,2)      Second hard disk on second IDE
cable, third partition 

   And how do the Windows / MS-DOS drive letters fit in?
 Well, they don't really. Each drive letter (C: , D: , etc )
 is given to partitions that have the FAT or NTFS file
 systems on them. Any partitions that do not are simply
ignored. How wonderfully typical of Uncle Bill. 

Back to Grub 

 The first command to use is the find command. This is used
 to find which hard disk and which partition on that hard
 disk certain files reside. What we are looking for are the
 Grub files on your hard disk. One of these files is called
stage1, which should be in the /boot/grub/ folder. 

Normally the find command will be :- 
Code:

  find /boot/grub/stage1 

   and you'll get returned the hard disk name and partion
that has that file (see above for how Grub names these). 

 However, on my PC I have a separate /boot partition, so that
 I have to slightly amend the find command (by removing the
"/boot" folder name) :- 

When there is a separate /boot partition 
Code:

  find /grub/stage1 


   The output of this command is the name of the hard disk
 and partition that holds the stage1 file. Why this is
 important is that where you find this file, you'll also find
the kernels, which you may need in the future. 

 When I entered the above find command, Grub returned
(hd0,1). 

I used this - (hd0,1) - in my next command - configfile . 

 The configfile command loads the Grub menu (the one that you
 should normally get), from where you will be able to load
Linux. 


Where there is not a separate /boot/ partition. 
Code:

  configfile (hd0,1)/boot/grub/grub.conf 


  On my PC the "configfile" command looks like this :- 

Where there is a separate /boot/ partition. 
Code:

  configfile (hd0,1)/grub/grub.conf 


   Obviously the configfile command on your PC may look
 different, as the find command may have given you a
 different hard disk drive partition number. So if the find
 command returned "(hd0,0)" , then substitute that for the
(hd0,1) in my examples, above. 

 You will now have a working Grub menu, that will allow you
 to load Linux. Now go to the "Re-installing Grub" bit of
this HowTo. 

 Note:- You can re-install Grub from the "grub>" command
 prompt, but I find that this only partially works (the
 pretty graphics splash image is missing). If you want to do
 this, enter setup (hdx) (hdy,z) , where the "x" is the
 number of the hard disk whose MBR is going the contain Grub
 and the "y" and "z" are the hard disk and partition numbers
 that contain the Grub files (such as "Stage1" - see above).



 All I get is "grub" or a "grub>" prompt when I try and boot


I'll address these problems one at a time. 

 If your PC sticks at grub and maybe even starts beeping at
 you, then you'll need to re-install Grub on the mbr (master
 boot record). To do this you'll first need to get at least
 grub up, if not all of Linux. I've already described the
 various ways of doing this, above. If none of those methods
work, try the following method. 

 If your PC successfully loads Grub, but leaves you with a
 grub> prompt, rather than the familiar menu screen, you'll
 need to get Linux up and running, so that you can amend the
 configuration file /boot/grub/grub.conf . If this file was
readable, you wouldn't be seeing the grub> prompt. 

 The easiest way past this problem is to use a rescue
 diskette (if you created one) or the installation CDs (if
 you have them). I've already discussed this method above in
 the "Windows has stopped me booting Linux" section. If you
can , follow those instructions. 

 If you can't use a rescue diskette or installation CD, read
on. 

 In some of my example commands, I've deliberately left the
 "grub>" command prompt in. Please do not type this in when
you are entering the command. 

 The first thing we need to do is find where (as in which
 hard disk and which partition on that hard-disk) the /boot/
 folder is (this is where your kernel and, if needed, your
 initrd file). The easiest way of doing this is by looking
 for the grub files, as these are in a folder that hangs off
the boot folder (in /boot/grub/). 

 The find command is used here, and we're looking for the
 file called stage1 which resides in either the /boot/grub/
 or /grub/ folder. I say either /boot/grub/ or /grub/ as it
 depends upon whether you've got a separate /boot/ partition.
 If (as is most likely) you don not have a separate /boot/
 partition the you're looking for a file called
/boot/grub/stage1 , else it's called /grub/stage1. 

The command will look like :- 
No separate /boot/ partition. 
Code:

  find /boot/grub/stage1 

  or 
With separate /boot/ partition. 
Code:

  find /grub/stage1 


   This will return the name of the hard disk and partition
 that has the grub files on it. The name will be in the form
 (hdx,y) , where the x is the hard disk's number (counting
 from zero) and the y is the partition number (again counting
from zero). 

 So, when I tried this, I got (hd0,0) returned to me. This
 tells me that my /boot/ folder lives on the first partition
 on hard disk on the first IDE cable. If it had returned
 (hd0,1) instead, that would have shown me that the /boot/
 folder lived on the second partition of the first hard disk
on the first IDE cable. 

 Once we have found this out we need to give Grub this in the
next commands. 

 The root command tells Grub where to base all of its file
 path searches from. We take the hard disk and partition,
 given by the find command and use it with the root command,
like so :- 
Code:

  root (hd0,0) 

   Of course the actual figures (here 0 and 0) may be
different for your PC. 

 Next comes the kernel command. This tells Grub the name of
 the kernel (core part of Linux) that you want to load when,
later, you do the boot command. 

 As there is no way that I can remember the full name of the
 kernel, I use the tab key facility in Grub (the tab key is
 that one with two opposite facing horizontal arrows that sit
above the Caps Lock key on most keyboards). 
Code:

  grub> kernel (hd0,0)/ 
  Possible files are: vmlinuz grub kernel.h System.map config
lost+found initrd. 
 img vmlinuz-2.4 initrd-2.4.img kernel.h-2.6.3-4mdk
initrd-2.6.3-4mdk.img System 
 .map-2.6.3-4mdk config-2.6.3-4mdk vmlinuz-2.6.3-4mdk
diag1.img diag2.img messag 
 e-graphic System.map-2.6.5-1.358 System.map-2.4.22-10mdk
config-2.4.22-10mdk vm 
 linuz-2.4.22-10mdk initrd-2.6.5-1.358.img
initrd-2.4.22-10mdk.img config-2.6.5- 
1.358 kernel.h-2.4.22-10mdk vmlinuz-2.6.5-1.358 
                                                             
                   
grub> kernel (hd0,0)/ 

   So you can see that by entering the first part of the
 command ( "kernel (hd0,0)/" ) and then pressing the tab key,
 I've been presented with a list of all possible files in
 that folder (they're a mix of both Fedora Core 2 and
 Mandrake 9.2 and 10.0). From this list I'll select the
kernel I'm after. 

 There are two ways of selecting the correct kernel (vmlinuz)
 file. Either go for the symbolic link, which is called
 "vmlinuz" (yes it should end in a "z" and not in a "x") and,
 hopefully, points at the correct kernel, or you can select
the full file name (which is my method). 

 For this example I'm going to select vmlinuz-2.6.5-1.358
which, I happen to know, is for my Fedora Core 2 system. 
Code:

   grub> kernel (hd0,0)/vmlinuz-2.6.5-1.358 ro root=/dev/hda2

   [Linux-bzImage, setup=0x1400, size=0x1235b7] 


   You'll notice that after the file name I put two extra
 parameters. These are ro for Read Only and root=dev/hda2
which Linux will pass onto the initrd (see later). 

 The more astute of you will have noticed that I've mentioned
 "root" twice to Grub, once in the root command and once here
 in the kernel command. And that, in my example, they point
 at different hard disk partitions. The reason for the
 difference in my example is that while the /boot/ folder is
 on its own partition ( (hd0,0) or /dev/hda1 ) the root
 folder (/) is on a different partition - dev/hda2. You will
 probably find that this is not the case with your PC. You
 will probably find that both the /boot/ and the root (/)
folders live on the same hard disk partition. 

 You will still want to add the "root=/dev/hdxy" to your
 kernel statement , even if both your /boot/ and your root
 (/) folders are on the same hard disk partition. This is
 especially true if you use Mandrake. I'll warn you now,
 Mandrake will give you a kernel panic if you get this bit
wrong. 

 Now comes the initrd command. Most distributions of Linux
 use the initrd during boot up. If you try omitting this
 command and you get a "Kernel panic: No init found. Try
 passing init= option to kernel", then you will have proved
to yourself that you definitely need an initrd. 

 Again there are two ways to tell Grub the name of the initrd
 file. You can use the symbolic link called "initrd.img" and
 , hopefully, this will point to the correct file. Or, as I
do, you can give the full file name. 

 In this example, I'm telling Grub to use the initrd file
 that matches the kernel that I just told it about. And
 again, I'm making use of the tab key facility, but this
time, I'm letting Grub do more of the work for me. 
Code:

  grub> initrd (hd0,0)/initrd 
  Possible files are: initrd.img initrd-2.4.img
initrd-2.6.3-4mdk.img initrd-2.6 
.5-1.358.img initrd-2.4.22-10mdk.img 

   I then narrow the name search a bit by adding the "-2.6."
bit 
Code:
                                        
grub> initrd (hd0,0)/initrd-2.6. 
  Possible files are: initrd-2.6.3-4mdk.img
initrd-2.6.5-1.358.img 

  And then fill in the very last bit 
Code:

  grub> initrd (hd0,0)/initrd-2.6.5-1.358.img 


   Now that we have told Grub about the two files that it
 will need to boot Linux, all that is left is for us to tell
Grub to boot 
Code:

  grub> boot 



  Linux will now boot. 


 Now procede to the "Re-installing Grub" part of this HowTo.


Note:- 
 If you mis-spell the name of the file, you'll get and Error
 15: File not found . If this happens simply re-type the
command. 

Re-installing Grub 
 As per usual, there is more than one way to re-install Grub.
 Such is the way of Linux. You can install / re-install Grub
from the Grub menu, or you can do so from within Linux. 

Re-installing Grub from the Grub menu or grub> prompt 
 If you have the normal Grub menu in front of you, press the
the c key to get the Grub command prompt. 

 From the grub> command prompt enter the setup command. This
 command takes two parameters, the first is the name of the
 hard disk drive whose master boot record (mbr) is going to
 hold Grub; the second parameter is the name of the hard disk
 partition where the Grub files reside (ie. where the
 /boot/grub/ folder is). Both of these parameters use the
 Grub method of naming (see my aside above for an
explanation). 

 So, for example, is I want to put Grub onto the mbr on my
 first hard disk drive and my /boot/grub/ folder lives on the
 second partition on that drive, the setup command would look
like this :- 
Code:

  setup (hd0) (hd0,1) 


   One problem that I've come across using this method is
 that , for reasons best known to itself, Grub seems unable
to find and display the pretty splash picture. 

Re-installing Grub from within Linux 
 You need to get yourself a shell command prompt up (either
 open a terminal window or press Ctrl Alt F1 to get a text
 only console - Ctrl Alt F7 will return you to the GUI), and
 you will need to be the root (su -) user (either logon as
root or enter su - followed by the root password). 

 From that command prompt you will need to enter the
 grub-install command. This takes one parameter - the name of
 the hard disk whose master boor record (mbr) will be having
 grub installed on it. This being Linux, you will need to use
 the Linux way of naming hard disk drives (see my aside,
 above, for an explanation on naming standards) . There is no
 need specify the hard disk partition that has the
 /boot/grub/ folder, as the one on the Linux that you are
 running will be used (this can, if needed, be overridden ,
see "info grub" for information). 

 So, if I want to use the mbr on the first hard disk (that
 is, the hard disk that is master on the first IDE cable) I
 would type (note, I've deliberately left the command prompt
in my example, please don't type it) :- 
Code:

  [root@localhost root]# grub-install /dev/hda 
Installation finished. No error reported. 
 This is the contents of the device map
/boot/grub/device.map. 
 Check if this is correct or not. If any of the lines is
incorrect, 
fix it and re-run the script `grub-install'. 

# this device map was generated by anaconda 
(fd0)     /dev/fd0 
(hd0)     /dev/hda 


  And that's all there is to it. 

Contents of the /boot/grub/grub.conf file 
 Following is the contents of my /boot/grub/grub.conf file.
 It is probably a little bit more complex than yours, but
don't let this put you off. 

 Each operating system that appears on the Grub menu has its
own title statement. 

 As you can see from mt /boot/grub.conf file (below), I get
 the choice of booting into Fedora core 2, Mandrake 10.0,
 Slackware, BeOS, Windows 98 SE, and Fedora Core 1. The first
 three of these operating systems are on my first hard disk (
 hd0 ) , with Fedora core 2 and Mandrake sharing the same
 /boot/ partition ( hd0,0 ), while the Slackware (reiserfs)
 partition is very much stand alone. BeOS (a now obsolete,
 but fun, operating system from http://www.bebits.com) and
 Windows 98 SE (hey, what can I say Smile ) is on my third
 hard disk, and my "just in case" Fedora core 1 is on my
second hard disk drive. 
Code:

  default=0 
timeout=10 
splashimage=(hd0,0)/grub/splash.xpm.gz 
title Fedora Core 2 (2.6.5-1.358) 
        root (hd0,0) 
         kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/1
hda=38792,16,63 
        initrd /initrd-2.6.5-1.358.img 
title Mandrake 10.0 
        root (hd0,0) 
         kernel /vmlinuz-2.6.3-4mdk ro root=/dev/hda6
hda=38792,16,63 
        initrd /initrd-2.6.3-4mdk.img 
title Slackware 
        root (hd0,4) 
         kernel /boot/vmlinuz-ide-2.4.22 ro root=/dev/hda5
hda=38792,16,63 
title BeOS 
   map (hd0) (hd2) 
   map (hd2) (hd0) 
   rootnoverify (hd2,4) 
   chainloader +1 
title Windows 98 SE 
   map (hd0) (hd2) 
   map (hd2) (hd0) 
   rootnoverify (hd2,0) 
   makeactive 
   chainloader +1 
title Fedora Core 1 (2.4.22-1.2188.nptl) 
   root (hd1,0) 
    kernel /boot/vmlinuz-2.4.22-1.2188.nptl ro root=/dev/hdc1

   initrd /boot/initrd-2.4.22-1.2188.nptl.img 


  Some explanations. 
 default=0 and timeout=10 means that unless I say otherwise,
 Grub will load the first operating system (again counting
from zero) - Fedora Core 2 . 

 splashimage=(hd0,0)/grub/splash.xpm.gz is the full name of
 the pretty splash image that is placed behind the Grub menu.


 hda=38792,16,63 is because of a problem that Fedora has with
 my first disk drive. Linux, unless you tell it otherwise,
gets the geometry wrong. 

 Both BeOS and Win98 need to be on the first hard disk. To
 make them believe this, I have used the map facility within
Grub. 

If you're still having boot problems 

Grub errors messages 

 The complete list of error messages are at the end of this
HowTo. 

The two that I've bumped into are 

Error 15 
 File note found. Which normally means that you have mistyped
 the file name. Try using the tab key to help you fill in
Grub commands. 

Error 17 
 Unable to mount (use) the partition. This may be that you
 have mistyped the number (remember, Grub counts from zero
 and not one), or that the partition that you pointed at does
not have a valid file system. 

Kernel panics 
 If you get an error message, while booting, along these
lines :- 
Code:

   Kernel panic: No init found. Try passing init= option to
kernel 

   Your kernel needs something called an "initrd" and can't
 find one. There are a number of reasons that this can
happen. 

 -> You haven't put an initrd statement in your Grub.conf or
while at the Grub prompt. 

 Easy one to fix, just make sure that you have the correct
 (and correctly spelt) initrd for Grub to pass to the kernel.
 Have a look at the "All I get is either a "grub>" prompt or
just "grub" when I try and boot" section of this HowTo. 

 -> The "root=" parameter on the kernel statement does not
point to the correct hard disk and partition. 

 The "root=" parameter on the kernel statement often says
 "root=LABEL=/", which often works just fine, but sometimes
 you have to be more exact. I've only found this to be a
 problem when I'm using a separate /boot and root (/)
 partition, or when Mandrake is involved. So change the
 "LABEL=/" bit to the partition that contains your root (/)
 folder. If your root (/) partition is on /dev/hda6, for
 example, then make the root statement look like
"root=/dev/hda6". 

-> The initrd file has become corrupted or been deleted. 

I'd first like to thank Opnosforatou for the following. 

 You'll need to get a Linux up using either a
 distribution/rescue CD or a rescue diskette. Then change the
 root to your hard disk drive by entering, from the shell
 command prompt, chroot /dev/hdxy . Where the "x" is the
 letter of the hard disk and the "y" is the number of the
 partition. So, if your normal /boot folder is on /dev/hda2 ,
then enter chroot /dev/hda2/ 

 Then change directory to the /boot folder, move the old .img
 file out of the way - assuming it's still there - by
 renaming it to *.img.old , and then create a new initrd by
 typing mkinitrd -v -f initrd-KERNEL-VERSION.img
 KERNEL-VERSION . Replace "KERNEL-VERSION" with the version
 of the kernel that you are trying to load. If you do a full
 listing of the /boot folder you'll see the same numbers and
 letters in the full kernel file's name (eg. for the kernel
 called "vmlinuz-2.4.22-10mdk" , you would want to create an
 initrd called "initrd-2.4.22-10mdk.img" and the kernel
version


<< обмен на данни между 2 нет доставчика (2 ) | iptables -t nat i iptables -t mangle (2 ) >>

 
© 2011-... Асоциация "Линукс за българи"
© 2007-2010 Линукс за българи ЕООД
© 1999-2006 Slavej Karadjov
Ако искате да препечатате или цитирате информация от този сайт прочетете първо това
Външния вид е направен от MOMCHE
Code Version: 1.0.8 H (Revision: 23-09-2011)
 
Изпълнението отне: 0 wallclock secs ( 0.08 usr + 0.01 sys = 0.09 CPU)