Sunday, August 7, 2011

HP DV3-4300SA

Well, that time of the century came that required a new laptop to be purchased, and given that I'm into small laptops with lots of power, I decided that this time I would go for a 13.3 instead of the 12.1 since the market for 12.1 sized screens was a little lame this year, whilst the 13.3 had some nice powered systems to offer. As a side point I'm annoyed that ACER in America produce an i7 10.1in screen and not in the UK (bastards).
Anyhow, it came down to either an ASUS (with no DVD and less hard disk) or the HP DV3-4300SA, which looks like a nice system, has the right specs, but ......

1. They lie as do all manufacturers about battery life. These days anything claiming to last for 5 - 6 hours means that you'll get 1.5 hours out of the battery. Now do you think I should challenge HP on this? Even if I just turned it on and left it without doing anything I'd be lucky to get 2 hours out of the battery. Come on people, put the right number of real hours down.

2. The screen. A nice clear crisp screen, obviously only made for Windows. Fedora 14 currently has some annoying issues with this laptop, so will venture (unfortunately) to Fedora 15 to see if it resolves the problem, the downside is the god awful desktop that they've forced on everyone, so may have to resort to XFCE in future if Gnome don't go back to a decent one. The problem with the screen is that it goes blank (although I know this is being worked on in the Linux community and that's why I think they've hopefully cracked it with FC15). This is during boot up, so you have to shut the lid and open it before the OS really gets going, otherwise it starts to throw a hissy fit. And there's more. Whilst using the operating system, I've had to disable the suspend option just in case the screen decides to do it's own thing.

3. Power supply. Get this, whilst using Linux if you plug in the power supply after running on battery for an hour (don't want it to start suspending now) it throws another hissy fit to the point that it logs you out and then doesn't let you log back in or get to a command line. So the only option is the power button. It's a good job FC14 has some good disk management and file systems that are resilient.

4. The touchpad is bloody annoying to. Why couldn't they just put 2 click zones on the pad. Oh, sorry they have, but didn't need to as there isn't 2. There's only one click, even though the separated the mouse pad to look like there are 2 buttons. Instead you have to do some sort of magical salute on the mouse pad to perform what would normally be a right click. HP just take away the dividing marks on the touchpad, you are not fooling anyone, and they just get in the way if you don't make a right click.

Come on HP you should know better as you are a company that provides Linux to businesses, you should realise that people will be using your laptops as well for this stuff. Not all of us are Windows fans, and some of us think that the Mac is not a real computer either.

Current verdict is don't by the HP DV3-4300SA if you are planning on running Fedora 14. I'll let you know about FC15 soon, much to my disgust in both camps.

Thursday, April 28, 2011

Virtual Box and Fedora Core

What a surprise Virtual Box have regressed to preventing USB from working again. They should have left it as adding the user to the vboxusers group (which you still require), but oh no!

Now you have to do the following on FC to make USB devices available to you;

Since we of the Fedora world have to use the install script it means our Virtual Box is installed into /opt/VirtualBox

In this directory there is a script called VBoxCreateUSBNode.sh

Edit this script and look for the following code;

if test "$class" -eq 9; then
exit 0
fi

Comment out these lines so it looks like;

#if test "$class" -eq 9; then
# exit 0
#fi

Then go to /proc/bus and you need to allow rwx to all users;

chmod -R 777 /proc/bus/usb
(This is still a work in progress, and ideally you should make the directory group something like vboxusers and then do chmod -R 775 /proc/bus/usb to make sure that only those you trust have access.

Now start VirtualBox

Start your VM

And you should now be able to select your USB device.

FC14 and Skype

As the new versions of Fedora Core come out so every time I have to find out how Skype can be installed and running, since Skype only seem to think everyone uses Ubuntu, even though there is a massive FC community out there.

So today, having successfully installed Skype on FC14 x86_64 architecture thought I'd best write a note about it so that I can remember when I upgrade my server.

Firstly we need to get the 32bit library files necessary for the only version Skype supply for non-Debian Linux systems. These files can be installed as follows;

yum install libXv.i686 qt.i686 qt-x11*.i686 libsigc++ libsigc++.i686 libXScrnSaver.i686 pulseaudio*.i686 libv4l.i686

In brief the above libraries provide the 32-bit graphical functionality, sound (pulseaudio) and webcam (libv4l).

Then download either the FC10 rpm or the Dynamic build of Skype from Skype directly.
If using the rpm then install as follows;
yum localinstall skype-versionsnumber.rpm --nogpgcheck

Else if using the Dynamic file unpack;
bunzip2 skype-versionnumber.tar.bz2
tar xvf skype-versionnumber.tar

Move the directory somewhere meaningful, e.g. /usr/local/skype

Now you should be able to start Skype and have audio and video, running with no library issues.

Tuesday, October 26, 2010

Monday, October 25, 2010

My Programming Blog

My programming blog can be found by clicking here

Saturday, August 21, 2010

Moving Windows the easy way

(WARNING you need to take great care in this process and know which is your original disk. This example assumes the /dev/sda is the disk with your working operating system and data on and /dev/sdb is the one that is going to be the new one).

Having recently moved my back up disk to a larger sized disk thinking the old one was failing (even though it turns out that its the small electronics board that's playing up), I thought I'd move my old back up disk (250GB) into my laptop which had a 120GB drive and was telling me that it had a bad sector. So here's the problem (or rather not for someone who seriously uses Linux).

Partition 1 - Windows
Other partitions are Linux based file systems.

Most sites will tell you that you can't just move Windows from one disk to another without having to do an ASR (Automated Systems Recovery), well that's just a load of BS and comes from a bunch of I.T. people that really don't understand computer systems properly.

So here is how it's done without having to do anything apart from move the partitions from one disk to another using a real tool.

Preparing the disk
  1. First acquire a copy of Linux. Any one will do that will allow you to boot a command line via a rescue system. I used Fedora 12 DVD
  2. Boot the Fedora 12 DVD with only your main drive (still in the system) attached
  3. At the options menu select the Rescue option, but press the TAB key and delete the entire line
  4. Replace the line with linux rescue and press enter
  5. Accept the language you need and the keyboard layout
  6. Say no to the network being started
  7. Do not mount or search for existing systems
  8. Select the Shell option
  9. You will now have a bash Linux command line and some lovely utilities
  10. Plug in your external drive that will be your new O/S disk
  11. Use fdisk to set up the partitions, ensuring that the sizes are exactly the same between the disks. Use the fdisk -l option to list the disks and see the partition information for both disks. Keep typing fdisk -l until you see /dev/sda and /dev/sdb or at least 2 disks
  12. Your primary disk (the one with the operating system on it currently) should be /dev/sda if it's a SATA drive like mine. And the USB external drive will be /dev/sdb (if there are no other disks in your system)
  13. Type fdisk /dev/sdb to modify the layout of the external disk
    d will delete a partition
    n will create a new partition
    p will print the partition table
    w will save the partition table
    a will allow you to set the active boot partition
  14. You will need all of the above commands to set up your disk to be the new O/S disk
  15. Delete any partitions that are on the new disk (/dev/sdb)
  16. Hopefully the geometry of the disks will be similar so that when you create a new partition you should be able to use the same Start and End cylinders as the old disk. You can check by the number of blocks, which should be the same for each corresponding file system e.g.
    /dev/sda1 1 1912 15358108+ 7 HPFS/NTFS
    /dev/sdb1 1 1912 15358108+ 7 HPFS/NTFS
  17. Once you have set all of the partitions to their correct size and marked the relevant partition as the active boot (you can identify this by looking for the * against the device) then we can start copying the partitions between the disks
Copying the partitions
  1. We will use a command called dd to copy the partitions. This is a byte copying utility that does not care what your data is, it just does the job, unlike these Windows command tools which clearly don't.
  2. To copy the first partition type
    dd if=/dev/sda1 of=/dev/sdb1
  3. Wait for the command prompt to come back. There is no information displayed on the screen during the copy, but you can tell it to show information
  4. To see progress of the dd command press ATL+F2 to move to the secondary terminal window
  5. Type
    ps -ef | grep dd
  6. Identify the dd if=/dev.... process ID (PID)
  7. Type
    kill -USR1 PIDfromStep6
  8. Press ALT+F1 to return to the original screen where dd is running and notice the information on the screen. It will tell you how much has been transferred so far and how fast the transfer is going.
  9. Repeat the above steps for every partition on the original O/S drive
When the process of copying all the partitions has finished carefully swap the hard disks over. When you start your system you will only need to start it with the new disk.

Starting the system (if you have dual boot)
  1. Boot from the Fedora DVD
  2. Select the Linux rescue
  3. This time follow the instruction and tell it to search for the Linux system
  4. Tell it to mount the found Linux system to /mnt/sysimage
  5. Type
    cd /mnt/sysimage
  6. Type
    chroot /mnt/sysimage
  7. Now we need to ensure that the MBR is correctly written to the disk, so type
    grub-install /dev/sda
  8. Type
    reboot
Your system can now be started without the DVD and will boot to GRUB, from their you can then choose your operating systems as normal.

If Windows then the system should just boot with no further modifications.

This is all based on the size of your partitions being identical between both disks (even if the sizes of the physical disk are different).

Monday, August 16, 2010

Boot loaders and dual boot systems

Install order no longer matters
Once upon a time it used to matter which order you installed your operating systems when trying to dual boot Windows and Linux/Unix systems. Today that no longer matters and you can install your operating system in any order. The only thing you really need to remember is that your Windows operating system will almost certainly require at least 1 primary partition and so will your Linux system.

Re-instantiating GRUB
If you do decide to install or re-install Windows once you've installed Linux then you'll need to re-instantiate your GRUB boot loader as the primary boot loader. Here are the steps to perform this, for those of you like me who use Linux as their primary OS, but due to the rest of the world who seem to think they have to use Windows or MAC OS and you do work for these companies, here are the steps to recovering your boot loader after installing Windows without having to re-install Linux.
  1. Boot your system using the Linux installation disk
  2. On some versions of Linux, e.g. Fedora 12 you might want to change the rescue option so that it just has linux rescue instead of all the other options. To do this select the linux rescue option and press tab, then delete the line and type linux rescue
  3. Follow the instruction up to the point it asks you to find installed systems
  4. Tell it to skip
  5. Then select shell option for a command line
  6. Type fdisk -l to see the hard disks on your system
  7. Hopefully you remember which one contains GRUB (the /boot) directory since this is the one you now need to set to primary boot
  8. Type fdisk /dev/XXX where XXX is the name of the device you wish to change the boot flag
  9. If you can't remember the option to toggle the boot flag type m and press enter
  10. Type p to print the partition table and note which partition has the * as this is the current boot partition
  11. Type the letter a to change the boot flag
  12. Type the number of the partition that currently has the *
  13. Type a and then type the number of the partition that contains the GRUB boot loader
  14. Type w to save the partition table
At this stage you should reboot the system as normal to see if your grub boot loader re-appears. This should be enough to do it. If it does not then;
  1. Start the system from the Linux install media as above, but this time do tell the system to search for Linux installations
  2. If it successfully finds your Linux installation it will generally mount it to /mnt/sysimage
  3. cd /mnt/sysimage
  4. chroot /mnt/sysimage
  5. Now we wish to re-install the GRUB boot loader. To do this type grub-install /dev/XXX where XXX is the disk and partition number where GRUB should be installed, that is where the /boot directory is
  6. Provided that your GRUB boot loader is in /boot, if it's not then you will need to look at the man page to see what option you need
Once done your system will reboot with the GRUB boot loader, and as long as you know the GRUB options to make Windows boot you should be able to add this to your boot loader.

Typical grub.conf Windows settings are;
rootnoverify (hd0,0)
chainloader +1

Where hd0,0 is the disk number and partition number where Windows boot loader resides.