bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

poor error reporting from embed; stage1_5 size?


From: Eric Mumpower
Subject: poor error reporting from embed; stage1_5 size?
Date: 07 Dec 2001 16:37:39 -0500
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Some disk-partitioning software, e.g. the somewhat popular "cfdisk" tool
under Linux, offer the option of "maximizing" your partitions. Among other
things, will can cause the first partition to start in sector #1 (i.e. the
sector immediately following the MBR). Perhaps obviously, this leaves no
space for an embedded GRUB loader. However, GRUB is fairly unclear when
reporting this problem.

It seems that "Error 12: Invalid device requsted" is returned in the case
where one has attempted to embed a loader in a location which has no space
(e.g. between the MBR (sector #0) and a partition which starts in sector
#1):

> grub> embed /boot/grub/e2fs_stage1_5 (hd1)
> 
> Error 12: Invalid device requested
> 
> grub> embed /boot/grub/e2fs_stage1_5 (hd0)
>  16 sectors are embedded.

This error message is almost completely useless. If it's possible to improve
it, that would be very useful. If not, it would be nice to mention this
behavior somewhere in the GRUB documentation.


Before realizing the nature of my problem, I had sectors 1-8401994 on both
disks (hd0 = /dev/hda, hd1 = /dev/hde) set up as halves of a RAID1 mirror.
(For testing purposes, I deactivated one of the halves (on hd0) and have
installed the stage1_5 loader in its place.)

How many sectors should I leave free in order to always have enough space
for a stage1_5 loader? (That is, what is the maximal size in sectors (or
bytes) of a stage1_5 loader?)


> test-raid:~# sfdisk -l -uS /dev/hda
> 
> Disk /dev/hda: 2434 cylinders, 255 heads, 63 sectors/track
> Units = sectors of 512 bytes, counting from 0
> 
>    Device Boot    Start       End  #sectors  Id  System
> /dev/hda1             0         -         0   0  Empty
> /dev/hda2       8401995  39102209  30700215   5  Extended
[...]
> test-raid:~# sfdisk -l -uS /dev/hde
> 
> Disk /dev/hde: 2434 cylinders, 255 heads, 63 sectors/track
> Units = sectors of 512 bytes, counting from 0
> 
>    Device Boot    Start       End  #sectors  Id  System
> /dev/hde1             1   8401994   8401994  fd  Linux raid autodetect
[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]