I had to mount MTP FS for my Android phone. Following these instructions worked:
http://tacticalvim.wordpress.com/2012/12/08/mounting-nexus-4-via-mtp-in-fedora-17/
Essentially, it involves installing the simple-mtpfs package, putting an appropriate rules file in /etc/udev/rules.d, and reloading the rules, and then mounting with simple-mtpfs.
Technical Learnings of Daily Practice for make install
Sunday, March 17, 2013
Thursday, March 7, 2013
Using Google Authenticator for sshd password login on Linux
Here are the standard instructions:
I wanted to enter the password and OTP together instead separately for two prompts. This is important for things like connecting to NX through a login password.
On Fedora, I followed the instruction of adding the forward_pass option and it worked like a charm. I had to make sure I had a new-enough version of the RPM, though. v0.3 didn't seem to support the option.
Wednesday, November 28, 2012
Wednesday, November 14, 2012
Setting default rpath with gcc
I built my own gcc in /usr/local, but unfortunately, the gcc produced still generates executables that have rpath for the usual system library paths, i.e. those in /usr and /. I changed the default by using my own specs file adapted from the default one. I added the appropriate -rpath options at architecture-specific places under '*link'.
Setting gcc default options
gcc can be given default options by putting the desired specs file in designated paths. To discover what the expected paths are, run strace on gcc to see what paths it is checking.
Friday, November 9, 2012
Enabling trim for encrypted LUKS on SSD in Fedora 17
I tried to enable trim on an encrypted partition, following instructions here, which isn't exactly for F17:
http://worldsmostsecret.blogspot.com/2012/04/how-to-activate-trim-on-luks-encrypted.html
and the discussion here:
http://forums.fedoraforum.org/showthread.php?t=278455
It didn't work for me. Neither "dmsetup table ... --showkeys" nor "cryptsetup status ..." indicated that trim was actually being used.
It turned out that in /etc/crypttab, for some reason, the option to specify is not discard, but allow-discards. Why?
http://worldsmostsecret.blogspot.com/2012/04/how-to-activate-trim-on-luks-encrypted.html
and the discussion here:
http://forums.fedoraforum.org/showthread.php?t=278455
It didn't work for me. Neither "dmsetup table ... --showkeys" nor "cryptsetup status ..." indicated that trim was actually being used.
It turned out that in /etc/crypttab, for some reason, the option to specify is not discard, but allow-discards. Why?
Wednesday, November 7, 2012
How to exclude memory regions from the Linux kernel (and how not to use grub2)
The new RAM turned out to be faulty at a particular address, so in order to keep running with a stable system, I tried adding an option 'memmap=1m$12621m' by editing the command-line in grub2 during boot. This was meant to exclude 1MB surrounding the faulty address.
The kernel got stuck very early. It turned out that I was using grub2 wrongly.
grub2 has special escaping requirements, and '$' means something special to it. In order to end up with a literal '$', it needs to be escaped with '\', so if editing the command in grub2 during boot, the option needs to be 'memmap=1m\$12621m'. However, in /etc/default/grub, which is used to generate the grub config file used during boot, an additional layer of escaping is needed, so there's a line in /etc/default/grub that looks like this:
GRUB_CMDLINE_LINUX=" ... memmap=1m\\\$12621m ..."
So, '\' and '$' each needs its own escaping with a '\'.
The kernel got stuck very early. It turned out that I was using grub2 wrongly.
grub2 has special escaping requirements, and '$' means something special to it. In order to end up with a literal '$', it needs to be escaped with '\', so if editing the command in grub2 during boot, the option needs to be 'memmap=1m\$12621m'. However, in /etc/default/grub, which is used to generate the grub config file used during boot, an additional layer of escaping is needed, so there's a line in /etc/default/grub that looks like this:
GRUB_CMDLINE_LINUX=" ... memmap=1m\\\$12621m ..."
So, '\' and '$' each needs its own escaping with a '\'.
Subscribe to:
Posts (Atom)