help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-install "(hd0)" put it on the mbr :( using grub version 1.96


From: shirish
Subject: Re: grub-install "(hd0)" put it on the mbr :( using grub version 1.96
Date: Sun, 10 Feb 2008 15:07:41 +0530

On Feb 10, 2008 2:38 PM, Vesa Jääskeläinen <address@hidden> wrote:
> shirish wrote:
> > Hi all,
> >       I did the grub-install "(hd0)" & it happened without any errors.
> >
> > This is the way my hard disk is set up.
> >
> > 1. IDE0 = Windows 160 GB HDD
> > 2. IDE1 = GNU/Linux 80 GB HDD
> >
> > The only way I know is to use the BIOS to change the hdds & then boot
> > up the relevant OS.
> > I want to set up so when I'm booting into windows, the windows
> > bootloader will come up & when I do IDE1 then GNU/Linux boots up.
> >
> > Now after grub-install "hd0" it seems to have wiped up the windows
> > bootloading mechanism. So grub goes to grub-rescue mode.
> >
> >
> > Any & all help would be appreciated.
>
> Hi,
>
> So lets test this mailing list for a bit...
>
> When you use BIOS to swap devices, BIOS device numbers shown to GRUB
> changes. This change is not known at time when you install GRUB.
>
> Looking at your other message which contains you grub.cfg (and grub.lst)
>   we can see that other is using hd0 while other is using hd1 (partition
> part ,0 and ,1 is Ok as partition numbering was changed to start from 1
> in GRUB2).
>
> Problem you are facing when you are trying to boot, is that it cannot
> load kernel files as they point to wrong devices.
>
> I am not exactly sure how debian does this configuration process, but
> you may have device.map file some where (in example
> /boot/grub/device.map). Check that this file contains (hd0) as IDE1 and
> (hd1) as IDE0. This is true when you have set IDE1 as default boot
> device in BIOS. If you want to install GRUB to start from IDE0 then you
> have to have (hd0) as IDE0 and (hd1) as IDE1.
>
> After device.map is corrected, you can try to install again.
>
> To fix your Windows boot record, there exists several different Linux
> tools do install regular Windows MBR, name of this tool seems to change
> from distro-to-distro, so I skip it for now. So easiest would be to plug
> in your Windows installation CD, enter to recovery console (perhaps key
> R at some time) and type fixmbr. If this doesn't help, try also running
> fixboot.
>
> Thanks,
> Vesa Jääskeläinen


Hi Vesa,
    Thank you for responding so quickly. I'm also ccing the list,
which u perhaps forgot.

Here are the contents of /boot/grub/device.map as well as fdisk -l
just for the record.

address@hidden:~$ cat /boot/grub/device.map
(fd0)   /dev/fd0
(hd0)   /dev/sda
(hd1)   /dev/sdb

address@hidden:~$ sudo fdisk -l
[sudo] password for shirish:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x48254824

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1912    15358108+   7  HPFS/NTFS
/dev/sda2            1913       19457   140930212+   f  W95 Ext'd (LBA)
/dev/sda5            1913        6083    33503526    7  HPFS/NTFS
/dev/sda6            6084       10254    33503526    7  HPFS/NTFS
/dev/sda7           10255       14425    33503526    7  HPFS/NTFS
/dev/sda8           14426       18596    33503526    7  HPFS/NTFS
/dev/sda9           18597       19457     6915951    7  HPFS/NTFS

Disk /dev/sdb: 80.0 GB, 80060424192 bytes
255 heads, 63 sectors/track, 9733 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0ded0d24

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1216     9767488+  83  Linux
/dev/sdb2            1217        9483    66404677+  83  Linux
/dev/sdb3            9484        9733     2008125   82  Linux swap / Solaris

I do not know what u mean as default boot in BIOS? Lemme check if
there is any option like that & report later on that.

So now from what u say these are the changes I need to do on the
/boot/grub/device.map ?

(fd0)   /dev/fd0
(hd1)   /dev/sda
(hd0)   /dev/sdb

I'm sure the fdisk-l and device.map listing above has told u what I
need. I just want to make sure things are correctly done each time.

As for the windows bootloader is concerned, I was thinking along the
same lines.
-- 
          Regards,
          Shirish Agarwal
  This email is licensed under http://creativecommons.org/licenses/by-nc/3.0/

065C 6D79 A68C E7EA 52B3  8D70 950D 53FB 729A 8B17

reply via email to

[Prev in Thread] Current Thread [Next in Thread]