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

Re: Installation failed - and failed again...



Brian wrote:
> On Sun 03 Mar 2013 at 18:07:26 -0300, Joao Luis Meloni Assirati wrote:
>
>> > Write a netinst image to two USB devices. Boot from one device and
>> > install to the second one. Try text and GUI modes. It's about an
>> hour's
>> > work at most.
>>
>> But will this happen even if one formats the partition holding the iso?
>> What if the installation proccess is done normally, the target device
>> that
>> happens to hold the iso is partitioned and all the partitions are
>> formatted? When grub gets to be installed, in the last installation
>> step,
>> all the information that an iso existed before is gone, or no?
>
> When the isohybrid ISO is written to to the drive the information about
> the iso9660 filesystem is put within the first 65 sectors of the drive.
> If fdisk is now used to partition the drive the first partition starts
> at sector 2048. Everything beyond this sector is destroyed but sectors
> below number 2048 are left intact. The drive is now useless as a device
> to boot Debian but information about the iso9660 file system is left
> intact.

Wow, of course. The iso image must be installed in the begining of the
disk, which includes the partition table and the mbr, not in the first
partition.

> fdisk leaves space at the beginning of the drive because GRUB requires
> it to embed part of itself there. But GRUB will not go there because it
> thinks it is overwriting data on the disk when it detects the iso9660
> signature. This is by design.

This is clearly a bug, because the disk has a partition table and
therefore there is no useful data before the first partition.

> D-I uses partman for partitioning. It too leaves an embedding area which
> contains the iso9660 data sector. The solution is to remember to do
>
>    dd if=/dev/zero of=/dev/sdX count=65
>
> before partitioning.

But this will destroy the partition table, which is not right if you have
other operating systems or partitions containing data. Maybe 'grub-install
--force <device>' would suffice?

>> Anyway, it must be said that you did an impressive investigation with
>> very
>> scarce resources to say the least, Brian!
>
> Thanks. I cheated though! I had already encountered the bug some time
> ago and the reported behaviour in this thread is very, very similar to
> it.

Of course you deserve congratulations. You had to guess among the various
phony bug reports. It was some kind of psychoanalysis. Your patient still
did not achieve catharsis, though.

João Luis.


Reply to: