[apt-get experts] long delayed, partial downloads keep resetting (NoOp)

Oli D vhann3000 at gmail.com
Mon Jun 22 16:31:36 UTC 2009


>
> Message: 2
> Date: Fri, 19 Jun 2009 17:01:51 -0700
> From: NoOp <glgxg at sbcglobal.net>
> Subject: Re: [apt-get experts] long delayed, partial downloads keep
>        resetting
> To: ubuntu-users at lists.ubuntu.com
> Message-ID: <h1h8tg$pqc$1 at ger.gmane.org>
> Content-Type: text/plain; charset=UTF-8
>
> On 06/19/2009 01:33 PM, Oli D wrote:
> > Hi,
> >
> > My lil' story (so people can help me better):
> > Since I only have 56kbits/sec Internet bandwidth at my parents' place
> > and still want to keep the Kubuntu systems there up-to-date,
>
> No idea how to assist, but I am _very_ interested in understanding how
> you managed to set all of that up. Perhaps when you get it all sorted
> out you can post, blog, whatever, on how you did it?
>
> Thanks.

Well, the setup is somewhat complex and very customized (not generic
or portable).

The computers (3 at the moment 2 Kubuntu 8.04, 1 Windows XP (necessary
for other members
of my family)) are linked together by Ethernet (RJ-45) cables via a
Linksys WRT54GS on which I
installed dd-wrt (see www.dd-wrt.com for details). At first, the
router was specifically bought because
the WRT54GS is better than WRT54G (S stands for Speed Booster) and
also because the
Linksys WRT54G Series have removable antennas (I was and am still
thinking about sharing my uncle's
Internet connection using cantennas (see
http://www.turnpoint.net/wireless/cantennahowto.html for details).

The thing to know is, my parents live in a small town where the sole
ISP isn't very interested in installing
DSL around. Therefore, only a select few homes are DSL-subscribed (and
their monthly fee is lower for a
better bandwidth and without clogging the phone line, go figure... ).
No matter what, I happened to figure out
how to dial-up under Linux
(some helpful links (ubuntu oriented, but I does work under my
Slackware 12.1 for example):
https://help.ubuntu.com/community/DialupModemHowto/ScanModem
http://linmodems.technion.ac.il/
http://www.linmodems.org/

Still, I recently figured there were problems between wvdial and the
Ubuntu NetworkManager/Kubuntu KNetworkManager, so I wrote scripts
handling the whole thing (I'll post them
if someone's interested). In short, what I have to do is:
1- Load the winmodem driver
2- Dial-up (wvdial as root)
3- Comment out/remove my router's IP in '/etc/resolv.conf', so the line
nameserver 192.168.1.1
becomes
#nameserver 192.168.1.1
4- Add my dial-up ISP DNS servers in '/etc/resolv.conf' if the dial-up
driver and/or wvdial doesn't do automatically
therefore creating two new lines looking like:
nameserver x.x.x.x
nameserver x.x.x.x
(where x.x.x.x is the IPv4 of the 2 DNS servers as reported by wvdial)
5- Delete the default route for interfaces other than ppp0 (where ppp0
is the Point-to-Point Protocol connection
(A.K.A. dial-up connection)) since requests for addresses outside my
local network must not be sent to the router (local DNS)
but rather to my ISP's DNS servers. Finally, I must add a default
route for my ppp interface
(I can't post examples and such because I am at work atm and don't
have the scripts nor a Linux system at hand)

6- I am then able to successfully ping remote locations such as
www.google.com/72.14.205.99 while still being
connected to my local network :) .

Then, I would configure the computer for Wake-on-LAN via broadcast
(add 'ethtool -s eth0 wol g to '/etc/init.d/rc.local' under Ubuntu, or
'/etc/rc.d/rc.local_shutdown' under Slackware, creating the file if it
doesn't already exist).

Once WOL is working, I would configure my dd-wrt router to Wake-on-LAN
the computer at a given time each night
(see http://www.dd-wrt.com/phpBB2/viewtopic.php?p=295476&sid=7501bc56a9d8b36f91cb59ca5afcd1a2
for details)

The computer would then do nothing for the next 30 minutes (I chose 30
minutes to be very safe (supposing fsck might
decide to scan all disks at start up)). At 23h00 (30 minutes after the
computer woke up), a cron job would call:
scriptToDialUp.bash && scriptToUpdateSystem

And at 6h30 in the morning another cron job would call:
scriptToStopUpdate && scriptToDisconnect

I then check the logs created by the scripts to know if all the
packages were downloaded (since I 'apt-get -dy upgrade'
(download-only))
and, if the download were completed successfully, I would manually
'apt-get [--no-download] upgrade' ( I happen to use --no-download
to make sure everything was ok as it would then report an error if not).

Also, I installed apt-cacher on this one computer so it would allow
other similar systems to stay up-to-date via my faster, more secure,
less phone-line-blocking local network (the script to stop the update
actually import downloaded packages each night).

That's it, I think I described every step I made or so.

Not matter what, I won't blog it or whatnot as I don't have any
blog/website or anything and am not convinced my method would actually
work for others (some parts are rather patchy).

Nota: Still trying to figure how to have get those partial downloads
to stop resetting btw.

Regards,
Vhann




More information about the ubuntu-users mailing list