Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Debian

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-18-2008, 02:34 PM
Marten Kemp
 
Posts: n/a
GRUB Error 2

I'm trying to install a very minimal system on a 540mb
drive to be moved to a laptop that doesn't have a CD.
I've partitioned as follows:
/boot - 10mb
/ - 350mb
swap - 30mb
/usr - 150mb

I'm using the net install CD and everything goes well
until the first boot of the installed system. I get:

GRUB loading stage1.5.
GRUB loading, please wait
Error 2

http://www.uruk.org/orig-grub/errors.html says:
2 : "Selected disk doesn't exist"

This error is returned if the device part of a device- or full filename
refers to a disk or BIOS device that is not present or not recognized by
the BIOS in the system.

I rebooted the CD in rescue mode and the contents of /boot
match those of both my Linux workstation and my main server.
The BIOS shows the device, and fdisk from a DOS floppy shows
that the partitions are there.

I reinstalled GRUB but that didn't help.

Any suggestions?
--
-- Marten Kemp
(Fix name and ISP to reply)
Reply With Quote
  #2 (permalink)  
Old 07-22-2008, 02:47 AM
S S
 
Posts: n/a
Re: GRUB Error 2

On Fri, 18 Jul 2008 10:34:54 -0400, Marten Kemp
<marten.kemp@earthlink.net> wrote:

> I'm trying to install a very minimal system on a 540mb
> drive to be moved to a laptop that doesn't have a CD.

----snip----8x----snip----8x----snip----8x----snip----8x----snip----8x
>
> I'm using the net install CD and everything goes well
> until the first boot of the installed system. I get:
>
> GRUB loading stage1.5.
> GRUB loading, please wait
> Error 2
>

----snip----8x----snip----8x----snip----8x----snip----8x----snip----8x
>
> I reinstalled GRUB but that didn't help.
>
> Any suggestions?


Maybe these will help.

1) According to /tmp/grub-0.97/stage2/shared.h the third
error number (having a value of 2) of a grub_error_t
is called ERR_BAD_FILETYPE, which is described in
/tmp/grub-0.97/stage2/common.c with "Bad file or directory
type". Maybe the netinstaller put the wrong filetype version
of the grub stage2 onto the 540 MB drive?

2) Read the grub manual. Check /boot/grub/device.map, add an
entry for your 540 MB drive. If anything looks wrong (or you
are just not sure) just then install grub again:

grub-install --root-directory=/path_to_the_540_MB_drive/boot
"hd1"

(Change that "hd1" to your 540 MB drive.) That line puts
grub in the MBR and the first 63 sectors of the hard-drive.
If you add a ",partition" to that last argument grub is placed
into the first 63 sectors of that partition. Check the logs
it /tmp to see what it did.

3) It looks as though grub is looking for one of its files
(menu.lst, stage2), they should be should be under /boot/grub/
on you 540 MB, are they there?

4) What is in the grub logs under /tmp/grub-install.*, any
clues? 3) grub-install should have modified the files in
/boot/grub/, to see the path(s) written to them by checking
address 0x021B in these two commands:

Replace hdb with the device name of the 540 MB, issue this
as root.

# dd if=/dev/hdb bs=512 count=62 skip=1 | xxd | less

Replace e2fs_stage1_5 with the file matching the format of
your /boot partition on the 540 MB.

xxd /path_to_the_540_MB_drive/boot/grub/e2fs_stage1_5 | less

5) Grub uses the partition that BIOS booted to complete that
path, is your 540 MB /boot partition set to boot, set its flag
with fdisk (or your favorite partitioning tool)?

6) It is best to install grub from grub, in other words boot
a copy of grub (floppy, CD or hard-disk) and use the "setup"
command at the grub command line. Grub uses BIOS calls to
install onto a drive and this method avoids any conflicts that
those routines might create with the OS, by eliminating the OS.

- steve s.
Reply With Quote
  #3 (permalink)  
Old 07-22-2008, 06:10 AM
Marten Kemp
 
Posts: n/a
Re: GRUB Error 2

S S wrote:
> On Fri, 18 Jul 2008 10:34:54 -0400, Marten Kemp
> <marten.kemp@earthlink.net> wrote:
>
>> I'm trying to install a very minimal system on a 540mb
>> drive to be moved to a laptop that doesn't have a CD.

> ----snip----8x----snip----8x----snip----8x----snip----8x----snip----8x
>>
>> I'm using the net install CD and everything goes well
>> until the first boot of the installed system. I get:
>>
>> GRUB loading stage1.5.
>> GRUB loading, please wait
>> Error 2


{much interesting information elided}

I think that the problem is installing on a system that supports
LARGE and LBA access modes. I did the full install with the drive
type set to AUTO, which worked on the test system but not on the
laptop. I then set the disk geometry to CHS and the install failed
with a collection of different GRUB errors on the reboot, depending
on the partitioning I used.

The test system I used has a fairly advanced Super 7 board. I'm gonna
try this again with my 386 which only supports CHS like I'm fairly
sure the laptop does.

I think that the install process uses the BIOS geometry and after the
first reboot Linux bypasses the BIOS and uses whatever it wants.

If the install using the 386 fails then I'll probably load IBM's
DOS 2K and Windows 3.11.

I tried booting with the floppies but the install fails because it
claims to get I/O errors when reading the ROOT floppy. I tried several
separate floppies and formatted 'em with DOS first to catch any bad
sectors. This is a PS/2 model 33 which needs the floppy=thinkpad
parameter. I used that and every other parameter I could think of
without success.

--
-- Marten Kemp
(Fix name and ISP to reply)
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Debian


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:06 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Anime | Loans | Personal Loan | Mortgage Calculator | Samsung



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109