Showing posts with label SUSE. Show all posts
Showing posts with label SUSE. Show all posts

Friday, August 19, 2011

How to get your full disc space back on ext filesystems

You may have already wondered why you can't use the full disc space on an ext2/3/4 partition? You already seen something like this, where the used and available blocks don't fit the number of blocks on the device/partition:
Filesystem 1K-blocks   Used    Available Use%  Mounted on
/dev/sdc1   15391664  38184   14571608      1%  /mnt
The reason is: if you create an ext filesystem (no matter if with mkfs or YaST), 5 % of the filesystem get reserved for the super-user to allow e.g. root daemons to continue to write to the partition after unprivileged processes stopped because the partition is full.
While this perfectly make sense on system partitions as '/', it makes no sense on data partitions or external media (in the most cases). By this you get e.g. on an external 2TB/1.8TiB drive 100GByte/~92GiB, which you can't use as normal user. But you can get this space back. Either you set the number of reserved blocks to zero when you create the file system:
mkfs -t ext4 -m 0 /dev/sdc1
or you do it later:
# make sure partition is unmounted
umount /mnt
tune2fs -m 0 /dev/sdc1
On a LUKS encrypted  you have to do this:
# on a LUKS device
umount /media/disk
tune2fs -m 0 /dev/mapper/udisks-luks-uuid-X
 You should see this output:
tune2fs 1.41.14 (22-Dec-2010)
Setting reserved blocks percentage to 0% (0 blocks)
 And if you mount the device again, you can see with df that you have the full space available:
 Filesystem 1K-blocks   Used    Available Use%  Mounted on
 /dev/sdc1   15391664  38184   15353480      1%  /mnt

Wednesday, August 17, 2011

Update for extundelete

Today I've submitted a new extundelete package to my repo with following fixes:
  • added man(8) page to the package
  • fixed --help output to print also info about --restore-directory
  • added --dump-names option to search for - and print the full name of - deleted and (potentially fully) recoverable files on a given partition 
Feel free to test and report problems back. The package is now also part of the filesystems project.

Tuesday, August 09, 2011

How to undelete files from ext3/ext4

Sometimes, especially on the command line, it happens that you delete a file or directory you didn't really plan to delete. A second after hit enter you realize what you have done, maybe you are fast enough to stop the deletion process and save some files, but in the most cases it's already to late, at least for some files.  If you have no or a too old backup you're screwed. 
If you use ext3/ext4 you may be able to recover the file with ext3grep or extundelete with information from the file system journal if the content of the file wasn't already overwritten by new data. 
The first step should be to stop all writing processes on the related partition and unmount that partition as soon as possible. Now you have the choice: if your partition uses ext4 you have to use extundelete, if it's ext3 you can use also ext3grep. Personally, I prefer extundelete, since it supports both file systems and seems on one hand much faster to me than ext3grep and it's also easier to use on the other hand. Due to that, the following examples are for extundelete (you can find a ext3grep How-To here).
If you know the path and the name of the file (let's assume it's /home/tux/cv.tex and /dev/sda4 is mounted to /home) you deleted, switch to root and go to a partition with enough free space to store the deleted files. Then:
# extundelete need the relative file path 
me:/tmp # extundelete --restore-file tux/cv.tex /dev/sda4
As soon as extundelete finished, you'll find the recovered file in /tmp/RECOVERED_FILES/tux/ .
If you deleted more than one file in a directory or a directory itself, you can use --restore-directory :
# extundelete need the relative dir path 
me:/tmp # extundelete --restore-directory tux/Documents/tex/ /dev/sda4
There are some more useful options as --restore-all , --restore-files, --after 'dtime' or --before 'dtime', but in the most cases the two examples above should be enough. You can find both tools in my buildservice repository.

Thursday, August 19, 2010

Hacking osc (4)

Here's what some of the major stuff I did on osc in the last weeks:
  • changed 'osc request revoke' (and also reopen, accept, decline, wipe, revoke) to check the actual state and ask the user to prevent set the same state twice [1]
  • added new command 'osc requestmaintainership' as shortcut for 'osc creq -a add_role USER maintainer PROJECT PACKAGE' since this command is hard to find for (new) users [2]
  • changed 'osc request show' to show add_role request info more verbose including requested person/group and the requested role [3]
  • fix output of 'osc buildinfo' if parameters are missing, show only the available repos (and not the arch) if called from a checked out package [4]
  • updated osc.complete, added all existing commands to list [5]
  • added new command 'osc distributions' to get info about active distributions [6]
  • some changes to respect 'osc -A' and to reuse apiurl instead of reading it again and again from config [7][8]
  • changed 'osc repos' to filter out disabled repos of a package [9]
Tech Tags:

Wednesday, July 21, 2010

[Update] openSUSE: new wiki, and now ...


Some updates about the new openSUSE wiki issues:
  • The User:* pages are now finally protected (see bnc#409520 for history).
  • Looks as if the Special:Import is now finally working also for normal users.
That are good news, but there are some other issues with the wikki: 
  • As already pointed out by some other (e.g. in the 5th comment on this post): older external links to wikipages don't work anymore and there is no hint on the 'empty' page that there is a new wiki with a new structure and where you can find the old wiki. That's really annoying! But there is a info one some pages in the old wiki where to find the new pages (as e.g. here), we need something like that in the new wiki with info where the page was moved. At least as long as this page is empty.
  • Also the 'google index' is destroyed. If you e.g. search at google.com for 'opensuse nvidia' you find this result on the second place, but the page doesn't exist. Sorry, but it was really a stupid idea to do this change and breaking the google index (and external links) with it.
  • I know the intention was to cleanup the old wiki and give it a new structure, but the way it was done makes it really hard for the users. If a user look for the replacement of the old Nvidia page in the new wiki, there is no result with the default search, since it was moved to SDB:NVIDIA. You have to enable the search for the SDB namespace manually. IMO this should be activated by default.
  • Not sure about the plans for the new structure of the wiki atm, have to search for some information about it. But there are some pages missing which are used in the URL-field of old and new (openSUSE 11.3/Factory) rpms. One example is the patterns page (e.g. from the patterns-openSUSE* rpms) and I assume there are others.
Tech Tags:

Tuesday, July 13, 2010

openSUSE: new wiki, and now ...

... a lot of work and some trouble. Since yesterday is the new openSUSE wiki online, as I discovered today as I checked my last week updated user page. The page was gone ... I had to create a new version of the page. Thanks!

I really appreciate the time the openSUSE wiki-team spend on the update, but unfortunately the new wiki don't always work as exprected:
  • You can export any page via Special:Export (from the old wiki, which you can reach via http://old-en.opensuse.org) and you should be able to import the page via Special:Import. But the import page don't work, you get "Permission error: The action you have requested is limited to users in the group: Administrators.". No way to migrate a page from the old to the new wiki for now!
  • If you 'Log out', you end in a old-style wiki page, which is oddly enough part of the new wiki:
  • The User:* pages are still not protected. Any user can change the content of your userpage. That's inacceptable! If you don't monitor your page very closely other ppl. may write there whatever they want. Btw. I opened a bug ages ago (2008-07-16) for this problem, but it's still not fixed even though there is already a proposal how to fix it included (bnc#409520).
  • Due to this post you should recreate to User:* page with a template. Unfortunately I couldn't find a way to load/import the template if you already created and saved the content of your page. That's why my page will stay in the old style.
So far so good about the technical part. There is another issue I don't like on the new wiki: the corporate design (CD). Except for the little lizard at the top left corner, there is not that much that differs the openSUSE wiki from other MediaWikis. I miss the distinguishing characteristics to other wikis and the associations to e.g. the design of the current openSUSE installer as you can see if you compare both side-by-side:


Even the sponsor logo is much bigger than the openSUSE lizard. There is no big recognition effect. While it's may not such an issue if you use a prosaic design for a developer service like build.opensuse.org, it's IMO important to have a design with a higher recognition effect for direct user services.
Tech Tags:

Thursday, July 01, 2010

Hacking osc (3)

Here my latest changes/commits on osc:
  • extended 'osc wipebinaries' to read package/project from checked out directories [1]
  • fixed 'osc diff' function which left tempfiles in /tmp after finished [2]
  • changed 'osc getbinaries' to work also in project dirs. If 'osc getbinaries' get called in a checked out directory all packages of the project get downloaded [3]
Tech Tags:

Thursday, June 24, 2010

Hacking osc (2)

The last days I fixed again some issues in osc. This time it was about the 'osc results' options:
  • fixed 'osc results -a/-r' if you call it from a package directory [1]
  • fixed and enabled 'osc results -a/-r' also for project directories to be able to filter the output for architecture(s) and/or repo(s) (especially since it can be a long list) [2]
Since I have now commit rights at the osc git repo: it should be in the next release.
Tech Tags:

Saturday, June 12, 2010

Hacking osc

Last month I found some time to take a look at osc to fix issues and add some stuff I was missing since I have to work with build.opensuse.org and the SUSE internal buildservice (e.g. for updates and maintenance of our enterprise products).

Yes, I know it's some weeks old and now integrated, but anyway. Here is what I've done:
  • added new 'osc getbinaries REPOSITORY' to checkout the RPMs for all architectures, including the source RPMs, into subdirectories [here]
  • fix 'osc my' to get the apiurl from checked out packages if possible [here]
  • make sure that global option -A always works too in a directory with a checked out package [here]
  • add run_pager() and make osc log/diff work like git log/diff (call less by default to display the result of diff) [here]
  • fixed some close() statements and some other warnings [here]
Tech Tags:

Monday, September 15, 2008

Back from SUSE Labs ... arrived at Portland

Friday we traveled back from Liberec (Czech Republic) to Nuremberg after an interesting week at the SUSE Labs Conference. Right now I arrived at Portland International Airport (OR/USA) for the Linux Plumbers Conference 2008 this week (17th-19th. September 2008). I will stay also for the BlueZ Developer Meeting next week (22th - 24th September 2008). This means nearly two interesting and fascinating weeks in Portland full with conferences and the chance to meet some interesting people and listen to also interesting talks.

Monday, September 08, 2008

Arrived at SUSE Labs Conference

I arrived today at Liberic (Czech Republic) for the SUSE Labs Conference 2008 from 08.-12. September. It was a really relaxed car-trip from Nuremberg this time.

There are many interesting talks, discussions and hacking planed about different topics as e.g. powermanagement, different kernel topics (Real-Time, filesystems, testing, OOM-killer ...) or network.
Tech Tags:

Monday, June 16, 2008

Hunting for a job as linux developer?

Are you seeking for a job as a open source software developer? Do you have experience with Linux and are you interested in develop software for Linux? You have knowledge of technologies related to laptops/mobile devices as e.g. WLAN, ACPI, Bluetooth, HAL, power management, device drivers or data synchronisation? You are a good C/C++ developer?

Then the SUSE/Novell Mobile Devices Team has probably a interesting job offer for you. We are looking for a talented, energetic Software Developer to increase our team. You can find the full job description here. SUSE offer competitive salaries and benefits. As far as I know the job location is not necessarily Prague.

If this sound interesting to you, mail us your application documents (for contact see here) and feel free to let me know.
Tech Tags:

Wednesday, February 27, 2008

HAL: some deprecated keys ...

... will be removed from HAL with end of this month, because they are deprecated since 12 months now and already replaced by other keys/properties. The affected keys  (old --> new/replacement) are:

2008-02-28:

  • smbios.system.manufacturer --> system.hardware.vendor
  • smbios.system.product --> system.hardware.product
  • smbios.system.version --> system.hardware.version
  • smbios.system.serial --> system.hardware.serial
  • smbios.system.uuid --> system.hardware.uuid
  • smbios.bios.vendor --> system.firmware.vendor
  • smbios.bios.version --> system.firmware.version
  • smbios.bios.release_date --> system.firmware.release_date
  • smbios.chassis.manufacturer --> system.chassis.manufacturer
  • smbios.chassis.type --> system.chassis.type
  • system.vendor --> system.hardware.vendor

2008-03-01:

  • info.bus --> info.subsystem
  • *.physical_device --> *.orginating_device

Please note, that there are some other (IMO rarely used) keys which are planed to be removed end of March:

2008-03-21:

  • usb_device.speed_bcd (int) --> usb_device.speed (double)
  • usb_device.version_bcd (int) --> usb_device.version (double)

Please check your packages for these keys (code and shipped fdi-files) and prepare them for the next HAL package. If you use openSUSE or you package RPMs  for openSUSE:  the next HAL version for openSUSE 11.0 (Beta) will be shipped without support for these keys.

Tech Tags:

Saturday, February 02, 2008

New/updated packages ...

... I have added new packages to my openSUSE Build Service homeproject for SLE-10 and openSUSE 10.2 - Factory. Some of them already existed in some other projects in the buildservice or in other places, but not up-to-date.

The new packages are:

  • KBlogger v1.0 Alpha 2 for KDE4
  • QSvn v0.6.1 for QT4
  • QGit v1.5.8 for QT3
  • QGit v2.1.1 for QT4
  • SVK v2.0.99_991

Some other packages get updated:

  • CellWriter to v1.3.3
  • kvkbd to v0.4.8
  • Jarnal to v9.20

Tuesday, November 06, 2007

TabletPCs: Cellwriter

Recently I found a new cool tool for TabletPCs: Cellwriter. The developer describe it as 'a grid-entry natural handwriting input panel' and it reminds me to the input panel on the Windows XP TabletPC Edition.

It provides a way to enter text by write characters with a pen to a grid. The big advantage in comparison with e.g. tools like xstroke is: there are no limitation for the way you write a character. You can take off the pen for one character and write points or an other line. This allows to write all characters of Unicode (e.g. German umlauts or chinese). As first you have to train the tool to correctly recognize your input. For this you can use the 'Train'-dialog where you should write each char five times into the related grid.

After the user trained CellWriter, he can use it to simple input text, commands or whatever to any desktop application that has the focus. Cellwriter show as applet e.g. in the KDE Panel and can get hide/shown via click on the applet icon. You can place the window free on the desktop or dock it to Top or Bottom of the screen. The input dialog allows also to correct wrong recognized input or to simply delete input. If you finished, simply press enter to send the text to the application with the input focus.

If you prefer to enter text via a virtual keyboard, CellWriter has also a solution for this. Simply press on the Keys icon and you get a virtual keyboard. Unfortunately this works for me only if the window is docked to the screen, but I assume it is a bug. There is also some more room for improvement: I could not find a way to configure the layout of the virtual keyboard, it was always US.

Cellwriter is a relative young project. The Changelog show the initial package is from end of August 2007. But it is a great tool and work well, also if there is some room for improvements:

  • The user need to train the tool before use the first time. It would be useful to have a basic pre-trained mode, which would allow the user to simply use it from the first start (at least for basic Latin characters).
  • The keyboard need to get fixed (see above) and should support configurable key maps.
  • If CellWriter is docked it should simply roll itself up if the focus get lost (like yakuake). If Cellwriter is in not docked the window is unfortunately always on top, thats annoying.
  • It would be cool if Cellwriter would detect input areas automatically and would show a icon besides this area to pop-up the input window. Not sure if this is that simple or if this need some changes in the desktop environments, but it should be IMO possible.

Conclusion: Cellwriter is a great tool, I like it. It allows TabletPC users to get basic, but natural handwrite recognition. Simply forget xstroke, this tool is very much powerful. I have already packaged it for openSUSE 10.2, 10.3 and Factory. You can get the packages from my repository. Feel free to install and use it. We plan to add the package to the next openSUSE release.

Tech Tags:

Wednesday, November 08, 2006

HAL patch collection (2)

Today again some new patches I send to the HAL mailing list which aren't included in the git repository because they are not approved so far :
  • fix detection of wireless network capability for devices which use drivers with dscape stack as e.g. rt2500pci: here
  • fix to add hardware specific/dependent sound devices to HAL (as e.g. /dev/snd/hwC0D0): here
  • fix of libhal related to changed behavior of dbus_error_is_set(error) if error == NULL in the new D-Bus. Now the check would crash the realated application which use libhal. Download: here
These patches are against current HAL git. As always: you can find all my current HAL patches here.
Tags:

Thursday, October 26, 2006

HAL patch collection

There a currently some patches I send to the HAL mailing list which aren't included in the git repository so far. They should be included in the new HAL package for openSUSE 10.2 Beta2. Here a list of these patches (feel free to use them on your own distribution):
  • fix build (hald-addon-macbookpro-backlight) against newer versions of libpci: here
  • add support for Standby (S1) to HAL: here
  • remove backend postfix from script filenames (need maybe rename files by hand, for more see this mail thread): here
  • A performance fix for search in pci.ids for vendor and product information of PCI devices. This patch is a reworked version of a inital patch from Ihno Krumreich. I extended the patch to fix bug in the search algorithm and to stop search if found everything we looking for. This patch speed up the search in the list by factor ~8-15 if HAL starts up: here
  • A new version of my patch to detect Tablet PCs (as e.g. with Wacom tablet devices and some Fujitsu Siemens machines) and to set the needed serial ports on boot: here
These patches are against current HAL git. You can find all my current HAL patches here.
Tags:

Wednesday, April 12, 2006

kernel module packages

Last week , while testing KPowersave on Kubuntu to force UpstreamVersionFreeze Exception process, I tested a LG M1 Express Dual as first with SUSE 10.1 Beta9, but it was a pain to install on this machine. I couldn't start installation via SLP: the kernel doesn't support the network card, USB and cardbus tulip network card also not worked. At the end I used a DVD to install the laptop.

After installation, in the running system the network worked via the usb docking station (also if KNetworkManager alway try to use COM1 instead of the correct networkinterface and I need to switch this always manually) but not correct via a Tulip cardbus card. I need pci=assigned_busses as kernel parameter and the card must be inserted before the yenta_socket kernel module is loaded. But also in this case the tulip module is not loaded automatically.

Btw. the onboard networkcard is not supported by the kernel. It's a Agere Systems ET1310 ethernet card. There was a patch (from a Agere developer as it looks) available e.g. on dadams1969.googlepages.com to add kernel support. I tested the module on the machine and it worked. But I needed to add some little fixes to get the patch compile. While testing I recognised that the module generate random mac addresses. Looks as if the first read from the EEPROM, to get the mac of the hardware, fail and instead of try again it generates a random address. With a little workaround (read directly two times from the EEPROM) I get the correct address.

Because it's not really a good idea to compile each time while BETA testing, after each kernel update or new installaation I made a et131-KMP package. Thanks to Andreas Gruenbacher for the help to get the package build. It's not available via factory tree at the moment. But If you need this package you can download it (without any support or guaranty) here. I hope Agere fix the module and try to get this in the linux kernel.

I also added a omnibook-KMP package to the factory tree. I should allow a lot of machines e.g. to get support for brightness change. For more information about the supported Laptops (HP Omnibook and Pavilion, Toshiba Satellite and some FSC, Compal, Acer and Compaq) and the features see the sf.net
omke project page. I already added support for the module to powersave. The package should be on the media of RC1 and SUSE Linux 10.1/SLES 10/SLED 10.

Thursday, March 23, 2006

The last two weeks ...

I didn't wrote anything here since two weeks. So here a update about some of the issues I worked on in this time:

Powersave:
  • I installed the first time a SUSE Linux 10.1 Beta 7 on a Apple iBook G4. The installation process is really abortive compared to normal install on ix86 or x86_64. By the way powersave also work on ppc and I tested (K)Powersave on this machine. Suspend to Disk work perfect, but I could not get Suspend to RAM running on this machine. Looks as if this not work on ppc via apm, need to investigate if this maybe is possible somehow via pmu. I added support for change brightness on machines with pmu support to powersave.
  • I also added brightness support for the omnibook kernel module. They released now a updated version of the package and now you can also unload the module on a 2.6.x kernel. I try to build a km_omnibook package in the next days.
HAL:
  • Added more support for TabletPCs to HAL. From now HAL set automatically the serial port (by call the correct setserial command) for the Wacom Tablets if they are detected. Because HAL starts early enough before the X server this addon should be able to activate the port to be used in X. I also added a FDI file to set the correct ttyS* device on machines where we should not use ttyS0.

Tuesday, February 21, 2006

Packaging - kdbus

Last week I found on kde-apps.org a new interesting package: kdbus. It's a KDE application to discover D-BUS services on the system and session bus and call found methodes. This is the same as kdcop for DCOP. I added the package to the SUSE build system and it was approved for production on the next day - really fast, thanks to Andreas Jäger - and is now available on factory and the next release.


By testing the package I could see that currently only D-BUS itself is full supported for introspection via the bus. I'm not sure if the other services are broken or only not support introspection. In case of HAL and also powersave I could not found any introspection code in the source. So I think we should add at least to powersave the related methodes and the needed xml file with the description of the available services, methodes and signals from the powersave daemon.

Btw. the application is very usefull if all services would implement intospection also If the GUI need some fixes and improvements because currently resize the GUI did not work so well.