grub-pc can not install on old drives, use grub instead

Bug #491740 reported by Arie Skliarouk
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: debian-installer

I tried to install ubuntu 9.10 amd64 onto an old drive that has only 965632 bytes per cylinder and the system did not boot after the installation.
When I tried to do "grub-install /dev/sda" (from Live CD), I got warning:
Embedding area is too small for core.img

I had to manually remove grub-pc and install grub for the machine to be able to boot from that disk.

debian-installer must have logic to choose to use grub on disks with too small cylinders.

description: updated
Revision history for this message
Colin Watson (cjwatson) wrote :

We'd much rather fix grub2! We can't stick with old unmaintained software forever.

affects: debian-installer (Ubuntu) → grub2 (Ubuntu)
Revision history for this message
Felix Zielcke (fzielcke) wrote : Re: [Bug 491740] [NEW] grub-pc can not install on old drives, use grub instead

Am Donnerstag, den 03.12.2009, 12:23 +0000 schrieb Launchpad Bug
Tracker:
> You have been subscribed to a public bug:
>
> Binary package hint: debian-installer
>
> I tried to install ubuntu 9.10 amd64 onto an old drive that has only
> 965632 bytes per cylinder and the system did not boot after the
> installation.
> When I tried to do "grub-install /dev/sda" (from Live CD), I got
> warning:
> Embedding area is too small for core.img
>

Do you have more then one disk in your PC?
If blocklists have to be used (i.e. grub-install --force) then you must
install GRUB to the disk where your /boot/grub is on.
And then you need to check in your BIOS that it boots from that one.

I recently experienced this problem myself and we really should abort
with an error in grub-setup/grub-install if blocklists get used and you
install to a different disk then /boot/grub is on.

--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer

Revision history for this message
Arie Skliarouk (skliarie) wrote :

You are right, I have two disks - old one as primary and new one as secondary.
I installed linux on the new harddisk, so I can't use blocklists...

Are there any other ways to use grub2 ?

Revision history for this message
Felix Zielcke (fzielcke) wrote : Re: [Bug 491740] Re: grub-pc can not install on old drives, use grub instead

Am Donnerstag, den 03.12.2009, 14:28 +0000 schrieb Arie Skliarouk:
> You are right, I have two disks - old one as primary and new one as
> secondary.
> I installed linux on the new harddisk, so I can't use blocklists...
>
> Are there any other ways to use grub2 ?
>

Why do you say you can't use blocklists?
As I said install GRUB to your new harddisk and then change your BIOS to
boot from it.
Or use (g)parted to resize the first partition so it starts at/after
sector 63 so that there is enough space to embed core.img
--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer

Revision history for this message
Arie Skliarouk (skliarie) wrote :

As I wrote earlier, I have solved the problem for me and am interested in it being resolved for sake of laymen that are going to install ubuntu onto theirs old harddisk, lose ability to boot windows and then hate linux (as a generalization) for the rest of their life.

I don't care how the problem is solved, by patching grub-pc, or modifying debian-installer. What matters, is for the user to be able install ubuntu on their *old* harddisk, with small track size and not notice that!

If you don't want to make debian-installer to use grub1 in these cases, fine then, make grub-pc to automatically use blocklists or use whatever workaround.

BTW, it is not user-friendly to ask users to change BIOS, or g-d forbid, resize the the first partition so it starts after sector 63...

If nothing can be done - fine too - close the bug please.

Revision history for this message
Felix Zielcke (fzielcke) wrote :

Am Freitag, den 04.12.2009, 06:49 +0000 schrieb Arie Skliarouk:
> As I wrote earlier, I have solved the problem for me and am interested
> in it being resolved for sake of laymen that are going to install
> ubuntu
> onto theirs old harddisk, lose ability to boot windows and then hate
> linux (as a generalization) for the rest of their life.
>
> I don't care how the problem is solved, by patching grub-pc, or
> modifying debian-installer. What matters, is for the user to be able
> install ubuntu on their *old* harddisk, with small track size and not
> notice that!

Well if you really have interest in having this bug fixed, it would help
much if you would confirm, if my thoughts are correct or not.
GRUB Legacy and GRUB 2 are complete 2 different things from code point
of view.

> If you don't want to make debian-installer to use grub1 in these
> cases,
> fine then, make grub-pc to automatically use blocklists or use
> whatever
> workaround.

grub-installer
> BTW, it is not user-friendly to ask users to change BIOS, or g-d
> forbid,
> resize the the first partition so it starts after sector 63...

What does g-d mean?

I asked you as a bug submitter.
I agree that it's not that friendly "fixing" this by telling this to
everyone who runs into this problem and not doing anything else.

> If nothing can be done - fine too - close the bug please.
>

The things which can be hopefully done are (again, if my assumption
about the problem here is correct):

- Fix grub-install/grub-setup to refuse to install GRUB to the MBR of a
different disk if blocklists have to be used.

- Make first partition in partman always start at a a later sector
I think there are plans in parted to make embeding area bigger.

- Make grub-installer install to the disk where /boot/grub is on,
instead of by default assuming (hd0) is the right disk.

In future hopefully debian-installer defaults to create GPT partition
tables, then it always creates a bios_grub partition and then blocklists
aren't a problem.

--
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer

Revision history for this message
YannUbuntu (yannubuntu) wrote :

Hi Arie,
can you reproduce with a recent version of GRUB2 ? (eg the one included in Ubuntu 12.04)

Please could you also indicate the output of 'sudo parted -l' after connecting your old drive ?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Arie Skliarouk (skliarie) wrote :

Sorry, I don't have the hardware around anymore and can not help further...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.