Gentoo Archives: gentoo-user

From: James <wireless@×××××××××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] migrating disks (from mounts to disklabels
Date: Wed, 17 Nov 2010 22:00:43
Message-Id: loom.20101117T224116-599@post.gmane.org
1 Hello,
2
3 I have a ~250 gig sata disk I want to migrate to a 2T
4 Sata disk. This is simple, but, I have a few caveats.
5
6 old disk:
7
8 Disk /dev/sda: 320.1 GB, 320072933376 bytes
9 255 heads, 63 sectors/track, 38913 cylinders
10 Units = cylinders of 16065 * 512 = 8225280 bytes
11 Sector size (logical/physical): 512 bytes / 512 bytes
12 I/O size (minimum/optimal): 512 bytes / 512 bytes
13 Disk identifier: 0x000a1ff7
14
15 Device Boot Start End Blocks Id System
16 /dev/sda1 * 1 6405 51448131 7 HPFS/NTFS
17 /dev/sda2 6406 6431 208845 83 Linux
18 /dev/sda3 6432 14080 61440592+ 83 Linux
19 /dev/sda4 14081 38913 199471072+ 5 Extended
20 /dev/sda5 14081 14861 6273351 82 Linux swap / Solaris
21 /dev/sda6 14862 26335 92164873+ 83 Linux
22 /dev/sda7 26336 38913 101032753+ 83 Linux
23
24
25 /dev/sda2 /boot reiserfs defaults 1 2
26 /dev/sda3 / reiserfs defaults 0 1
27 /dev/sda5 none swap sw 0 0
28 /dev/sda6 /usr/local reiserfs defaults 0 1
29 /dev/sda7 /usr/local/video reiserfs defaults 0 1
30 none /proc proc defaults 0 0
31 none /dev/shm tmpfs defaults 0 0
32 /dev/fd0 /mnt/floppy vfat noauto,user,umask=000 0 0
33 #/dev/fd0 /mnt/floppy auto noauto, 0 0
34 /dev/cdrom /mnt/cdrom auto noauto,rw,user 0 0
35 #/dev/sda1 /mnt/windows ntfs-3g 0 0
36
37 Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
38 255 heads, 63 sectors/track, 243201 cylinders
39 Units = cylinders of 16065 * 512 = 8225280 bytes
40 Sector size (logical/physical): 512 bytes / 512 bytes
41 I/O size (minimum/optimal): 512 bytes / 512 bytes
42 Disk identifier: 0x5f61c272
43
44 Device Boot Start End Blocks Id System
45
46 <needs formatting and file systems installed>
47
48 OK, so I format using fdisk <no big deal>
49 <new disk will just have /(200G), swap, boot(250M) and one
50 bit fat /usr/local (1.8T)
51
52
53 Ok now I was going to use same reiserfs < no big deal>
54 unless I can use reiser4? good idea? <discuss-caveats>
55
56 OK now I want the new fstab to use disklabels
57 <old dog learning new trick here>
58
59 like this simple (few) partition scheme:
60 /dev/sdb3 200G 52G 42G 55% /
61 udev 10M 224K 9.8M 3% /dev
62 /dev/sdb1 250M 47M 189M 20% /boot
63 /dev/sdb4 1800G 125G 12G 92% /usr/local
64
65 Current <non disklabel fstab>
66
67 /dev/sda1 /boot reiserfs defaults 1 2
68 /dev/sda2 none swap sw 0 0
69 /dev/sda3 / reiserfs defaults 0 1
70 /dev/sda4 /usr/local reiserfs defaults 0 1
71 /dev/cdrom /mnt/cdrom auto noauto,ro,user 0 0
72 /dev/fd0 /mnt/floppy vfat noauto,user,umask=000 0 0
73 shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
74 none /proc proc defaults 0 0
75
76 so what does new fstab using disk labels look like?
77
78
79
80 Last, just dd it over like this?
81 dd if=/dev/sda of=/dev/sdb bs=32768
82
83 What did I miss?
84
85 Discussion, corrections or caveats are most welcome.

Replies

Subject Author
Re: [gentoo-user] migrating disks (from mounts to disklabels Alan McKinnon <alan.mckinnon@×××××.com>
Re: [gentoo-user] migrating disks (from mounts to disklabels Florian Philipp <lists@××××××××××××××××××.net>
Re: [gentoo-user] migrating disks (from mounts to disklabels Dale <rdalek1967@×××××.com>