PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > migrating Debian GNU/Linux Etch to second SATA drive
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

migrating Debian GNU/Linux Etch to second SATA drive

Réponse
 
LinkBack Outils de la discussion
Vieux 08/05/2008, 22h20   #1
Paul Csanyi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut migrating Debian GNU/Linux Etch to second SATA drive

Hello!

I tried to migrating from the first to second SATA drive My Debian
Etch OS with Gparted.

I copied the /, /usr, /var, swap, /tmp, /home partitions of the system
to the second SATA: sdb with Gparted.

Then I tried to set up grub to boot this Debian system from the first
SATA drive sda, and did the following:

- boot the install CD of the Etch Netinstall
- at prompt use expert
- ...
- detecting disks
- did not disk partition
- run a shell

Here I follow the mini howto:
http://wiki.archlinux.org/index.php/Reinstalling_GRUB

cd /
mount -t ext3 /dev/discs/disc1/part1 /mnt
# this is the / partition of the sdb
mount -t ext3 /dev/discs/disc1/part2 /mnt/usr
# this is the /usr partition of the sdb
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt /bin/bash

grub-install /dev/sda

Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
corresponding BIOS drive.

I can't here as root to use nano because of the bterm error. I did the
following to get some editor, namely mcedit:

TERM=xterm
export TERM
mcedit /etc/fstab

I can to use here mcedit, but with difficulties. Still can to edit
fstab, however.

But, I can't to install grub to boot sdb root from the sda MBR.

Any advices will be appreciated!


--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 08/05/2008, 22h50   #2
Kevin Mark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
> Hello!
>
> cd /
> mount -t ext3 /dev/discs/disc1/part1 /mnt
> # this is the / partition of the sdb
> mount -t ext3 /dev/discs/disc1/part2 /mnt/usr
> # this is the /usr partition of the sdb
> mount -t proc proc /mnt/proc
> mount -t sysfs sys /mnt/sys
> mount -o bind /dev /mnt/dev
> chroot /mnt /bin/bash
>


>
> But, I can't to install grub to boot sdb root from the sda MBR.
>
> Any advices will be appreciated!
>


Is the partition mounted rw ?
-K
--
| .''`. == Debian GNU/Linux == | my web site: |
| : :' : The Universal |mysite.verizon.net/kevin.mark/|
| `. `' Operating System | go to counter.li.org and |
| `- http://www.debian.org/ | be counted! #238656 |
| my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
|join the new debian-community.org to Debian! |
|_______ Unless I ask to be CCd, assume I am subscribed _______|


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/05/2008, 04h00   #3
NN_il_Confusionario
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
> corresponding BIOS drive.


is /etc/mtab correct ?

is /boot/grub/device.map (which might be created by grub-install by
reading /etc/mtab) correct ?

have you searched google

Linkname: grub error does not have any corresponding BIOS drive - Google Search
URL:
http://www.google.com/search?num=100...ve&btnG=Search

?

--
Chi usa software non libero avvelena anche te. Digli di smettere.
Informatica=arsenico: minime dosi in rari casi patologici, altrimenti letale.
Informatica=bomba: intelligente solo per gli stupidi che ci credono.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/05/2008, 18h50   #4
Paul Csanyi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

Kevin Mark <kevin.mark@verizon.net> writes:

> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>> Hello!
>>
>> cd /
>> mount -t ext3 /dev/discs/disc1/part1 /mnt
>> # this is the / partition of the sdb
>> mount -t ext3 /dev/discs/disc1/part2 /mnt/usr
>> # this is the /usr partition of the sdb
>> mount -t proc proc /mnt/proc
>> mount -t sysfs sys /mnt/sys
>> mount -o bind /dev /mnt/dev
>> chroot /mnt /bin/bash
>>

>
>>
>> But, I can't to install grub to boot sdb root from the sda MBR.
>>
>> Any advices will be appreciated!
>>

>
> Is the partition mounted rw ?


Which partition?
nano /etc/mtab

....
/dev/sdb1 / ext3 rw,errors=remount-ro 0 0

Did you mean this abowe?
This is the:
/dev/discs/disc1/part1

mounted as /mnt

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/05/2008, 19h00   #5
Paul Csanyi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

NN_il_Confusionario <pinkof.pallus@tiscalinet.it> writes:

> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
>> corresponding BIOS drive.

>
> is /etc/mtab correct ?
>
> is /boot/grub/device.map (which might be created by grub-install by
> reading /etc/mtab) correct ?


Yes, it is:
nano /etc/mtab

....
/dev/sdb1 / ext3 rw,error=remount-ro 0 0

> have you searched google
>
> Linkname: grub error does not have any corresponding BIOS drive\
> - Google Search
> URL:
>

http://www.google.com/search?num=100...rror+does+not\
+have+any+corresponding+BIOS+drive&btnG=Search
>
> ?


I checked /boot/grub/device.map:
(hd0) /dev/sda
(hd1) /dev/sdb

I edited menu.lst:
# kopt=root=/dev/sdb1 ro

# groot=(hd1,0)

I run grub-install with --recheck option.

Still I have no success.

I boot the Debian Etch system from the sda, and check the /boot/grub/
directory of the Debian Etch system from the sdb. There I find strange
situation. The /boot/grub/ directory contain another /boot directory
with grub/. I removed this second boot/grub/ directory.

This must be the case because when I tried to run grub-install I tried
also to reinstall grub with aptitude reinstall grub..

I shall reboot to see how it works the grub-install now.

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/05/2008, 20h50   #6
Paul Csanyi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

Paul Csanyi <csanyipal@gmail.com> writes:

> NN_il_Confusionario <pinkof.pallus@tiscalinet.it> writes:
>
>> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>>> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
>>> corresponding BIOS drive.

>>
>> is /etc/mtab correct ?
>>
>> is /boot/grub/device.map (which might be created by grub-install by
>> reading /etc/mtab) correct ?

>
> Yes, it is:
> nano /etc/mtab
>
> ...
> /dev/sdb1 / ext3 rw,error=remount-ro 0 0
>
>> have you searched google
>>
>> Linkname: grub error does not have any corresponding BIOS drive\
>> - Google Search
>> URL:
>>

> http://www.google.com/search?num=100...rror+does+not\
> +have+any+corresponding+BIOS+drive&btnG=Search
>>
>> ?

>
> I checked /boot/grub/device.map:
> (hd0) /dev/sda
> (hd1) /dev/sdb
>
> I edited menu.lst:
> # kopt=root=/dev/sdb1 ro
>
> # groot=(hd1,0)
>
> I run grub-install with --recheck option.
>
> Still I have no success.
>
> I boot the Debian Etch system from the sda, and check the /boot/grub/
> directory of the Debian Etch system from the sdb. There I find strange
> situation. The /boot/grub/ directory contain another /boot directory
> with grub/. I removed this second boot/grub/ directory.
>
> This must be the case because when I tried to run grub-install I tried
> also to reinstall grub with aptitude reinstall grub..
>
> I shall reboot to see how it works the grub-install now.


No success.

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/05/2008, 21h20   #7
Paul Csanyi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

Paul Csanyi <csanyipal@gmail.com> writes:

> Paul Csanyi <csanyipal@gmail.com> writes:
>
>> NN_il_Confusionario <pinkof.pallus@tiscalinet.it> writes:
>>
>>> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>>>> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
>>>> corresponding BIOS drive.
>>>
>>> is /etc/mtab correct ?
>>>
>>> is /boot/grub/device.map (which might be created by grub-install by
>>> reading /etc/mtab) correct ?

>>
>> Yes, it is:
>> nano /etc/mtab
>>
>> ...
>> /dev/sdb1 / ext3 rw,error=remount-ro 0 0
>>
>>> have you searched google
>>>
>>> Linkname: grub error does not have any corresponding BIOS drive\
>>> - Google Search
>>> URL:
>>>

>> http://www.google.com/search?num=100...rror+does+not\
>> +have+any+corresponding+BIOS+drive&btnG=Search
>>>
>>> ?

>>
>> I checked /boot/grub/device.map:
>> (hd0) /dev/sda
>> (hd1) /dev/sdb
>>
>> I edited menu.lst:
>> # kopt=root=/dev/sdb1 ro
>>
>> # groot=(hd1,0)
>>
>> I run grub-install with --recheck option.
>>
>> Still I have no success.
>>
>> I boot the Debian Etch system from the sda, and check the /boot/grub/
>> directory of the Debian Etch system from the sdb. There I find strange
>> situation. The /boot/grub/ directory contain another /boot directory
>> with grub/. I removed this second boot/grub/ directory.
>>
>> This must be the case because when I tried to run grub-install I tried
>> also to reinstall grub with aptitude reinstall grub..
>>
>> I shall reboot to see how it works the grub-install now.

>
> No success.


At last I have success!

I don't use grub-install command but run grub on the command line,
and:
grub> root (hd1,0)
grub> setup (hd0)
grub> quit

Success!!

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/05/2008, 21h50   #8
hh.eu@gmx.de
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

I am not sure if I understood you correctly, so please correct me if
I am
wrong, but I assume:

* you have basically moved all needed partitions for a full Debian
system from
one disk to another,

* and now you want to install GRUB to this second disk so that GRUB
can boot
from that disk (and you can eventually remove the old disk from
the system).

Can you still (temporarily) boot from your first disk where GRUB is
still
installed? You don't need to be able to boot Debian from the old
disk, you
just need a working GRUB install there. Does GRUB display a menu when
you boot
from your old disk?

Then you can use the GRUB shell, and within the GRUB shell you can
run several
commands to install GRUB to the second, new hard disk.

You get to the GRUB shell by pressing the "c" key when GRUB displays
the menu.
(Maybe you have to press "Esc" first, I am not sure and can't try it
now.)

Let me know if this would work for you, then I could tell you more
about which
commands to run in the GRUB shell.

Am 2008-05-08 um 23:12 schrieb Paul Csanyi:

> Hello!
>
> I tried to migrating from the first to second SATA drive My Debian
> Etch OS with Gparted.
>
> I copied the /, /usr, /var, swap, /tmp, /home partitions of the system
> to the second SATA: sdb with Gparted.
>
> Then I tried to set up grub to boot this Debian system from the first
> SATA drive sda, and did the following:
>
> - boot the install CD of the Etch Netinstall
> - at prompt use expert
> - ...
> - detecting disks
> - did not disk partition
> - run a shell
>
> Here I follow the mini howto:
> http://wiki.archlinux.org/index.php/Reinstalling_GRUB
>
> cd /
> mount -t ext3 /dev/discs/disc1/part1 /mnt
> # this is the / partition of the sdb
> mount -t ext3 /dev/discs/disc1/part2 /mnt/usr
> # this is the /usr partition of the sdb
> mount -t proc proc /mnt/proc
> mount -t sysfs sys /mnt/sys
> mount -o bind /dev /mnt/dev
> chroot /mnt /bin/bash
>
> grub-install /dev/sda
>
> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
> corresponding BIOS drive.
>
> I can't here as root to use nano because of the bterm error. I did the
> following to get some editor, namely mcedit:
>
> TERM=xterm
> export TERM
> mcedit /etc/fstab
>
> I can to use here mcedit, but with difficulties. Still can to edit
> fstab, however.
>
> But, I can't to install grub to boot sdb root from the sda MBR.
>
> Any advices will be appreciated!
>
>
> --
> Regards, Paul Csanyi
> http://www.freewebs.com/csanyi-pal/index.htm
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster@lists.debian.org



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/05/2008, 22h00   #9
hh.eu@gmx.de
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive


Am 2008-05-09 um 22:13 schrieb Paul Csanyi:
> At last I have success!
>
> I don't use grub-install command but run grub on the command line,
> and:
> grub> root (hd1,0)
> grub> setup (hd0)
> grub> quit


OK, I hadn't seen this last message from you when I wrote mine, but I
see that
you have had success with exactly what I was going to suggest to you.

I am just wondering if you are aware that you still need your first disk
installed to boot the second. So far, GRUB is not installed on the
second
disk, so if your first disk breaks, you will not (easily) be able to
boot from
the second disk. I am not sure about what you are doing with those
two disks,
but maybe it is wise to install GRUB also to the second disk, in case
you
remove the first one at some point. (Or you could directly boot from the
second disk.)

By the way, if you have a floppy drive, you can install GRUB on a
floppy, too,
then you have a GRUB emergency disk which lets you perform operation
such as
those you described (in the GRUB shell) (for cases of drive failure
etc.).

-Moritz


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 09/05/2008, 23h50   #10
NN_il_Confusionario
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA

> * From: Paul Csanyi <csanyipal@gmail.com>
>NN_il_Confusionario <pinkof.pallus@tiscalinet.it> writes:
>> On Thu, May 08, 2008 at 11:12:30PM +0200, Paul Csanyi wrote:
>>> Error: /dev/scsi/host1/bus0/target0/lun0/disc does not have any
>>> corresponding BIOS drive.

>>
>> is /etc/mtab correct ?
>>
>> is /boot/grub/device.map (which might be created by grub-install by
>> reading /etc/mtab) correct ?

>
>Yes, it is:
>nano /etc/mtab
>...
>/dev/sdb1 / ext3 rw,error=remount-ro 0 0


It is not, if I have understood correctly your aims.

When I have an i386 / amd64 installation on (say) sda and I want to copy
it on (say) a new disk sdb in such a way that when the new disk is
installed as sda it boots as a "clone" (but with partitions of different
size; if sda and sdb are identical I use dd) of the old sda, this is
what I do:

recreate partition table and filesystems on sdb

mount the / of the new disk as (say) /tmp/NEW/ and then the /var/ (say)
of the new disk on /tmp/NEW/var/ , and so on.

clone the contents of the filesystems (with rsync or whatever)

chroot /tmp/NEW/

and then inside the chroot I mount what i need:

mount /proc/
mount /sys/ # if needed, for example to recreate a yaird initrd
mount /dev/pts
(and so one for every "virtual" filesystem which I need. I do not use udev)

finally (still in the chroot) I edit two files:

(1) I edit /etc/mtab in such a way that it corresponds to /etc/fstab ;
so in your case it would be

/dev/sda1 / ext3 rw,error=remount-ro 0 0

(sda and not sdb). The rule is: the mtab must contain the lines that it
will contain when the system will be booted from he new disk.

(2) I edit /boot/grub/device.map ; this way the logic seems opposite to
the previous one; in your case this would be:

(hd0) /dev/sdb

This line means: the disk that grub and the bios will see as the first
one (hd0) when the system will be booted, is the disk that Linux is
seeing as hdb in the moment that grub-install is executed.

(3) I run

grub-install /dev/sdb

Note: "(hd0) /dev/sdb" versus "(hd1) /dev/sdb" changes a bit in the boot
record which is written in the MBR of sdb.

(4, optional but useful to avoid confusion) I re-edit
/boot/grub/device.map so that it will be correct onece the sistem will
be booted from the new disk ; in your case

(hd0) /dev/sda

Finally I umount the special filewistems, the (say) /var/ partition (and
so on), I exit the chroot, I umount even the / partition of the new disk.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/05/2008, 06h00   #11
Paul Csanyi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

hh.eu@gmx.de writes:

> I am not sure if I understood you correctly, so please correct me if
> I am wrong, but I assume:
>
> * you have basically moved all needed partitions for a full Debian
> system from one disk to another,


That is correct. I copied all Debian partition from sda to sdb with
Gparted live CD.

> * and now you want to install GRUB to this second disk so that GRUB
> can boot from that disk (and you can eventually remove the old disk
> from the system).


No. I want to keep sda for the Windows XP. I want to install Grub on
this sda so I can to boot with it the Debian on the sdb.

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 10/05/2008, 06h10   #12
Paul Csanyi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: migrating Debian GNU/Linux Etch to second SATA drive

hh.eu@gmx.de writes:

> By the way, if you have a floppy drive, you can install GRUB on a
> floppy too, then you have a GRUB emergency disk which lets you
> perform operation such as those you described (in the GRUB shell)
> (for cases of drive failure etc.).
>
> -Moritz


That shall I to do, or maybe there is an alternative option, say to
install GRUB on the USB stick as emergency disk?

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 11/05/2008, 12h50   #13
hh.eu@gmx.de
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut GRUB device numbers/names, use of device.map (Re: migrating Debian GNU/Linux Etch to second SATA drive)

Am 2008-05-10 um 07:01 schrieb Paul Csanyi:

> hh.eu@gmx.de writes:
>
>> By the way, if you have a floppy drive, you can install GRUB on a
>> floppy too, then you have a GRUB emergency disk which lets you
>> perform operation such as those you described (in the GRUB shell)
>> (for cases of drive failure etc.).
>>
>> -Moritz

>
> That shall I to do, or maybe there is an alternative option, say to
> install GRUB on the USB stick as emergency disk?


I haven't done that, but it should also work.

Make sure you test if you can actually boot from your USB stick or
not because
not all machines can boot from USB devices. E.g., I have a computer that
should be able to do it according to the manual and all the settings
in the
BIOS, but after hours of trying I still couldn't get it to work, it's
a buggy
BIOS. Also, if it works on one of your machines, it may not work on
another or
computer of a friend who you are trying to .

If you are frequently using the USB stick, you might occasionally
format it,
erase it etc., so be careful not to destroy your GRUB install on it.

Then, I guess, you have to be careful with the GRUB drive numbers
(hd0, ...)
when you use the USB stick. E.g., depending on whether or not the USB
stick is
plugegd in or possibly even which controller it is plugged into, the
numbers
of all drives may be different. Depending on the BIOS, the USB stick
might be
considered a floppy drive, so it might be fd1 instead of hd1, for
example. So
you should be very careful when you try to reinstall GRUB, to ensure
you are
not (for example) overwriting the MBR on a Windows disk.

Generally, GRUB uses some sort of *guessing* to assign the drive
numbers, so
one always has to be careful.[1]

(All of the above of course also applies to the case where you use a
floppy.
But then you will at least usually know that fd0 is your regular floppy
drive.)

The GRUB shell offers the "find" command. You can use it to find a
certain
file you know exists on a particular drive, which will you find
out which
device number GRUB uses for that disk.

Another tip is to type something like "root (" + tab, it will give
you a list
of possible devices, then complete the name of one device and use tab
again,
GRUB should then tell you which file system is on that disk which
might also
you.

Then there is a file named /boot/grub/device.map where one can define
which
device should have which number, but the use of this file is quite
confusing
and poorly documented, and it took me many tries to understand. (The
GRUB
manual and all sorts of search results couldn't me clearly.)
Summary:

(1) If GRUB is started from within Debian:
* If started with the command "grub", the file device.map is ignored.
GRUB
assigns device names (hd0 etc.) based on *guesses* it makes.[1]
* If started with the command "grub --device-map=device.map" and the
file
device.map exists, the file device.map is parsed.
* If started with the command "grub --device-map=device.map" and the
file
device.map does not exist, GRUB *guesses* the device names [1] and
stores
the result of the guessing in the file device.map.

(2) If GRUB is started directly from the BIOS (GRUB shell):
* The file device.map is ignored, the device names are derived from
GRUB's
guessing.[1]

Note that (2) is also the situation you have when you boot your system
normally. In other words: Making changes to device.map does not
influence
device numbers actually used by GRUB when booting. (That's why I
don't use
that file, I personally find no use for it.)

-Moritz

[1] This guessing can, of course, never be really consistent and
leads to all
sorts of confusing situations, e.g. different device numbers
depending on
whether GRUB is started from the BIOS of from within Debian or different
numbers after changing cables in the computer. It is one of the
fundamental
logical flaws in the design of GRUB and one of the reasons GRUB 0.97
is not
developed further. (Development effort goes to GRUB 2, currently at
version
1.9something, which has been in the works for years and is still not
ready for
release and is not documented yet, so for most people is not a viable
alternative.)


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 11/05/2008, 19h10   #14
Paul Csanyi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: GRUB device numbers/names, use of device.map (Re: migrating Debian GNU/Linux Etch to second SATA drive)

hh.eu@gmx.de writes:

> Am 2008-05-10 um 07:01 schrieb Paul Csanyi:
>
>> hh.eu@gmx.de writes:
>>
>>> By the way, if you have a floppy drive, you can install GRUB on a
>>> floppy too, then you have a GRUB emergency disk which lets you
>>> perform operation such as those you described (in the GRUB shell)
>>> (for cases of drive failure etc.).
>>>
>>> -Moritz

>>
>> That shall I to do, or maybe there is an alternative option, say to
>> install GRUB on the USB stick as emergency disk?


Now, when I have finally installed GRUB on the sda so I can to boot
with it the Debian Etch that is on the sdb, I can use Debian Etch
Netinstall CD in rescue mode.

I run a shall in the rescue mode on the root partition of the Debian
Etch system (on the sdb). There I chroot target/ , mount /usr/ and run
grub:

grub> root (hd1,0)
grub> setup (hd0)
grub> quit

> Another tip is to type something like "root (" + tab, it will give
> you all of possible devices, then complete the name of one device
> and use tab again, GRUB should then tell you which file system is on
> that disk which might so you.


The tip that you wrote down abowe is ful.

--
Regards, Paul Csanyi
http://www.freewebs.com/csanyi-pal/index.htm


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h41.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,28079 seconds with 22 queries