Grub set up
Alan McKinnon
alan at linuxholdings.co.za
Tue Jul 4 07:13:01 UTC 2006
On Mon, 2006-07-03 at 21:38 -0400, Richard E. Barmann wrote:
> This is my problem.
> I tried to install Dappar Dan with the cd's I received but it kept
> crashing. I
> then download another iso file and burned it and did an install with
> no
> problem. Now I am trying again to configure Grub to boot either linux
> or
> WindowsXP.' In media I show a file "hdb1" which contains windows. and
> "hda3".
> The following is the disc setup after I made the partitions and
> installed
> Dapper Dan. I think I have my data on the "hda3" partition'
>
> Disc 20G
> 1 Partition 18.4 /media/hdb1 ntfs /dev/hdb1
> enabled
> Windows?
> 2 Partition 1
> kb /dev/hdb2
> 3 Partition 723.5
> Mb /dev/hdb5
> Disc 80G
> 1 Partition 43.1 Gb /
> ext3 /dev/hda1
> Emabled Linux?
> 2 Partition 716.1
> Mb /dev/hda2
> 3 Partition 30.0 Gb /media/hda3 ext3 /dev/hda3
> Enabled
> Data?
> 4 Partition 1
> Kb /dev/hda4
> 5 Partition 729.5 Mb none swap /dev/hda5
> Enabled
> I am confused by partitions and may have messed them up. I believe the
> Windows
> in on hdb1 and linux/Dapper Dan is on hda1. hda3 should have the data
> that I
> am trying to save but I cannot access it. Any help is appreciated and
> needed.
> Thank You Dick Barmann
To really see what is going on you should post the results of the
command 'sudo fdisk -l', but here's the gist of it:
The kernel assigns drive letters in the order it find them. For IDE they
are called /dev/hdx, and x is assigned in this order: primary master
then slave, secondary master then slave. Your Windows stuff is on that
20G drive, and it's set up as a primary slave and called hdb. I suspect
you moved the cables around as Windows is highly likely to want this as
the primary master. If you swap it back, remember that Linux will swap
the hda and hdb names around and you will have to edit some config
files.
For inetersts skae, SCSI drives are named in a similar fashion, but have
the names /dev/sdx
Grub has a slightly different naming convention and doesn't
differentiate between IDE and SCSI - it doesn't need to as all it does
is find partitions and boot from them. Grub first looks for IDE drives,
the first one is (hd0), then (hd1) etc. Then it adds SCSI drives,
continuing the number sequence without gaps.
Grub numbers the partitions found from 0 and writes them like this:
(hd0,0). So the first partition on the primary master IDE will be
(hd0,0), the 30G partition you have will come out as (hd1,2) and so on.
Keep in mind that grub names these things each time it runs and if
drives have been removed or swapped around, then grub's idea of the
order is different from the last time. A file, /boot/grub/device.map is
provided to help with this where you tell grub which grub name is which
Linux drive. It's usually commented so you can see how it works.
If all this still doesn't answer your actual question, fire away with
some more :-)
alan
More information about the ubuntu-users
mailing list