RESEARCHUT -- Minds With Innovations
RESEARCHUT
Minds With Innovations

RESEARCHUT - minds with innovations

This site has been archived. The new interface is: HERE

pypt-offline goodness

Monday 29 December 2008 at 7:15 pm

I created pypt-offline with the hope that it'd be useful for people who don't have an internet connection but would still like to enjoy Debian. Enjoying Debian is about enjoying its Package Manager, APT. I don't have any data to show if pypt-offline is in use by anybody. I too, use it rarely, when at my hometown. But I hope people who use it, find it useful.

At my hometown, I use internet service from my friend's ISP. I have a 10kb/s connection at home. That's slow.

And I've been using KDE 4.2 in Debian. The Debian KDE team decided to defer public availability of KDE 4.2 Beta packages for a good reason. But I did want to use it and find more bugs, sooner. So I ended up with the unofficial sources. There, it comes packaged almost every 2 days. That ends up being a 600-700 mb download quite often. (This includes the debug packages).

Being at home and downloading 700 megs of deb is painful. So I rushed to my friend's ISP. There I can get 500kb/s bandwidth. But apt didn't want to play good. The problem is that apt is not threaded. So from a single source, only a single download can be initiated. That ended up me using on 120kb/s bandwitdth to download. That was time consuming. I wanted it to be downloaded faster so that I could spend more time at home.

That's when I thought of using pypt-offline. When I designed pypt-offline, one of my requirements set, was threads. pypt-offline is threaded. This ended up being very helpful for me. I was able to utilize the bandwidht upto 600 kb/s by using 5 threads. This has yielded in faster download for me, while it must be choking the bandwidth for the server ;-)

I wish if apt was threaded. But I think it isn't threaded for good reasons. Having a threaded apt will end up with excess load on Debian servers. But then, if you really want fast downloads and do have the bandwidth, do give pypt-offline a try. And yes, you can try it on Windows/Linux/Mac.

It makes me happy today to see a good use of pypt-offline. :-)

Laptop - Microsoft Windows - Installer - License

Thursday 11 December 2008 at 1:52 pm

Most people who've bought laptops, would see a pre-installed version of Windows, for which they'd have already paid. Recently things have changed but still for the majority of the laptop models available, Windows is the most commonly used option.

I own a Dell XPS M1210 which too came pre-installed with Microsoft Windows XP. Since the machine was low on hard-drive space, I had to eventually knock-off all Non-Linux partitions to make more space. Recently I was able to swap my Seagate SATA Laptop Drive (160 GB) with the one that was shipped with the Laptop. This made me rich in disk space. So, being a small PC gamer, I decided that I do want to have a copy of Windows XP installed on my machine. And why not, I already have paid for it and own a license.

Here's where the fun started. Over the years, my laptop's CD/DVD drive had been mal-functioning. I seldom used it. For installing Linux, I never had issue because most Linux Distributions support installation off the USB Stick. But to install Windows XP using the USB Stick was a very tough time. I had to dig up a lot of docs on the internet, most of which were very particular (to EEEPC) and never worked. The only article that I came across, that worked, was this.

After having the USB Stick WIndows XP Bootable, I ran into a new problem. The copy of Windows XP Installer didn't accept my License Key. This started a whole new set of problems. It led me to suspect that something must be flawed in the USB Installation method, especially that it uses the ramdisk image from WIndows Server 2003.

Left with not much choices, I was disappointed. I wanted to install XP on my laptop but was not able to. Last night I tried a Desi thing. I wiped the CD/DVD Drive's lense with my shirt and gave the Windows XP Installer CD another try. And Bingo, It booted off it. Sometimes Lord Mahadev just want the Sweet Time be taken. Now with the Installer CD working, I hoped things would work. But it came to the same License key problem. My license key didn't work. I had to struggle a lot in getting it to work.

Two things here:

Overall now I'm done with the Windows XP re-incarnation on my laptop.

There's just one glitch remaining to solve. My HDD's partition layout is this:

rrs@learner:~$ sudo fdisk -l
[sudo] password for rrs:   

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1d05272a                    

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         255     2048256   83  Linux
/dev/sda2   *         256        4143    31230360    7  HPFS/NTFS
/dev/sda3            4144        5359     9767520   83  Linux
/dev/sda4            5360       19457   113242185   8e  Linux LVM

sda4 is the LVM partiton where my root and swap partitions reside. Under Windows XP, sda4 is listed as a "Windows XP Fault Tolerant Partition". I'm not touching it at all when in Windows, but its mere presence makes my mood go bad. I'd rather preferred if Windows XP was completely unknown about this partition type (8e)

SELinux in Debian

Thursday 11 December 2008 at 1:46 pm

Thanks to Pierre Chifflier, Debian now has setroubleshoot packaged. The good thing about setroubleshoot is that it gives you a very user friendly message about the SELinux violations that occur on your box while you were doing something.

Now that something is very difficult to define (at least for Debian). My day job requires me to work on the RHELdistribution which has very good SELinux policy defined (Same is the case with Fedora). Here's a list of things which Debian's SELinux policy lacks and that RHEL/Fedora's doesn't

  • `acpi -V` raises a violataion 
  • `dmesg` raises a violation
  • `apt-get update` raises a violation
  • You can't suspend, that raises a violation
  • nvidia module load raises a violation (Oh!! Well. That's binary-only. ;-)    But the same doesn't raise a violation in Fedora)
So even though I'd love to use SELinux on Debian, I can't. Basic tasks are seen as violation by the Debian SELinux Policy. Try out enabling SELinux in Permissive mode and install setroubleshoot. You'll see setroubleshoot pop-up a SELinux violation every 5 seconds. Turns out that Debian's SELinux policy is becoming just too too much secure and thus interfering with the user using the OS.