> * From: Paul Csanyi <email@example.com>
>NN_il_Confusionario <firstname.lastname@example.org> 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:
>/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)
and then inside the chroot I mount what i need:
mount /sys/ # if needed, for example to recreate a yaird initrd
(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:
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
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
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 email@example.com