1 |
On 05/04/2010 02:34, walt wrote: |
2 |
> On 04/04/2010 01:04 PM, Neil Bothwick wrote: |
3 |
>> On Sun, 04 Apr 2010 20:35:11 +0100, Kerin Millar wrote: |
4 |
>> |
5 |
>>> Whichever way you go about it, ensure that no pseudo-filesystem or bind |
6 |
>>> mounts are present within "/mnt/oldrootfs" at the time. |
7 |
>> |
8 |
>> Use the -x option with rsync to stop it descending into other |
9 |
>> filesystems. |
10 |
> |
11 |
> This is directed to all of you gurus who replied to Meino's post: |
12 |
> |
13 |
> Meino's unstated assumption is that his new (larger) disk is already |
14 |
> formatted |
15 |
> (possibly partitioned?) before he copies the existing filesystem to it. |
16 |
> |
17 |
> IIUC the new disk will then be unbootable until grub or equivalent is |
18 |
> installed |
19 |
> on the new disk. Does this seem correct, or not? |
20 |
|
21 |
Absolutely correct. Two commands from the grub shell and job done :) |
22 |
|
23 |
> |
24 |
> My instinct is to use dd to duplicate the entire old disk to the new |
25 |
> (unformatted) |
26 |
> disk and then use gparted to twiddle it from there. (But I do love a |
27 |
> puzzle ;o) |
28 |
|
29 |
In general, I'm a proponent of copying filesystems, as opposed to |
30 |
copying entire block devices or disks. That's not to say that there |
31 |
aren't some situations where the latter approach makes sense. |
32 |
|
33 |
Note that it's possible to copy just the portion of the first sector |
34 |
that contains bootloader code as thus: |
35 |
|
36 |
dd if=/dev/sda of=/dev/sdb bs=446 count=1 |
37 |
|
38 |
NOTE: that's 446 as opposed to 512 as the latter would result in the |
39 |
partition table being copied too, which would be most undesirable. |
40 |
|
41 |
Cheers, |
42 |
|
43 |
--Kerin |