>     * From: Paul Csanyi <[EMAIL PROTECTED]>
>NN_il_Confusionario <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to