Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] dd says no space left on device
Date: Mon, 16 May 2011 15:36:32
Message-Id: BANLkTikkNd0_rercEZB5Nb0MTzRu_fv0HQ@mail.gmail.com
In Reply to: Re: [gentoo-user] dd says no space left on device by Stroller
1 On 16 May 2011 15:21, Stroller <stroller@××××××××××××××××××.uk> wrote:
2 >
3 > On 16/5/2011, at 12:56pm, Adam Carter wrote:
4 >> ...
5 >> Yes the new drive is bigger, going from 66G to 500G. Single partition only, ...
6 >>
7 >> So how do i proceed? Is it;
8 >> 1. dd the mbr without partition table, to get the boot code (so bs=446 count=1)
9 >> 2. use fdisk to set one big primary partition, mark it bootable and NTFS (type 7)
10 >> 3. dd into what will be /dev/sdb1
11 >
12 > Just `dd if=/dev/sda of=/dev/sdb` if you can.
13 >
14 > As Neil posted: there is no need to copy MBR & partitions separately in such a simple situation. I don't know that I have ever needed to clone a hard-drive in the way that you're attempting - I have *always* cloned the whole drive (and I've cloned quite a few Windows drives this way). `dd if=/dev/sda of=/dev/sdb` with no numbers on the end of sda or sdb.
15 >
16 >> but IIRC there is a 100MB unlabelled space (doesnt come up with fdisk -l). Is this is an OEM recovery hidden partition?
17 >
18 > Possibly. But this question should be preceded by: "do you have an OEM recovery hidden partition?"
19 >
20 > I mean, if the computer starts up and says "press R to boot into the Compaq recovery partition" and there's no other place for it to be, then yes. But frequently OEM recovery hidden partitions are visible in Windows' disk management console (Start > Run > "diskmgmt.msc") as partitions of DOS or unknown type, or simply showing as "hidden" or with no drive letter assigned. Therefore I'd expect them to be visible in fdisk as well.
21 >
22 > Whatever, if you clone the whole disk you will copy the recovery partition, if its present.
23 >
24 >> Will I be able to expand NTFS or it is better to make sure parition size = NTFS filesystem size so it doesnt get confused, the boot into windows and expand it?
25 >
26 > It probably depends on the version of NTFS whether this can be done natively or not. I believe that in XP you can expand D: and E: partitions from within Windows, but not C:. So to expand an XP system drive you would use Partition Magic or the GParted LiveCD [1]. I guess that Windows 7 allows you to expand C: from the management console, if not GParted claims to support it (and Vista).
27 >
28 > I would be trying to do this *after* you have cloned the whole drive and booted with the new copy. Don't try to be clever about whether the filesystem should be the same size as the partition or not - just copy the whole lot verbatim, so they'll remain the same sizes they are now. Then use the GUI tools to expand the partition+filesystem afterwards and let those GUI tools worry about it - preferably use Windows' own tools, otherwise use Partition Magic or GParted.
29 >
30 > Partition Magic is my resizing tool of choice for XP, but it's neither free nor Free, nor is it supported on Vista or Windows 7.  GParted is the next choice, then - I understand it to be more than "just a graphical front-end", and I don't think you'll have such good results trying to use command-line tools to expand NTFS partitions.
31 >
32 > Stroller.
33 >
34 >
35 > [1] http://gparted.sourceforge.net/livecd.php
36
37 Only to add that the new larger drive will appear as small as the
38 original because the fs size is after all that of the smaller drive.
39 After your dd the data over to the new disk you will need to run
40 gparted as suggested by Stroller, or use ntfsresize which is what
41 gparted uses anyway.
42 --
43 Regards,
44 Mick

Replies

Subject Author
Re: [gentoo-user] dd says no space left on device Stroller <stroller@××××××××××××××××××.uk>
Re: [gentoo-user] dd says no space left on device Neil Bothwick <neil@××××××××××.uk>