Sunday, November 13, 2011

Boot Fedora 16 Live from partition on hard drive

Also known as a 'poor man's install', I wanted to have a rescue partition on the hard drive, which I can use grub to boot should something go wrong with the regular Fedora install.

Here's how I did it, based on instructions from http://forums.fedoraforum.org/showthread.php?t=191888

Use fdisk to create a FAT32 partition large enough to hold the live distro, in my case /dev/sda8 below
Format it using mkfs or gparted.


Command (m for help): p


Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xaa9baa9b


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    24578047    12288000   27  Hidden NTFS WinRE
/dev/sda2   *    24578048    24782847      102400    7  HPFS/NTFS/exFAT
/dev/sda3        24782848   502260399   238738776    7  HPFS/NTFS/exFAT
/dev/sda4       502261760   625142447    61440344    5  Extended
/dev/sda5       502263808   503287807      512000   83  Linux
/dev/sda6       503289856   605689855    51200000   83  Linux
/dev/sda7       605691904   613883903     4096000   82  Linux swap / Solaris
/dev/sda8       613885952   625141759     5627904    b  W95 FAT32

Mount the iso image, and copy files from it 
su
cd /mnt/
mkdir iso live
mount -o loop -t iso9660 ~/Downloads/Fedora-Live.iso iso
mount -t ext3 /dev/sda8 live
cp -r iso/* live/

Alternatively, a better way might be -
livecd-iso-to-disk --noverify --overlay-size-mb 2047 Fedora-16-x86_64-Live-LXDE.iso /dev/sda8 


Examine the grub conf on the live distro -
cat /mnt/live/EFI/boot/grub.conf
..
title Fedora-16-x86_64-Live-LXDE.iso
  kernel /EFI/boot/vmlinuz0 root=live:LABEL=Fedora-16-x86_64-Live-LXDE.iso rootfstype=auto ro liveimg quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0 
  initrd /EFI/boot/initrd0.img
..

Find the UUID of your live partition -

[steve@aspireone753 ~]$ ls -lF /dev/disk/by-uuid
total 0
lrwxrwxrwx. 1 root root 10 Nov 13 11:33 B381-1423 ->; ../../sda8

Then edit the regular grub.conf on your main linux installation. Changes needed are shown in bold.

sudo vi /boot/grub/grub.conf

paste in a new entry, copied from the live distro -

title Fedora-16-x86_64-Live-LXDE.iso
        root (hd0,7)
        kernel /EFI/boot/vmlinuz0 root=UUID=B381-1423 rootfstype=auto rw liveimg quiet  rhgb rd.luks=0 rd.md=0 rd.dm=0
        initrd /EFI/boot/initrd0.img

Reboot, and choose the live distro at the grub menu.

Fedora 16 Install

Well this didn't go so smoothly. I first tried to install from live usb - perhaps this was a mistake.
After partitioning, when beginning the install, it stopped with a filesystem error.
Frustrated also with LVM, I had tried the install without LVM.
I tried many partition layouts, including with LVM, but in the end was unable to resolve it.

Desperate, I did a fresh install of Fedora 15 (from DVD install media), using a custom layout (without LVM), which worked fine. From there yum upgrade from Fedora 15 to 16 went smoothly.

Wednesday, November 9, 2011

Picasa on Fedora

This you can find all over the web... but for my own use, and perhaps to save others browsing the many google results -

If you get this trying to run picasa -


/usr/bin/picasa: line 189:  8381 Segmentation fault      (core dumped) "$PIC_BINDIR"/wrapper check_dir.exe.so
/usr/bin/picasa: line 248:  8497 Segmentation fault      (core dumped) "$PIC_BINDIR"/wrapper set_lang.exe.so

Then install wine, and replace picasa's wine preloader with the one from the fedora wine install

cp /usr/bin/wine-preloader /opt/google/picasa/3.0/wine/bin/wine-preloader

And then, to allow sign-in to web albums -


cp /usr/lib/wine/wininet.dll.so /opt/google/picasa/3.0/wine/lib/wine/


Resizing LVM volumes

Just made the costly mistake of shrinking an LVM volume by booting from a DVD, and using lvm to resize directly. I should have read the following first -

http://www.linuxquestions.org/questions/linux-enterprise-47/shrink-lvm-without-dataloss-557746/

Seems the key step I missed was to use 'resize2fs' to resize the filesystem first.

Having re-installed... my next step is to put a second install on the hard disk, for future recovery work.

Saturday, October 8, 2011

Horrible web site - Citi Commercial Cards / Citimanager

Corporate policy now dictates that we use a Citibank corporate card... replacing the very functional 'First Card' we previously used. No problem... until one is forced to use their website to view bills etc.

1. Horrible login security

A password that needs to be between 6 and 9 characters long.
- What if I want a password with 10? Doesn't fit in their database table... too bad.
The password can't have any repeated characters in it
- Why not?
It must have mixed case and numbers
- Ok, that I can live with
After logging in with a password that fits all those requirements... it wants to know in which city I was born
- Why? If someone can remember the password that fits all the requirements... good luck to them in looking at  the price of the dinner I paid for on my company card

2. Horrible layout

Try to understand how much you need to pay - good luck

3. One way messaging

Yes, every time I login, I have a new message in my inbox about some system downtime.
But, try to send a message to customer service, with an enquiry about your account... no way. You need to call to a call center, remember a whole other set of authentication details, and hope that the person on the other end can answer your question

Customer first... not a chance.
Move into the 21st century Citibank.

Sunday, August 28, 2011

XBMC on Fedora 15 (upgrade from Fedora 14)

After upgrading from Fedora 14 to 15, XBMC stopped working with the error below -

/usr/lib64/xbmc/xbmc.bin: error while loading shared libraries: libopenjpeg.so.2: cannot open shared object file: No such file or directory

An update of xbmc didn't solve the problem.
However, a subsequent update of vlc did -

Installed Packages
vlc.x86_64                                               1.1.11-1.fc14                                               @rpmfusion-free-updates/14
Available Packages
vlc.x86_64                                               1.1.11-1.fc15                                               rpmfusion-free-updates    

Actually it may have been a broken spotify repo, that led to such updates not happening automatically.

Friday, August 5, 2011

HP Laserjet M1005MFP on Fedora 15

All looked good for my printer on Fedora 15 - on plugging it in, it was detected and some installation occurred. Unfortunately when trying to print it failed, and lpstat gave the info below -


[steve@aspireone753 ~]$ lpstat -t
scheduler is running
system default destination: HP-LaserJet-M1005
device for HP-LaserJet-M1005: hp:/usb/HP_LaserJet_M1005?serial=KJ18MKN
HP-LaserJet-M1005 accepting requests since Fri 05 Aug 2011 17:43:13 CEST
printer HP-LaserJet-M1005 now printing HP-LaserJet-M1005-8.  enabled since Fri 05 Aug 2011 17:43:13 CEST
/usr/lib/cups/filter/hpcups failed
HP-LaserJet-M1005-7     steve             1024   Fri 05 Aug 2011 17:42:16 CEST
HP-LaserJet-M1005-8     steve             1024   Fri 05 Aug 2011 17:43:13 CEST

A further check in /var/log/messages revealed -



Aug  5 17:43:14 aspireone753 hpcups[5262]: prnt/hpcups/HPCupsFilter.cpp 418: m_Job initialization failed with error = 48


From which google found the solution below -

https://bugzilla.redhat.com/show_bug.cgi?id=611255

Friday, July 8, 2011

Fedora 15 on Acer Aspire One 753

My new Acer Aspire One 753 arrived. Somewhat to my surprise the performance of it with Windows 7 was not great, so I shrunk the volume, and installed Fedora 15. This went quite smoothly, except for the installer wanting/needing internet access. As the built-in WIFI device isn't supported by GPL drivers, I needed to plug in a cable to complete the install.

I then set about getting wifi to work as follows -

Black list acer_wmi
echo blacklist acer_wmi > /etc/modprobe.d/blacklist-acer.conf

Install broadcom driver
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
yum update
yum install kmod-wl

Fedora 15 is performing very well, and the new interface is nice.

Sunday, June 26, 2011

Microsoft tax

My original Acer Aspire One sadly died recently, so I decided to replace it with an Aspire One 753. I'm anticipating it's arrival. One of the reasons I bought the Aspire One originally was that it came with Linux installed. Unfortunately this is no longer an option (the Cromia isn't available here yet), so I began to investigate if it's possible to get a refund for Windows 7. The posts below show that it is -

Getting a Windows refund from Acer in the Netherlands
Windows tax refund for Acer notebook (Acer Aspire 1410/1810T)

but I don't have the patience to go through the difficult process. Whilst I'm not a Microsoft hater in general, their monopolistic practices have clearly left a legacy -  and sadly this time they will be taking a cut from me.

Monday, June 6, 2011

Chrome unresponsive for gmail and yahoo mail on Fedora 14

Some time back I switched from Firefox to Chrome on my Aspire One (running Fedora 14). I was impressed by how fast it is, and became a convert. Unfortunately, after some time it became unusable, with gmail and many other pages leaving Chrome unresponsive.

I tried many workarounds and 'solutions', removing my cache and configuration directories but still no joy.

I then began troubleshooting with strace - and noticed that the problem went away. This lead me to some more googling, and I found this post -

Issue 77274: Chrome 11 hangs on linux due to gecko-mediaplayer

The solution was as simple as removing gecko-mediaplayer


$ sudo yum erase gecko-mediaplayer


Monday, April 11, 2011

D-LINK DHP-307AV Powerline AV

Although my apartment is wired with CAT-6, unfortunately where I have the TV and HTPC now, there is only one outlet. As my TV provided via IPTV, my set-top box needs it's only Ethernet feed from the 'triple-play' switch (XG6745). The HTPC needs a good connection to my NAS... so initially it got the CAT-6 connection, whilst I figured the IPTV could be sent over HomePlug AV.

So I bought this kit - D-LINK DHP-307AV.

Initially, I was very impressed - the setup was very smooth, just plug-in, and press a button on each unit... and my IPTV was up and running. 

However, after a couple of days, my the TV would occasionally freeze, and break-up. After some resets, and moving outlets... the problem remained.

I then switched the TV back to Ethernet, and connected the HTPC over the powerline. Whilst it works fine.. the throughput was around 30Mbps - somewhat disappointing. I had hoped based on google research to be in the range 60-85Mbps.

Thursday, March 31, 2011

MCE Remote and LCD Display

Microsoft MCE Remote
sudo yum install lirc

yum install lirc-remotes
cp /usr/share/lirc-remotes/mceusb/lircd.conf.mceusb /etc/lirc/lircd.conf

chkconfig lirc on
/etc/init.d/lirc restart

I'm unable to get the mouse working at this point. After lot of experimentation and googling, I'm not sure anyone has succeeded yet with Fedora.

LCD Display

sudo yum install lcdproc
cd /etc/sysconfig/lcdproc
cp LCDd.conf.example LCDd.conf
Edit LCDd.conf setting Driver=imonlcd
cp lcdproc.conf.example lcdproc.conf

chkconfig LCDd on
chkconfig lcdproc on
/etc/init.d/LCDd start



Wednesday, March 30, 2011

XBMC on Fedora 14 (HTPC)

I bought a new HTPC, in pieces -

  • 386482 - Antec Fusion HTPC Remote Black, Fans: 2x 120mm Sida, IR, Remote, LCD Display, iMon software
  • 612433 - Corsair CX 500W PSUATX 12V V2.3, 80 Plus, Standard. 2x 6+2pin PCIe, 5x SATA, 120mm Fan
  • 610540 - AMD Athlon II X3 450, Triple Core, 3.2Ghz, AM3, 1,5MB, 95W, Boxed
  • 363359 - Crucial DDR3 1333MHz 4GB KIT, CL9, Kit w/two matched DDR3 2GB, 240pin
  • 597747 - Gigabyte GA-880GMA-UD2H, Socket-AM3 mATX, AMD880G+SB850, DDR3, 2xPCIe(2.0)x16, VGA, DVI, HDMI, SATA 6Gb/s, USB 3.0
  • 575186 - Western Digital Caviar® GreenPower™ 1TB Sata 3 Gb/s, 64MB Cache
  • 582000 - Microsoft Wireless Optical Desktop 700V2 Black USB
  • 508084 - HDMI Cable, 1m
  • 493692 - Lite-On Blu-Ray Reader IHOS104-37, Blu-Ray DVD-ROM, Sata
It's been many years since I've built a PC - it was a nice surprise to see the assembly be problem free. Tired of Vista, and not wanting to shell out Microsoft tax for Windows 7, I decided to install Mythdora - MythTV on Fedora. It was very disappointing - so I switched to Fedora 14 + XBMC - and was immediately impressed.

Customisations so far -
Auto-login, and auto-start of XBMC -
http://www.perturb.org/display/GDM_AutoLogin.html


Installed NoMachine NX Server to allow easy remote management

Next to tackle -
- Microsoft MCE Keyboard/Remote
- Front panel display on the Antec Fusion case
- IPTV PVR

Saturday, February 5, 2011

Fedora 14 on Acer Aspire One A150L

Problem 1
Old livecd-tools from Fedora 8, for Linpus, seem to create a syslinux.cfg that isn't compatible with the version of grub (?) used on the FC14 live image.

Result was this message at boot -

syntax error in syslinux.cfg

Work-around - use Windows based liveusb-creator.


Problem 2
During boot of Fedora from live usb image, the message below appears -

no root device found.
booting has failed, sleeping forever.

The problem in my case was the volume name of the USB drive (FAT32). The label had a space character in it ('P1I CARD'), which the liveusb-creator mapped in syslinux.cfg as 'P1I_CARD'.

I was able to resolve this by renaming the volume to 'USBDISK', and replacing all instances of 'P1I_CARD' in syslinux.cfg.

Install to hard disk
Having booted the live usb image, I used gparted to reduce the size of the linpus partition, and free up space for Fedora.

Next was to install Fedora into the free space and boot into Fedora.
I then copied lines from the linpus grub.conf into the new fedora grub.conf, such that I could dual boot.

This went smoothly, and Fedora is performing exceptionally well... just wish I'd made the upgrade sooner.