[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Best practices for installing Debian in a new disk?



On 15:13 Wed 19 Oct     , Bruno Buys wrote:
> Alvin Oga wrote:
> 
> >On Tue, 18 Oct 2005, mikepolniak wrote:
> >
> >>Why not just copy over the whole Debian partition from the ide disk to
> >>the new disk. I have done this many times without a problem. I make a new
> >>partition on the new disk as the target and cd into / dir of the old disk
> >>then:
> >>
> >>cp -ax * /target
> >>   
> >>
> >
> >manual cleanup will be required, regardless of which way you clone 
> >ide -> sata
> >
> >	clean up /var/log ( or wipe  it all out )
> >	clean up /var/spool/*mail-stuff*
> >	clean up /root/{*caches*} 
> >	rm -rf /tmp/*
> >
> >- if you don't clean it up .. your IDS should be screaming that the
> > machine had been hacked
> >
> >keep your fingers crossed that the sata disk bootable on your other system
> >and that the sata controller is supported by the kernel
> >
> > 
> >
> >>If necessary then edit the /etc/fstab and /etc/network/interfaces.
> >>Then install lilo or grub on the new disk and it's good to go. 
>   
>    Mike,
>    I considered a entire-partition copy approach, but I got scared of 
> how many configs files I´d need to edit, in order to correct things such 
> as /dev/hda to /dev/sda, and it seemed like more work than simply 
> reinstalling from netinst. My current setup is like ~350MB apt-get 
> download, after base install, which is doable in say 3 hs. I just left 
> the computer downloading overnight.
> How exactly do you copy files in this way, when you do that? Maybe I´ll 
> switch to this next time.
> 
> How do I go about editing my lilo.conf from ide disk to point correctly 
> and boot the system from sata?

I always clone the whole partition to the /new-disk/target-partition 
(I have done this literally dozens of times without any problems). Using
just the following 2 commands archives the complete _*_ source tree:  

cd to / directory of the source partition, then
cp -ax * /target-partition

To clone a 3GB partition on the same pc takes about 15 mins and a few mins. 
for editing.     

Since this is my home pc i don't need to edit everything on the new disk,
just necessary things like fstab for hda-sda and network/interfaces and
/etc/modules if any hardware is different. If the clone uses physically the
identical hardware then its just /etc/fstab.

I started using the Grub boot loader about 4 years ago. It is more
flexible than lilo, with a command line and menu interface. So you can
boot to either the SATA or IDE disks without changing the bios. It just
boots to whatever disk is set in the bios and then you can choose/change 
any boot options from the Grub menu right at boot time. If you need any help
with setting up Grub you can email me off list.

If you want to keep Debian on both disks or more than one pc up to date
you can run a proxy server for your Debian package archives so you only
run apt-get and download once for all pc's. The easiest one i found is a
package called "approx". This only saves/serves the packages you download for
your install updates not the whole Debian mirror.

  




Reply to: