Lomadee, uma nova espécie na web. A maior plataforma de afiliados da América Latina.

quinta-feira, agosto 17, 2006

Quick and Dirty Sarge to Etch Migration

I was in front of my computer some weeks ago and I then an idea comes in my mind, use one of my free partitions to install a copy of Debian GNU/Linux 4.0 Etch, but in that time, I was doing something too important to reboot the machine (I do not remeber what), this way, I get some reading on Debian docs and find a way to do so... Here is the drill

First of all, I need to create a space for my new system, then I issued this command as root. It create a label on the /dev/hdh4 partition to be used latter by the system.

# e2label /dev/hdh4 etch

You know what it means, right? If not, do man mkdir

# mkdir /etch

Here I mount my partition named previously by e2label command as etch

# mount -t ext3 -L etch /etch

And then I get started with debootstrap to bootstrap the base system to the monted partition from one official Debian mirror (it may take a while depending of your link speed).

# debootstrap etch /etch ftp://ftp.br.debian.org/debian/

After that, I need to mount the proc file-system

# mount -t proc none /etch/proc

With the proc file-system mounted out, I can chroot on the new system partition to do the rest of the job

# chroot /etch

Here I add securty updates to the source-list file, with this, every new package installed will get security updates done by default

# echo 'deb http://security.debian.org/ etch/updates main' >> /etc/apt/sources.list

Do a aptitude cache refresh

# aptitude update

And it's time to make this new system usable

# aptitude install locales console-data console-common kbd initrd-tools cramfsprogs dash linux-headers-2.6-k7 linux-image-2.6-k7 busybox initramfs-tools klibc-utils libc6-i686 libklibc libvolume-id0 linux-headers-2.6.15-1 linux-headers-2.6.15-1-k7 linux-image-2.6.15-1-k7 udev usbutils pciutils bzip2 sysfsutils dhcp3-client dhcp3-common resolvconf acpid acpi libpci2 libsysfs2 xserver-common xserver-xorg x-window-system-core x-window-system gdm gnome-session

# dpkg-reconfigure locales console-data

# echo '127.0.0.1 localhost' > /etc/hosts

You need to fix for your system

# echo '' > /etc/hostname

And here too

# printf '# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

# The loopback network interface
auto lo
iface lo inet loopback

iface eth0 inet static
name Ethernet LAN NIC
address 10.1.1.3
netmask 255.0.0.0
broadcast 10.255.255.255
network 10.0.0.0
gateway 10.1.1.1
auto eth0\n'

# ln -sf /usr/share/zoneinfo/America/Fortaleza /etc/localtime

# fstab
proc /proc proc defaults 0 0
LABEL=etch / ext3 defaults,errors=remount-ro 0 1
LABEL=swapfs none swap sw 0 0
/dev/hdc /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom1 iso9660 ro,user,noauto 0 0

You must update your boot loader configuration file (grub or lilo) and reboot this new system. After this, continue installing your preferred applications.