Switch to full style
User discussion and information resource forum for BootIt Bare Metal.
Forum rules
Post a reply

Reinstalling grub from the terabyte grub disk

Wed May 28, 2014 2:06 pm

My main hard drive, a 2 TB Hitachi, died on me recently but I had backups of all its partitions and a spare 2 TB hard drive. I was able to reinstall all of the backups and reinstall BIBM and BIBM is working fine. I do not use the feature of BIBM that allows more than 4 primary partitions on a MBR drive.

A number of the partitions I re-installed are boot partitions for various Linux distros in an extended partition ( the equivalent root/home partitions are on a second hard drive which did not fail ). When I re-installed the various boot partitions I moved them toward the end of my new spare hard drive, just before he BIBM dedicated primary partition at the end of he drive in order to leave maximum room before it.

However none of the Linux boot partitions will boot, even though BIBM is able to find and recognize them easily as valid boot partitions. Some of the Linux distros are grub-based ( instead of grub2 based ) so I then decided to try to re-install grub using the Terabyte grub disk. First I would boot the unbootable distro, in order to set he partitions it should see properly, then I would restart my computer with the Terabyte grub disk so that I would boot into it. All went according to plan but when I tried to find the stage1 files it could not do so. Then I decided to directly use the root command since I knew exactly which partition contained boot file. When I did this: 'root (hd0,7)' I received the response that the partition was beyond the maximum cylinder accepted by my BIOS.

I looked in my BIOS but I could not find anywhere anything that specified that it only allowed my hard drives to have some maximum number of cylinders. Does anybody know why i might be getting this message from grub and where in my BIOS I might find anything specifying the maximum cylinders for a hard drive ?

Re: Reinstalling grub from the terabyte grub disk

Wed May 28, 2014 4:04 pm

I assume you're using GRUB Legacy. You may have to place them at the beginning of the drive (probably the easiest solution). You could check if there's a BIOS update available for the system first, though (it may have better support for larger drives). LBA mode should be enabled (or you may need to select "Normal" or "Auto" for the mode).

How old is the system? What type of drive (IDE, SATA, etc.)?

Which Linux distros?

Re: Reinstalling grub from the terabyte grub disk

Wed May 28, 2014 4:06 pm

eldiener wrote:
> My main hard drive, a 2 TB Hitachi, died on me recently but I had backups
> of all its partitions and a spare 2 TB hard drive. I was able to reinstall
> all of the backups and reinstall BIBM and BIBM is working fine. I do not
> use the feature of BIBM that allows more than 4 primary partitions on a MBR
> drive.
>
> A number of the partitions I re-installed are boot partitions for various
> Linux distros in an extended partition ( the equivalent root/home
> partitions are on a second hard drive which did not fail ). When I
> re-installed the various boot partitions I moved them toward the end of my
> new spare hard drive, just before he BIBM dedicated primary partition at
> the end of he drive in order to leave maximum room before it.
>
> However none of the Linux boot partitions will boot, even though BIBM is
> able to find and recognize them easily as valid boot partitions. Some of
> the Linux distros are grub-based ( instead of grub2 based ) so I then
> decided to try to re-install grub using the Terabyte grub disk. First I
> would boot the unbootable distro, in order to set he partitions it should
> see properly, then I would restart my computer with the Terabyte grub disk
> so that I would boot into it. All went according to plan but when I tried
> to find the stage1 files it could not do so. Then I decided to directly use
> the root command since I knew exactly which partition contained boot file.
> When I did this: 'root (hd0,7)' I received the response that the partition
> was beyond the maximum cylinder accepted by my BIOS.
>
> I looked in my BIOS but I could not find anywhere anything that specified
> that it only allowed my hard drives to have some maximum number of
> cylinders. Does anybody know why i might be getting this message from grub
> and where in my BIOS I might find anything specifying the maximum cylinders
> for a hard drive ?

It might be worth using the 'geometry' command to look at how grub is seeing the drive. To do that, you would use the command like this:

grub> geometry (hd0) => where hd0 is the first BIOS drive, hd1 is the 2nd BIOS drive, etc

It should show the drive number, CHS values, # of sectors, and list the partitions it sees on the drive

Also, what is the exact error message you get when running that root (hd0,7) command?

Re: Reinstalling grub from the terabyte grub disk

Wed May 28, 2014 5:16 pm

TeraByte Support(PP) wrote:
> I assume you're using GRUB Legacy. You may have to place them at the
> beginning of the drive (probably the easiest solution). You could check if
> there's a BIOS update available for the system first, though (it may have
> better support for larger drives). LBA mode should be enabled (or you may
> need to select "Normal" or "Auto" for the mode).
>
> How old is the system? What type of drive (IDE, SATA, etc.)?
>
> Which Linux distros?

Some of the distros have GRUB legacy and some have GRUB2. Right now I am concentrating on re-initializing those systems which have GRUB legacy. They are CentOS 5.10, CentOS 6.5, Suse 13.1, and Mageia 4.

I understand that placing the extended partition, in which the various Linux /boot partitions reside, at or nearer the beginning of the drive will probably work. On the old hard disk, before it failed, the extended partition was not at the beginning or the end of the drive but it was within the first terabyte of he 2 TB drive ( at probably the 500 GB mark ), and everything worked properly as far as booting. In my new setup I wanted to place the extended partition near the end of the drive, just before the final BooITBM primary partition, which is approximately 4 GB.

The system is a K9A2 Platinum mobo so it is a number of years old. It has an AMI BIOS. But LBA is definitely on and I can see nothing in the BIOS limiting the size of hard drives.

The type of drives are all SATA II. There is currently tow 2 TB drives internally.

Re: Reinstalling grub from the terabyte grub disk

Wed May 28, 2014 5:24 pm

TeraByte Support(TP) wrote:
> eldiener wrote:
> > My main hard drive, a 2 TB Hitachi, died on me recently but I had backups
> > of all its partitions and a spare 2 TB hard drive. I was able to reinstall
> > all of the backups and reinstall BIBM and BIBM is working fine. I do not
> > use the feature of BIBM that allows more than 4 primary partitions on a MBR
> > drive.
> >
> > A number of the partitions I re-installed are boot partitions for various
> > Linux distros in an extended partition ( the equivalent root/home
> > partitions are on a second hard drive which did not fail ). When I
> > re-installed the various boot partitions I moved them toward the end of my
> > new spare hard drive, just before he BIBM dedicated primary partition at
> > the end of he drive in order to leave maximum room before it.
> >
> > However none of the Linux boot partitions will boot, even though BIBM is
> > able to find and recognize them easily as valid boot partitions. Some of
> > the Linux distros are grub-based ( instead of grub2 based ) so I then
> > decided to try to re-install grub using the Terabyte grub disk. First I
> > would boot the unbootable distro, in order to set he partitions it should
> > see properly, then I would restart my computer with the Terabyte grub disk
> > so that I would boot into it. All went according to plan but when I tried
> > to find the stage1 files it could not do so. Then I decided to directly use
> > the root command since I knew exactly which partition contained boot file.
> > When I did this: 'root (hd0,7)' I received the response that the partition
> > was beyond the maximum cylinder accepted by my BIOS.
> >
> > I looked in my BIOS but I could not find anywhere anything that specified
> > that it only allowed my hard drives to have some maximum number of
> > cylinders. Does anybody know why i might be getting this message from grub
> > and where in my BIOS I might find anything specifying the maximum cylinders
> > for a hard drive ?
>
> It might be worth using the 'geometry' command to look at how grub is seeing the
> drive. To do that, you would use the command like this:
>
> grub> geometry (hd0) => where hd0 is the first BIOS drive, hd1 is the 2nd
> BIOS drive, etc
>
> It should show the drive number, CHS values, # of sectors, and list the partitions it
> sees on the drive
>
> Also, what is the exact error message you get when running that root (hd0,7) command?

Using within the grub prompt 'geometry (hd0)' gives:

drive 0x80: C/H/S = 1024,255,63, the number of sectors is = -387938128, LBA
Partition num: 0 Filesystem type unknown, partition type 0x17
Partition num: 1 Filesystem type unknown, partition type 0x17
Partition num 3, Error 18: Selected cylinder exceeds maximum supported by BIOS

However from within my PartitionMagic bootup disk 'parted -l /dev/sda' has no problem showing everything:

Model: ATA ST2000DL003-9VT1 (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 316GB 316GB primary ntfs
2 316GB 845GB 529GB primary ntfs boot
3 1779GB 1989GB 210GB extended
5 1779GB 1780GB 1078MB logical ext3
6 1780GB 1781GB 1054MB logical ext3
7 1781GB 1782GB 1078MB logical ext3
8 1782GB 1783GB 1078MB logical ext3
9 1783GB 1784GB 1070MB logical ext3
10 1784GB 1785GB 1049MB logical ext3
11 1785GB 1786GB 1050MB logical ext3
4 1989GB 1993GB 4294MB primary fat16

Also from within BIBM all partitions are viewable without problems.

Re: Reinstalling grub from the terabyte grub disk

Thu May 29, 2014 6:01 am

eldiener wrote:
> Using within the grub prompt 'geometry (hd0)' gives:
>
> drive 0x80: C/H/S = 1024,255,63, the number of sectors is = -387938128, LBA
> Partition num: 0 Filesystem type unknown, partition type 0x17
> Partition num: 1 Filesystem type unknown, partition type 0x17
> Partition num 3, Error 18: Selected cylinder exceeds maximum supported by BIOS
>
> However from within my PartitionMagic bootup disk 'parted -l /dev/sda' has no problem
> showing everything:
>
> Model: ATA ST2000DL003-9VT1 (scsi)
> Disk /dev/sda: 2000GB
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
>
> Number Start End Size Type File system Flags
> 1 1049kB 316GB 316GB primary ntfs
> 2 316GB 845GB 529GB primary ntfs boot
> 3 1779GB 1989GB 210GB extended
> 5 1779GB 1780GB 1078MB logical ext3
> 6 1780GB 1781GB 1054MB logical ext3
> 7 1781GB 1782GB 1078MB logical ext3
> 8 1782GB 1783GB 1078MB logical ext3
> 9 1783GB 1784GB 1070MB logical ext3
> 10 1784GB 1785GB 1049MB logical ext3
> 11 1785GB 1786GB 1050MB logical ext3
> 4 1989GB 1993GB 4294MB primary fat16
>
> Also from within BIBM all partitions are viewable without problems.

Ok, it looks like the Grub legacy boot disk is having problems with that drive.

Another way to go about it would be to use the grub2 boot disk linked to here:
ftp://ftp.terabyteunlimited.com/thirdparty/grub2.zip
That's the one used in the Grub2 KB article here:
http://www.terabyteunlimited.com/kb/article.php?id=408

In that KB article, in the Troublshooting Grub2, Issue2 section near the end, it covers how to boot with the 'linux', 'initrd', and 'boot' commands, which should work regardless of whether the distro is using Grub legacy or Grub2. It will be harmless to try in any case. You will need to know the root partition for each distro, as well as the boot parititon. Once booted into the disto, you would then have to reinstall Grub Legacy from the distro, typically by using the 'grub-install' command - assuming that will work with your current drive & partition layout.

I have never tried it, but there is also the Super Grub Disk here:
http://www.supergrubdisk.org/
Post a reply