cloning bootable hard drive
John Abreau
john.abreau at zuken.com
Wed Feb 27 13:47:36 EST 2008
You might also have to rebuild initrd; I did a disk upgrade
last week that failed at the end until I figured out that
I had to run mkinitrd before it would see the volume group
within /dev/md1.
I had a 1U server with a single 80 gb disk I had purchased
on eBay back inthe summer, and I decided to upgrade it
to a RAID-1 pair of 750 gb disks before deploying it to
production. I had used LVM on the 80 gb disk when I first
installed CentOS, so I was able to shuffle things around
within LVM to move everything except /boot onto the new
drives. I copied over /boot with dump and restore, followed
by a grub-install and a mkinitrd.
Jarod Wilson wrote:
> On Wed, 2008-02-27 at 09:46 -0500, Derek Atkins wrote:
>
>> Jarod Wilson <jarod at wilsonet.com> writes:
>>
>>
>>>> How are you copying the drive? I would do:
>>>>
>>>> dd if=/dev/<olddrive> of=/dev/<newdrive> bs=1m
>>>>
>>> Assuming <newdrive> is at least as big as <olddrive>, that should work
>>> too. Some potential fixups needed to make proper use of additional space
>>> on a larger drive though. I went from a 120G drive to a 250G drive in my
>>> laptop, and wanted to expand each of my partitions, so my previously
>>> mentioned rsync method worked much better for me.
>>>
>> True, the dd assumes the new drive is >= the old drive,
>> which is usually the case nowadays. Yes, you need to do
>> some special work to make more use of the space. However
>> if you wanted to redo ALL the paritions then you will lose
>> your bootability because the MBR wont point to the right
>> place to find the boot loader. So you'd need to re-install
>> grub.
>>
>
> Yep, that's the last step of my rsync dance. :)
>
>
>
--
John Abreau
IT Manager
Zuken USA
238 Littleton Rd., Suite 100
Westford, MA 01886
T: 978-392-1777 F: 978-692-4725
M: 978-764-8934
E: John.Abreau at zuken.com W: www.zuken.com
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Discuss
mailing list