Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Cc: Allan Gottlieb <gottlieb@×××.edu>
Subject: Re: [gentoo-user] dd'ing small drive to large one
Date: Mon, 31 Jan 2011 21:06:10
Message-Id: 201101312234.59966.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] dd'ing small drive to large one by Allan Gottlieb
1 Apparently, though unproven, at 21:16 on Monday 31 January 2011, Allan
2 Gottlieb did opine thusly:
3
4 > On Mon, Jan 31 2011, Alex Schuster wrote:
5 > > Allan Gottlieb writes:
6 > >> On Mon, Jan 31 2011, Alex Schuster wrote:
7 > >> > There is a PC with a 160 GB SATA drive, and I want to replace it with
8 > >> > one of about 1 TB in size. Would this work?
9 > >> >
10 > >> > - attach 2nd drive via SATA port or USB->SATA convertor
11 > >> > - boot from rescue CD
12 > >> > - dd if=/dev/sda of=/dev/sdb
13 > >> > - remove sda, attach sdb to where sda was
14 > >> > - reboot
15 > >> > - add other partitions or enlarge the last one
16 > >> >
17 > >> > I do not expect problems, but I'm not entirely sure. Maybe the
18 > >> > different drive geometry would have an effect on file system or at
19 > >> > least to the Grub boot loader?
20 > >>
21 > >> Won't dd'ing the whole disk will make the 1TB disk a 160GB disk.
22 > >
23 > > Not really. Yes, the current partitioning scheme will not make more than
24 > > the 160G available. But this can be changed easily later, all I need to
25 > > do is call fdisk and add partitions. Or resize the last one.
26 >
27 > Sure, but the other partitions will stay the same size. If you are
28 > using lvm then that is no problem, if not I would think it is
29 > constraining.
30
31 The pertinent question is what is on those partitions from the first to second
32 last? Maybe they don't need to be any bigger than the original disk.
33
34 /opt, /boot, /usr, %PORTDIR come to mind as likely candidates. Maybe the OP
35 can live with that constraint.
36
37
38 --
39 alan dot mckinnon at gmail dot com