Was trying to setup grub on /dev/sdb and got an error about stage1 not
being read correctly:

# fdisk -l /dev/sdb
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00098852

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          13      104391   83  Linux
/dev/sdb2              14       48053   385881300   83  Linux
/dev/sdb3           48054       60801   102398310   83  Linux

# pmount /dev/sdb1

# mount -l | grep sdb1
/dev/sdb1 on /media/sdb1 type vfat
(rw,noexec,nosuid,nodev,quiet,shortname=mixed,uid=0,gid=0,umask=077,fmask=0177,dmask=0077,iocharset=utf8)
[grub]

# grub-install --recheck --no-floppy --root-directory=/media/sdb1 /dev/sdb
Probing devices to guess BIOS drives. This may take a long time.
The file /media/sdb1/boot/grub/stage1 not read correctly.

Turns out the problem is that grub reads the filesystem information
from the partition table (id 83 linux) and not from the partition
directly (vfat) as mount does.  I had partitioned the drive with
fdisk, which by default assigns id=83, but then formated it as vfat.
This confused grub (and me.)

The solution was to change the id to b (w95 fat32) with fdisk:

# fdisk -l /dev/sdb

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00098852

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391    b  W95 FAT32
/dev/sdb2              14       48053   385881300   83  Linux
/dev/sdb3           48054       60801   102398310   83  Linux

... and then grub-install worked just fine.

Regards,
- Robert

--~--~---------~--~----~------------~-------~--~----~
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
More options: http://groups.google.com/group/cwelug
-~----------~----~----~----~------~----~------~--~---

Reply via email to