[Top][All Lists]

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

Re: GRUB only offers a rescue shell

From: jmh6
Subject: Re: GRUB only offers a rescue shell
Date: Fri, 14 Jul 2017 06:47:27 -0400 (EDT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

Hi Pascal,

Further experiments to try to clone my working Knoppix 6.4.3 hard drive.

    The layout is /dev/sda1 - swap /dev/sda2 - OS.

I used fdisk to get hard disk layout more or less the same using another Linux to mount the 'new' harddrive and the working OS image as a USB memory stick.

I dd copied the working image /dev/sda2 to what is eventually to be /dev/sda2. It is /dev/sdb2 on the cloning system. It seems to have copied OK. I can mount it, etc.

I tried to use grub-install. I was expecting it to ask me a bunch of questions and finally install a good grub including MBR on /dev/sdb. Grub would not do that. Or at least I could not figure out how to do it. There were no known good grub examples that I found.

So I took the known good MBR from the running system and dd copied it to the 'new' hard drive.

On boot I see 'GRUB ' on the CRT and then dead. So I assume grub 'must' be loading some absolute block number from the hard drive of assembly code , but doesn't load the right block(s). It would be MOST helpful to know exactly what grub was trying to do at this point?? I probably could then have just patched the MBR assembly code and have been up and running?

Next attempt. Use CD to install a new version of Knoppix 6.4.3 on the 'new' hard drive. Worked all OK. Boots OK. So somehow it told Grub and friends what to do?? It would be VERY nice to have whatever was done really documented.

As I write this I am using dd to replace the recently install /dev/sda2 with the known working /dev/sda2. Maybe grub will 'know' what to do. Or maybe things will just happen to be in the right place for grub to work??

If this fails. And I expect it may. The next step is to image copy the whole known working /dev/sda image. MBR, swap space, and working image as one large image and see if that works? Later I can probably use fdisk to make the unused hard disk available as some sort of partition?

It would be VERY nice to have an easy way to clone a working Linux to a new hard drive or memory stick.

    Of course I should write it :).

    Thanks in advance for your time and help,

On Fri, 14 Jul 2017, Pascal Hambourg wrote:

Le 14/07/2017 ? 06:15, Jordan Uggla a ?crit :
On Thu, Jul 13, 2017 at 1:20 PM, Pascal Hambourg <address@hidden>

Or one could force grub-install to include the part_msdos module in the
image with the --modules=part_msdos option.

One could, and it would work, but basically only by chance due to how
cross disk installs are supported in grub. grub-install would still
see it as a cross disk install, and would still set it up as such.
Because cross disk installs use an embedded config that searches by
UUID, and that search happens to still search partitions even when
grub-install "knew" that $prefix was not to be found on a partition,

IMO it is a pity that GRUB does not also search by UUID even when the core image and $prefix are on the same disk. It would avoid boot failure when the partition containing $prefix is renumbered (logical partition numbers are not stable when you create or remove another logical partition).

$prefix would be configured properly but it's an ugly work around that
could break if grub's implementation changes. I am firmly of the
opinion that the --modules option should never be used, as it is
almost exclusively misused and it is easy to break things when using

I had to use --modules once on a regular setup because grub-install did not include some required module by itself.

Help-grub mailing list

reply via email to

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