Author Login
Post Reply
Am Donnerstag, 8. Mai 2008 schrieb ext Adam Carter:
> I'm running out of disk space on my laptop and the new disk arrived
> today.
>
> Old setup; 60 gig drive;
> /dev/hda1 = /home (used to be windows, hence the partition number)
> /dev/hda2 = swap
> /dev/hda3 = /
>
> New setup; 250 gig drive
> /dev/hda1 = / (including /home)
> /dev/hda2 = swap
Hmm, I don't like those all-in-one-partition setups. But as always: YMMV.
However, since this is a laptop, I would recommend encrypting the
partitions. But that would mean to use a separate /boot and booting the
system from an initramfs (needed to unlock the real / partition). The setup
would be like this:
hda1: /boot (32M, ext2)
hda2: swap
hda3: / (rest of disk)
However, I would use a different setup on my systems:
hda1: /boot (32M, ext2)
hda2: LVM, rest of disk.
Then put everything into small (as possible) logical volumes.
> Here's my plan;
> - make a new lilo.conf entry to boot off /dev/hda1, then run 'lilo -v'
I wonder why people still use lilo.
> - boot knoppix
> - dump /dev/hda3 (/) to USB external drive with 'mount /dev/hda3
> /mnt/root ; rsync -a /mnt/root /usbdrive/' - dump /dev/hda1 (/home) to
> USB drive with 'mount /dev/hda1 /mnt/home ; rsync -a /mnt/home
> /usbdrive/' - dump MBR to USB drive with 'dd if=/dev/hda
> of=/usbdrive/mbr_backup bs=512 count=1'
> - power down, swap hda to new drive, boot knoppix again
> - add boot record without partition table, 'dd if=/whatever/mbr_backup
> of=/dev/hda bs=446 count=1' - 'fdisk /dev/hda', create one linux
I wouldn't write the mbr from the old drive to the new one. Just let lilo
write a new mbr to the new drive.
> partition using most of the disk and one linux swap partition - put
> filesystem on /dev/hda1 with 'mkreiserfs /dev/hda1'
> - dump old / to /dev/hda1 with 'mount /dev/hda1 /mnt/root ; rsync -a
> /usbdrive/root/* /mnt/root' - dump old /home onto /dev/hda1 with 'rsync
> -a /usbdrive/home /mnt/root' - create swap 'mkswap /dev/hda2'
>
> then reboot and use the new lilo entry that points to /dev/hda1.
>
> Will it work?
Yes, looks good.
Bye...
Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@(protected)
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net

Attachment:
signature.asc (zipped)