Gentoo Archives: gentoo-user

From: "Wang
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Disk upgrade sanity check pls
Date: Thu, 08 May 2008 06:42:24
Message-Id: 1210228931.17622.8.camel@localhost
In Reply to: [gentoo-user] Disk upgrade sanity check pls by Adam Carter
1 hi,
2
3 I think it's better to use LVM to manage your partitions, it will be
4 much less painful..
5
6 Wang
7 在 2008-05-08四的 16:20 +1000,Adam Carter写道:
8 > I'm running out of disk space on my laptop and the new disk arrived
9 > today.
10 >
11 > Old setup; 60 gig drive;
12 > /dev/hda1 = /home (used to be windows, hence the partition number)
13 > /dev/hda2 = swap
14 > /dev/hda3 = /
15 >
16 > New setup; 250 gig drive
17 > /dev/hda1 = / (including /home)
18 > /dev/hda2 = swap
19 >
20 > Here's my plan;
21 > - make a new lilo.conf entry to boot off /dev/hda1, then run 'lilo -v'
22 > - boot knoppix
23 > - dump /dev/hda3 (/) to USB external drive with
24 > 'mount /dev/hda3 /mnt/root ; rsync -a /mnt/root /usbdrive/'
25 > - dump /dev/hda1 (/home) to USB drive with
26 > 'mount /dev/hda1 /mnt/home ; rsync -a /mnt/home /usbdrive/'
27 > - dump MBR to USB drive with 'dd if=/dev/hda of=/usbdrive/mbr_backup
28 > bs=512 count=1'
29 >
30 > - power down, swap hda to new drive, boot knoppix again
31 > - add boot record without partition table, 'dd if=/whatever/mbr_backup
32 > of=/dev/hda bs=446 count=1'
33 > - 'fdisk /dev/hda', create one linux partition using most of the disk
34 > and one linux swap partition
35 > - put filesystem on /dev/hda1 with 'mkreiserfs /dev/hda1'
36 > - dump old / to /dev/hda1 with 'mount /dev/hda1 /mnt/root ; rsync
37 > -a /usbdrive/root/* /mnt/root'
38 > - dump old /home onto /dev/hda1 with 'rsync
39 > -a /usbdrive/home /mnt/root'
40 > - create swap 'mkswap /dev/hda2'
41 >
42 > then reboot and use the new lilo entry that points to /dev/hda1.
43 >
44 > Will it work?
45 >
46 > tnx
47 >
48 >
49 --
50 Wang, Baojun Lanzhou University
51 Distributed & Embedded System Lab http://dslab.lzu.edu.cn
52 School of Information Science and Engeneering wangbj@×××××××××××××.cn
53 Tianshui South Road 222. Lanzhou 730000 .P.R.China
54 Tel: +86-931-8912025 Fax: +86-931-8912022

Attachments

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