Posted by: isaraffee | April 10, 2010

Setting IP address on Ubuntu

Setting IP address on Ubuntu

To set a temporary IP address on Ubuntu type

# ifconfig eth0 172.16.0.2 netmask 255.255.0.0 broadcast 172.16.255.255 up

Verify the network connections.

# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:16:d3:43:12:02

inet addr:172.16.0.2 Bcast:172.16.255.255 Mask:255.255.0.0

inet6 addr: fe80::216:d3ff:fe43:1202/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

<output truncated for brevity>

Test the configuration by pinging its IP address

root@ismail-laptop:~# ping 172.16.0.2

PING 172.16.0.2 (172.16.0.2) 56(84) bytes of data.

64 bytes from 172.16.0.2: icmp_seq=1 ttl=64 time=0.054 ms

64 bytes from 172.16.0.2: icmp_seq=2 ttl=64 time=0.039 ms

^C

— 172.16.0.2 ping statistics —

2 packets transmitted, 2 received, 0% packet loss, time 999ms

rtt min/avg/max/mdev = 0.039/0.046/0.054/0.010 ms

This IP address will be gone once you reboot the machine. To set the IP address permanently follow these steps.

Setting IP address on Ubuntu via Configuration file

If the Ubuntu Server installer has set your server to use DHCP, you will want to change it to a static IP address so that people can actually use it.

Changing this setting without a GUI will require some text editing, but that’s classic linux, right?

Let’s open up the /etc/network/interfaces file. I’m going to use vi, but you can choose a different editor

sudo vi /etc/network/interfaces

For the primary interface, which is usually eth0, you will see these lines:

auto eth0
iface eth0 inet dhcp

As you can see, it’s using DHCP right now. We are going to change dhcp to static, and then there are a number of options that should be added below it. Obviously you’d customize this to your network.

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

The auto directive identifies the network interface to be configured, in this case the loopback adapter as noted by the lo label.

Auto lo

Without the auto directive, the specifiied interface is not activated the next time you type the /etc/init.d/networking restart or the ifup -a commands.

iface lo inet loopback

The auto lo directive also need the directive shown above. The iface directuve applies Ipv4 networking as defined by the inet directive (Ipv6 would be configured with inet6), along with the loopback address, to the loopback adapter lo.

If you are using DNS to resolve IP addresses to machine names, you may want to add the DNS server (name servers) by editing the resolv.conf file:

sudo vi /etc/resolv.conf

On the line ‘nameserver xxx.xxx.xxx.xxx’ replace the x with the IP of your name server.

Now we’ll just need to restart the networking components:

sudo /etc/init.d/networking restart

Posted by: isaraffee | April 10, 2010

Viewing Network Interface in Ubuntu

Viewing the Network Interface

On the Ubuntu host, type:

root@ismail-laptop:~# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:16:d3:43:12:02

inet6 addr: fe80::216:d3ff:fe43:1202/64 Scope:Link

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:9 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:0 (0.0 B) TX bytes:1494 (1.4 KB)

Interrupt:20 Base address:0xa000

Posted by: isaraffee | February 15, 2010

Exploring WINE in Ubuntu Jaunty

Exploring WINE in Ubuntu Jaunty

Wine lets you run Windows software on other operating systems. With Wine, you can install and run these applications just like you would in Windows.

Install WINE via the Add/Remove Applications program.

Configure WINE by typing

root@ismail-laptop:~# winecfg

Simply accept the default values.

Launch WINE via that Applications menu.

You can run cmd.exe and type the DOS commands like you would in Windows.

Below are some screenshots of WINE in action

Launching WINE

WINE in action

Posted by: isaraffee | February 14, 2010

lspci,lsusb,lshal,lshw

lspci,lsusb,lshal,lshw

The abovementioned commands are useful if you are troblehooting or simply you want to know your hardware details

The output are very lengthy. I just run one of the commands i.e. lshw

#lshw > lshw.txt

I redirect the output to a text file

# more lshw.txt
ismail-laptop
description: Notebook
product: TravelMate 2440
vendor: Acer
version: 0100
serial: LXTCZ0509062805E5B2000
width: 32 bits
capabilities: smbios-2.4 dmi-2.4 smp-1.4 smp
configuration: boot=oem-specific chassis=notebook cpus=1 uuid=9ADA6D80-131B-
11DB-A84D-A46231C00A51
*-core
description: Motherboard
product: Garda5
vendor: Acer
physical id: 0
version: Rev
serial: LXTCZ0509062805E5B2000
slot: M2
*-firmware
description: BIOS
vendor: Phoenix Technologies LTD
physical id: 0
version: V1.03 (06/27/06)
size: 100KiB
capacity: 960KiB
capabilities: isa pci pcmcia pnp apm upgrade shadowing escd cdboot acp
i usb
*-cpu
description: CPU
product: Intel(R) Celeron(R) M CPU        410  @ 1.46GHz
vendor: Intel Corp.
physical id: 4
bus info: cpu@0
version: 6.14.8
serial: 0000-06E8-0000-0000-0000-0000
slot: U23
size: 1460MHz
capacity: 2048MHz
width: 32 bits
clock: 133MHz
capabilities: boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8
apic sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx
constant_tsc up arch_perfmon bts pni monitor tm2 xtpr pdcm
*-cache:0
description: L1 cache
physical id: 5
slot: L1 Cache
size: 16KiB
capacity: 16KiB
capabilities: asynchronous internal write-back
*-cache:1
description: L2 cache
physical id: 6
slot: L2 Cache
size: 1MiB
capacity: 1MiB
capabilities: burst internal write-back
*-memory
description: System Memory
physical id: c
slot: System board or motherboard
size: 2GiB
capacity: 2GiB
*-bank:0
description: DIMM Synchronous
physical id: 0
slot: M1
size: 2GiB
width: 64 bits
*-bank:1
description: DIMM Synchronous [empty]
physical id: 1
slot: M2
*-pci
description: Host bridge
product: ATI Technologies Inc
vendor: ATI Technologies Inc
physical id: 100
bus info: pci@0000:00:00.0
version: 01
width: 32 bits
clock: 66MHz
configuration: latency=64
*-pci:0
description: PCI bridge
product: RS480 PCI Bridge
vendor: ATI Technologies Inc
physical id: 1
bus info: pci@0000:00:01.0
version: 00
width: 32 bits
clock: 66MHz
capabilities: pci bus_master cap_list
*-display UNCLAIMED
description: VGA compatible controller
product: RC410 [Radeon Xpress 200M]
vendor: ATI Technologies Inc
physical id: 5
bus info: pci@0000:01:05.0
version: 00
width: 32 bits
clock: 66MHz
capabilities: pm msi bus_master cap_list
configuration: latency=66 mingnt=8
*-pci:1
description: PCI bridge
product: RS480 PCI Bridge
vendor: ATI Technologies Inc
physical id: 4
bus info: pci@0000:00:04.0
version: 00
width: 32 bits
clock: 33MHz
capabilities: pci pm pciexpress msi ht bus_master cap_list
configuration: driver=pcieport-driver
*-pci:2
description: PCI bridge
product: RS480 PCI Bridge
vendor: ATI Technologies Inc
physical id: 6
bus info: pci@0000:00:06.0
version: 00
width: 32 bits
clock: 33MHz
capabilities: pci pm pciexpress msi ht bus_master cap_list
configuration: driver=pcieport-driver
*-usb:0
description: USB Controller
product: IXP SB400 USB Host Controller
vendor: ATI Technologies Inc
physical id: 13
bus info: pci@0000:00:13.0
version: 80
width: 32 bits
clock: 66MHz
capabilities: msi bus_master cap_list
configuration: driver=ohci_hcd latency=64
*-usb:1
description: USB Controller
product: IXP SB400 USB Host Controller
vendor: ATI Technologies Inc
physical id: 13.1
bus info: pci@0000:00:13.1
version: 80
width: 32 bits
clock: 66MHz
capabilities: msi bus_master cap_list
configuration: driver=ohci_hcd latency=64
*-usb:2
description: USB Controller
product: IXP SB400 USB2 Host Controller
vendor: ATI Technologies Inc
physical id: 13.2
bus info: pci@0000:00:13.2
version: 80
width: 32 bits
clock: 66MHz
capabilities: pm msi bus_master cap_list
configuration: driver=ehci_hcd latency=64 module=ehci_hcd
*-serial
description: SMBus
product: IXP SB400 SMBus Controller
vendor: ATI Technologies Inc
physical id: 14
bus info: pci@0000:00:14.0
version: 83
width: 32 bits
clock: 66MHz
configuration: driver=piix4_smbus latency=0 module=i2c_piix4
*-ide
description: IDE interface
product: IXP SB400 IDE Controller
vendor: ATI Technologies Inc
physical id: 14.1
bus info: pci@0000:00:14.1
logical name: scsi0
version: 80
width: 32 bits
clock: 66MHz
capabilities: ide msi bus_master cap_list emulated
configuration: driver=pata_atiixp latency=64
*-disk
description: ATA Disk
product: TOSHIBA MK6034GA
vendor: Toshiba
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: AC10
serial: 56DZ0749T
size: 55GiB (60GB)
capabilities: partitioned partitioned:dos
configuration: ansiversion=5 signature=0005b174
*-volume:0
description: EXT3 volume
vendor: Linux
physical id: 1
bus info: scsi@0:0.0.0,1
logical name: /dev/sda1
logical name: /
version: 1.0
serial: bf44916d-b656-46ff-9fa0-970a1f6248af
size: 33GiB
capacity: 33GiB
capabilities: primary journaled extended_attributes large_fil
es ext3 ext2 initialized
configuration: created=2009-07-14 20:31:27 filesystem=ext3 mo
dified=2010-02-14 11:26:24 mount.fstype=ext3 mount.options=rw,relatime,errors=re
mount-ro,data=ordered mounted=2010-02-14 10:07:28 state=mounted
*-volume:1
description: Windows NTFS volume
physical id: 2
bus info: scsi@0:0.0.0,2
logical name: /dev/sda2
logical name: /media/mywinxp
version: 3.1
serial: 70e1cfb6-0061-0545-b8eb-bbd9e5562e4a
size: 19GiB
capacity: 19GiB
capabilities: primary bootable ntfs initialized
configuration: clustersize=4096 created=2009-07-15 05:30:29 f
ilesystem=ntfs mount.fstype=fuseblk mount.options=rw,nosuid,nodev,user_id=0,grou
p_id=0,allow_other,blksize=4096 state=mounted
*-volume:2
description: Extended partition
physical id: 3
bus info: scsi@0:0.0.0,3
logical name: /dev/sda3
size: 2384MiB
capacity: 2384MiB
capabilities: primary extended partitioned partitioned:extend
ed
*-logicalvolume
description: Linux swap / Solaris partition
physical id: 5
logical name: /dev/sda5
capacity: 2384MiB
capabilities: nofs
*-cdrom
description: DVD reader
product: RW/DVD GCC-4244N
vendor: HL-DT-ST
physical id: 0.1.0
bus info: scsi@0:0.1.0
logical name: /dev/cdrom
logical name: /dev/cdrw
logical name: /dev/dvd
logical name: /dev/scd0
logical name: /dev/sr0
version: 1.00
capabilities: removable audio cd-r cd-rw dvd
configuration: ansiversion=5 status=nodisc
*-multimedia
description: Audio device
product: IXP SB4x0 High Definition Audio Controller
vendor: ATI Technologies Inc
physical id: 14.2
bus info: pci@0000:00:14.2
version: 01
width: 64 bits
clock: 33MHz
capabilities: pm msi bus_master cap_list
configuration: driver=HDA Intel latency=64 module=snd_hda_intel
*-isa
description: ISA bridge
product: IXP SB400 PCI-ISA Bridge
vendor: ATI Technologies Inc
physical id: 14.3
bus info: pci@0000:00:14.3
version: 80
width: 32 bits
clock: 66MHz
capabilities: isa bus_master
configuration: latency=0
*-pci:3
description: PCI bridge
product: IXP SB400 PCI-PCI Bridge
vendor: ATI Technologies Inc
physical id: 14.4
bus info: pci@0000:00:14.4
version: 80
width: 32 bits
clock: 66MHz
capabilities: pci bus_master
*-pcmcia
description: CardBus bridge
product: CB1410 Cardbus Controller
vendor: ENE Technology Inc
physical id: 0
bus info: pci@0000:0a:00.0
version: 01
width: 32 bits
clock: 33MHz
capabilities: pcmcia bus_master cap_list
configuration: driver=yenta_cardbus latency=176 maxlatency=5 min
gnt=193 module=yenta_socket
*-network:0
description: Ethernet interface
product: RTL-8139/8139C/8139C+
vendor: Realtek Semiconductor Co., Ltd.
physical id: 1
bus info: pci@0000:0a:01.0
logical name: eth0
version: 10
serial: 00:16:d3:43:12:02
size: 100MB/s
capacity: 100MB/s
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list ethernet physical tp mii 10
bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=8139too d
riverversion=0.9.28 duplex=full ip=172.16.0.2 latency=64 link=yes maxlatency=64
mingnt=32 module=8139too multicast=yes port=MII speed=100MB/s
*-network:1
description: Wireless interface
product: AR2413 802.11bg NIC
vendor: Atheros Communications Inc.
physical id: 6
bus info: pci@0000:0a:06.0
logical name: wifi0
version: 01
serial: 00:16:ce:6c:ae:b3
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list logical ethernet physical w
ireless
configuration: broadcast=yes driver=ath_pci latency=168 maxlaten
cy=28 mingnt=10 module=ath_pci multicast=yes wireless=IEEE 802.11g
*-scsi
physical id: 1
bus info: usb@1:5
logical name: scsi10
capabilities: emulated scsi-host
configuration: driver=usb-storage
*-disk
description: SCSI Disk
physical id: 0.0.0
bus info: scsi@10:0.0.0
logical name: /dev/sdb
size: 7751MiB (8127MB)
capabilities: partitioned partitioned:dos
configuration: signature=52078c8a
*-volume
description: Windows FAT volume
vendor: MSDOS5.0
physical id: 1
bus info: scsi@10:0.0.0,1
logical name: /dev/sdb1
logical name: /media/TOSHIBA
version: FAT32
serial: a0ce-4f64
size: 7743MiB
capacity: 7747MiB
capabilities: primary bootable fat initialized
configuration: FATs=2 filesystem=fat mount.fstype=vfat mount.opt
ions=rw,nosuid,nodev,fmask=0077,dmask=0077,codepage=cp437,iocharset=iso8859-1,sh
ortname=mixed,utf8,flush state=mounted
*-battery
physical id: 1
slot: Left Front
*-network DISABLED
description: Ethernet interface
physical id: 2
logical name: pan0
serial: a2:e4:41:5e:c8:8c
capabilities: ethernet physical
configuration: broadcast=yes driver=bridge driverversion=2.3 firmware=N/A
link=yes multicast=yes

Posted by: isaraffee | February 14, 2010

Accessing Windows Files from Ubuntu

Accessing Windows Files from Ubuntu

To see where your Windows partitions are type:

# fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes

255 heads, 63 sectors/track, 7296 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x0005b174

Device Boot Start End Blocks Id System

/dev/sda1 1 4391 35270676 83 Linux

/dev/sda2 * 4392 6992 20892532+ 7 HPFS/NTFS

/dev/sda3 6993 7296 2441880 5 Extended

/dev/sda5 6993 7296 2441848+ 82 Linux swap / Solaris

From the above output, we see that the NTFS partitions is at /dev/sda2.

Next create a mount point for the Windows partitions. You have to make a directory at /media directory.

root@ismail-laptop:~# cd /media/

root@ismail-laptop:/media# mkdir mywinxp

Now you need to edit the /etc/fstab to add the mount point of the Windows partition. It’s a good practice to make a copy of the file should anything happen to the original file.

root@ismail-laptop:~# cp -p /etc/fstab /etc/fstab.bak

root@ismail-laptop:~# vi /etc/fstab

Add the following line

/dev/sda2 /media/mywinxp ntfs users,rw,owner,umask=000 0 0

Save and quit. Then you need to reload the /etc/fstab to enable the partitions. Type:

#mount -a

If you don’t want to edit the /etc/fstab file, you can also type:

root@ismail-laptop:~# mount /dev/sda2 /media/mywinxp/

This will mount the Windows partitions but it is not permanent. Once you reboot your Linux, the Windows partitions will not be mounted automatically. You will have to manually mount it again.

Type mount to see the partitions that are mounted. In this example, the last line shows that the Windows partitions are mounted at /media/mywinxp.

root@ismail-laptop:~# mount

/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)

tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)

proc on /proc type proc (rw,noexec,nosuid,nodev)

sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)

varrun on /var/run type tmpfs (rw,nosuid,mode=0755)

varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)

udev on /dev type tmpfs (rw,mode=0755)

tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)

fusectl on /sys/fs/fuse/connections type fusectl (rw)

lrm on /lib/modules/2.6.28-13-generic/volatile type tmpfs (rw,mode=755)

securityfs on /sys/kernel/security type securityfs (rw)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)

/dev/sda2 on /media/mywinxp type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)

Now let’s access the Windows files.

root@ismail-laptop:~# cd /media/mywinxp/

root@ismail-laptop:/media/mywinxp# ll -rt

total 2095457

-rwxrwxrwx 1 root root 47564 2004-08-04 06:38 NTDETECT.COM

-rwxrwxrwx 1 root root 250032 2004-08-04 06:59 ntldr

drwxrwxrwx 1 root root 4096 2009-07-15 02:56 System Volume Information

drwxrwxrwx 1 root root 0 2009-07-15 04:29 temp

drwxrwxrwx 1 root root 0 2009-07-15 05:16 RECYCLER

-rwxrwxrwx 1 root root 210 2009-07-15 05:36 boot.ini

drwxrwxrwx 1 root root 8192 2010-02-01 12:12 Program Files

drwxrwxrwx 1 root root 4096 2010-02-01 17:54 Documents and Settings

-rwxrwxrwx 1 root root 2145386496 2010-02-11 22:31 pagefile.sys

drwxrwxrwx 1 root root 40960 2010-02-11 23:10 WINDOWS

Yes we can list the Windows files. You can also use the file manager, Nautilus to access the files.

An icon on the Destop will also appear

Accessing Windows XP files from Linux

To umount the Windows partition, type:

root@ismail-laptop:/media/mywinxp# cd
root@ismail-laptop:~# umount /media/mywinxp/

Posted by: isaraffee | February 13, 2010

Configuring X Using xorgconfig in Slackware 12

Configuring X Using xorgconfig in Slackware 12

In this exercise I will reconfigure my screen resolution of my Slackware 12 using the text-based program xorgconfig. My linux box has a Pentium 3 550Mhz CPU, 355MB RAM and a 2MB VGA card. Yes don’t be suprised it’s a 2 MEGA BYTE VGA.Well don’t ask me how I get this old VGA card. Anyway the motherboard has a onboard VGA memory of 32MB. Again don’t ask me why I rather to use the 2MB VGA card instead of the onboard 32MB VGA chip. Logical sense should tell you to toss away the 2MB VGA card. Hey but again, this posting is about configure X and with a twist. Its title should read “Configuring X Using xorgconfig in Slackware 12 with an old 2MB VGA Card”

Before you start, you may want to and in fact you should google and find the technical specifications of your monitor. Things to take note are the horizontal and vertical refresh frequency. Horizontal scanning is in kHz and vertical refresh is in Hz.

Needs editing

Color depth is the amount of memory used to represent a color. “bpp” stands for “bits per pixel”. With 8bpp you can represent 256 colors, 24bpp allows millions of colors to be displayed

# xrandr -q

The number of distinct colors that can be represented by a piece of hardware or software. Color depth is sometimes referred to as bit depth because it is directly related to the number of bits used for each pixel. A 24-bit video adapter, for example, has a color depth of 2 to the 24th power (about 16.7 million) colors. One would say that its color depth is 24 bits.

Color depth is also referred to as bits per pixel (bpp).

Resolution and color depth are intimately tied together in a monitor’s display. The amount you can have of each is dependant on the amount of video memory that your video card has. Note that video memory is different than regular system ram memory or hard drive memory. Naturally, higher resolution and deeper color depth require more video memory. If you have at least 2 megabytes of video memory on your video card, you should be able to run 24-bit true color at 800 x 600 resolution, if your monitor supports it

Resolution 4 Bits 8 Bits 16 Bits 24 Bits 32 Bits
320×200 0.03 (256 KB) 0.06 (256 KB) 0.12 (256 KB) 0.18 (256 KB)
640×480 0.15 (256 KB) 0.29 (512 KB) 0.59 (1 MB) 0.88 (1 MB) 1.17 (2 MB)
800×600 0.46 (512 KB) 0.92 (1 MB) 1.37 (2 MB) 1.83 (2 MB)
1024×768 0.75 (1 MB) 1.50 (2 MB) 2.25 (4 MB) 3.00 (4 MB)
1280×1024 1.25 (2 MB) 2.50 (4 MB) 3.75 (4 MB) 5.00 (6 MB)
1600×1200 1.83 (2 MB) 3.66 (4 MB) 5.49 (6 MB) 7.32 (8 MB)
Posted by: isaraffee | February 12, 2010

How to format hard disk using Linux fdisk

How to format hard disk using Linux fdisk

Picture this scenario; you have an extra hard disk which you want to format it with fat 32 LBA, ext2, or other filesystems, using your Linux fdisk command.

This exercise requires you o have a Linux box and yes you will need to open your chassis and look for the IDE cable. Make sure you do this with the power switch off.

Connect the extra hard disk as a slave. You will need to check for jumpers in the extra hard disk.

In my case I disconnect my DVD drive and connect the cable to it. This way my extra hard disk will be detected as a slave.

When you have done with the hard disks connections, power up the Linux box, and check that the CMOS detected both hard disk and that the primary and save hard disks are detected.

After you have logged in to your LInux box )in my case it’s slackware 12), open a terminal console and type

fdisk -l

And yes you need to be root user.

You will see entries like these

/dev/hda <– this is your main hard disk, you don’t want to format this

the other entry will be like this

/dev/hdb or /dev/hdc , it’s all depends how you connect your extra hard disk.

Let’s say your extra hard disk is stated as /dev/hdc, to go to the formating menu and prepare for the hard disk to be formatted, type:

fdisk /dev/hdc

Don’t worry this won’t format your hard disk yet.

You will be presented with a menu. To go to the menu at any point type m and to quit without saving type q.

First create a partition by typing n. You will need to set the first and the last cylinder. In my case, I just except the default suggested values.

Next type p to view the partition that you have created. You will see that he default partition type is Linux’s ext filesystem. This is denoted by the number 83.

Now let’s day you want to change the filesystem from Linux to FAT32 LBA. Why well maybe you want to preapre this hard disk to be installed with Windows XP or something like that.

So to change the file system type at the meny, type t.

Then type c to change the filesystems to FAT32 LBA. You can see a whole list of file systems by typing L, I think. Anyway just see the menu screen.

To commit the changes, type w (for writing). Afer that quit the program by typing q.

Now reboot your computer and after reboot you can verify that the newly formated hard disk by typing:

fdsik -l

Take note of the partition type. Now in my case, I powered down the computer, took out the newly formatted hard disk and put it to another PC to install a different OS.Guess what, yes, Windows XP.

Posted by: isaraffee | February 12, 2010

How to find memory size of VGA card

How to find memory size of VGA card

Sometime you need to know the memory size of your vga card. This is needed if you are replacing your vga card, or you need to reconfigure the resolution by editing the /etc/X11/xorg.conf file. In some Linux distributions, like Slackware here is the xorgconfig program which you can use instead of editing the xorg.conf file. Whichever methiod you choose, you need to know the memory of your vga card. In Linux you can type lspci and look for the VGA card entry. You will need to take note of the hexadecimal value at the left most column. With this hexadecimal value, you will type the comand:

lspci -v -s <hexadecimal value>

Do not include the greater than and the smaller than brackets when executing the command. The output will show you the memory size of your VGA card.

If you want to confirm this what you can do is to install the VGA card in XP and you can go to Start then Run and type in the term dxdiag and then click OK. A popup screen for DirectX will open. Go to the Display tab and look at the left side. You will find your video card or chips and the memory amount. Another way is to right click your desktop select properties at the display properties box select the settings tab click the advanced button, select the adapter tab

Posted by: isaraffee | February 9, 2010

Configuring FTP in Slackware 12.0

Configuring FTP in Slackware 12.0

To explore ftp you will need a ftp client and ftp server. If you do not have two hosts i.e. one will act as a ftp client and the other the ftp server, you can still experiment with ftp because a host can be configured as a ftp client and ftp server.

In this section I will be configuring my slackware as a ftp client and ftp server.

Configuring the ftp client

Firstly let’s configure it as a ftp client. There is not much to configure. You will need to check that you have the ftp client program. Type :

# which ftp

/bin/ftp

Configuring the ftp server

You will check if the ftp server is installed. Most of the time I use proftp as a ftp server. Let’s check if it is install, One way to check is to type:

# which proftpd

/usr/sbin/proftpd

Another command line that will launch the package manager is to type:

# pkgtool

The other way is to use GUI I.e. the Kpackage. Once in Kpackage search for the program name.

If you have slapt-get installed, you can type:

root@galaxy:~# slapt-get –list | grep proftp

Failed to open package_data

package_data: No such file or directory

Perhaps you want to run –update?

proftpd-1.3.0a-i486-1 [inst=yes]: proftpd (FTP server daemon)

If it is not installed, you will need to download it from the Internet and install it. For example, type:

# installpkg programname.tgz

Now let’s check if the proftpd server service is running.

root@galaxy:~# ps -ef|grep ftp

root 3868 3412 0 06:49 pts/1 00:00:00 grep ftp

It’s not running. To start the proftpd server, tpe:

This is the default proftpd configuration file:

root@galaxy:/etc# more proftpd.conf | grep -v “^#”

ServerName “ProFTPD Default Installation”

ServerType inetd

DefaultServer on

Port 21

Umask 022

MaxInstances 30

User nobody

Group nogroup

SystemLog /var/log/proftpd.log

TransferLog /var/log/xferlog

<Directory /*>

AllowOverwrite on

</Directory>

<Anonymous ~ftp>

RequireValidShell off

User ftp

Group ftp

# We want clients to be able to login with “anonymous” as well as “ftp”

UserAlias anonymous ftp

# Limit the maximum number of anonymous logins

MaxClients 50

# We want ‘welcome.msg’ displayed at login, and ‘.message’ displayed

# in each newly chdired directory.

DisplayLogin welcome.msg

DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot

<Limit WRITE>

DenyAll

</Limit>

# An upload directory that allows storing files but not retrieving

# or creating directories.

</Anonymous>

To run proftpd as a standalone, edit the configuration file by making sure that the value for the ServerType reads Standalone and not inetd.

REstart inetd

root@galaxy:~# more /var/run/inetd.pid

3132

root@galaxy:~# kill -9 3132

root@galaxy:~# ps -ef|grep inetd

root 3996 3427 0 07:20 pts/3 00:00:00 grep inetd

root@galaxy:~# inetd

root@galaxy:~# ps -ef|grep inetd

root 3998 1 0 07:20 ? 00:00:00 inetd

root 4000 3427 0 07:20 pts/3 00:00:00 grep inetd

root@galaxy:~#

root@galaxy:~#

root@galaxy:~# proftpd

– IPv6 getaddrinfo ‘localhost’ error: Name or service not known

Start proftpd and ftp

root@galaxy:/var/log# ftp 127.0.0.1

Connected to 127.0.0.1.

220 ProFTPD 1.3.0a Server (ProFTPD Default Installation) [::ffff:127.0.0.1]

Name (127.0.0.1:root): root

331 Password required for root.

Password:

530 Login incorrect.

Login failed.

Remote system type is UNIX.

Using binary mode to transfer files.

ftp>

Logs

root@galaxy:/var/log# tail -f proftpd.log

Sep 18 07:21:08 galaxy proftpd[4003] localhost: error setting IPV6_V6ONLY: Protocol not available

Sep 18 07:21:08 galaxy proftpd[4003] localhost: ProFTPD 1.3.0a (stable) (built Tue Apr 10 16:31:07 CDT 2007) standalone mode STARTUP

Sep 18 07:21:15 galaxy proftpd[4005] localhost (localhost[::ffff:127.0.0.1]): error setting IPV6_V6ONLY: Protocol not available

Sep 18 07:21:15 galaxy proftpd[4005] localhost (localhost[::ffff:127.0.0.1]): FTP session opened.

Sep 18 07:21:25 galaxy proftpd[4005] localhost (localhost[::ffff:127.0.0.1]): SECURITY VIOLATION: root login attempted.

Mounting Thumbdrive in Slackware 12.0 – The Security policy error

A security policy in place prevents mounting of volumes.

If you happen to access a CD-ROM device or USB device which results in the following error:

A security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface “org.freedesktop.Hal.Device.Volume” member “Mount” error name “(unset)” destination “org.freedesktop.Hal”)

Is essence, you need to add your user to the plugdev and cdrom groups to be able to automount devices.

Before adding:

root@galaxy:/etc/rc.d# id

uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy)

root@galaxy:/etc/rc.d# groups

root bin daemon sys adm disk wheel floppy

After adding:

root@galaxy:/var/log# id

uid=0(root) gid=0(root) groups=0(root),19(cdrom),83(plugdev)

root@galaxy:/var/log# groups

root cdrom plugdev

After reboot when I ran the groups command it shows that root belongs to only 3 groups instead of the previous 8 groups. So I added the groups to root:

root@galaxy:/var/log# usermod -G bin,daemon,sys,adm,wheel,floppy,plugdev,cdrom root

root@galaxy:/var/log# groups

root cdrom plugdev

But again do not rely on the groups command output. Reboot your system again.

Do not rely on the output of the groups and id command. After you have added the user to the plugdev and cdrom groups, reboot your system. Restarting the hal daemon would not help.

Note:

Once I added the root to the cdrom and plugdev groups, I can no longer access the Internet. To access the Internet again remove the root from the cdrom and plugdev groups

root@galaxy:/var/log# usermod -G bin,daemon,sys,adm,wheel,floppy root.

« Newer Posts - Older Posts »

Categories