Saturday, September 8, 2007

Opening freebsd partition under GUI environment

Previously, I've ever write a note when trying to mount freebsd filesystem using command line. This note just a modified version from that one. while you trying to mount freebsd partition using file manager under desktop environment (GNOME or KDE) in linux, there is an error message showed up. It's look like a message if I mount it under command line using mount tool.

Device manager feature which came with GNOME or KDE is trying to mount freebsd partition using read-write mode instead of read-only mode. But in most linux distro, an ufs module inside kernel doesn't compiled as read-write mode by default because it is still DANGEROUS. Eventhough i've ever try it successful.

Not only that, a default ufstype's option which passed to mount ufs filesystems is old. File manager try to mount the partition using old type instead of ufs2 which is not supported for mounting freebsd native filesystem (UFS/FFS). if you want to mount a partition under GUI (desktop) environment maybe this example bellow can help. Just put this line into /etc/fstab file:
e.g.
/dev/hda2 /media/hda2 ufs user,noauto,ro,ufstype=ufs2 0 0

note:
- /dev/hda2: which is your freeBSD partition
- In the option column from that line is defined to force mounting option to use read-only mode and ufs2 as ufstype.

Friday, August 10, 2007

An interactive linux kernel map


For people who wants to know what is inside linux kernel, maybe this map is helpful. This is a map that explain a lot of how kernel works. An author said it could navigated similar to google map. All indetifier on the map are linked to the LXR, a toolset for indexing and presenting linux source code. Either you can view an online version or buy the poster from that map.
Link site: http://www.linuxdriver.co.il/kernel_map

Monday, July 30, 2007

Install Slackware from ISO file with grub or lilo

pre-requirement:
- already have Linux or BSD-based (FreBSD) system installed on harddisk before using grub or lilo as bootloader.
- Slackware's iso image on your harddisk.
- at least one partition prepared for your slackware system

Here are step by step:
1. Extract kernel and initramfs image's file (initrd.img) that come from slackware's iso image (you can mount it first to get both file). The location for kernel file is in /kernel directory and initramfs file is in /isolinux directory. Then, copy both file into /boot directory in your linux/FreeBSD system.

2. Configure your linux/FreeBSD grub or lilo for including slackware's kernel and initramfs file (initrd.img).
Add this entry into /boot/grub/menu.lst if using grub:
title Slackware-12.2 Install
kernel /boot/[your-slackware-kernel]
initrd /boot/[your-initramfs-file]
quiet

simply add this entry into /etc/lilo.conf if using lilo:
image=/boot/[your-slackware-kernel]
label=Slackware-12.2
initrd=/boot/[your-initramfs-file]
read-only


you need to update the configuration because lilo doesn't update that information automatically.
Run this command on your console:
lilo -v -v

3. Restart your pc/laptop to boot into slackware installation entry in your bootloader menu. Before you start to type "setup", make sure you already mount an iso file. If your slackware's iso image on /dev/hda2, then mount that device first before mount an iso. Assumed /dev/hda2 is a location of an iso file than mount it into a directory first. Here are a step by step:
cd /
mkdir hda2
mount /dev/hda2 /hda2
mkdir iso
mount -o loop -t iso9660 /hda2/[your-slackware-iso].iso /iso


4. now you can run setup. When prompted to select source media, choose an option to install from a pre-mounted directory. don't forget to add "slackware" directory when you insert into a pre-mounted directory column.
e.g: /iso/slackware

5. you can continue doing installation activity as usual.

There are another option for booting both kernel and initramfs file. You can use Loadlin from DOS or use Grub4Dos if you don't have any linux or bsd system before.

hope this helpful

Monday, July 2, 2007

Slackware 12.0 is released

A new slackware version has released now, after waiting for a long time. there is an issues before a release date, that said a release version would jump directly in major number without passing a minor one. A mistery question has asnwered. An issue became a surprise for me, that slackware has released into version 12.0. Maybe this is an unusual habit from a developer team.

I'm really curious what a great change was happen. Then I start to find out into README.TXT's file first, if there is an explanation for this question. There are only some info about major components inside slackware 12.0 which are only a new version from major components of slackware 11.0. Here are the componets's version:
- Linux kernel 2.6.21.5
- C compiler gcc-4.1.2
- Binutils 2.17.50.0.17
- GNU C Library glibc-2.5
- X Window System X11R7.2.0 from X.Org.
- KDE 3.5.7
- Xfce 4.4.1

But This is really surprising me, when I read a RELEASE_NOTES's file. Here are a qoute from that file:

About the only things to mention here are that Slackware now requires a recent 2.6.x kernel (I believe 2.6.18 is a minimum), but as usual unless your needs are specific you're probably better off running the included kernels that we've tested things against. The best kernel to run (even on a one CPU/core machine) is the generic SMP one, but that needs an initrd, so be sure to read the instructions in /boot after installing with a huge* kernel if you plan to switch. Since the initrd has been around since Slackware 11.0, hopefully most
Slackware users can take on this task easily and will not be "shocked and appalled".

Yeah, developer team decide to use kernel version 2.6 as default instead of 2.4 that usually being default from a release version before. I think this is a big changes that cause developer to jump a release version direct to major number. Also hotplug as device manager before has replaced with udev.

Another changes are completely documented in Changelog.txt's file and also in ANNOUNCE.12_0's file. As usual, it's time for upgrading system. If you would like to upgrade the system don't forget to read CHANGES_AND_HINTS.TXT's file. There are enough explanation and completes guide for upgrading system from 11.0 inside that file.

Happy slacking! :-)

Friday, June 15, 2007

Testing write support for UFS filesystem module in linux kernel

In previous article, I wrote a note for accessing UFS filesystem under Linux operating system. But It just in read-only mode. Now I'll try to enable write support for UFS filesystem. In this case, still use slackware version 11.0 as a linux host and using kernel release 2.6.18. First, I use config file from kernel packages that come with slackware and modify it to add this entry:
CONFIG_UFS_FS_WRITE=y

or you can use config menu interface to modify it. In file systems --> Miscellaneous Filesystems --> UFS filesystem support , and check on "UFS file system write support (DANGEROUS)" entry.

next, re-compile your kernel.

After doing some configuration and rebooting slackware system using new modified kernel, I try to mount freebsd filesystem manually using this command:
mount -t ufs -o ufstype=ufs2,rw /dev/hda3 /mnt

As far as I did, nothing wrong happen. What i've done is trying to create a file on UFS filesystem (freeBSD partition) and insert some text. Then I boot into freebsd system normally and there is a file that I create before under linux. Maybe need more test to know if it works fine or getting wrong and can cause a damage for freebsd filesystem.

hope this helpful. Use it with your own risk and without warranty.

Saturday, May 26, 2007

Repair Grub with Ubuntu LiveCD

After re-installing windows, my ubuntu partition have disappear. What I mean is a grub bootloader (which come from ubuntu) that already installed before on MBR cannot be accessed because windows re-write MBR partition with its own boot manager.

what I should do?
1. boot using ubuntu livecd (desktop version)
a. login as root
using command: sudo_root or sudo -s
b. mount your ubuntu partition
e.g: - mount point as /media/disk
mount /dev/sda1 /media/disk

2. mount your livecd /dev directory into your ubuntu mount point ( /media/disk )
e.g: mount --bind /dev /media/disk/dev

3. run this command: grub-install --root-directory=/media/disk /dev/sda

hope this helpful.

Friday, April 20, 2007

TopologiLinux - Running Linux inside Windows

If you think this is a stuff that tells us about a GNU/Linux operating system topology, you're completely wrong. Because this is just another kinds of GNU/Linux distro which is a slackware-based variant. An interesting part from this distro that it can run on windows partition natively.

Topologi linux come in two mode: Colinux mode and Real Mode
a. Colinuxmode:
in this mode, you can install it directly into windows partitions ofcourse with a coLinux support ( tools for optimize operating your linux in windows natively).
b. Real Mode:
which means you can install this distro likely as general linux installation especially in native slackware installation.

This distro support for installing into NTFS filesystem. Based on official site, latest release (when I wrote this article) is 6.1.0 which support 6 GB software repository. Full version is bundled into 1 installation DVD. Beside that, this distro still use native slackware's package format (.tgz) and can run under Windows Vista.

There are also some FAQ and complete installation howto on official site. But there is no full documentation that spesifically for this distro as far as I know. Maybe you can use slackware documentation as reference.

related link:
www.topologilinux.com

Saturday, March 10, 2007

Mounting freeBSD partition under Linux

This is a note on how I accessing freeBSD ( exactly version 5.4 ) partition which use UFS filesystem's type under slackware 11.0 ( using linux kernel 2.6.18). First, I try to mount it with this command:
mount -t ufs /dev/hda3 /mnt

but I get a message:
mount: wrong fs type, bad option, bad superblock on /dev/hda3,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

when I check dmesg | tail it show:
ufs was compiled with read-only support, can't be mounted as read-write

then I try to mount it using option ro (read only) :
mount -t ufs -o ro /dev/hda3 /mnt

but it still has a problem and a message like this appear:
You didn't specify the type of your ufs filesystem
mount -t ufs -o ufstype=sun|sunx86|44bsd|ufs2|5xbsd|old|hp|nextstep|nextstep-cd|openstep ...
WARNING Wrong ufstype may corrupt your filesystem, default is ufstype=old
ufs_read_super: bad magic number

next, try to pass an option ufstype=44bsd as it defined in manual mount:
mount -t ufs -o ro,ufstype=44bsd /dev/hda3 /mnt


not yet work, last chance using ufs2 as an entry of ufstype option:

mount -t ufs -o ro,ufstype=ufs2 /dev/hda3 /mnt

it works well but still in read only mode. Fine for me now, because I just trying to access a filesystem without modified it.


there is a message before, that ufs filesystem was compiled as read-only mode. I wonder if there is read-write mode. Then I check on kernel source tree using make menuconfig as if we try to compiling kernel. In UFS filesystem part (exactly in miscellaneous filesystem), there is an option that UFS can support write access but still flagged as DANGEROUS. maybe I can try it next time.

hope this helpful.

Tuesday, February 27, 2007

Coding day's for fun

this code was inspired from people in forum when ask me an algorithm. this is an implementation from the algorithm. It's only for fun and for wasting a time. also to learn programming language. I hope this's not the last.

Bash script version
-------------------
start here
-------------------
#!/bin/bash
echo -n "Your input: "; read input
let temp=$input/2
let temp=$temp+1
let count=0
let i=1
echo $temp
while ((i<=input))
do
let j=1
let left=1
let right=$input
if [[ $i -le $temp ]]; then
let count=$count+1
elif [[ $i -gt $temp ]]; then
let count=$count-1
fi

while ((j<=input))
do
if [[ $left -le $count ]]; then
echo -n "$left "
elif [[ $right -le $count ]]; then
echo -n "$right "
else
echo -n "$count "
fi
let left=$left+1
let right=$right-1
let j=$j+1
done
let i=$i+1;
echo ""
done

C Version
---------------
Start here
---------------
#filename: funcode.c
int main ()
{
int input, temp=0, count=0;
int i,j,left,right;

printf ("Your input: ");scanf("%d",&input);
printf ("
Dimention: %d \n",input);
temp=(input/2) + 1;
printf("temp: %d \n",temp);

for (i=1; i<=input; i++)
{
j=1;
left=1;
right=input;

if (i <= temp)
count++;
else if (i> temp)
count--;

for (j=1; j<=input; j++)
{
if (left <= count)
printf("%d ",left);
else if (right <= count)
printf("%d ",right);
else
printf("%d ",count);
left++;
right--;
}
printf("\n");
}
return 0;
}

An output is here:
mine@unique:~$ ./funcode
Your input: 5
Dimention: 5
temp: 3
1 1 1 1 1
1 2 2 2 1
1 2 3 2 1
1 2 2 2 1
1 1 1 1 1
mine@unique:~$

Sunday, February 25, 2007

Linux Community Against Steven Balmer's Claim

This is from Steven Balmer's claim that linux violates Microsoft's intellectual property. Linux Community response and against this claim with make a petition that Microsoft should show the windows code that Linux has violated it.
Linux Community do it, with launch a site that contain an open letter to Steven Balmer whom make the claim again and again.
On this petition also, Linux Community calling out all Linux Developer and Open Source leader also developers for any Linux distribution or any company that feels threatened by Microsoft non-existent lawsuits.

read more...

Thursday, February 15, 2007

Setup lilo into partition's superblock and load it from grub

I already have grub installed on MBR of harddisk. It's come from my ubuntu linux. Then I installing slackware and want to use slackware's lilo to load the slackware system. First, I install lilo into superblock of slackware's partition using this command:
lilo -b /dev/hda2

note:
Slackware partition is on hda2, maybe it is different with yours, depends on your system placed in harddisk (including position of disk controller and partition). In my case, I use PATA harddisk which set as primary on controller 0. And my slackware system is on second partition.

Second, edit grub's
configuration file (menu.lst). Usually in /boot/grub/menu.lst. And then add this entry:
title Slackware Lilo
root (hd0,4) #for example, if your slackware partition in /dev/hda5
chainloader +1

Now, restart the system.

hope this helpful.

Wednesday, January 24, 2007

Linux Foundation has founded

The Linux Foundation is a nonprofit consortium dedicated to fostering the growth of Linux. Founded in 2007 by the merger of the Open Source Development Labs and the Free Standards Group, it sponsors the work of Linux creator Linus Torvalds and is supported by leading Linux and open source companies and developers from around the world. The Linux Foundation promotes, protects and standardizes Linux by providing unified resources and services needed for open source to successfully compete with closed platforms.
Since OSDL and the FSG were each formed more than six years ago, Linux has grown significantly in server, desktop, and embedded usage around the world. Moreover, the open source model has transformed development by providing faster demand-side learning, higher quality, better security, shorter development cycles, and lower prices than closed platform development models. OSDL and the FSG were important forces behind open source adoption and played key roles in preventing fragmentation of the Linux market.
For Linux to remain open and attain the greatest ubiquity possible, important services must be provided, including legal protection, standardization, promotion and collaboration. Successful proprietary software companies, for instance, do several important things well: backwards compatibility, promotion, interoperability, developer support, and more. In the voluntary and distributed world of Linux development, the industry continues to successfully use the consortia model to rapidly improve these value attributes for Linux. The Linux Foundation has been founded to help close the gap between open source and proprietary platforms, while sustaining the openness, freedom of choice and technical superiority inherent in open source software.

Official site

Saturday, January 13, 2007

Accessing Linux/freeBSD filesystem from windows

For some people who operates more than two operating system in one PC (like me) maybe lists of these tools would be useful. I use these tools if I'm on windows and need to access freeBSD (using UFS filesystem type) or Linux partition (using ext2/3 or Reiserfs filesystem type). Here are the lists:

for accessing Reiserfs filesystem type,
a. rfstool,
using command Line as default Interface
b. rfsgui,
a graphics front-end for rfstools and you don't need to download rfstools because it's already included in this package.
c. YaReG,
also a front-end for rfstool which developed with .NET platform. You need to install .NET framework from microsoft.
d. ReiserDriver,
is an Installable File System Driver (IFSD).No gui front-end, but your ReiserFS partitions will appear as additional disks in windows, allowing files from ReiserFS partitions to be transparently accessed from any windows application.
e. visualrfstool,
another front-end for rfstool developed using Delphi.

for accessing Ext2 or Ext3 filesystem you can use this tools,
a. ltools,
this tool not only support for Ext3 filesystem but also for Reiserfs (but i still have a problem when try to access reiserfs filesystem) beside that, this tools also using multiple platform as front-end ( .NET using C#, java, and web-based).
b. Explorer2FS,
support both of reiserfs and Ext2/Ext3 filesystem and also need package's dependencies.
c. Explorateur-Ext3FS,
I'm not yet try this tool, maybe you can give me your explanation for this tool.
d. Ext2IFS,
maybe this's the only one tool that come as a windows binary installer package. And the different between others that it doesn't come with gui front-end but you can view ext3/reiserfs partition directly from windows explorer because this tool directly integrated with windows explorer.

and if you need to access FreeBSD partition that use UFS filesystem type, these tools maybe helpful:
a. ufsexplorer,
licensed as shareware and come as a windows binary installer package.
b. ufs2tools,
using command prompt without
gui front-end support.
c. ffsdrv,
this tool is used to read FFS file system type. using simple gui to mount freebsd partition and developed using visual C++

For documentation's support, you can access official site for each tools. If you have another tool that not listed here, please let me know.