Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Grub Error 17, partition type 0x7
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Simplimus
n00b
n00b


Joined: 14 Mar 2006
Posts: 30
Location: Dresden, Germany

PostPosted: Thu Aug 09, 2012 7:15 pm    Post subject: [solved] Grub Error 17, partition type 0x7 Reply with quote

Hi folks,

i'm running the gentoo live dvd and try to install gentoo from here. Everything worked like a charm so far, but now I ran into grub being unwilling to cooperate:
Code:

(chroot) Gentoo-2012 init.d # grub-install --no-floppy /dev/sda
The file /boot/grub/stage1 not read correctly.


My system looks like this:
Quote:

# fdisk /dev/sda
Device Boot Start End Blocks Id System
/dev/sda1 2048 3999743 1998848 82 Linux swap / Solaris
/dev/sda2 * 3999744 4204543 102400 7 HPFS/NTFS/exFAT
/dev/sda3 4204544 127973375 61884416 7 HPFS/NTFS/exFAT
/dev/sda4 127973851 625137344 248581747 f W95 Ext'd (LBA)
/dev/sda5 127973853 625137344 248581746 7 HPFS/NTFS/exFAT

All partitions are formatted in ext4, while sda2 is the designated boot and sda3 the root partition.

And these are the partitions that grub offers me
Quote:

root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x82
Partition num: 1, Filesystem type unknown, partition type 0x7
Partition num: 2, Filesystem type unknown, partition type 0x7
Partition num: 4, Filesystem type unknown, partition type 0x7


I tried
Quote:

grub> root (hd0,2)
Filesystem type unknown, partition type 0x7

grub> setup (hd0)
Error 17: Cannot mount selected partition


Just to be complete, here is my fstab
Quote:

/dev/sda2 /boot ext4 noauto,noatime 1 2
/dev/sda3 / ext4 noatime 0 1
/dev/sda1 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
# /dev/fd0 /mnt/floppy auto noauto 0 0


Any suggestions?


Last edited by Simplimus on Thu Aug 09, 2012 8:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7089
Location: Saint Amant, Acadiana

PostPosted: Thu Aug 09, 2012 7:27 pm    Post subject: Reply with quote

Last time I installed Gentoo I encountered something similar, I just resorted to plain grub command line and it worked. Maybe grub-install script is broken.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Simplimus
n00b
n00b


Joined: 14 Mar 2006
Posts: 30
Location: Dresden, Germany

PostPosted: Thu Aug 09, 2012 7:31 pm    Post subject: Reply with quote

Yes, that's what I thought, too. That's why I tried it by foot. But no luck.
As I said:
Quote:

grub> root (hd0,2)
Filesystem type unknown, partition type 0x7

grub> setup (hd0)
Error 17: Cannot mount selected partition


Could it have to do something with the ext4 partition? I never used that before.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Thu Aug 09, 2012 7:41 pm    Post subject: Reply with quote

Simplimus,

Your fdisk is incorrect.

Notice that it gives the ID of 7 tp partitions 2,3, and 5. Use fdisk to change the ID to 83.
Grub must be reading the partition IDs, not trying to read the filesystem on the partition.

Thats where
Code:
 Filesystem type unknown, partition type 0x7
comes from.
When the partition type is 83 (Linux) grub will look inside to see what is there.

Changing the filesystem ID is harmless to the data on the partition. Its just a single byte in the partition table.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Simplimus
n00b
n00b


Joined: 14 Mar 2006
Posts: 30
Location: Dresden, Germany

PostPosted: Thu Aug 09, 2012 7:51 pm    Post subject: Reply with quote

So how do I do that?

EDIT:
Found it.

Now it works like a charm.
Code:

(chroot) Gentoo-2012 init.d # grub-install --no-floppy /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(fd0)   /dev/fd0
(hd0)   /dev/sda


Thanks a lot.

Although I wonder why my Thinkpad is supposed to have a Floppy *headscratching*
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum