Entries Tagged as 'FLOSS'

Faster file copying over a local network

What I started to do was to copy a 460MB file from the computer in the project network into my laptop before I leave in an hour. The problem is that when I started mapping the drive containing the file and copying it using Windows explorer the ETC displayed by the file copy dialog box fluctuates between 2-5 hours. This instability and slowness is a pet peeve I have against the Windows copy process over CIFS/SMB shares. I know copying from the command line is going to be faster but without a progress meter I don’t know when it is going to be finished.

The next option I did was to share it the webserver hosted in the remote box and then tried to download it. The download speed range is between 30-75kbps so the ETC reported by the browser is between 2-3 hours. It may be faster but not fast enough for my needs. Then I realized that I have rsync inside the cygwin install in the laptop. As I have already the network share mapped to Z: drive so the simple command

$ rsync -avp --partial --progress /cygdrive/z/Temp/bigfile.zip ./

started the transfer which was a whopping speed range of 230-420Kbps. ETC is now 15-20 minutes. Problem solved so I am writing this blog while waiting for the transfer to complete. For those interested with the rsync options:

  • -avp : copy the file in archive mode, preserve permissions and increase verbosity.
  • –partial : if the error fails, don’t delete the transferred chunks so it can be used for resuming the transfer.
  • –progress : show the copy progress.

Why didn’t I just use a USB stick? It is because the company has locked down the USB storage drivers and while somebody who amazingly has a strong resemblance to me can do something about it, it would be too troublesome to pursue. FTP might have been a good choice of protocol as this is a secured environment but from experience the antiquated file transfer protocol only has a slight advantage over HTTP in terms transfer speeds.

ciao!

Semi-hosed Wind UMPC (Fixed)

Fixed by overriding the GRUB lines, editing the GRUB menu, and correcting the entries in the /etc/fstab.

Here is the original line that causes the bootup to panice:

kernel (hd1,0)/boot/vmlinuz BOOT_IMAGE=linux root=/dev/sdc10 vga=788
initrd (hd1,0)/boot/initrd.img

PCLinuxOS is configured to use the graphical GRUB menu so pressing the ESC key will allow the users to go into text mode that allows the editing of the line command. Pressing ‘e’ on the selected entry enabled to correct the order of hard drive being searched [ (hd0,0)/boot] as well as the correct root [root=dev/sda10]. After both the kernel and initrd lines have been updated, pressing ‘b’ will continue the boot process.

The GRUB entry is only half of the problem since the boot operationg still panics and dumps me in a command line. The culprit is that the fstab file still contains incorrect entries since all of the partitions are being searched at /dev/sdc. The USB flashdrive I used for the installation has 3 partitions so there are also 3 incorrect entries for it in /etc/fstab.

As I said, the boot process dumps me into a command line. This is where knowledge of vi comes very handy. It is small enough and ubiquitous enough to be in most *nix system. A quick ‘vi /etc/fstab’ to correct all linux partitions (and temporarily disable mounting of windows partitions) and I am now good to go. Invoking ‘mount -a’ confirms that I am able to successfully mount all partitions.

This problem is solved but unfortunately the PCLinuxOS Minime distribution is not the answer to my wireless in the Wind woes. :(

ciao!

Semi-hosed Wind UMPC

Doc Mana (or rather his daughters) own a Wind and has pointed me to the released Linux realtek drivers. As Doc Mana has stated, the released drivers are in RPM format but this gives me a good opportunity to use the alien utility for converting packages. Doc also said his Neo empriva is working fine with a similar wireless chipset.

With the extended weekend, I promised to try it out with a refreshed Xubuntu installation, or better yet try installing the PCLinuxOS MiniMe distro to get native support for RPM. The nutshell is that I now have a semi-hosed Wind UMPC. :(

Here is what happened:

  • I replaced the gnome network manager with the kwlan application and I hosed down my network connections. I then decided to refresh the Xubuntu installation from the my 4GB flash disk. And then…
  • I tried converting the package using the alien utility with the “–scripts” parameter because it told me so. It said it is for including the scripts inside the package. When it was time to install them with dpkg, an error was thrown out that there is a parsing error in the post install script. Both drivers show this error. Great!
  • As this is a refreshed installation, I decided to try again the tip from the msiwind.net wiki as this is also stated in the Gentoo Wind wiki. The build essential tools refused to install properly because of the problem with the botched realtek drivers installation.
  • I cannot uninstall/purge the realtek drivers from synaptic becase there are errors in the hooked scripts. :(
  • I wiped by flash disk with MiniMe and proceeded to install over my Xubuntu system. Everything seems to be fine until I rebooted. The system got reconfigured with my flash disk as its main storage (sda) and my Wind’s drive as its secondary (sdc) so the GRUB entries refuses to work.
  • I tried booting with the flash disk inserted and tried to select the HDD Minime installation but the boot process refuses to proceed and ends with a kernel panic.

Right now the Wind will only continue booting if I have the flash disk inserted, and its too late into the night to start tinkering with livecd options. The bright side is that I have effectively created a very crude security key. /lol

I hope I can fix this properly tomorrow as the wife is giving me weird looks when she can’t easily get into the Windows partition to play Mystery Case Files. :D

ciao!

Ext2/Ext3 undelete

Frequently I come across queries on how to retrieve files in Linux wherein the most probably answer will be that it is almost impossible due to the journaling nature of the standard file systems for most Linux systems. Ext2 is not a journaled file system but its use for large partitions (>128MB) is not recommended since a premature crash (system-induced or external like a power shut-off) will cause the file system to be marked as dirty and be subjected to a file system check and possible data loss. At this time where terabytes of disk space are becoming available to us members of the unwashed masses, I don’t think anybody in a right mindset will even consider using ext2 on a 20GB partition.

Back to the topic, previously you are screwed if you were clicker/presser happy with delete operations (rm -rf ~ /tmp comes into mind, ouch!) then it only takes a split second from the time you confirmed the delete operation to switch between nonchalance and an agitated mental anguish. It may be a single document or your whole directory (I hope you are not in the habit of running as root for day-to-day use), but if you really need to get that file you just delete and you are using ext2/ext3 then there might still be some hope. I just came across the page for ext3undel which promises a set of utilities and scripts that will help you in getting your precious files back. The project is not available on official Mandriva and Arch repositories :( but the project provides RPM and Deb downloads.

I haven’t used it yet as I am fortunate enough to haven’t gotten the need but the documentation on the project’s wiki seems to be simple enough. I am going to try installing this on my systems this weekend since this would be a handy tool to have when my stupidity arises need beckons.

ciao!

tux on a stick

I have a 4gb TDK usb drive and i want to try running a full-blown linux on it. I am using this guide from pendrivelinux to install xubuntu on the flash drive.

The instruction is for creating two partitions: the first one is a fat16 partition that will hold the main system while the second partition is a small ext2 partition for the persistent data (settings?). I modified it a bit with this setup:

  • sdb1 – 3GB FAT32 – for sharing data
  • sdb2 – 1GB – fat16 for the main system. I tried using ext2 but the instruction was really for a fat16 partition for the syslinux step
  • sdb3 – 115MB – persistent partition that is labeled casper-rw

The partitions were created using cfdisk on my archlinux system. I opted to put the 3GB partition at the start because I am from the old school thinking that when dealing with stupid OSes always put the partitions it can read first. All of the partitions are physical partitions but i marked the second one as the active/bootable partition.

Everything else in the tutorial went smoothly except when it was time to boot the machine using the usb drive. The booting stopped with the message that the boot sector was invalid or damaged. I tried googling around for the fix which basically suggests installing the boot loader on the flash drive’s boot sector (/dev/sdb) but these did not work.

I finally gave in and restarted the installation process, only this time I placed the 3GB partition at the end so that I will be mostly compliant with the pendrive linux guide. There is really something to be said for following instructions especially if those instructions do not contain any discussion on the rationale. My tux in a stick works although it takes quite a while to boot my laptop. I have been able to use it in the office so I can copy a big file (RTC linux client) that I need to bring home from the office since I cannot complete the download at home.

I am happy since I have a portable Linux system in case I need it. As for the question on whether Windows was able to recognize the data space at the end of the drive, I honestly don’t know. I haven’t booted into Windows yet here at home, and the USB ports are locked by the domain server at work. I guess I will eventually know the answer but I am not in a hurry to find out. :)

ciao!