Tag Archives: linux

Dell XPS13, Developer Edition and Fedora

I am now the proud owner of a Dell XPS13 Developer Edition. It ships with Ubuntu, and I have just installed Fedora 21.

For a “Linux” Laptop, linux support is actually pretty terrible, but you can get all the hardware functioning.

BIOS
First thing, make sure you upgrade the BIOS past A02.

Broadcom wireless chipset
Apparently if you are lucky enough to pick up one of these in Europe it will ship with an Intel wireless chipset, but the US version has a Broadcom wireless card in it.

  • Add the rpmfusion repository
  • Install the required module and support software
    # yum install kmod akmod kmod-wl kernel-devel
  • Reboot your laptop

Microphone
Updating the BIOS will get the sound to work, but the microphone will still not work. Updating to Kernel 4.0 will fix the problem, or waiting for Fedora 22. I found a backported 4.0 here.

Chromebook Pixel, Fedora 20 and Dualboot

My first update in a very long time. Please do not do this if you are unsure of any of the steps. Though as long as you have a ChromeOS recovery built, your Pixel will be fixable. Also, you will lose your current local data. I have written this from memory, so I take no responsibility for your broken notebook.

So I was lucky enough to get a Chromebook Pixel. I love the hardware, I even like Chromeos, but there are occasions when I want full linux.

You can install any OS you like on a Pixel using the legacy boot options, but this will usually make ChromeOS un-bootable, even if you don’t remove it.

If you google, you will find 2 main options for running another Linux distribution along side ChromeOS:

  1. crouton, running Debian/Ubuntu based distributions in a chroot
  2. chrubuntu, Running ubuntu in a dual-boot environment

But I wanted to dualboot with Fedora. This basic steps are simple.

  • Resize paritions, do not edit partition types or labels.
  • Install Linux on /dev/sda7.

Unfortunately the Fedora installer (Anaconda) will always alter the partition table and stop ChromeOS booting. So we need to install Fedora without using the Fedora Installer. Full Instructions below.
Continue reading Chromebook Pixel, Fedora 20 and Dualboot

The Nexus 7 and Fedora 17

Fedora support MTP, but the Nexus 7 is not recognised.

But it is fairly straight forward to get ADB, if your using the Developer Tools, and MTP mounting working.

  1. Create the file /etc/udev/rules.d/99-android.rules

    # Google Nexus 7 16 Gb
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e41", MODE="0666", OWNER="your-login" # MTP media (multimedia device)
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0666", OWNER="your-login" # MTP media with USB debug on(multimedia device)
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e43", MODE="0666", OWNER="your-login" # PTP media (camera)
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e44", MODE="0666", OWNER="your-login" # PTP media with USB debug on (camera)
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0666", OWNER="your-login" # Bootloader
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d001", MODE="0666", OWNER="your-login" # Recovery
    # MTP Support
    ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e41", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
    ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

  2. Restart udev

    # systemctl restart udev.service

  3. Install required software

    # yum install mtpfs libmtp

Done.
You should now be able to mount your device:

$ mtpfs /home/user/some_mount_point

The existing help I have found on MTP failed to include both Product IDs. Meaning if USB debugging was enabled on the device libmtp would not recognise your device.

Offline cached ldap and krb logins with SSSD and Active Directory

SSSD from the Fedora Project provides NSS and PAM mechanisms for cached network credentials (Notebook users can still login when disconnected). SSSD is available in the main repos for both Fedora and Ubuntu.

The following sssd.conf worked for our environment. (Making it work with FreeIPA or Open LDAP and Kerberos is far less fiddly).

[sssd]
domains = MYDOMAIN
services = nss, pam
config_file_version = 2
sbus_timeout = 30
 
[pam]
offline_credentials_expiration = 0
 
[domain/MYDOMAIN]
description = MYDOMAIN AD Server
#debug_level = 9
enumerate = true
ldap_referrals = false
min_id = 1000
 
access_provider = permit
 
id_provider = ldap
chpass_provider = krb5
 
ldap_uri = ldap://my.ldap.server
ldap_search_base = dc=my,dc=ad,dc=domain
 
ldap_id_use_start_tls = False # TLS/SSL is supported

# If you do not have anonymous binds enabled 
# User that can read from AD, any normal user should work. Update as necessary
ldap_default_bind_dn = user@my.ad.domain
# Leave this as password
ldap_default_authtok_type = password
 
# The ldap users actual password, update as necessary
ldap_default_authtok = password

# This is the important stuff for making AD LDAP work 
ldap_schema = rfc2307bis
ldap_user_principal = userPrincipalName
ldap_user_fullname = displayName
ldap_user_name = sAMAccountName
ldap_user_object_class = user
ldap_user_home_directory = unixHomeDirectory
ldap_user_shell = loginShell
ldap_user_principal = userPrincipalName
ldap_group_object_class = group
ldap_force_upper_case_realm = True

# I love this setting
override_homedir = /home/%u
 
# kerberos config
auth_provider = krb5
krb5_server = dc.my.ad.domain
krb5_realm = MY.AD.DOMAIN
# This will probably not work for changing passwords
krb5_changepw_principle = kadmin/changepw
krb5_ccachedir = /tmp
krb5_ccname_template = FILE:%d/krb5cc_%U_XXXXXX
krb5_auth_timeout = 15
cache_credentials = True

Exim/Gmail/Fedora

Ever since working with Debian I have wondered why more Linux distros don’t ship with exim on as the default mail client.

“exim -bt email@address” is reason enough

It is simpler to setup and easier to administer. If you want your fedora machine to send local email via Gmail, here is a guide.

One point to add, if you want root mail delivered somewhere, edit /etc/aliases and set an alias for root. Don’t forget to run “newaliases” when your done.

Changing the default Calendar app in gnome-shell

For various reasons I use Thunderbird as my calendaring app. One of Gnome-shells most obvious features is it’s clock applet front and centre on the screen, with it’s built in calendar. It pulls this information from Evolution.

This config change will get the applet to launch Thunderbird (or any  other app), but it will still not populate the calendar with entries from Thunderbird. But this single line, will mean that Thunderbird launches when you click on the in-built calendar.

$ gsettings set org.gnome.desktop.default-applications.office.calendar 
exec 'thunderbird'

To populate the calendar widget there is an extension for Thunderbird called: Evolution Mirror which should populate the evolution db with your Thunderbird data. You will need to install a couple of additional packages to make it work, in F16:

$ sudo yum install gnome-python2-extras gnome-python2-evolution

Corrupted drive, missing superblock,

I was passed a currupt LVM volume today and asked to recover it. It was completely screwed. “dumpe2fs” could not give me a list of superblocks for me to pass to fsck.

I could probably calculate where the superblocks should be on the filesystem by hand if I needed to, but it was much simpler than that:

# mkfs.ext3 -n

The -n is a dry run. It will show me what would happen but not actually touch the drive. This will also show you where the superblocks should be. Pass one of these to you fsck command. If the previous partition had been created with a set of unique options this may not work. But your filesystem’s hosed anyway so it may be worth the punt.

If your filesystem is completely screwed though you may recover little. And what you do recover will probably be sitting in “lost+found”, fsck will recover your filesystem but it makes no guarantee about recovering files.