Gentoo Archives: gentoo-user

From: Dirk Heinrichs <dirk.heinrichs.ext@×××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Disk upgrade sanity check pls
Date: Thu, 08 May 2008 08:03:45
Message-Id: 200805081003.20065.dirk.heinrichs.ext@nsn.com
In Reply to: [gentoo-user] Disk upgrade sanity check pls by Adam Carter
1 Am Donnerstag, 8. Mai 2008 schrieb ext Adam Carter:
2 > I'm running out of disk space on my laptop and the new disk arrived
3 > today.
4 >
5 > Old setup; 60 gig drive;
6 > /dev/hda1 = /home (used to be windows, hence the partition number)
7 > /dev/hda2 = swap
8 > /dev/hda3 = /
9 >
10 > New setup; 250 gig drive
11 > /dev/hda1 = / (including /home)
12 > /dev/hda2 = swap
13
14 Hmm, I don't like those all-in-one-partition setups. But as always: YMMV.
15 However, since this is a laptop, I would recommend encrypting the
16 partitions. But that would mean to use a separate /boot and booting the
17 system from an initramfs (needed to unlock the real / partition). The setup
18 would be like this:
19
20 hda1: /boot (32M, ext2)
21 hda2: swap
22 hda3: / (rest of disk)
23
24 However, I would use a different setup on my systems:
25
26 hda1: /boot (32M, ext2)
27 hda2: LVM, rest of disk.
28
29 Then put everything into small (as possible) logical volumes.
30
31 > Here's my plan;
32 > - make a new lilo.conf entry to boot off /dev/hda1, then run 'lilo -v'
33
34 I wonder why people still use lilo.
35
36 > - boot knoppix
37 > - dump /dev/hda3 (/) to USB external drive with 'mount /dev/hda3
38 > /mnt/root ; rsync -a /mnt/root /usbdrive/' - dump /dev/hda1 (/home) to
39 > USB drive with 'mount /dev/hda1 /mnt/home ; rsync -a /mnt/home
40 > /usbdrive/' - dump MBR to USB drive with 'dd if=/dev/hda
41 > of=/usbdrive/mbr_backup bs=512 count=1'
42 > - power down, swap hda to new drive, boot knoppix again
43 > - add boot record without partition table, 'dd if=/whatever/mbr_backup
44 > of=/dev/hda bs=446 count=1' - 'fdisk /dev/hda', create one linux
45
46 I wouldn't write the mbr from the old drive to the new one. Just let lilo
47 write a new mbr to the new drive.
48
49 > partition using most of the disk and one linux swap partition - put
50 > filesystem on /dev/hda1 with 'mkreiserfs /dev/hda1'
51 > - dump old / to /dev/hda1 with 'mount /dev/hda1 /mnt/root ; rsync -a
52 > /usbdrive/root/* /mnt/root' - dump old /home onto /dev/hda1 with 'rsync
53 > -a /usbdrive/home /mnt/root' - create swap 'mkswap /dev/hda2'
54 >
55 > then reboot and use the new lilo entry that points to /dev/hda1.
56 >
57 > Will it work?
58
59 Yes, looks good.
60
61 Bye...
62
63 Dirk
64 --
65 Dirk Heinrichs | Tel: +49 (0)162 234 3408
66 Configuration Manager | Fax: +49 (0)211 47068 111
67 Capgemini Deutschland | Mail: dirk.heinrichs@×××××××××.com
68 Wanheimerstraße 68 | Web: http://www.capgemini.com
69 D-40468 Düsseldorf | ICQ#: 110037733
70 GPG Public Key C2E467BB | Keyserver: www.keyserver.net

Attachments

File name MIME type
signature.asc application/pgp-signature