I try to explain in this series of blog entries how to install gcc (GNU C-Compiler) and what to do with it. I also try to explain little make and CMake/Autotools. This is not very generic tutorial because I like to promote openSUSE as coding platform. Most of the tips goes just fine with every distro. For the first words I like to say one thing: openSUSE is excellent platform for C-coding. Though, you can choose your programming language but this time I like to talk about GCC and specially C-Compiler. I’ll try to how to get there with these writings because I have noticed that this substance is getting less attention that it needs. Also noted that GCC anf GNU is 30 years and I have used it almost 15 so time to share some information. (more…)
Archive for the ‘Systems Management’ Category
Here is a new tool that provides a simple zenity based GUI frontend to live-fat-stick script. The live-fat-stick script allows you to create multi boot USB stick/HDD which has vfat partition on it without formatting or removing existing data on it, it uses whole ISO images to boot so the image is still usable to create more live USB sticks or burn CD/DVDs. In live mode the device’s vfat partition can be mounted to access/modify and save files.
Currently live CD/DVD isos of openSUSE 12.2(and derivatives) including all from susestudio, Mint, Ubuntu(and derivatives) and Fedora are supported. Fedora iso is not copied but is extracted on the USB device instead as it does not support booting from iso image yet.
Here is Live USB GUI in action:
Do you want to play with cloud software on your own machines?
Some people have been working to package the current OpenStack version “Folsom” for openSUSE (tested on 12.2) and add scripts to configure it into a working state.
You need 2GB of RAM and 3+ GB of free disk space under /var/lib/
Then you do
export cloudsource=openstackfolsom ; bash -x qa_openstack.sh
This is a script we use for continous integration testing, but it is as useful to setup a simple environment for development, testing or demoing.
Folsom packages are still rather rough and might see some change over the coming weeks.
If you want the older stable version, you can use the above snippet with cloudsource=openstackessex
however, there are some known bugs in that old version and backports are really hard.
Soon there will be Grizzly packages upcoming. More is to come…
P.S. To interact with your cloud, you need credentials, which are automatically sourced from /etc/bash.bashrc.local (it is admin:openstack) and then you use commands like
nova list and
but there is also a web-interface that allows you to do most actions in a browser – even VNC, if you use KVM instead of the default lxc.
With the release of snapper 0.1.0 also non-root users are able to manage snapshots. On the technical side this is achieved by splitting snapper into a client and server that communicate via D-Bus. As a user you should not notice any difference.
So how can you make use of it? Suppose the subvolume /home/tux is already configured for snapper and you want to allow the user tux to manage the snapshots for her home directory. This is done in two easy steps:
- Edit /etc/snapper/configs/home-tux and add ALLOW_USERS=”tux”. Currently the server snapperd does not reload the configuration so if it’s running either kill it or wait for it to terminate by itself.
- Give the user permissions to read and access the .snapshots directory, ‘chmod a+rx /home/tux/.snapshots’.
For details consult the snapper man-page.
Now tux can play with snapper:
tux> alias snapper="snapper -c home-tux" tux> snapper create --description test tux> snapper list Type | # | Pre # | Date | User | Cleanup | Description | Userdata -------+---+-------+----------------------------------+------+----------+-------------+--------- single | 0 | | | root | | current | single | 1 | | Tue 16 Oct 2012 12:15:01 PM CEST | root | timeline | timeline | single | 2 | | Tue 16 Oct 2012 12:21:38 PM CEST | tux | | test |
Snapper packages are available for various distributions in the filesystems:snapper project.
So long and see you at the openSUSE Conference 2012 in Prague.
Recently, came across x2go packages maintained by Jan Engelhardt for openSUSE and other distributions on open build service. As openSUSE Education Li-f-e has great LTSP integration thanks to KIWI-LTSP, I decided to check out how x2go can fit in with this existing thin-client computing solution.
“x2go is an open (GPL/AGPL) source “server based computing” project. Combining the advantages of existing systems it features ease of use, performance and scalability. x2go provides you with access to your desktop – from within your own network and via the internet. x2go is not limited to particular hardware, it supports a variety of devices and architectures.” -from their website.
Some of the features/benefits of x2go that are not available on LTSP are:
* Remote login from within local lan and internet from any OS
* Session persistence, you can disconnect session from one client and continue where you left off from any other client
* Low bandwidth usage
* Session sharing with other users
After some iterations of updating the system with zypper dup or yast and some years of service with the system you will find out that there is a lot of dust which is obsolete or has been forgotten. Recently I had the problem that I need to move my 32bit system to a 64bit system and thus the way to go was to migrate the running system into an image description, build a 64bit image from it and install that on the 64bit machine. But the most important part was to cleanup the running system and find out what it really contains. The report kiwi migrate created here was helpful and so I think it might be helpful for others too. Just call:
kiwi –migrate mySystem
It will end up with some data below /tmp/mySystem which of course can be removed at any time without any risk. Most interesting is the html report generated which you can view with any browser. So far kiwi collects the following information:
- kernel version and kernel specific kmp packages
- hardware dependent packages
- installed gem packages
- repository checkouts
- rpm packages installed multiple times
- rpm packages which could not be found according to the current repo setup including version and repo information
- tree of modified files, packaged but changed
- tree of custom files, those which doesn’t belong to any package or other part of the bullet list
basically the use case of kiwi migrate is to migrate the running system into an appliance description but I’m not there yet. There is still room for improvement but I think it still can help to cleanup the system and to see what is installed on the system and not managed by a package manager
I have tested this since openSUSE 11.4
Remember to have fun
With the release of openSUSE Edu Li-f-e 12.2, we also have new KDE waiting in the official update repository. To resolve a couple of conflicts you will need to add Education:update repository before running yast2 online_update.
Follow these steps:
- Add Education:update repository by using this 1-click install, remain subscribed to the suggested repositories or via command line:
zypper ar obs://Education:update/openSUSE_12.2 Education:updatethen run
yast2 online-update. - select replacement for kioaudiocd - select deinstallation of yast2-qt-branding-life - Proceed with the update
openSUSE Education team once again presents Li-f-e (Linux for Education) built on hot new openSUSE 12.2 including all the post release updates. As always this edition of Li-f-e comes bundled with a lot of softwares useful for students, teachers, as well as IT admins of educational institutions. Apart from stable versions of KDE and Gnome, Cinnamon is also available.Sugar desktop suite makes a comeback thanks to the work of Xin Wang packaging it. Li-f-e also give full multimedia experience right out of the box without having to install anything extra. The live installable DVD iso stands at 3.3G as an incredible array of softwares from open source world are available on it, we have not just bundled them in, but have tried to integrate it with the distribution to give everything a seamless feel.
SUSEs Hackweek 8 allowed me to implement support for LVM thin-provisioned snapshots in snapper. Since thin-provisioned snapshots themself are new I will shortly show their usage.
Unfortunately openSUSE 12.2 RC1 does not include LVM tools with thin-provisioning so you have to compile them on your own. First install the thin-provisioning-tools. Then install LVM with thin-provisioning enabled (configure option –with-thin=internal).
To setup LVM we first have to create a volume group either using the LVM tools or YaST. I assume it’s named test. Then we create a storage pool with 3GB space.
# modprobe dm-thin-pool # lvcreate --thin test/pool --size 3G
Now we can create a thin-provisioned logical volume named thin with a size of 5GB. The size can be larger than the pool since data is only allocated from the pool when needed.
# lvcreate --thin test/pool --virtualsize 5G --name thin # mkfs.ext4 /dev/test/thin # mkdir /thin # mount /dev/test/thin /thin
Finally we can create a snapshot from the logical volume.
# lvcreate --snapshot --name thin-snap1 /dev/test/thin # mkdir /thin-snapshot # mount /dev/test/thin-snap1 /thin-snapshot
Space for the snapshot is also allocated from the pool when needed. The command lvs gives an overview of the allocated space.
# lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert pool test twi-a-tz 3.00g 4.24 thin test Vwi-aotz 5.00g pool 2.54 thin-snap1 test Vwi-a-tz 5.00g pool thin 2.54
After installing snapper version 0.0.12 or later we can create a config for the logical volume thin.
# snapper -c thin create-config --fstype="lvm(ext4)" /thin
As a simple test we can create a new file and see that snapper detects its creation.
# snapper -c thin create --command "touch /thin/lenny" # snapper -c thin list Type | # | Pre # | Date | Cleanup | Description | Userdata -------+---+-------+-------------------------------+---------+-------------+--------- single | 0 | | | | current | pre | 1 | | Tue 24 Jul 2012 15:49:51 CEST | | | post | 2 | 1 | Tue 24 Jul 2012 15:49:51 CEST | | | # snapper -c thin status 1..2 +... /thin/lenny
So now you can use snapper even if you don’t trust btrfs. Feedback is welcomed.