Subject: Re: HowTo move NetBSD 2.0.2 from larger to smaller HardDisk?
To: None <netbsd-help@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 07/18/2005 20:39:07
bsd.petr@seznam.cz wrote:
> Hi everybody,
> i need to move my NetBSD 2.0.2 from old 4 GB HDD to new 1.2 GB HDD. Is
> there some program as Norton Ghost or Acronis TrueImage with UFS file
> system support?
There are many free alternatives. One is http://www.feyrer.de/g4u/. I'm
not sure how many will be much use, though, because your target system is
much smaller than your source. You have to do a file-by-file copy, not a
filesystem image.
> Or could you tell me please how can i do it manually
> from NetBSD command line?
Approximately:
1. fdisk(8)
2. newfs(8)
3. dump(8)
4. restore(8)
You can pipe dump | restore, so you don't create a dump image. Do it in
single-user mode for your own sanity.
> 1) Which folders i can delete "some large folders as KDE, Gnome but from
>
> where are they" (I using only Samba 3, Apache 2 + SSL, MySQL 4, PHP 4)
> to decrease the used space on old HDD?
Well, if the software you don't want was installed with pkgsrc, I'd
suggest pkg_delete(1) is your friend.
> 4) How can I install "NetBSD boot loader" for start system from new 1.2
> GB HDD?
That would be disklabel -B, I believe.
Once you have your new filesystem in place and have restored your files to
it, you can first reboot and use boot(8) to boot from the new disk before
you make any hardware changes. That's always a treat. Just bring it up
single-user, though, because your fstab will still be pointing to wd0,
even though your root partion will be wd1a. ISTR that even if you change
the boot drive in your BIOS, NetBSD still keeps the same device names.
You can leave yourself booting from wd1 and adjust your fstab, or
physically swap the disks on the IDE bus.
--jkl