Belenix FAQ

From Genunix

Jump to: navigation, search

The BeleniX FAQ is a collection of answers to questions that have been discussed in the various forums. It also contains additional questions and answers that people might commonly have. Moinak Ghosh has answered most of the questions alongwith other BeleniX community members.

Please note that this FAQ is currently being updated for BeleniX 0.7.1 (by: Amit K. Saha)

Contents

What is the default username/password for the Live CD

username: jack

password: belenix

Execute pfexec su to assume root user privilege.

What is the default shell for BeleniX?

 $ echo $SHELL
 /bin/bash

More information on BASH can be obtained as follows:

 $ bash --version
 GNU bash, version 3.2.25(1)-release (i386-pc-solaris2.11)
 Copyright (C) 2005 Free Software Foundation, Inc.
 $ which bash
 /usr/bin/bash

How do I manage packages on BeleniX ? Does the existing software have packaging info ?

As of version 0.7 BeleniX contains native SVR4 packages for entire distribution with plans to change to a different packaging framework in future.

The BeleniX LiveCD includes the pkg-get tool (http://www.blastwave.org/pkg_get.pkg) so packages from the Blastwave Repository (http://www.blastwave.org/) can be used once BeleniX is installed to harddisk. You can install any Blastwave package and dependencies using /opt/csw/bin/pkg-get -i <package name>. Refer to http://www.blastwave.org/howto.html for more details. Please note that you'd need to add /opt/csw/bin to your PATH.

The current releases also bundle a utility called get_pkgs. This tool will help you install commonly used packages in a single step. Details on how to use this tool can be found here:

   http://opensoars.blogspot.com/2008/04/additional-softwarespackages-for.html

How do I set up BeleniX for development?

BeleniX, by default does not come with development tools such as C/C++ compilers. To set up BeleniX for your development needs, install the 'devel' cluster (in a way suggested above) like this:

get-pkgs devel

For Java Development, it is recommended to install the JDK/JRE by downloading the Solaris installers from http://java.sun.com/javase/downloads/index.jsp. You can also install NetBeans by downloading the installer for Solaris from here at http://dlc.sun.com.edgesuite.net/netbeans/6.5/beta/

The repository contains earlier versions of the Java development packages.

How do I submit bug reports ?

First, make sure you read the FAQ well. Next, search the mailing list archives.

If you're certain that you have uncovered a bug, then head to http://sourceforge.net/projects/belenix/ and file your bug report.

Where are the Man Pages ?

About 4000 man pages are available on BeleniX but this does not yet cover every command. More manpages will get included as an when they are released by SUN in the OpenSolaris docs consolidation.

In the meantime you can access the online manpages at Docs.Sun.COM

What are the system requirements for running BeleniX ?

There are two cases here. BeleniX LiveCD and BeleniX installed to harddisk. The LiveCD requires at least 256MB RAM and a Pentium (also Celeron) or AMD processor to boot into a graphical desktop like Xfce. 128MB RAM is sufficient for booting into Command-Line mode.

BeleniX should be able to boot into Xfce desktop with 128MB RAM once it is installed to harddisk. At least 256MB is recommended for using KDE.

5GB of free disk space and a free Primary Partition is recommended to install BeleniX to harddisk.

How do I use USB devices like Memory Sticks and Digital Cameras in BeleniX ?

As of version 0.4.2 support for libusb has been added so software like Gphoto2 and Gtkam will work on BeleniX. However these will be included by default in the next release.

USB Memory Sticks are supported by default on OpenSolaris if they are formatted with the FAT (16 or 32) filesystem. You need to just plug them in and they will be automatically mounted under /media.

How do I find out my hardware configuration ?

PCI Bus information -

 /usr/bin/prtpci 
 /usr/X11/bin/scanpci (as root)
 dmesg - /usr/sbin/dmesg

USB Information lsusb is not yet included in BeleniX, though libusb is already included.

 $ lshal | grep usb

Hardware information

 /usr/sbin/smbios (detailed human readable info, similar to lshw on Linux), 
 /usr/sbin/prtconf

Processor

 /usr/sbin/psrinfo -pv

Architecture

  /usr/bin/isainfo

Summary system info

 /usr/sbin/prtdiag

Disk primary partitions

 /sbin/fdisk /dev/rdsk/c*d*p0

Solaris VTOC table

 /usr/sbin/prtvtoc /dev/dsk/c*d*s2

How do I find out process information ?

(Based on a post by Moinak Ghosh to the Bangalore Open Solaris User Group)

 Accurate measure of free memory -
     Login as root
     Execute  /usr/bin/mdb -k
     Enter command   ::memstat
     CTRL+D to come out of mdb
 Closer to actual estimate of process memory usage excluding the mmap-ed shared libs -
     /usr/bin/pmap -x <pid>
 Look at the total for the 4th column labeled "Anon". Also add in any non-Anon 
 memory usage for the process itself. For those who who know this is mostly the 
 executable text pages.
 See the function call stack of a running process -
     /usr/bin/pstack <pid>
 See which libraries a process is using -
    /usr/bin/pldd <pid>
 See the command line arguments with which the process was
 started -
    /usr/bin/pargs <pid>
 See the process hierarchy -
   /usr/bin/ptree <pid>
   /usr/bin/ptree 1 gives the entire process hierarchy for the system.

How do I use CDROM/DVD in BeleniX ?

BeleniX includes HAL and Rmvolmgr (svcs hal, svcs rmvolmgr) that manage removable media including USB Memory Sticks and CDROM/DVDs. If a data CD is inserted into the drive, it will automatically get mounted in /media/<volume name> . You can execute 'df -h' to check where it is mounted.

Support for writing CD and DVD is also provided. There are two options. One is to use the native OpenSolaris utility called /usr/bin/cdrw that can write to CD and DVDs. In addition /usr/bin/cdrecord (http://freshmeat.net/projects/cdrecord/) is provided which is also a capable tool.

In addition X-CD-Roast GUI is included in BeleniX.

Common cdrw options:

-l - If the drive contains some valid media, this will list the details of the drive and media

-i <ISO filename> - Writes the ISO image to blank CD/DVD

-iC <ISO filename> - While writing ISO images allow non-default media sizes; i.e. CD Image greater than 650MB.

-c - Copy the contents of a cdrom

Where can I find basic info about the new features in OpenSolaris ?

There is a good cheatsheet with links to more info here: http://www.genunix.org/wiki/index.php/OpenSolaris_Cheatsheet

How do I manually configure Xorg ?

The Xorg Xserver in BeleniX is located under /usr/X11 and the config files are located under /etc/X11. The main Xorg config file is /etc/X11/xorg.conf. You can use the /usr/X11/bin/xorgconfig utility to manually configure Xorg.

How do I install BeleniX to harddisk ?

At present OpenSolaris requires a free Primary Partition. It cannot live in an Extended Partition.

BeleniX includes the Caiman Grapical Installer (http://www.opensolaris.org/os/project/caiman/). After booting the LiveCD to Xfce or KDE you will see an icon on the desktop that says "Install BeleniX". BeleniX uses the ZFS filesystem as it's root filesystem. This results in a very flexible setup. Since BeleniX behavior in these cases is very similar to SUN's OpenSolaris distro you can see the OpenSolaris Getting Started Guide for mre details: http://dlc.sun.com/osol/docs/content/IPS/getst1.html

Can BeleniX multiboot with other OSes like Windows and Linux ?

Yes. BeleniX uses the Grub bootloader that allows you to boot other operating systems. Currently BeleniX will install it's own Grub into the MBR and overwrite the original bootloader. The Grub configuration file in BeleniX is /rpool./boot/grub/menu.lst which can be modified to add entries for other operating systems.

BeleniX can currently auto-detect Windows partitions and add boot entries for those. Ability to detect Linux partitions and add proper boot entries will be added going forward.

Also, refer http://mail.opensolaris.org/pipermail/belenix-discuss/2008-August/000706.html for a discussion on dual-booting BeleniX with Linux

An excellent resource that deals with multibooting OpenSolaris with other OSes is http://multiboot.solaris-x86.org/

Displaying disk partitioning info

BeleniX versions 0.4.4 or greater include a utility called /usr/bin/prtpart that can be used to display the harddisk partition table (including all extended partitions) in an indented human readable format. The following section describes how to determine the harddisk device name and use prtpart on it.

First execute /usr/sbin/format to identify your disk device. Don't worry format is not going to immediately format your disk. Upon executing format you will see output similar to the following:

   AVAILABLE DISK SELECTIONS:
      0. c1d0 <DEFAULT cyl 13002 alt 2 hd 64 sec 63>
         /pci@0,0/pci-ide@11,1/ide@0/cmdk@0,0

Note down the name after "0. ", in this case it it "c1d0". Now press CTRL+D to quit out of format.

Now execute /usr/bin/prtpart /dev/rdsk/<devname>p0. So as per our example above the command should look like:

/usr/bin/prtpart /dev/rdsk/c1d0p0

This will print an indented human readable dump of the entire partition table on the harddisk that includes all your extended partitions.

/usr/bin/prtpart /dev/rdsk/c1d0p0 -doslabel

This will print out OpenSolaris device names for all the FAT/FAT32 partitions on the harddisk, whether on primary or extended partition. If you have booted the LiveCD, these should already be mounted on /mnt/fat0, /mnt/fat1 and so on.

How do I take screenshots on BeleniX ?

BeleniX includes ImageMagick and GIMP both of which provides tools for taking screenshots. With ImageMagick just type

 import mysnap.png

You can also use the KDE based KSnapshot

How do I enable telnetd on BeleniX ?

Huh, do you really want to do that ? Well anyway since you waned to know, just execute the following command:

inetadm -e telnet

Remote login attempts as the root user fails

In BeleniX the "root" account is a Role account. This means that there is no way to directly login as root. You need to login as a normal user and then su to root.

However if you really really want root to be a normal user and enable direct root logins the do the following:

1) Make root a normal user:

  Edit /etc/user_attr and check for the line that begins with "root::::type=role;...". Delete the "type=role;" part and save the file.

2) BeleniX uses ssh by default so you will need to set the flag "PermitRootLogin yes" in /etc/ssh/sshd_config and restart sshd via svcadm restart ssh.

I want to play around with ZFS without repartitioning my harddisk. Is this possible ?

BeleniX uses ZFS as it's root filesystem so this point is moot.

How do I check what network interfaces are available ?

Execute "/sbin/ifconfig -a" and this will tell you which network interfaces were recognised by BeleniX.

How do I configure a static IP Address and setup networking ?

You can use /sbin/ifconfig in the follwing way:

ifconfig <intferface> <ip address> broadcast <bcast address> netmask <net mask> Or you can execute the /usr/bin/inetmenu GUI tool to configure the interface.

In addition you can use /usr/bin/netprof to have network profiles. See later.

But if you want your configuration to persist across reboots you'd need to do the following:

1) Disable inetmenu. This interferes with static configuration: svcadm disable network/inetmenu.

2) Select a name for your host and enter it in the /etc/nodename file. This file must have exactly one entry, which is the hostname.

Example:

 echo belenix-box-1 > /etc/nodename

3) Edit /etc/hosts and add your hostname to ip address mapping. If you are in a domain, you may want to add another entry with the fully qualified domain name as well. Example:

 127.0.0.1       localhost
 192.168.0.150   belenix-box-1 belenix-box-1.yourdomain.com loghost

4) Determine which interface will be connected to the network. Lets assume that your bge0 network interface is connected to the network. Then create a file called /etc/hostname.hme0 which contains the hostname as in step (1): Example:

 echo belenix-box-1 > /etc/hostname.bge0

5) Create or edit the /etc/defaultrouter file and enter the IP Address of the default router. This will have been provided to your by your network admin or ISP. Example:

 echo 192.168.0.1 > /etc/defaultrouter

6) Now you need to setup name resolution. Typically you'll want to use DNS and the list of nameservers will have been provided to you by your network admin or ISP. So you will have to setup /etc/nsswitch.conf and /etc/resolv.conf. Example:

Our example /etc/resolv.conf contains the following lines:

 domain yourdomain.com
 search yourdomain.com
 nameserver 192.168.0.9
 nameserver 192.168.0.11

These details will be different in your case. Execute:

 /usr/bin/cp /etc/nsswitch.conf.dns /etc/nsswitch.conf

7) BeleniX enables NWAM (http://www.opensolaris.org/os/project/nwam/) by default which you will have to disable:

  svcadm disable network/physical:nwam
  svcadm enable network/physical:default

Now you can reboot and the settings will automatically take effect. You can also perform the following tests to confirm that everything is fine:

  1. ping your gateway
  2. ping a machine on your local network
  3. ping your nameservers
  4. ping a well-known host, like www.yahoo.com

You can also activate the configuration without rebooting. After doing the above 6 steps execute an ifconfig command as mentioned in the beginning to directly configure the IP address on the network interface. Then execute "svcadm enable dns/client" and things should begin to work. Later versions of BeleniX will contain a Network configurtion UI to avoid having to manually do all these things.

Example:

  1. Perform steps 1 - 7
  2. Execute: /sbin/ifconfig hme0 192.168.0.150 broadcast 192.168.0.255 netmask 255.255.255.0
  3. Add default route: /sbin/route add default 192.168.0.1 <- The gateway ip
  4. If you do not have default gateway info: /sbin/route add default belenix-box-1 -interface
  5. Execute: svcadm enable dns/client

Does BeleniX support Network Profiles ?

Yes Network Profiles are supported via the /usr/bin/netprof GUI tool. You need to configure the details for your network profile in the directory /etc/netprof/ . Use an existing sample config as a template. Then execute the /usr/bin/netprof tool to switch profiles.

How do I connect to a DHCP Network ?

BeleniX automatically configures DHCP if it is available and your network interface is connected. This is done by NWAM.

Connecting to a Wireless Network

Assuming that you have a wireless network the following is an example to connect to an open-access wireless network:

 ifconfig ath0 plumb
 wificonfig -i ath0 createprofile essid=myessidname
 wificonfig -i ath0 connect myessidname
 ifconfig ath0 dhcp 

You can also use the /usr/bin/inetmenu GUI tool to connect to a wireless network. It also supports configuring a WEP key. For more details on wireless usage/configuration, refer to the following page: http://www.opensolaris.org/os/community/laptop/wireless/

How do I Change Desktop resolution dynamically ?

     Execute  /usr/X11/bin/xrandr  to list possible resolutions
     Execute  /usr/X11/bin/xrandr -s <number> to set  the resolution
     In addition Xfce and KDE provide there own tools for this.

Adding and Deleting users

You can add users easily via the graphical KDE User Manager(KUser) utility or you can do it manually via the command line. If you want to use command line the text below will be of help:

The /usr/sbin/useradd command can be used to add users.

Example:

 /usr/sbin/useradd -d /export/home/fubar -m -u 1000 -g fugroup -e 10/10/2010 -s /usr/bin/ksh fubar

This example illustrates several options:

-d Sets the user's home directory. On OpenSolaris local users should have home directory under /export/home as /home is used by the automounter.

-m Instructs to automatically create user's home directory

-s Sets the user's shell to /usr/bin/ksh. This is optional and shell defaults to /bin/sh if this is left out.

-u Optionally sets the user's id. An ID is auto-generated if this is left out.

-g Optionally add the user to the given group.

-e Set the expiry date of the user account. Date formats are mentioned in /etc/datemsk

The last item is the username.


The /usr/sbin/userdel command can be used to delete users.

Example:

 /usr/sbin/userdel -r fubar

The -r optional switch also deletes the user's home directory.

How to set the Console Keyboard layout ?

You can use the commands:

/usr/sbin/eeprom kbd-type='<Layout Name>'
svcadm restart keymap

to set the system's keyboard layout.

The list of recognized keyboard maps are in the directory /usr/share/lib/keytables

The BeleniX LiveCD boots up but immediately reboots thereafter, what to do ?

This is probably a platform-specific driver issue. Your best bet is to file a bug at http://sourceforge.net/tracker/?group_id=216118&atid=1036403 .

However you need to provide appropriate diagnostic information to help the developers to troubleshoot the problem. In order to do that you need to perform the following steps:

  1. Firstly when you see the Grub boot screen try to boot BeleniX via the non-acpi boot option. If it boots fine then it is a problem with the ACPI implementation in your particular machine. Many older machines have broken ACPI implementation.
  1. If step (1) fails as well, then come back to the Grub screen.
  1. Highlight the first entry and press 'e' to go to Edit mode.
  1. Now highlight the first line that begins with "kernel hd(..." and press 'e' again.
  1. Now you are in line editing mode and using the arrow keys go to the end of the kernel line and add the text " -kv". This enables the kernel debugger - don't be afraid it is not very complex.
  1. Now press 'Enter' and then press 'b'. This will initiate the boot process.
  1. When the kernel hits the bug it will print a series of function calls called the stacktrace. This identifies exactly where the kernel initialization failed.
  1. The kernel will drop to a debug prompt. Now please note down as much of the stacktrace as possible and any previous messages. This diagnostic info is very important and should be included when you are filing the bug.
  1. You can then reboot by pressing CTRL+D.

HOWTO Remaster BeleniX and create a customized ISO ?

-- TODO --

How to install VirtualBox Guest Additions on BeleniX 0.7.1 ?

First add the locale and language specific packages using:

$ get-pkgs lang
$ get-pkgs l10n

Now start BeleniX 0.7.1 under VirtualBox and click on Devices -> Install Guest Additions. This will downlod the ISO and add it to your list of CDROMS. Now mount it using Mount CD/DVD-ROM -> CD/DVD-ROM Image.

This will mount the ISO somewhere under /media/VBOXADDITIONS-version-blah-blah. This directory would contain a VBoxSolarisAdditions.pkg SVR4 package. To install it

$ pkgadd -d /media/VBOX*/VBoxSolarisAdditions.pkg all

Now restart BeleniX and you have all the goodness of mouse integration and better a better Xorg configuration. If you missed the get-pkgs step or if something went wrong there you might see locale related failures that prevent the VirtualBox service from starting up:

[ Sep 17 20:17:26 Executing start method ("/usr/bin/VBoxService"). ]
VBoxService: error: VbglR3Init failed with rc=VERR_NO_TRANSLATION.
[ Sep 17 20:17:27 Method "start" exited with status 1. ]

How to Get 5.1 channel audio working in Belenix ?

To get the 5.1 channel audio to work in belenix.

1).Download the appropriate OSS drivers from www.opensound.com.

2).Open a konsole and su to root user.

3).Uninstall default oss drivers using the command:

           pkgrm oss

4).Install the new drivers:

           pkgadd -d oss-solaris-v4.1-1051-i386.pkg

5).In the KDE menu->control center->sound and multimedia->sound system->hardware

 change the selected audio device to “open sound system” 
“override device location” to /dev/oss /oss_hdaudio0/pcm0.
 Then apply the changes.That’s it restart if required and you should have 5.1 audio
Personal tools