FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

LinkBack Thread Tools
Old 01-27-2010, 07:20 PM
Alex Samad
Default cloning a hard drive issue/problem

On Wed, Jan 27, 2010 at 07:16:07PM +0000, Camaleón wrote:
> On Wed, 27 Jan 2010 19:53:44 +0100, Robert Cates wrote:
> (...)
> > So, my question is - am I on the right path, will this work? Or do any
> > of you have a better method to upgrade hard drives, under these
> > circumstances?

can I suggest, connect both drives to the machine, boot from a live cd.
partition up the sata how you want it.

I normally use

1G /boot
20G /
rest for lvm
1G /var/log/
10-30G /tmp

<memsize> swap

I would use rsync to copy between ide and sata something like

rsync -avHSz /tmp/mountedhda /tmp/mountedsata/

you will need to change /etc/fstab (on sata) to /dev/sd<?> - I would
recommend change to LABEL's or UUID so that this problem of changing
device name is not a problem. use tune2fs -l to set a label so
presuming sda2 is your / fs

tune2fs -L / /dev/sda2
tune2fs -L /boot /dev/sda1

then fstab can look like

LABEL=/ / ext3 errors=remount-ro,noatime,nodiratime 0 1
LABEL=/boot /boot ext2 defaults 0 0

once that is done, you will need to remake you initrd mkinitd (in the
live cd you will need to chroot onto the sata rootfs and mount /boot)
and you will need to install grub (also in the chroot).

that should give you a bootable system. If you run into problems, if
you have grub working it will drop into a shell (busybox) if it can't
find the rootfs, give it time the timeout is fairly long. then you can
look around and see what is wrong. If possible mount the rootfs (you
will have to check the location to mount it to) and then ctrl-D (exit)
out and initrd should continue on to your system, where you can fix the
problem permanently and re run mkinitrd


> After cloning the drive, in order to boot properly, besides adjusting "/
> etc/fstab" do not forget to edit the corresponding GRUB entries located
> at "/boot/grub/menu.lst".
> They have also to point to the right (new) device.
> Greetings,

"It's about past seven in the evening here so we're actually in different time lines."

- George W. Bush
congratulating newly elected Philippine President Gloria Macapagal Arroyo, Washington, D.C.

Thread Tools

All times are GMT. The time now is 03:36 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org