You are here

Linux

Image: 

Linux Distribution Chooser

Linux

Always wanted to try Linux, or thinking about trying some other distribution? Just came across this link, the Linux Distribution Chooser.

No surprises here (for me at least): Debian/Ubuntu. Very good for newbie users too...

How do I REALLY delete a file ?

Linux

Do you know that deleting a file really doesn't delete the file content on your disk ? In Unix, a file delete (rm) unlinks the inode, but doesn't actually zero-out the data blocks associated with the file. How can you really destroy the contents of a file? What if you're doing a rm -r of hundreds of files? Deleting files on disk-level can be very interesting if you have highly sensitive data on your disks. Many people who are using Unix know GNU shred, but the docs state "that shred relies on a very important assumption: that the filesystem overwrites data in place." This is the traditional way to do things, but many modern filesystem designs [such as Solaris' UFS] do not satisfy this assumption. ZFS is even trickier, as it uses Copy On Write, so overwriting data actually never happens !

I'll present some ways of deleting data on your disks.

  1. The safest option for really deleting a file is to remove the hard drive and physically destroy it. While I relish the thought of beating Sun equipment with hammers, actual physical destruction of hardware is not always an option. Your employer may have very specific policies that must be followed.
  2. If you have a degausser laying around, you could degauss the disks. In addition to wiping the contents of the platters themselves, degaussing can render the drives unusable by destroying timing tracks, server motors, and spindle
    motors. Spectrumwest.com had some interesting details.
  3. Low-level formats :
    This approach assumes you want to delete an entire disk drive or at least an entire file system. These could not be used to target specific files while leaving the rest of the file system intact. Definately worth including though: Sun Blueprint scrubbing disks.
  4. Alternatives :
    Repeatedly format > analyze > [purge|write|compare]

    Overwrite raw device with something such as:
    dd if=/dev/zero of=/dev/rdsk/c#t#d#s#

  5. Fill up the file system :
    A safe way of cleaning a drive is to delete all the files/data we wanted destroyed. Then, fill the file system with junk. One problem with this approach is that it assumes we already know ALL of the sensitive files that should be deleted and don't forget one. Unless all of your sensitive data is positively stored in a known area, you risk leaving a file alive by mistake.

    a. Remove all files of interest.
    This will leave disk blocks on the free list which may contain some data that you'd rather not see leave your custody.

    b. AS ROOT, run this on each filesystem where the files from (a) used to live:
    yes > junk
    and let it run until the filesystem is completely full. Why "as root"? Because the last 10% of the actual free space on each filesystem is reserved for root. (See "tunefs".) This allows root user to manipulate the filesystem and recover from some space exhaustion problems -- even when the filesystem appears to be "full" from the viewpoint of end users.

    c. Of course, "yes > junk" is rather simple-minded and relatively slow - something that did block writes would run a heck of a lot faster. So for example, you might want to use something a notch more sophisticated, along these general lines:
    touch junk
    while (1)
    dd if=/some/big/file/full/of/crud bs=20k >> junk
    end

    to do 20K writes. This should run considerably faster, and of course you could also do your variant of this with shell, perl, C, python, whatever you wish. The general idea though, is that you want to force the system to allocate every (currently) free block so that you can scribble on it. This should put recovery of the data beyond the ability of most people.

NVidia drivers for the 'Aldi' Medion 8800

Linux

In my first post about Linux on the Medion 8800, I noticed that the Debian/unstable drivers for the NVidia card wouldn't load, bailing out with the error message Unknown symbol register_ioctl32_conversion. Using the experimental nvidia-7676 drivers, everything compiled nicely, and the module loaded without any problem. If X.org refuses to start, spewing out a message about not being able to find the module, that's because you need the nvidia-glx package.

Linux on the 'Aldi' Medion MD8800

Linux

The Aldi Medion MD8800 is a multimedia PC containing

  • A Pentium D 830 64bit dualcore processor
  • 1 Gig RAM
  • wireless mouse and keyboard
  • a wireless LAN card
  • a NVidia Geforce 6700 XL card
  • a 250 Gig SATA disk
  • a Philips SAA7134 TV card
  • Windows XP (32 bit) preinstalled...

Most of the config setup can be found at Martins site.

The machine is completely geared and configured towards Windows XP, but which new machine isn't nowadays ? I noticed the XP install contains MPlayer and a program called Power Cinema Linux, which has nothing to do with Linux itself, so I'm wondering if there's some copyright or trademark violated here. It was the first time I used Windows XP for a day or two, looks nice, but it seemed continuously like I was driving a Ferrarri in first gear. How sweet the system would be running a complete 64bit OS on it. Time to fetch the Linux install CDROMs...

I chose to install a Debian 64 bit version on it. For AMD64 and Pentium EMT64 (x86-64) processors, you need the Debian amd64 port (ia64 is the port intended for Itanium). I used the Debian Sarge amd64 netinst iso, but that refused to detect the SATA disk. Using the updated netinst iso from Lennart Sorensen, with an updated 2.6.12 kernel, fixed the problem eventually, though the installer detected the disks only after loading the ata-piix module.

There's a price running a 64 bit system, and that is that you can't run 32bit applications, and unfortunately, Openoffice is some of them... for the rest, all the software I use, is available in 64bit version.

Update : I run Ubuntu 32bit now.

Kernel
I tried to build myself a stock 2.6.14 kernel, using the /boot/config file, but that one paniced while trying to mount the root fs, and I didn't have any time to investigate this problem any further. There's a 2.6.14-smp image for p4 based systems in the Debian archive, which I use now. The dualcore is nicely detected as a two-processor system.

Sound
The onboard soundcard doens't reveal itself with a 'lspci -v', so this took me a little time; the soundcard is a Trident 3D Wave, so use the trident driver. The /dev/dsp device gets activated through the snd-pcm-oss module.

Keyboard
Works without problem as a USB mouse and keyboard. While powering up the machine, the mouse refused to work, but that's because you need to charge the batteries first with the USB cable. I installed the hotkeys package in order to use the multimedia keys from the Medion keyboard. Works great with a little fiddling (you need to remap some of the application startup keys).

CD- and DVD Writer
Works without problem. The DVD drives are detected as hda and hdb.

NVIdia
I use the 'nv' xorg driver. I tried to build the Debian nvidia driver from source, but that gives unresolved symbols while loading the module. Seems a global problem in Debian, though...
Using the experimental nvidia-7676 drivers, everything compiled nicely, and the module loaded without any problem. If X.org refuses to start, spewing out a message about not being able to find the module, that's because you need the nvidia-glx package.

TV Card
See Gentoo documentation for the SAA7134 driver.
update : use these options while loading the module
modprobe saa7134 i2c_scan=1 card=55 oss=1
Linux-2.6.19 will provide a better driver for this card...

Remote control
You should use the ati_remote kernel module, or use the lirc ati_usb module. You'll need to define a .Xmodmap file to remap most of the keys, though.

WLAN card
yet untested, though the driver detects the Ralink card. Probably supported with the rt2400 module.

Firewire
untested

Functional display
Works, but not out of the box. You need lcdproc-0.5.1 or higher, since that version contains the MD8800 support.

Cardreader
Only USB ports work, Compact Flash and SD card slots do not work out of the box.

I will try to update this post whenever I get additional info how to tweak some settings...

Xscreensaver

Linux

There are some programs which I really like. When I started university, we had on the university mainframe access to something called ArpaNet, some worldwide network between universities, and which would later evolve into the Internet. The university mainframe had an interesting FTP cache of different programs, and one of these was Moria. I just had discovered Tolkien, and quickly I rolled into the world of Dungeons & Dragons, and its kin. Moria was one of the roguelike games, a world where the goal was to plunge into the deep caverns of Khazad-Dhum, and fight the Balrog. Moria had different alternatives, the most common were NetHack, Omega and of course Zangband. I must have wasted thousand hours playing Moria.

Another program was Fractint. In 1988, I received my first computer, an 8 MHz XT machine. It came with a diskette with QW-Basic, and some months later I had written my first fractal generator. It took one minute in high zoom mode to draw a pixel, and delivered head-ache causing green-and-black pictures. Fractint was a freeware program that had the revolutionary idea of using integers to compute the fractals, instead of floating point numbers, which made it blazingly fast. Fractint is called Xaos nowadays.

The program which many people play with first when using a Linux machine, must be XScreenSaver. It has tens of different modes, which are added on a regular base, which produce each a screensaver image with many different tuning parameters, good for hours of fun. Xscreensaver now has 233 modes, and every time an apt-get dist-upgrade brings a new version on my PC, the first thing I do, is check out the new modes. I just discovered Timetunnel, which draws an animation similar to the opening and closing effects on the Dr. Who television show. Very hypnotizing indeed.

Pages

Subscribe to RSS - Linux