[plug] Migrate HDD on headless server
Craig Ringer
craig at postnewspapers.com.au
Sat Jun 28 10:23:46 WST 2003
Weirdo wrote:
> I am currently running my debian server on a 400mb HDD with 10mb free. I
> have a 2Gb drive that I want to replace the 400 with. The server is
> headless and doesn't accept graphics cards (part of the MB is bung and
> it will boot up graphicly 1 out 30 times.) I can probably put the hdd in
> as slave, i can't remeber if the BIOS is set to AUTO but Linux will see
> it any way. I need instructions for copying / to the new drive and
> resizing it to a new size. Then I need to make it bootable etc...
> I don't need a swap partition although it currently has one. I will have
> to do all this over ssh.
The ssh requirement makes it hard. The usual method I use is to boot
"linux init=/bin/bash" and DD the root filesystem over to the new
partition while it's in RO mode. I then DD all the other partitons and
"resize2fs" or "reiserfs_resize" them up to the size of the new host
partition. Then I shutdown, swap disks, boot up off a GRUB floppy and
install GRUB on the new primary disk. It's easy and fuss free IMHO.
I think that in your case, perhaps you should simply move the disks to a
machine which isn't broken and do the migration there, then put the new
disk back?
Craig Ringer
More information about the plug
mailing list