Re: How to install Debian in such a situation
> I've a very old PC with an old Debian installed. Recently I found the hard
> disk has some bad sectors, sometime the file system will be mounted as read
> only. I bought a new hard disk and downloaded Debian testing version, then
> I found the CD-ROM is broken, it can not boot from the CD-ROM. The old PC
> can not boot from USB disk either. How to install the new Debian on the
> new hard disk?
Here's what I'd do:
- plug both the old and new disk into the same machine.
- Use "dd" to copy the old disk to the new disk (if the old disk is "in
use" try to remount it read-only before doing that).
- throw away the old disk.
- put the new disk in place.
- boot to the old system installed on the new disk.
You'll then want to resize partitions since the new disk is
probably larger. And you'll probably want to "aptitude upgrade" e.g. to
the current Debian testing.
Instead of "dd and then resizing", you can also create the partitions
and file systems on the new disk by hand, then copy with "cp -a" or
"rsync" (that also has the advantage that it works much more reliably if
you booted from the old disk but weren't able to "remount readonly"
before the copy). The only trick then is not to forget to "grub-install
One of the advantages of this approach is that you preserve the