Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Guide: Install gentoo linux using isdn
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Sun Jul 28, 2002 1:06 pm    Post subject: Guide: Install gentoo linux using isdn Reply with quote

Finally I managed to find time to write the guide. However, I don't have time to keep it up to date, so I would appreceate if anyone could take on the responsebility.

Anyway: here it is

Installing gentoo linux using isdn

Written by Cato A. V. Morholt

Quick note: This method makes it possible to install from stage 1, but
the cost is 12+ hours of downloading before you have X/kde up and
running.

When you are going to install gentoo over isdn, you have a few choises:

1. Use an existing distro, and chroot to your new gentoo partition.
This way you can use the connection from the distro until you reboot
into the new gentoo system.
2. Use a second computer as a gateway.
3. Reconfigure the boot cd to support isdn.

There is probably more ways to do this, but these are the only ones I
know works. This document only coveres the last choise, since I do not
have any experience with the other two.

In short, we are going to add nessecery applications, scripts, and
kernel support to the install cd. Since we have to burn this boot cd to
be able to test it, I strongly recomend using a rewritable cd.

Let's get started. First thing to do, is get hold of the boot cd iso.
You can find this at the gentoo homepage (www.gentoo.org) Which boot cd
you get, dosn't matter for this approach, so choose the one that suits
you best. Once you've got the iso, burn it. You can use the following
command:

Code:
#cdrecord -v dev=0,0,0 speed=12 blank=fast-data gentoo.iso


Replace 0,0,0 with whatever device that shows up when running
cdrecord -scanbus, replace speed with what's appropriate for you cd
recorder, and replace gentoo.iso with the iso that you downloaded.
The blank=fast option is only needed if you use a rewritable disk.

Once the burn process is completed, you mount the cd and copy all of
it's contents to a directory on your harddrive. Later in this document
I will refer to this dir as $gentoocd. You can either replace this with
the path to the directory, or you can do:

Code:
#export gentoocd=/path/to/dir


and just write exactly what the examples say.

Next we need to add the following applications needed to configure an
isdn connection: isdnctrl, ipppd, route, and ifconfig. We're also going
to add their dependecies. First thing to do, is to mount the filesystem
on the bootcd. You can do this with the following lines of code:

Code:
#mkdir /mnt/rescue
#gunzip $gentoocd/isolinux/rescue.gz
#mount -o loop $gentoocd/isolinux/rescue /mnt/rescue


When the bootcd filesystem is mounted, it's time to copy the apps.
There's about 2Megs of free storage on the rescue image, so this should
be plenty for what we need. Now, find the apps mentiond. On my system
they are all located in /sbin. This might differ from your system. Other
likely places to find these apps are /usr/sbin, /usr/bin, /bin. The
easiest way to find out, is to search for the files using thise commands:

Code:
#find / -iname isdnctrl
#find / -iname ipppd
#find / -iname route
#rind / -iname ifconfig


Copy the files with the following command: (remember to replace path with
the one appropriate for your system)

Code:
#cp /sbin/isdnctrl /sbin/ipppd /sbin/route /sbin/ifconfig /mnt/rescue/sbin


So, for the applications dependecies. The following command, will output
something like:

Code:
#ldd /sbin/isdnctrl /sbin/ipppd /sbin/route /sbin/ifconfig
/sbin/isdnctrl:
        libgdbm.so.2 => /usr/lib/libgdbm.so.2 (0x40025000)
        libc.so.6 => /lib/libc.so.6 (0x4002c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
/sbin/ipppd:
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40025000)
        libutil.so.1 => /lib/libutil.so.1 (0x40052000)
        libc.so.6 => /lib/libc.so.6 (0x40055000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
/sbin/route:
        libc.so.6 => /lib/libc.so.6 (0x40025000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
/sbin/ifconfig:
        libc.so.6 => /lib/libc.so.6 (0x40025000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


You need to copy all these libraries in order to make the applications
function. Look to the right of the => arrow to see full path of the
library. Also remember to copy to the same directory of the bootcd
filesystem. From the output above, you would do:

Code:
#cp /usr/lib/libgdbm.so.2 /mnt/rescue/usr/lib/libgdbm.so.2
#cp /lib/libc.so.6 /mnt/rescue/lib/libc.so.6
#cp /lib/ld-linux.so.2 /mnt/rescue/lib/ld-linux.so.2
#cp /lib/libcrypt.so.1 /mnt/rescue/lib/libcrypt.so.1
#cp /lib/libutil.so.1 /mnt/rescue/lib/libutil.so.1


Now the applications needed to bring up the connection is in order, but
we still haven't configured anything. Open your favorite editor, and
open the following files (if they don't exist, create theme):

/mnt/rescue/etc/resolv.conf
This file should contain the ip addres of your nameserver (dns). A
minimum file should look like this (start and end line not included):

--start--
nameserver 193.212.1.11
---end---

/mnt/rescue/etc/hostname
This file contains a name, by which your machine is recognized. Don't
worry, It dosn't have any effect on a dialup connection, but makes
your command prompt look more pretty. It looks like this:

--start--
netsurfer
---end---

/mnt/rescue/etc/hosts
I'm really not sure about what this file does, but it should contain
something like:

--start--
127.0.0.1 localhost
0.0.0.0 netsurfer
---end---

For more info on this file, run:

#man hosts

/mnt/rescue/etc/ppp/pap-secrets
This file contains info for the password authentication protocol. It
contains your username and password at your isp. It looks like this:

--start--
username * password
---end---

Replace username, and password with your username and password, and
be sure to include the star between theme.

/mnt/rescue/etc/ppp/chap-secrets
This file should contain exactly the same as pap-secrets

/mnt/rescue/sbin/isdn.init
This file corrects any errors made by devfs, conserning isdn devices.
You might not experience the same problems that I did, but include it
just to be sure.

--start--
#!/bin/sh
rm /dev/isdnctrl
rm /dev/isdninfo
rm /dev/ippp0
rm /dev/ippp1
mknod /dev/isdninfo c 45 255
mknod /dev/isdnctrl c 45 64
mknod /dev/ippp0 c 45 128
mknod /dev/ippp1 c 45 129
modprobe hisax type=36 protocol=2
---end---

The last line of this file loads isdn support for ASUSCOM ISDNLink 128.
You probably have to change this line to suit you. Since I really don't
have any experience with other isdn cards, I can't really give you any
more detailed description here.

To make the isdn.init script executable, type:

Code:
#chmod +x /mnt/rescue/sbin/isdn.init


This should take care of the configuration. The only thing missing is some
script to connect with. There is an exelent script found at:
http://www.linuxnorge.com/internett/ISDN/isdn-script.tgz

You only need the isdn.dial file. Copy this to /mnt/rescue/sbin and edit it.
It's fairly well described what is needed to make it work in the isdn.dial
file, and the readme file. When it's configured, make it executable:

Code:
#chmod +x /mnt/rescue/sbin/isdn.dial


Finally we check what kernel version is used on the bootcd by typing the
following command:

Code:
#ls /mnt/rescue/lib/modules


We are done with the rescue file for now, and un-mount it:

Code:
#umount /mnt/rescue


Now we need to add kernel support in the bootcd kernel. Connect to the
internet, and fetch a kernel similar to the one that was on the bootcd.
The best thing is to get exactly the same. If you can't get a hold of it,
the importatnt thing about the new kernel is that it supports devfs, and
any of the following that you intend to use: xfs, reiserfs, ext3

Configure the kernel, and remember to include the following:
Code maturity level options
|->[*] Prompt for development and/or incomplete code/drivers

File systems
|->[*] /dev file system support (EXPERIMENTAL)
[*] Automatically mount at boot
|->[*] Viritual file system

These options are needed to make the bootcd function properly. Also, be
sure to include options for xfs, reiserfs, ext2, ext3 (at least the ones
you are going to use.

When you configure isdn support in the kernel, it might be a thought to
compile the isdn driver as a module. But don't compile too much as modules
since we don't have more than 2megs of space on the rescue file. That way
you only need to reload the module, instead of recompiling the entire kernel
when making it work.

After the kernel is configured, you compile it and copy the kernel to the
bootcd:

Code:
#make dep && make clean bzImage modules modules_install
#rm $gentoocd/isolinux/kernel
#cp /usr/src/linux/arch/i386/boot/bzImage $gentoocd/isolinux/kernel


We also need to copy the modules in order for the kernel to function
properly:

Code:
#mount -o loop $gentoocd/isolinux/rescue /mnt/rescue
#cp /lib/modules/kerneldir /mnt/rescue/lib/modules
#umount /mnt/resuce


Now the rescue file is complete, and we gzip it again:

Code:
#gzip $gentoocd/isolinux/rescue


Last thing to do is to create the new iso, and burn it:

Code:
#mkisofs -R -b isolinux/isolinux.bin -c isolinux/boot.catalog -no-emul-boot -boot-load-size 4 -boot-info-table $gentoocd > cd.iso
#cdrecord -v dev=0,0,0 speed=12 blank=fast -data cd.iso


Again: Replace 0,0,0 with whatever device that shows up when running
cdrecord -scanbus, replace speed with what's appropriate for you cd
recorder, and replace gentoo.iso with the iso that you downloaded.
The blank=fast option is only needed if you use a rewritable disk.

Reboot, and boot from the new cd. First run isdn.init. Then start the isdn
connection using the isdn script. If you used the one refered to in this
document, type:

Code:
#isdn.dial single


Last, test the connection by pinging something like:

Code:
#ping www.gentoo.org


If this is ok, then you are good to go. Follow the gentoo installation guide
like normal, but you can skip the networking part.

When you install, it might be a good idea to use the --fetchonly option with
emerge. Like when the guide tells you to do "emerge system". Fist do "emerge
--fetchonly system". When this is done, change to another console (Alt-F2),
disconnect using "isdn.dial hangup", switch back (Alt-F1) and do "emerge
system". This way the isdnconnection don't time out, and you won't spend mony
being connected while the computer is compiling.

Enjoy
Back to top
guest
Guest





PostPosted: Tue Jul 30, 2002 11:43 am    Post subject: Reply with quote

whoa .......

maybe the developers should think about inculding syncppp support in the install kernel.
Back to top
Pythagoras1
Guru
Guru


Joined: 29 Jul 2002
Posts: 352
Location: Burgas, Bulgaria

PostPosted: Fri Aug 02, 2002 8:57 pm    Post subject: Reply with quote

Each ISDN adapter requires special arguments when calling 'modprobe hisax'. Details how to modify the last line in your isdn.init file can be found here: http://www.linuxhq.com/kernel/v2.4/doc/isdn/README.HiSax.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum