Grub error 17 when installing Suse 11.4

Hi,

I’m fairly new to linux and trying to dualboot my netbook running Windows 7. Before installing OpenSUSE I shrunk my Win 7 partition down in half, then created 3 partitions out of the new free space for /root, /home and /swap. I installed opensuse and when it got to the bootloader section I kept getting Grub error 17 - cannot mount selected partition, and so on. I made sure it was writing to the MBR and also into /boot if that makes a difference, but I did get a prompt that said YaST couldn’t make changes to /dev/sda (I’m paraphrasing and can’t remember the exact error message).

At the moment I have suse installed and my windows partition intact, but no bootloader (not even windows one) so all I can do is boot to Live CD.

Below is the output of fdisk -l. There’s quite a few more partitions than it’s showing, sda3, sda4 and sda5 are my /home, /root, /swap and the other ones are windows partitions, like the system recovery along with the win7 install. During the suse install I formatted the home and root partitions with ext4 filesystem.

linux:/home/linux # fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdc1f6e3d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63        2047         992+  42  SFS
/dev/sda2            2048      616447      307200   42  SFS
/dev/sda3          616448   288901119   144142336   42  SFS
/dev/sda4   *   288901120   488395119    99747000   42  SFS

Thanks in advance :slight_smile:

I’m afraid same problem and same answer (or lack of answer) as in this other post:
GRUB - Error 17 on single HDD with several partitions on installation

Okay… I’m going to try loading Ubuntu like you mentioned in the other thread and see if GRUB2 can write to the disks.

BTW it is not “/root, /home and /swap” what you probably mean but “/, /home and swap”
/root is also on the system, but is another directory then what you mean.
Swap is for swapping. You could have a directory /swap and mount a partition there, but apart from the word it would not have to do anything with swapping by default.

This is the same on Ubuntu (or any other Unix/Linux).

Thank you for clarification :slight_smile:

So I believe I figured out the overall problem. I booted to ubuntu live and used GParted to take another look. I had the 4 primary partitions, but my linux partition was set as a primary with no logical partitions anywhere. I deleted it and made the unallocated space a new extended partition, created a few logical ones inside it, formatted them and it installed fine. On restart it loaded GRUB and I could go into ubuntu and had the options for Win7, of course windows 7 was boned and errored immediately so I will have to figure out what’s wrong with that.

So now it brings me to this question, with all the repartitioning I did (which I’m assuming was the whole reason it didn’t work) am I safe to wipe lame Ubuntu and install SUSE? Do you think grub 2 made a difference, or was it probably because I set it up wrong that SuSE didn’t work.

ty!

This is why I told the OP in the other post to try to change the partition ID of the last partition to 0x0F (which means the extended partition). But then I got confused with the GPT partition scheme (as it doesn’t use primary and logical partitions AFAIK.)

I would recommend you figure out that first if you intend to use Windows.

Yes, Grub2 makes a difference when it gets to read a GPT partition table. One possible trick would be to install Ubuntu in a single small partition. You don’t need to install a desktop, just the very minimal system with Grub2. Once you’ve done that, you can install openSUSE in other partitions. You’ll have to explicitely tell openSUSE setup to NOT write a generic bootcode into MBR - I wish they would stop to do that some day.

I deleted it and made the unallocated space a new extended partition, created a few logical ones inside it, formatted them and it installed fine. On restart it loaded GRUB and I could go into ubuntu and had the options for Win7, of course windows 7 was boned and errored immediately so I will have to figure out what’s wrong with that.

I’m thinking it may have been helpful to first convert these partitions to basic as done here dual boot with windows 7perhaps it could still help to get win7 working? You would in this case choose the “[EFI GPT] EFI GPT partition map” option (not shown on the version of testdisk used in the link given) instead of the “[INTEL]” option.

@dvhenry,

Great tip! I think you should write a howto, as I’m afraid we’re going to encounter this situation more and more often on Windows laptops.

I think you should write a howto

I have more questions than answers!

For example, **fdisk -l ** output in this thread is lacking this expected line, ( if GPT is used ).
WARNING: GPT (GUID Partition Table) detected on ‘/dev/sda’! The util fdisk doesn’t support GPT. Use GNU Parted.

Running gparted from partedmagic on a virtual hard disk in vbox, and setting up 6 partitions on a GPT disk.
If I run **fdisk -l **and parted -l, ( noting that parted handles GPT and fdisk doesn’t ) I get,

root@PartedMagic:~# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 22.1 GB, 22141730816 bytes
255 heads, 63 sectors/track, 2691 cylinders, total 43245568 sectors
Units = sectors of 1 * 512 = 512 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
/dev/sda1               1    43245567    21622783+  ee  GPT

root@PartedMagic:~# parted -l
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 22.1GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  1286MB  1285MB  ntfs
 2      1286MB  5332MB  4046MB  ntfs
 3      5332MB  6004MB  672MB   ntfs
 4      6004MB  11.7GB  5745MB  ext4
 5      11.7GB  21.1GB  9332MB  ext4
 6      21.1GB  22.1GB  1059MB  linux-swap(v1)

There are many tools that can be used to create these partition tables, they don’t all have to work the same way.
So, how do I compare this output to the OP’s output?
Perhaps I should ask the OP to give me** parted -l** along with** fdisk -l** when looking at this type of question?

I think you should write a howto, as I’m afraid we’re going to encounter this situation more and more often on Windows laptops.
I also think these problems will occur more often in the near future, does the upcoming 12.1 have an option to install GRUB2?
There are some areas where I can offer some input, perhaps helping someone else writing that howto?

That’s right. Here’s what it says on my iMac running openSUSE - the only machine I have here which uses GPT:

# fdisk -l      

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00002652

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      409639      204819+  ee  GPT
/dev/sda2          409640   352469031   176029696   af  HFS / HFS+
/dev/sda3   *   352731176   488134983    67701904   83  Linux


I think you hit the nail on the head! They are dynamic disks and I don’t think they’re being recognized, not even being recognized when I try to reinstall Windows either.

Here are the new logs from fdisk -l and parted -l:

Model: ATA TOSHIBA MK2556GS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system     Flags
 1      32.3kB  1049kB  1016kB  primary
 2      1049kB  316MB   315MB   primary   ntfs
 3      316MB   148GB   148GB   primary   ntfs            boot
 4      148GB   250GB   102GB   extended
 5      148GB   150GB   2097MB  logical   linux-swap(v1)
 6      150GB   152GB   2201MB  logical   ext4
 7      152GB   173GB   21.1GB  logical   ext4
 8      173GB   250GB   76.7GB  logical   ext4


Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label         
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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: 0xdc1f6e3d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           1         992+  42  SFS
Partition 1 does not end on cylinder boundary.
/dev/sda2               1          39      307200   42  SFS
Partition 2 does not end on cylinder boundary.
/dev/sda3   *          39       17984   144142336   42  SFS
/dev/sda4           17984       30402    99746817    5  Extended
/dev/sda5           17984       18239     2048000   82  Linux swap / Solaris
/dev/sda6           18239       18507     2149376   83  Linux
/dev/sda7           18507       21076    20638720   83  Linux
/dev/sda8           21076       30402    74907648   83  Linux

Mind you this is after I repartitioned everything but I didn’t touch the 3 windows ones (sda 1, 2, 3). I will try out TestDisk!

I will try out TestDisk!
Remember, you don’t have to save the changes to disk if you are not sure, if that is the case show us the testdisk log.

I don’t have anything on windows that I need so I was planning to wipe it and start over. After changing the partition table to the one you suggested, it won’t load GRUB anymore so I’m booting back into a live cd. Going to go back into testdisk and try to paste a log if I can figure out how to. :slight_smile:

Run testdisk with the [INTEL] option, NOT the previously mentioned [EFI GPT] option, more has been discovered about this problem since that post. Take your time with Testdisk, you can rerun it until you are comfortable with the changes before you make them.

Unfortunately I think I fail as a test subject. I think I’ve already accepted the changes to it and now I’m left with:

Model: ATA TOSHIBA MK2556GS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End    Size   File system  Name  Flags
 1      1049kB  316MB  315MB  ntfs
 2      316MB   148GB  148GB  ntfs
 3      148GB   250GB  102GB  ext4


Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label                                  


I will try the Intel option now though. Thanks again for helping me with this!

It seems I was too late with the last reply, Test disk can fix this (with some luck, and take caution this time, again, no need to save changes if you are not certain!).

No problem! I think my problem now (unrelated) is having issues running or installing testdisk from the Live CD, I haven’t tried it from SUSE since I ran into the initial problems (ultimately I want this computer running SUSE/win7), so maybe I can access it easier than in ubuntu.

Unfortunately I think I fail as a test subject. I think I’ve already accepted the changes to it and now I’m left with:

Testdisk can look at previous partition setups and reinstate them, but you do need to be carefull, keep your whits about you!

Run Testdisk from a liveCD, I use the PartedMagic liveCD.

I kept my whits, but I may be ultimately defeated. I set the TestDisk table to INTEL and I have the same problem, however the disks show up in Win7 repair except they are read only. I think I’m going to blow it all away and reformat correctly from the ground up :). I’ll partition everything, install Windows, then OpenSuSE 11.4.