Executing 'grub-install (hd0)' failed (due to divergency of partition type and filesystem type)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
debian-installer (Debian) |
Fix Released
|
Unknown
|
|||
debian-installer (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
grub (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
ubiquity (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: ubiquity
There are several bug reports for this summary, but i was not able to find one, which is describing this problem. So here's a new one...
Here's how to reproduce it in a vmware:
1. crate a new vmware vm: typical, linux, ubuntu (8GB harddrive)
2. boot 704-desktop-386-cd within that vm
3. use gparted to set disklabel msdos and create a ext3 primary partition (whole device). (Note: by specifiying 'ext3', the partition gets formated and the partition type is set to 0x83
4. quit gparted.
Use fdisk for the following steps. The problem won't occour, if you use gparted for the following steps...
5. delete the partition from step 3.
6. create a new primary partition in "partition slot" 1. It is very important, that the new partition starts on excatly the same position as the deleted partition! Some space should be left behind for a smaller second primary partition (swap). For the first partition set the partiton type fat16 (0x06). Create the second primary partiton on the remaining free space and assign partition type 0x82
7. write partition table and quit fdisk (unmount, if the first primary partition is now automatically mounted...)
8. start the installer, and choose 'manual' in the 'prepare disk space' dialog.
9. Select first primary partition and click 'Edit partition'. Change the mountpoint to '/'. (Use 'go back' if you are asked for 'resizing'). Note, that 'format' is not automatically checked. So do it manually. Use seconde partition as swap. Now continue with installation.
At about 94 percent of the installation, the installer fails to install grub. Grub is not able to dump stage1 on first primary partiton, because it assumes the wrong filesystem type...
Can this happen in 'real life'? Yes ;-) I had a unused harddrive containing two ext3 formated primary partitions. I installed Windows XP on the first primary. After installation i used the partitioning tool which is part of windows (sorry, don't now the exact english name) to delete the second partition and create two _unformatted_ primarys in the free space. Windows set fat16 for these partitions...
So in my opinion the problem is, that ubiquity does not verify/correct the partiton type in the partition table. It detects a ext3 filesystem (which is a relict of an allready deleted partition) and is happy. Later on, grub fails because of the misleading partition type 'fat16'.
In addition, ubiquity should always format the partition which is assinged to '/' (the checkbox 'format' was not checked by default in the above case).
Changed in debian-installer: | |
status: | Unknown → Fix Released |
i think i am seeing the same problem.
grub install failed with the installer (minimal install) so i chose to install lilo instead. now i am trying to switch to grub.
grub-install gives to error
The file /boot/grub/stage1 not read correctly
my hda just has one ext3 partition. but now i have checked and fdisk -l thinks that it is FAT16
is there a safe way to change the partition type?