[ILUG] harddisk swap
enda at unison.ie
Thu Apr 29 17:52:13 IST 2004
Padraig Brady Wrote:
>Timothy Murphy wrote:
>> On Wednesday 28 April 2004 15:59, Cian Cullinan wrote:
>>>1) I've partitioned the SCSI disk in advance and done "mkfs.ext3 -j" on
>>>partions except the swap. Will this work or will I have do something like
>>>dd if=/dev/hda of=/dev/sda bs=512 count=1
>>>for the MBR before I can go and partition /dev/sda?
>> I would be very surprised if you could copy the MBR in this way.
>> In any case, it seems to me perfectly sensible to partition the disk
>> and create file-systems before doing anything else.
Its perfectly valid to copy the MBR in this way, but the values will
probably be wrong. If its a lilo boot loader, you'll need to edit the old
/etc/lilo.conf and point the moutn points to the scsi instead of the ide,
and write it to the MBR using lilo -C path_to_edited_lilo.conf
I'm sure there is a similar process with Grub if thats what you use.
>>>2) I'm planning on booting from a Fire CD mounting /dev/hda partitions
>>>read-only and using cp to copy them to the /dev/sda partitions. Sound
>> I would use "cp -a" as you suggest.
>> You have to be careful not to copy filesystems mounted on subdirectories,
>> eg by umount-ing them before copying the main system.
>> But I'm sure the ILUG gurus will give better advice.
> Won't cp bail out on a failed read?
> tar should give you more control of stuff like this:
Nope, not at all. cp will report errors to stdout, and continue on its merry
way leaving you with a list of errors to deal with manually later. Its the
GUI implementations that bomb out, like when you drag and drop files in KDE.
However, I'd recommend using the r switch too, cp -ar
Fire is a good choice of boot cd, some good tools on that for data recovery
>>> Any other gotchas I should be ready for?
Yeah, make sure to update /etc/fstab so that the kernel can actually find
the filesystems on the scsi disk instead of looking for them on the ide
More information about the ILUG