Belenix FAQ
From Genunix
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.
What is the default username/password for the Live CD
username: jack
password: belenix
Execute pfexec su to assume root user privilege.
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 move to IPS in the near future.
The BeleniX LiveCD includes the Solaris and 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.
In addition the Pkgsrc packages can also be used on BeleniX by doing the following steps:
1) Download the following files into the same directory:
Pkgsrc bootstrap kit: bootstrap.tar.bz2 Pkgsrc setup script : pkgsetup.sh Both these files can be downloaded Wrom: OWCONEUQZAAFXISHJEXXIMQZUIVOTQNQEMSFDULHPQQWOYIYZUNNY
2) Now open a terminal window and change to the directory where you downloaded the above files: cd /your/directory
3) Now execute the script: sh pkgsetup.sh
4) Now logout and login again and you are ready to use Pkgsrc.
5) You must now connect to the internet to auto-download packages.
6) To install packages you need to open a terminal window and execute: pkg_add -v <package name> This command will automatically download the binary packages and install them in "/usr/pkg".
7) To see a list of available packages please visit:
http://public.enst.fr/pkgsrc/packages/SunOS-5.10/i386/pkgsrc-current/All
Several thousand OpenSource packages are available here for OpenSolaris.
The 0.7 release also bundles 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 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 ?
The OpenSolaris manpages are not yet available in BeleniX because SUN has not yet released these for redistribution. This will change in the not too distant future as the OpenSolaris manpages are being converted into DocBook format in preparation for their release.
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 23) filesystem. You need to just plug them in and they will be automatically mounted under /rmdisk.
How do I find out my hardware configuration ?
(Based on a post by Moinak Ghosh to the Bangalore Open Solaris User Group)
PCI Bus information - /usr/bin/prtpci or /usr/X11/bin/scanpci dmesg - /usr/sbin/dmesg USB Information - lsusb is not yet included in BeleniX, though libusb is already included. 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 the OpenSolaris daemon called volume manager (svcs vold) that manages removable media including USB Memory Sticks and CDROM/DVDs. If a data CD is inserted into the drive, vold will automatically mount it in /cdrom/<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/foss/bin/cdrecord[1] is provided which is also a capable tool.
The KDE 3.5.x included in BeleniX also includes the Solaris port of K3b which is a very capable CD/DVD burning GUI.
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. OpenSolaris uses the concept of slices which can be viewed as sub-partitions within a partition.
The /usr/bin/hdinstaller utility is provided to install BeleniX to harddisk. It provides a text-mode Curses based usr interface which can also be navigated using the mouse. It will allow you to create a primary Solaris partition within which BeleniX should be installed. If you select auto-layout then BeleniX automatically calculates space allocation for the various slices like '/', '/usr' swap etc. It is recommended to review the space allocation for swap.
At the minimum you will need to have a '/' (root) slice and a swap slice.
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 /boot/grub/menu.lst which can be modified to add entries for other operating systems.
This will be changed in a subsequent release to allow the option to install Grub into the Solaris partition and to auto-detect other bootable operating systems.
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/partmgr 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 partmgr on it. This utility is still evolving so expect many new features in upcoming releases.
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/partmgr /dev/rdsk/<devname>p0. So as per our example above the command should look like:
/usr/bin/partmgr /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/partmgr /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.
Dtrace scripts that need to be parsed through the cpp preprocessor ( dtrace -C ) fail
For Example -
Right after livecd is up:
# /opt/DTT/Net/tcpsnoop.d dtrace: failed to compile script /opt/DTT/Net/tcpsnoop.d: Preprocessor not found
The solution is to explicitly set the preprocessor using the command:
dtrace -C -xcpppath=/usr/foss/bin/cpp -s /opt/DTT/Net/tcpsnoop.d
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
While booting BeleniX I can see kernel stacktrace after "Configuring X11" message. Is this a problem ?
This just a harmless warning that a kernel module called aperture required by the Xorg server is using an obsolete kernel API. This will be fixed soon.
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
By default remote root logins are disabled. You need to comment out the line "CONSOLE=/dev/console" in the file /etc/default/login to allow remote root login.
I want to play around with ZFS without repartitioning my harddisk. Is this possible ?
Yes ZFS filesystems can be created in files. Please refer to this blog entry for details: http://www.cuddletech.com/blog/pivot/entry.php?id=446
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.hme0
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
Now you can reboot and the settings will automatically take effect. You can also perform the following tests to confirm that everything is fine:
- ping your gateway
- ping a machine on your local network
- ping your nameservers
- 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:
- Perform steps 1 - 6
- Execute: /sbin/ifconfig hme0 192.168.0.150 broadcast 192.168.0.255 netmask 255.255.255.0
- Add default route: /sbin/route add default 192.168.0.1 <- The gateway ip
- If you do not have default gateway info: /sbin/route add default belenix-box-1 -interface
- 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. If you connect it later and would like to connect then please use the /usr/bin/inetmenu GUI tool to do so.
Can't boot into BeleniX after harddisk installation
After harddisk install, reboot from harddisk fails and the following message is seen: diskread: reading beyond end of ramdisk start = 0x2000, size 0x2000 failed to read superblock ...
This is caused by an improperly generated Boot Archive, which is the minimal ramdisk loaded by Grub that the kernel initally uses to initialize. To fix this do the following:
- Boot into the LiveCD and the root slice of the harddisk installed BeleniX will be automatically mounted under /mnt/solaris0. You can verify this by checking that the /mnt/solaris0/kernel directory is present.
- Execute the following commands:
/usr/bin/rm -f /mnt/solaris0/platform/i86pc/boot_archive /mnt/solaris0/boot/solaris/bin/create_ramdisk -R /mnt/solaris0 /sbin/bootadm update-archive -R /mnt/solaris0
- Reboot
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://sarovar.org/tracker/?atid=1494&group_id=360&func=browse .
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:
- 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.
- If step (1) fails as well, then come back to the Grub screen.
- Highlight the first entry and press 'e' to go to Edit mode.
- Now highlight the first line that begins with "kernel hd(..." and press 'e' again.
- 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.
- Now press 'Enter' and then press 'b'. This will initiate the boot process.
- 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.
- 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.
- You can then reboot by pressing CTRL+D.
HOWTO Remaster BeleniX and create a customized ISO ?
As of Aug 14 2006 it is now possible to easily Remaster a BeleniX 0.4.4 ISO using a toolkit that can be downloaded via this link: http://www.belenix.org/binfiles/livecdtools.tar.gz
A complete HOWTO explaining the Remastering process and the working of the toolkit is available at:
LINK NOT WORKING http://www.belenix.org/BeleniX-Remaster-HOWTO.html
