Wikia

coLinux

InstallDebianFromIso

Talk2
235pages on
this wiki

Howto Install Debian Sarge image from scratch Edit


Newer, simple instructions: (if someone wants to make them simpler and add links go ahead, this is a wiki :) )

I have coLinux 0.8.0 running. I have recompiled the kernel with GCC 4.2.0 and have most modules working (there are a few that you must not use under coLinux). I have tons of files and everything works (have not had any crashes / panics). I even have kde working - thus my method works ...

Run new coLinux installer - but don't bother downloading a root image. Go to SF and choose your own http://sourceforge.net/project/showfiles.php?group_id=98788 so you can see the size and monitor the download. I chose Debian-3.0r2.ext3-mit-backports.1gb.bz2 since it is fairly new and fairly small (you can upgrade AFTER you install it).

Follow the instructions on numerous other pages to get everything installed properly and your network running. Be careful if you use "ping -c 1 xx.xx.xx.xx" to check your network, some places don't answer pings and so you might not know it is working.

Now that you have coLinux running and the network working properly install X11 on your Windows side of things. Cygwin's X11 works great. Use xterm (on coLinux's sode) to contact X11 (on Windows side) and you will have a large window (with scrollback) instead of the tiny coLinux terminal (though you still have fltk that you can "TAB" to and use your function keys to log on additional times).

Use "apt-get update" and "apt-get upgrade" to make things newer. Use "aptitude" to pick and choose exactly what you want - and see how huge a download it will end up being when it adds other required packages to your selection. Sometimes you will want just one little file but if you have a new system you will need many MB's of additional things to be installed.

Things to download: You might want to start with a firewall and some system utilities. You might want to download _some_ Linux documentation to your Windows system (and view them with Acrobat) to assist you to learn / use Linux. You would still need to use "aptitude" (or apt-get) to get Linux .info and man pages so you can type "info" in your xterm window and use the Linux side of things to view your Linux docs (which are not the same as typing "info" under Cygwin's shell).

Remember that whatever you get it must run on either fltk (coLinux's little screen), X11, or the huge download; KDE (which looks sort of like WinXP and IE). What I mean by this is that you don't want to try to download a DVD player for coLinux - it would be more sensible to use it on the Windows side directly. You get better support for your sound card, faster video and DVD access. On the other hand some things are way better on the Linux side (like compiling coLinux or GCC-4.2.0). There are also things you simply can't do and sometimes ways to get around it (like using Wine to make the coLinux installer for WinXP). You need to decide on which of your two platforms you want to run which programs and how to divide things up - it can get confusing 8x) .


We now continue with the somewhat dated documentation that was already here ...


shorter and saner version here : InstallDebianFromIsoShort

<Bracx> I created a howto/notes to install Debian Testing available at http://www.brightstar.curvedspaces.com/documents.html The howto uses the newer non-xml configuration format. <as of 4/30/2006 dead link>

Before you start: Edit

the last official package comes with a 2.6.11 Kernel.

This version comes with a file named initrd.gz which contains the debianmodules.

First, as initrd.gz is a common name I recommend that you *copy it* to something like initrd.modules.gz, and unzip it to initrd.modules to avoid confusion.

Chosing an image Edit

http://www.debian.org/devel/debian-installer/ports-status.en.html provides an overview of current Sarge images.

If you have decent networking, take the netboot image, an other tested option is the businesscard image.


for Businesscard-ISO: Edit

Using daemon tools (http://www.daemon-tools.cc) to mount the image or an archiver program (http://www.tugzip.com) to extract files get initrd.gz out of \install on the CD. (NOTE: The file may be in \boot or another dir if you're using a different distro, but will still be named initrd.gz)


if you use the *netboot image* just ignore anny further references to *.ISO and CD ROM. Leave the lines in the *.XML files out.

Extract initrd from initrd.gz *rename it* to *initrd.inst* and place it in a directory with your filesystems.

Note that IE might extract initrd.gz automatically (but keeps the name), in that case it is downloading more than 100%. If this is the case, just rename the file to *initrd.inst*.

Configure the installation system Edit

Create a batchfile "my_sid_inst.bat" which contains:

C:\coLinux\colinux-daemon.exe -t nt -c C:\coLinux\my_sid_inst.xml


Start with a configuration file "my_sid_inst.XML" similar to this (this assumes root.fs is a blank file): see DebianGNUcoLinux for details.

<?xml version="1.0" encoding="UTF-8"?>
<colinux>
    <block_device index="0" path="\DosDevices\D:\Downloads\coLinux\root.fs" enabled="true" />
    <block_device index="1" path="\DosDevices\D:\Downloads\coLinux\swap.fs" enabled="true" />
    <block_device index="2" path="\DosDevices\D:\Downloads\coLinux\initrd.modules" enabled="true" /> <!-- needs to be index 0,1,2 or 3  -->
    <block_device index="3" path="\DosDevices\D:\Downloads\coLinux\initrd.inst" enabled="true" />
    <block_device index="4" path="\DosDevices\D:\Downloads\coLinux\sarge-i386-businesscard.iso" enabled="true" />
    <bootparams>root=/dev/cobd3 ro</bootparams>
    <image path="vmlinux" />
    <memory size="128" />
    <network index="0" type="bridged" name="Local" />
</colinux>

Note: As mentioned in coLinuxNetworking the name="Local" within the network tag has to match a substring of your network adapter's name. The default name is something like "Local Area Connection", "LAN-Verbindung" or "Connexion au réseau local" depending on the language settings of your windows installation.

Note2: If you have already bridged the TAP and LAN adapters, then use <network index="0" type="tap" /> on the network line instead.

Note3: On Thinkpad X41, 128 MB memory size seems not to be recommended (it may hang hard). Chose a smaller or larger memory size.

Note4: If you can't start the debian installer.Try to add devfs=mount,dall to bootparms, such as <bootparams>root=/dev/cobd3 devfs=mount,dall</bootparams>

Boot colinux normally and wait for the installer to load.

  • choose lang, country, keyboard
  • set Hostname and network and mirror
  • You will get a warning "No kernel modules were found", ignore!
  • geting Base installer
  • Choose to manually find CD. Choose "None" for CD ROM driver, then choose "/dev/cobd/4" for path.
  • This should get you up to "No partitionable media is found".
  • Press Alt+F2, then Enter.
  • if you hav not initialized (=formated) your targetimage, you can do that now :
mke2fs -j /dev/cobd/0
mkdir -p /mnt/modules
mount /dev/cobd/2 /mnt/modules
mkdir /target
mount /dev/cobd/0 /target/
cd /target

Install modules :

 tar -zxvf /mnt/modules/lib/modules/vmlinux-modules.tar.gz

(see debianmodules for details)

making all supported 32 nodes in the new Sarge style : Edit

mkdir -p /target/dev/cobd; for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do mknod /target/dev/cobd/$i b 117 $i; done

Baaah, ugly! If you're using sarge, you have probably a bash > 2.05 and the following should work:

mkdir -p /target/dev/cobd; for ((i=0; i<=31; i++)); do mknod /target/dev/cobd/$i b 117 $i; done

Optional, creating symbolic links for compatibility to the old Woody style:

for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31; do ln -s /target/dev/cobd/$i /target/dev/cobd$i; done

Same here:

for ((i=0; i<=31; i++)); do ln -s /target/dev/cobd/$i /target/dev/cobd$i; done

<JosepMa> Warning!! The above creates a link to /target/dev/cobd/* . It is ok during the installation, but it is not once the system restarts, because /target does not exist anymore.

preparing fstab:

mkdir /target/etc
echo "/dev/cobd/0 / ext3 defaults 1 1" >> /target/etc/fstab
echo "/dev/cobd/1 swap swap defaults 0 0" >> /target/etc/fstab

stay in /target or a subdir of it (this will "lock" this directory as mounted no matter what the partition step tries to do) Press Alt+F1, choose to continue install anyway. (50 Mb will be downloaded) Installing kernel then errors out, choose continue anyway. (choose a kernel-image-2.6.8-1-686 or simmilar, related to your CPU of course) Don't install LILO or GRUB


Make sure to follow all three installation steps in the right order:

  • Install the base system
  • Continue without boot loader
  • Finish the installation

otherwise it won't work, but only produce unhelpful errormessages. There will be a few errors, choose continue anyway. if you get "Proceed with installation to unclean target?", say <yes>

Before restarting, this configures your network (assuming dhcp):

 cat <<EOF >>/target/etc/network/interfaces
 auto lo eth0
 iface lo inet loopback
 iface eth0 inet dhcp
 EOF

You could do the above after rebooting, just use /etc/network/interfaces instead

  • When you are done, if it asks you to restart, say <ok>, it should be better than restarting manually.

Create a batchfile "my_sid.bat" which contains:

C:\coLinux\colinux-daemon.exe -t nt -c C:\coLinux\my_sid.xml

copy "my_sid_inst.XML" to "my_sid.XML" and change it to boot from cobd0 like so:

<?xml version="1.0" encoding="UTF-8"?>
<colinux>
    <block_device index="0" path="\DosDevices\D:\Downloads\coLinux\root.fs" enabled="true" />
    <block_device index="1" path="\DosDevices\D:\Downloads\coLinux\swap.fs" enabled="true" />
    <bootparams>root=/dev/cobd0 ro</bootparams>
    <initrd path="initrd.modules.gz" />
    <image path="vmlinux" />
    <memory size="128" />
    <network index="0" type="bridged" name="Local" />
</colinux>


Boot, login as root,

  • apt-get update
  • apt-get install module-init-tools
  • reboot (this isn't needed, it's just for Windows addicts)


Should be at a fully working (yet minimal) debian install! don't forget to adjust your network configuration (like /etc/resolv.conf) and run apt-get clean to get rid of about 50 Mb you just downloaded.


History : Edit

  • originally written by <SKroWL> (very nice job), later updated with link to woody and edited for clarity.
  • checked and edited by <Gniarf>
  • rewritten by <ollinaie>
  • added bridged note by Xantus
  • added web link to howto/notes <Bracx> Nov,14 2005
  • some minor changes by rasmus Mar 2006

MassTranslated on 25 Dec 2004.
MassTranslated on Sun Apr 23 17:36:19 UTC 2006

Around Wikia's network

Random Wiki