Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

How to make Samsung Xpress C480W scanner working on Ubuntu Bionic

Intro


As I don't have time today, this is going to be one of the shortest posts in this blog. But I really want to save it as I've already spent a couple of hours trying to figure it out. So to make the long story short I reinstalled my laptop with Ubuntu Bionic and my Samsung Xpress C480W scanner stopped working. Nooooo!

Fixing the scanner


OK, so in order to make the scanner working again download and install the Samsung Unified Linux Driver:

sudo apt install libusb-0.1-4

cd /tmp

wget https://www.bchemnet.com/suldr/driver/UnifiedLinuxDriver-1.00.39.tar.gz

tar -xzf UnifiedLinuxDriver-1.00.39.tar.gz

cd uld

./install.sh

Easy peasy. So what's wrong? The problem is that the installer places the module under the "/usr/lib/sane" directory while Ubuntu Bionic expects them under the "/usr/lib/x86_64-linux-gnu/sane" directory! Sigh ... I don't know whether this is a bug or not, I basically didn't have time to check. But the problem can be easily solved by linking the module into the proper location:

sudo ln -sf /usr/lib/sane/libsane-smfp.so* /usr/lib/x86_64-linux-gnu/sane/

I hope it helps.


How to upgrade Dell BIOS on Ubuntu


Intro


According to Ubuntu Wiki Dell has discontinued support for Linux. Just such a "nice" surprise. How to upgrade the BIOS then when all of the files are now distributed as a Windows executables? Fortunately, before trying any of not so easily looking solutions on the Ubuntu Wiki I have found out some other way to do it. The following section describes the detailed steps required to upgrade the BIOS on Ubuntu.

Upgrade


1) First of all, you need to install the required package:

$ sudo apt-get install smbios-utils

2) The above package package provides the getSystemId command that we can use to verify the System ID of the machine that is a hex value that is unique for any of the Dell products or products family. I.e. when running the command on my PowerEdge R300 the following output was returned:

$ sudo getSystemId 
Libsmbios version:      2.2.28
Product Name:           PowerEdge R300
Vendor:                 Dell Inc.
BIOS Version:           1.5.1
System ID:              0x020F
Service Tag:            ABCDEFG
Express Service Code:   13772621908
Asset Tag:              
Property Ownership Tag:

3) Now you need to go into the following website, find out the directory containing the System ID that you've just found in its name and use the one that has the latest BIOS version in its name too. I.e. for the above machine this was the following one:

system_bios_ven_0x1028_dev_0x020f_version_1.5.2

5) Go into the directory and download the bios.hdr file. Put it somewhere on your machine and launch the following command to start the BIOS upgrade process:

$ sudo modprobe dell_rbu
$ sudo dellBiosUpdate -u -f bios.hdr

6) Reboot your machine. It should come up with the BIOS version that you've already downloaded and installed. You may check that by running the following command after reboot:

$ sudo dmidecode -s bios-version
1.5.2

Could not perform immediate configuration on 'util-linux' - issues during the upgrade from Ubuntu 10.04 to 12.04 (part 3)




Intro


When performing an upgrade of Ubuntu 10.04 to 12.04 I experienced some serious issues with the util-linux package. What's interesting is that I haven't found any official website for this bug. Thanks to some different tips found in the I have managed to bypass those issues anyway. The following steps describe a detailed troubleshooting process both with a solution.


Symptoms


  • During the regular upgrade process, when running the following command:
apt-get dist-upgrade

the following error message is being displayed:

E: Could not perform immediate configuration on 'util-linux'.Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)

Solution


Please, run the following sequence of commands:
  • apt-get install libc6-dev
  • apt-get install util-linux -f -o APT::Immediate-Configure=0
  • apt-get dist-upgrade
  • follow the regular on-screen instructions to accomplish the upgrade process
  • apt-get autoremove
  • reboot


Notes


Issues described in the above posts are not the only ones that I encountered when upgrading my Ubuntu 10.04 servers to 12.04. Please, take a look on the following post descirbing similar issues both with the troubleshooting process and the solution:

VMFS: Unsupported version 5 - How to mount VMFS5 on Ubuntu


Intro


The VMFS is great, but it lacks from the support on Ubuntu and other Linux distributions. We all know the vmfs-tools package and the vmfs-fuse tool and there are a lot of great HowTos regarding its usage however its current official version - 0.2.1-1 - doesn't support VMFS5. The following is an output from my terminal when trying to mount VMFS5 formatted disk (/dev/sda1 in my case):


root@ubuntu:~# vmfs-fuse /dev/sda1 /mnt/
VMFS: Unsupported version 5
Unable to open device/file "/dev/sda1".


According to some various tips I have finally managed to mount the VMFS5 drive on Ubuntu using the manually compiled 0.2.5-1 version anyway, but the support is extremely limited so far (e.g. there's no RW support). What I found is that the goal of the developers is to introduce stable internal API and the mkfs.vmfs tool prior to version 0.5 and the full write support prior to version 1.0. So far, please find the following instruction that will enable you to mount your VMFS5 drives on Ubuntu in RO mode. I was using regural Ubuntu Desktop 12.04 Live CD.


Installation


1) First of all boot the system from Ubuntu Desktop 12.04 Live CD and log in as a root user. Then download and extract the package file:

root@ubuntu:~# cd /tmp
root@ubuntu:/tmp# wget https://launchpad.net/ubuntu/+archive/primary/+files/vmfs-tools_0.2.5-1.tar.gz
root@ubuntu:/tmp# tar -xzf vmfs-tools_0.2.5-1.tar.gz
root@ubuntu:/tmp/vmfs-tools# cd vmfs-tools

2) Install all the prerequisites. For best practice refer to the README file. In general the following should be enough:

root@ubuntu:/tmp/vmfs-tools# apt-get install gcc make uuid-dev pkg-config libfuse-dev

If you need the man pages, you'll need to install asciidoc, xsltproc and docbook-xsl packages too.

3) Configure and compile the package:

root@ubuntu:/tmp/vmfs-tools# ./configure 
Checking for pkg-config...yes
Checking for uuid...yes
Checking for fuse...yes
Checking for asciidoc...no
Checking for xsltproc...no
Checking for docbook.xsl...no
Checking for strndup...yes
Checking for dlopen in -ldl...yes
Checking for posix_memalign...yes
echo "#if 1" > version
echo "#define VERSION \"v0.0.0.0.\"" >> version
echo "#else" >> version
echo VERSION := v0.0.0.0. >> version
echo "#endif" >> version
make: `config.cache' is up to date.
root@ubuntu:/tmp/vmfs-tools# make
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Idebugvmfs -Ilibvmfs -I/usr/include/uuid -Ilibreadcmd  -include version   -c -o debugvmfs/debugvmfs.o debugvmfs/debugvmfs.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Idebugvmfs -Ilibvmfs -I/usr/include/uuid -Ilibreadcmd     -c -o debugvmfs/variables.o debugvmfs/variables.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/scsi.o libvmfs/scsi.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/utils.o libvmfs/utils.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_bitmap.o libvmfs/vmfs_bitmap.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_block.o libvmfs/vmfs_block.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_dirent.o libvmfs/vmfs_dirent.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_file.o libvmfs/vmfs_file.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_fs.o libvmfs/vmfs_fs.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_heartbeat.o libvmfs/vmfs_heartbeat.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_host.o libvmfs/vmfs_host.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_inode.o libvmfs/vmfs_inode.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_lvm.o libvmfs/vmfs_lvm.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_metadata.o libvmfs/vmfs_metadata.c
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibvmfs -I/usr/include/uuid    -c -o libvmfs/vmfs_volume.o libvmfs/vmfs_volume.c
ar -r libvmfs/libvmfs.a libvmfs/scsi.o libvmfs/utils.o libvmfs/vmfs_bitmap.o libvmfs/vmfs_block.o libvmfs/vmfs_dirent.o libvmfs/vmfs_file.o libvmfs/vmfs_fs.o libvmfs/vmfs_heartbeat.o libvmfs/vmfs_host.o libvmfs/vmfs_inode.o libvmfs/vmfs_lvm.o libvmfs/vmfs_metadata.o libvmfs/vmfs_volume.o
ar: creating libvmfs/libvmfs.a
ranlib libvmfs/libvmfs.a
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ilibreadcmd     -c -o libreadcmd/readcmd.o libreadcmd/readcmd.c
ar -r libreadcmd/libreadcmd.a libreadcmd/readcmd.o
ar: creating libreadcmd/libreadcmd.a
ranlib libreadcmd/libreadcmd.a
gcc -o debugvmfs/debugvmfs debugvmfs/debugvmfs.o debugvmfs/variables.o libvmfs/libvmfs.a libreadcmd/libreadcmd.a   -ldl -luuid 
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ifsck.vmfs -Ilibvmfs -I/usr/include/uuid -include version   -c -o fsck.vmfs/vmfs_fsck.o fsck.vmfs/vmfs_fsck.c
gcc -o fsck.vmfs/fsck.vmfs fsck.vmfs/vmfs_fsck.o libvmfs/libvmfs.a   -luuid
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Iimager     -c -o imager/imager.o imager/imager.c
imager/imager.c: In function ‘skip_zero_blocks’:
imager/imager.c:165:13: warning: ignoring return value of ‘ftruncate’, declared with attribute warn_unused_result [-Wunused-result]
gcc -o imager/imager imager/imager.o   
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ivmfs-fuse -Ilibvmfs -I/usr/include/uuid -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse    -c -o vmfs-fuse/vmfs-fuse.o vmfs-fuse/vmfs-fuse.c
gcc -o vmfs-fuse/vmfs-fuse vmfs-fuse/vmfs-fuse.o libvmfs/libvmfs.a   -luuid -pthread -lfuse -lrt -ldl
gcc  -Wall -O2 -g -D_FILE_OFFSET_BITS=64  -Ivmfs-lvm -Ilibvmfs -I/usr/include/uuid -Ilibreadcmd  -include version   -c -o vmfs-lvm/vmfs-lvm.o vmfs-lvm/vmfs-lvm.c
gcc -o vmfs-lvm/vmfs-lvm vmfs-lvm/vmfs-lvm.o libvmfs/libvmfs.a libreadcmd/libreadcmd.a   -ldl -luuid 
(echo "*.tar.gz"; \
echo "*.[ao]"; \
echo "*.xml"; \
echo "*.8"; \
echo "version"; \
echo "config.cache"; \
echo debugvmfs/debugvmfs; echo fsck.vmfs/fsck.vmfs; echo imager/imager; echo vmfs-fuse/vmfs-fuse; echo vmfs-lvm/vmfs-lvm; \
) > .gitignore
root@ubuntu:/tmp/vmfs-tools# make install
install -s -m 0755 debugvmfs/debugvmfs /usr/local/sbin/
install -s -m 0755 fsck.vmfs/fsck.vmfs /usr/local/sbin/
install -s -m 0755 vmfs-fuse/vmfs-fuse /usr/local/sbin/
install -s -m 0755 vmfs-lvm/vmfs-lvm /usr/local/sbin/
make: *** No rule to make target `debugvmfs/debugvmfs.8', needed by `/usr/local/share/man/man8/debugvmfs.8'.  Stop.

4) Now you should be able to mount the VMFS5 disk in RO mode without any issues:

root@ubuntu:/tmp/vmfs-tools# /usr/local/sbin/vmfs-fuse /dev/sda1 /mnt
root@ubuntu:/tmp/vmfs-tools# mount
/cow on / type overlayfs (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
/dev/sr0 on /cdrom type iso9660 (ro,noatime)
/dev/loop0 on /rofs type squashfs (ro,noatime)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
gvfs-fuse-daemon on /home/ubuntu/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ubuntu)
/dev/fuse on /mnt type fuse (rw,nosuid,nodev,default_permissions)

Don't be confused with the rw option. The disk is mounted in RO mode.



Could not perform immediate configuration of 'python-minimal' - Couldn't configure pre-depend multiarch-support for libnih-dbus1 - issues during the upgrade from Ubuntu 10.04 to 12.04 (part 2)



Intro


When performing an upgrade of Ubuntu 10.04 to 12.04 I experienced some serious issues with the python-minimal package that are described in the following bug. What I can only add is that none of the solutions provided there work as there's another issue with the libglib2.0-0 package. Searching for a solution in the Internet results in dozens of blogs written by desperate people that experienced the same issue and had to reinstall their boxes on a new LTS from scratch. I have managed to bypass those issues anyway. The following steps describe a detailed troubleshooting process both with a solution.


Symptoms


  • During the regular upgrade process, when running the following command:
apt-get dist-upgrade

the following error message is being displayed:

E: Could not perform immediate configuration on 'python-minimal'.Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
  • When running the following command:
apt-get install -o APT::Immediate-Configure=false -f apt python-minimal

as suggested on the following website another error message is being displayed:

The following packages have unmet dependencies.
  libglib2.0-0: Recommends: libglib2.0-data but it is not going to be installed
                Breaks: gvfs (< 1.8) but 1.6.1-0ubuntu1build1 is to be installed
E: Broken packages

Solution


Please, run the following sequence of commands:
  • apt-get install libglib2.0-dev - install the development version of the package
  • apt-get upgrade - we need to run that one more time as the libglib2.0-dev package makes some significant changes to the system
  • apt-get install -o APT::Immediate-Configure=false -f apt python-minimal - it should work without any issues this time
  • apt-get dist-upgrade
  • follow the regular on-screen instructions to accomplish the upgrade process
  • apt-get autoremove
  • reboot


Notes


Issues described in the above posts are not the only ones that I encountered when upgrading my Ubuntu 10.04 servers to 12.04. Please, take a look on the following post descirbing similar issues both with the troubleshooting process and the solution:

Could not perform immediate configuration of 'python-minimal' - Couldn't configure pre-depend multiarch-support for libnih-dbus1 - issues during the upgrade from Ubuntu 10.04 to 12.04 (part 1)


Intro


When performing an upgrade of Ubuntu 10.04 to 12.04 I experienced some serious issues with the python-minimal package that are described in the following bug. What I can only add is that none of the solutions provided there work as there's another issue with the libnih-dbus1 package. Searching for a solution in the Internet results in dozens of blogs written by desperate people that experienced the same issue and had to reinstall their boxes on a new LTS from scratch. I have managed to bypass those issues anyway. The following steps describe a detailed troubleshooting process both with a solution.


Symptoms


  • During the regular upgrade process, when running the following command:
apt-get dist-upgrade

the following error message is being displayed:

E: Could not perform immediate configuration on 'python-minimal'.Please see man 5 apt.conf under APT::Immediate-Configure for details. (2)
  • When running the following command:
apt-get install -o APT::Immediate-Configure=false -f apt python-minimal

as suggested on the following website another error message is being displayed:

E: Couldn't configure pre-depend multiarch-support for libnih-dbus1, probably a dependency cycle.

Solution


Please, run the following sequence of commands:
  • uname -r - you'll need to know your kernel version, e.g.:
3.2.0-23-generic-pae
  • apt-get remove libnih-dbus1 - please, note down all the packages that are going to be removed, except of any linux-image packages e.g.:
The following packages will be REMOVED:
  apache2 apache2-mpm-worker apache2.2-common bsd-mailx console-setup cron dkms dmsetup e2fsprogs eject grub grub-common hostname ifupdown
  initramfs-tools initscripts kbd libc6-i686 libdevmapper1.02.1 libnih-dbus1 libsasl2-modules logrotate module-init-tools mountall nagios-plugins
  nagios-plugins-basic nagios-plugins-standard netbase ntp ntpdate open-vm-dkms openssh-server plymouth postfix procps udev upstart ureadahead
  util-linux
  • Yes, do as I say!
  • apt-get install ubuntu-minimal
  • apt-get install [list of packages from point 2] - install back automatically uninstalled packages from point 2
  • answer N for any of the questions regarding configuration files, e.g.:
Configuration file `/etc/ntp.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** ntp.conf (Y/I/N/O/D/Z) [default=N] ? N
  • apt-get install linux-image-[version from point 1] - install Linux kernel (sometimes I need to rung that command twice)
  • apt-get install -o APT::Immediate-Configure=false -f apt python-minimal
  • apt-get dist-upgrade
  • follow the regular on-screen instructions to accomplish the upgrade process
  • apt-get autoremove
  • reboot

Notes


Issues described in the above posts are not the only ones that I encountered when upgrading my Ubuntu 10.04 servers to 12.04. Please, take a look on the following post describing similar issues both with the troubleshooting process and the solution: