SUMMARY: : How to copy disk partitions from disk A to disk B
Scott Ostrander <[email protected]> Mon, 29 Mar 2004 08:46:14 -0800 (PST)
| Newsgroups | gmane.linux.admin.managers |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the replys. The best answer I got (from Mike, Maney and Binand ) was to use sfdisk -d sfdisk -d /dev/sda | sfdisk /dev/sdb Others suggested dd which would work, But would be much slower due to 10GB of data Origional Question follows: > In Solaris I use this command > prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2 > to copy the partitions from one disk to a second. > > I am trying to figure out how to do this on RHEL 3.0 > I can get the info from disk A using fdisk -l > > # fdisk -l /dev/sda > > Disk /dev/sda: 36.7 GB, 36703934464 bytes > 255 heads, 63 sectors/track, 4462 cylinders > Units = cylinders of 16065 * 512 = 8225280 bytes > > Device Boot Start End Blocks Id System > /dev/sda1 * 1 19 152586 83 Linux > /dev/sda2 20 401 3068415 83 Linux > /dev/sda3 402 656 2048287+ 82 Linux swap > /dev/sda4 657 4462 30571695 f Win95 Ext'd (LBA) > /dev/sda5 657 4462 30571663+ 83 Linux > > Now the qusetion is how do I partition the disk B with this info in a script? > > TIA. _______________________________________________ LinuxManagers mailing list - http://www.linuxmanagers.org submissions: LinuxManagers-35TzE1X9F6582KRnZfj+bdi2O/[email protected] subscribe/unsubscribe: http://www.linuxmanagers.org/mailman/listinfo/linuxmanagers