Re: quickly partition disk, copy an image, install grub

From: Alvin Oga (aoga_at_mail.Linux-Consulting.com)
Date: 09/20/05

  • Next message: John Hasler: "Re: Debian Compatable UPS?"
    Date: Tue, 20 Sep 2005 09:12:13 -0700 (PDT)
    To: Gregory Seidman <gsslist+debian@anthropohedron.net>
    
    

    On Tue, 20 Sep 2005, Gregory Seidman wrote:

    > } fdisk /dev/hdb, and set up / and swap partitions

    faster way to copy partitions from one disk to another is
    with sdisk or "cat file | fdisk "

    > } mkswap /dev/hdb5 # do I need to do this?

    no .. swap partition is optional, and if you have enuff
    mem for all your thingies your pc will be doing, it won't
    randomly crash on you

    swapp partitions might be of major issue on usb-sticks and cf
    when you need all the bytes to squeeze in the kitchen sink

    > } dd if=/path/to/image of=/dev/hdb1 # will this work if the partitions

    the problem with low level copying a disk to another with dd...
    a) you're assuming thre is no defects in the master
       and no defects in the clone
            - if there is a bad sector in either, you lost 512bytes of data
            and you will never know about the loss of data, unless you
            did a diff -r /master /clone

    b) you'd be copying and reformatting the target to be the same
       as the master .. ( ie .. if your clone is bigger disks, you're
       wasting space on the clone )

    .. more whackyness

    > } # are not of exactly equal size?
            
    when using dd, yo do NOT need to format the clone since you're
    doing it by copying the old data ( image ) into the new disk

    > } dd if=/dev/hda of=/dev/hdb bs=448 count=1 # does this install GRUB?

    yoou just wiped up partition 4

    you should be using bs=446 instead of 448 .. BIG difference

    > } so, my question is: is this the right way to go about this? am I
    > } missing any steps? is there a better way to do it?

    yes ... it just depends on what you're comfy doing

    i prefer ( tar master ) | ( cd clone ; tar extract )
            and use lilo or grub to reinstall the mbr

    c ya
    alvin

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: John Hasler: "Re: Debian Compatable UPS?"

    Relevant Pages

    • Re: Software to clone disk and resize target partiions at same time?
      ... >> resize any or all of the partitions. ... That only means that partitions it doesnt understand the format ... I think its best to clone from the bootable rescue CD too, ... > I have to be sure and unplug it and plug the target disk in it's place so ...
      (comp.sys.ibm.pc.hardware.storage)
    • LVM on SW RAID for sarge - success
      ... I've just had success migrating Debian Sarge to root on LVM on RAID. ... First make sure the SCSI BIOS boots from the first disk. ... I made reiserfs on all the filesystem partitions and completed the ... The remaining two disks were partitioned and used to create RAID arrays ...
      (Debian-User)
    • Re: Replace SCSI Drive
      ... from there you can manipulate other hard drives attached to the machine. ... It should 'just work' but watch out that you keep disk devices ... vi-a) Write a BSD partition table into the slice, then set up your required FreeBSD partitions: ... items under the 'Custom Install' to achieve the desired result. ...
      (freebsd-questions)
    • Re: Upgrade to new drive issues
      ... I started the clone anyway with a proportional parttion copy which ran ... partition and got a disk error. ... I am reluctant to use partition magic to delete the partitions since I do ... resolved your problem as it involves the cloning of partitions from one HDD ...
      (microsoft.public.windowsxp.hardware)
    • Re: RAMDisk and HardDisk strikes back!
      ... One disk with only one partition as large as FBA setup; ... Two disk with one or more partitions for each. ... @ 20:32:55.252 #W059 Selecting best compatible driver failed. ... @ 20:53:51.166 #T211 Install Device: Changing registry settings as specified ...
      (microsoft.public.windowsxp.embedded)