Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am having trouble with my hard disk. Previously, I had a working Linux Mint Debian Edition partition and a Windows XP partition, all working and bootable through GRUB.

However, I decided to replace LMDE with Debian, so on my Windows parition I deleted the LMDE parition. I downloaded Debian Live on to a USB flash drive, booted it, however during Debian installation it fails to install GRUB (or any other bootloader it offers). Somewhat confused, I aborted installation and went to reboot into Windows. However, when loading GRUB the error "no such parition" appears, and a rescue prompt appears.

I am not sure how this happened, however I want to try and repair GRUB so I can have both my old Windows XP partiion (it's still fine, I can mount it in Debian) and a fresh Debian 6 partition. Here is my fdisk output:

user@debian:~$ sudo fdisk -l

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x04fa04fa

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            3297        4864    12580864    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2               1        3297    26480641    5  Extended
/dev/sda5   *           1        3157    25355264   83  Linux
/dev/sda6            3157        3297     1124352   82  Linux swap / Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 8006 MB, 8006926336 bytes
247 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20ac7dda

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   ?      210559      238826   216435558+   7  HPFS/NTFS
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(187, 180, 14) logical=(210558, 221, 10)
Partition 1 has different physical/logical endings:
     phys=(784, 0, 13) logical=(238825, 64, 22)
Partition 1 does not end on cylinder boundary.
/dev/sdb2   ?      213663      341223   976730017   16  Hidden FAT16
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(906, 235, 61) logical=(213662, 17, 20)
Partition 2 has different physical/logical endings:
     phys=(262, 116, 59) logical=(60762, 71, 9)
Partition 2 does not end on cylinder boundary.
/dev/sdb3   ?           1           1           0   6f  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(370, 101, 50) logical=(0, 0, 1)
Partition 3 has different physical/logical endings:
     phys=(10, 114, 13) logical=(280460, 46, 4)
Partition 3 does not end on cylinder boundary.
/dev/sdb4            3279       63637   462167897    0  Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(0, 0, 0) logical=(3278, 20, 45)
Partition 4 has different physical/logical endings:
     phys=(0, 0, 0) logical=(63636, 236, 34)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Disk /dev/sdc: 987 MB, 987738624 bytes
31 heads, 61 sectors/track, 1020 cylinders
Units = cylinders of 1891 * 512 = 968192 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
user@debian:~$ 

/dev/sda1 is my Windows parition, and /dev/sda5 seems to be my corrupted Debian installation. Not sure about the other one (/dev/sda6 is swap space). I'm not sure what that message under /dev/sda1 means, either.

I am unable to use apt-get to install packages that may fix this due to lack of Internet connection (had this in LMDE, I needed to install MadWifi which I'll do once I get it set up properly) however if need be I can get and transfer .deb packages from my phone.

share|improve this question
    
I can answer some of the side questions: sda2 is a container for sda5 and sda6. It's used because the PC partition table format was originally designed with a limit of 4 partitions, so some OS installers make one of the first 4 an "Extended" partition which can contain many more partitions. The "cylinder boundary" thing doesn't matter unless your BIOS is from the paleolithic era. See here –  Alan Curry Jul 29 '12 at 3:40
    
As for the main question, could you retry the Debian installer, and post exactly what error message you get when it tries to install grub? –  Alan Curry Jul 29 '12 at 3:41
    
The 'grub-pc' package failed to install into /target/. –  Alex Jul 29 '12 at 4:14
    
is that all? Is there anything about grub in /var/log/dpkg.log? –  Alan Curry Jul 29 '12 at 4:17
    
Nope. Nothing there. –  Alex Jul 29 '12 at 4:26
show 7 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.