Thursday, February 27, 2003

Installing Debian while a running Red Hat 8.0 system

I've been running a triple bootable Compaq Armada M700 laptop --
Microsoft Windows 2000, Red Hat 8.0 and Debian. On the internal disk
is W2k and RH8 a long with my /home partition. A second disk in the
multibay slot had Debian/sarge on it. I recently replaced the second
disk with a new 20G drive and thought it would be simpler to reinstall
debian on the new disk rather than try to restore it from the previous
disk. Here are my step by step instructions on on how I installed
Debian on the second drive while running Red Hat.




I'm also going to try to note all the packages/configurations needed for this d
ebian laptop which other people may find useful.




  • The first thing to do is read the instructions from "chroot
    Debian Install From A Booted System mini-HOWTO"


  • Partition disk as to create a 4G partition (/dev/hdb1) and a 512M
    swap disk (/dev/hdb2), the rest will be carved up later.



  • mkfs.ext3 /dev/hdb1
    mkswap /dev/hdb2


  • Create a directory for the new partition and then mount it,


    mkdir /debian-root
    mount -t ext3 /dev/hdb1 /debian-root/



  • Grab the debian potato base


    http://http.us.debian.org/debian/dists/potato/main/disks-i386/current/base2_
    2.tgz


  • Unpack into a free partition


    cd /debian-root
    tar zxvf ~/base2_2.tgz



  • chroot into the environment:


    chroot /debian-root bin/bash




  • create a reasonable fstab for the new partition

    The debian root will be on my 2nd disk. There is also a swap disk
    on the 2nd disk as well as the first (currently used by Red Hat,
    more on that later)


    #
    #
    /dev/hdb1 / ext3 defaults 0 0
    /dev/hdb2 none swap sw 0 0
    proc /proc proc defaults 0 0


  • /proc





  • Set timezone (the dpkg-reconfigure console-data didn't work for me.)


    tzconfig





  • (re)configure the debian base

    Copy what in Red Hat's /etc/resolv.conf into the chroot'ed /etc/resolv.conf


    search americas.cpqcorp.net
    nameserver 16.103.131.242


    Set any proxies if you need them.


    export -p http_proxy=http://proxy.compaq.com:8080
    export -p no_proxy=.hp.com


    Consider editing /etc/apt/sources.list if you have a local debian
    mirror that carries 'potato'


    dpkg-reconfigure base-config


    At this point it will download a bunch of files from the debian mirror
    site.

    I get this error:

    /var/lib/dpkg/info/base-config.postinst: /usr/share/base-config/stage4: No su
    ch
    file or directory

    One thing this doesn't do is remove /sbin/unconfigured.sh



  • Edit /etc/network/interfaces


    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet dhcp



  • /etc/hostname put some one word in that file for your hostname, in my case
    elephanttalk



  • While at 'stable':


    $ apt-get update
    $ apt-get dist-upgrade


  • Edit /etc/apt/sources.list to use 'sarge' instead and upgrade to
    sarge...


    $ apt-get update
    $ apt-get dist-upgrade

    $ dpkg-reconfigure -a # just for good measure



  • Install a kernel and bunch of useful tools...



    $ apt-get install kernel-headers-2.4.20-686 kernel-image-2.4.20-686 aptitude ss
    h emacs21



    NOTE: Say no to any lilo configuration. I used grub which is on the
    MBR of the first disk.


  • removed /sbin/unconfigured.sh



    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet dhcp





  • In /etc/grub.conf of the redhat 8.0 system, add this:


    title Debian/sarge (2.4.20)
    root (hd1,0)
    kernel /vmlinuz ro vga=0f07 root=/dev/hdb1
    initrd /initrd.img



  • reboot



  • to get the network up, I needed to manually type 'insmod e100' and then '
    ifup eth0'.

  • use tasksel and pick X window system, laptop system and install a
    bunch of stuff.

  • Use dselect and add kdebase. This will require a bunch of other
    packages, add enough that kdebase can be installed.

  • I like the look of kde's login manager better than xdm, apt-get
    install kdm.

  • apt-get these essential apps: rsync, kernel-pcmcia-2.4.20-686

  • getting networking (wired & wireless) going:

    Add to /etc/modules

    e100 # for builtin 10/100
    yenta_socket # pcmcia for Compaq Armada M700