HP ProBook 5330m notebook for Windows and Linux

Author: L.S.Lowe. File: hp5330m. Started: 20110914. This update: 20121204. Part of Guide to the Local System.

Contents: Quick look, Windows-Only laptop, Preparing partitions for Linux, Installing Linux.

Quick look at the hardware

I have the LG719EA version, which has Intel i5-2520M 2.5GHz processor (2 cores, 2 hyperthreads per core), 4GiB memory, 500GB disk, no optical drive. System supplied is Windows 7 Professional.

First glance impression is good. The backlit keyboard is a nice feature. The Enter key is narrow, no wider than any other key, so is easy to mis-hit. The analogue audio uses a combo 3.5mm jack socket, and there's no supplied adapter to conventional dual sockets. Unfortunately I had to return the first laptop back to the supplier as the display was not working (though an external monitor did). The replacement was fine, as were three more purchases.

Initial view of the disk

I switched on with an external USB CD/DVD drive connected (not HP-provided), pressed ESC a few times and then F9 to choose that CD/DVD drive as boot device, and then booted into a Linux installation system (Fedora 15), and did a Ctl-Alt-F2 and an fdisk -lu command (so output is in sectors; option -u is defaulted in F15 anyway), to view the layout of the notebook partitions as supplied; for me I had:
# fdisk -l /dev/sda
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      616447      307200    7  HPFS/NTFS/exFAT
/dev/sda2          616448   126445567    62914560    7  HPFS/NTFS/exFAT
/dev/sda3       936689664   966281215    14795776    7  HPFS/NTFS/exFAT
/dev/sda4       966281216   976756735     5237760    c  W95 FAT32 (LBA)
Mounting those areas read-only and listing them using Linux, the contents of those partitions is initially as follows:
# df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/sda1  fuseblk      307196     36136    271060  12% /tmp/sda1
/dev/sda2  fuseblk    62914556  26370276  36544280  42% /tmp/sda2
/dev/sda3  fuseblk    14795772  12417452   2378320  84% /tmp/sda3
/dev/sda4     vfat     5225472   2998072   2227400  58% /tmp/sda4
# ls -l /tmp/sda?
/tmp/sda1:
drwxrwxrwx. 1 root root      0 Feb 20  2011 $RECYCLE.BIN
drwxrwxrwx. 1 root root   4096 Feb 20  2011 Boot
-rwxrwxrwx. 1 root root     33 Apr 27 03:53 SYSTEM
drwxrwxrwx. 1 root root      0 Apr 27 03:25 System Volume Information
-rwxrwxrwx. 1 root root 383562 Jul 14  2009 bootmgr

/tmp/sda2:
drwxrwxrwx. 1 root root      0 Feb 20  2011 $Recycle.Bin
-rwxrwxrwx. 1 root root   8192 Jul 27  2009 BOOTSECT.BAK
lrwxrwxrwx. 2 root root     60 Jul 14  2009 Documents and Settings -> /tmp/sda2/Users
drwxrwxrwx. 1 root root      0 Apr 27 03:05 EFI
drwxrwxrwx. 1 root root      0 Feb 20  2011 Intel
drwxrwxrwx. 1 root root      0 Jul 14  2009 PerfLogs
drwxrwxrwx. 1 root root   8192 Feb 20  2011 Program Files
drwxrwxrwx. 1 root root   8192 Feb 20  2011 Program Files (x86)
drwxrwxrwx. 1 root root   4096 Feb 20  2011 ProgramData
drwxrwxrwx. 1 root root   8192 Feb 20  2011 SYSTEM.SAV
drwxrwxrwx. 1 root root   4096 Apr 27 03:42 System Volume Information
drwxrwxrwx. 1 root root      0 Feb 20  2011 USW764PR
drwxrwxrwx. 1 root root   4096 Jul 27  2009 Users
drwxrwxrwx. 1 root root  16384 Feb 20  2011 Windows
drwxrwxrwx. 1 root root   4096 Apr 27 05:51 appl.zip
drwxrwxrwx. 1 root root   4096 Jul 27  2009 boot
-rwxrwxrwx. 1 root root 383562 Jul 14  2009 bootmgr
drwxrwxrwx. 1 root root      0 Apr 27 04:15 compaq
drwxrwxrwx. 1 root root      0 Apr 27 04:39 hp
drwxrwxrwx. 1 root root      0 Apr 27 03:46 i386
-rwxrwxrwx. 1 root root 904704 Dec  2  2006 msdia80.dll
drwxrwxrwx. 1 root root   8192 Apr 27 03:55 sources
drwxrwxrwx. 1 root root   8192 Apr 27 04:45 swsetup
drwxrwxrwx. 1 root root      0 Jul 27  2009 sysprep
-rwxrwxrwx. 1 root root   4525 Jul 27  2009 unattend.xml

/tmp/sda3:
drwxrwxrwx. 1 root root 0 Feb 20  2011 $RECYCLE.BIN
-rwxrwxrwx. 1 root root 0 Feb 20  2011 HP_WINRE
drwxrwxrwx. 1 root root 0 Feb 20  2011 Recovery
drwxrwxrwx. 1 root root 0 Feb 20  2011 System Volume Information
drwxrwxrwx. 1 root root 0 Apr 27 03:53 boot
drwxrwxrwx. 1 root root 0 Feb 20  2011 system.sav

/tmp/sda4:
drwxr-xr-x. 2 root root 4096 Feb 20  2011 $RECYCLE.BIN
-rwxr-xr-x. 1 root root   33 Feb 20  2011 HP_Tools
drwxr-xr-x. 7 root root 4096 Feb 20  2011 Hewlett-Packard
So sda1 is the boot/bitlocker partition, sda2 the Windows C drive, sda3 a recovery partition, and sda4 a HP Tools partition.

Well thanks HP and Microsoft for using up all the primary partition numbers, that makes re-partitioning to accommodate Linux a little bit harder. But not impossible. Note that the sda2 partition ends well short of the start of the sda3 partition. We assume that on first Windows boot, the HP initialisation will not actually change or move partitions sda1, sda3 and sda4, but will simply expand sda2, currently 60 GiB exactly, into the available space between sda2 and sda3, making around 480 GB. Ideally we want to prevent the Windows C drive expanding into all that available space, because it is harder to reduce a C drive once Windows has put its unmoveable files like pagefile.sys just where you didn't want them.

Windows-only laptop: first Windows boot

Without doing any partition changes, for my first notebook of this type, I booted into Windows. Don't do this yourself if you want to use my Linux partitioning method. I got the following steps ....

Setup is preparing your computer for first use, choose language, choose country, time/currency, keyboard layout, choose userid, computer-name, accept license agreements, choose time zone, skip join a wireless network. Setup is preparing your computer for first use (again) (a few minutes), HP: Software Installation (a few minutes), Welcome to your new HP computer, optional registration, some other settings.

Unlike my cheap and cheerful Samsung netbooks, HP setup does not offer me the choice of re-partitioning to have a smaller C drive along with a D Drive. There is no such choice.

Partition sda2 is the C drive, sda3 is the E drive (HP_RECOVERY), and sda4 is the F drive (HP_TOOLS). It's not really clear to me why it's useful for the E and F drives to be visible given that the files they contain are largely marked hidden.

Windows-only laptop: checking disk layout after first Windows boot

This was checked by again booting from my Fedora installation CD. As anticipated, the above first Windows boot has expanded the sda2 (C drive) partition to use the unused space between sda2 and sda3. The other partitions (sda1, sda3, sda4) have not been relocated. Partition sda2 top directory has now no intel and compaq directory and others, has an updated SYSTEM.SAV, and has a hiberfil.sys and a pagefile.sys. Partition sda3 has now got a bootmgr file in its top directory.

# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      616447      307200    7  HPFS/NTFS/exFAT
/dev/sda2          616448   936689663   468036608    7  HPFS/NTFS/exFAT
/dev/sda3       936689664   966281215    14795776    7  HPFS/NTFS/exFAT
/dev/sda4       966281216   976756735     5237760    c  W95 FAT32 (LBA)

# df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/sda1  fuseblk      307196     36152    271044  12% /tmp/sda1
/dev/sda2  fuseblk   468036604  33397620 434638984   8% /tmp/sda2
/dev/sda3  fuseblk    14795772  12592612   2203160  86% /tmp/sda3
/dev/sda4     vfat     5225472   2998072   2227400  58% /tmp/sda4

# ls -l /tmp/sda?
/tmp/sda1:
drwxrwxrwx. 1 root root      0 Feb 20  2011 $RECYCLE.BIN
drwxrwxrwx. 1 root root   4096 Feb 20  2011 Boot
-rwxrwxrwx. 1 root root     33 Apr 27 03:53 SYSTEM
drwxrwxrwx. 1 root root      0 Apr 27 03:25 System Volume Information
-rwxrwxrwx. 1 root root 383562 Jul 14  2009 bootmgr

/tmp/sda2:
drwxrwxrwx. 1 root root       4096 Sep 14 14:59 $Recycle.Bin
lrwxrwxrwx. 2 root root         60 Jul 14  2009 Documents and Settings -> /tmp/sda2/Users
drwxrwxrwx. 1 root root          0 Apr 27 03:05 EFI
drwxrwxrwx. 1 root root          0 Jul 14  2009 PerfLogs
drwxrwxrwx. 1 root root       8192 Feb 20  2011 Program Files
drwxrwxrwx. 1 root root       8192 Sep 14 14:53 Program Files (x86)
drwxrwxrwx. 1 root root       4096 Feb 20  2011 ProgramData
drwxrwxrwx. 1 root root       8192 Sep 14 14:58 SYSTEM.SAV
drwxrwxrwx. 1 root root       4096 Sep 14 14:59 System Volume Information
drwxrwxrwx. 1 root root       4096 Sep 14 14:52 Users
drwxrwxrwx. 1 root root      16384 Sep 14  2011 Windows
drwxrwxrwx. 1 root root       4096 Jul 27  2009 boot
-rwxrwxrwx. 1 root root     383562 Jul 14  2009 bootmgr
-rwxrwxrwx. 1 root root 4200972288 Sep 14 14:54 hiberfil.sys
drwxrwxrwx. 1 root root          0 Apr 27 04:39 hp
-rwxrwxrwx. 1 root root 4200972288 Sep 14 14:49 pagefile.sys
drwxrwxrwx. 1 root root       8192 Sep 14 14:55 swsetup

/tmp/sda3:
drwxrwxrwx. 1 root root      0 Sep 14 14:59 $RECYCLE.BIN
-rwxrwxrwx. 1 root root      0 Feb 20  2011 HP_WINRE
drwxrwxrwx. 1 root root      0 Sep 14 14:52 Recovery
drwxrwxrwx. 1 root root      0 Feb 20  2011 System Volume Information
drwxrwxrwx. 1 root root   4096 Sep 14 14:52 boot
-rwxrwxrwx. 1 root root 383562 Jul 14  2009 bootmgr
drwxrwxrwx. 1 root root      0 Feb 20  2011 system.sav

/tmp/sda4:
drwxr-xr-x. 2 root root 4096 Feb 20  2011 $RECYCLE.BIN
-rwxr-xr-x. 1 root root   33 Feb 20  2011 HP_Tools
drwxr-xr-x. 7 root root 4096 Feb 20  2011 Hewlett-Packard

One reason for doing these checks is to see if and how re-partitioning to allow splitting the C drive and/or accommodating Linux can be done. The fact that sda3 has been modified raises the question of whether that modification would have been done correctly if that filesystem had been given a new partition number or moved into an extended partition. In fact advice on the web is to leave sda3 in place so that F11 at boot time continues to work, as the HP bios code looks for a primary partition labelled HP_RECOVERY. (Other advice says that's true but in a multi-boot system you could boot a logical partition copy of that partition using GRUB instead). My chosen procedure, where further partitions are required, is to use gparted to relocate the HP Recovery (sda3) contents from its near end-of-disk location to a mid-disk location and keep it as a primary partition sda3, still allowing Windows to expand sda2 to use up any available inter-partition space later. The HP Tools partition (sda4) is not thought to be critical in location or primary vs logical partition requirements, so in the new scenario could be put as a logical partition. Although it would be "fun" to see if we could convert primary sda4 to logical sda5 by simply tweaking the partition table, leaving the partitions limits and contents in place, I didn't have any partition tool that would do that as an indivisible step guaranteed to preserve the partition contents. The HP Tools partition is sufficiently small that it is easy and quick to do a block-level backup and restore, so that's what I will try.

Dual boot laptop: preparing partitions to give room for Linux

For our second 5330m laptop (and third and fourth!), for which a dual boot with Linux was required, I checked through my info from the first laptop (see above), and decided that I wanted a C drive of 80 GiB, which would be a small expansion on the 60 GiB that the supplied sda2 had, and then I would have a large D drive and further partitions for Linux. To do this preparation, I powered on with an external USB CD/DVD drive connected, pressed ESC a few times and then F9 to choose that CD/DVD drive as boot device, and booted into a GParted Live system off CDROM, version 0.9.1, that is, before any Windows boot.

Dual boot laptop: booting Windows for the first time

I booted into Windows 7 and got the following steps: ... Setup is preparing .... Setup is checking video performance ... choose Language, choose localisation, set user name and computer name, involuntarily skipped over password, agree to EULAs, skip updates for now, set timezone date and time, skip wireless setup, ... setup will continue after restarting your computer ... Starting Windows, Setup is preparing your computer for first use, Welcome, Software is being installed, Welcome to your new HP Computer, fill in or defer registrations etc.

Looking at the Computer view, the C: drive has 48GiB free of 80GiB, the HP_Tools partition (sda5) is called E: and has 2 GiB free of 5 GiB, and the HP_Recovery partition (sda3) is called F: with 2 GiB free of 14 GiB. So the disk letters have swapped around compared with my earlier laptop, but the disk labels are intact (as anticipated) and there should be no problems.

The C: drive used space includes hiberfil.sys and pagefile.sys which are 4 GiB each. Just to note that after installing Office Pro Plus 2010, Windows 7 SP1, and important updates, the C: drive has 43.6 GiB free of 80GiB.

Dual boot laptop: reviewing the effect of first Windows boot

I then restarted the laptop and pressed ESC and F9 and booted from a linux CD to check the partition layout after the first Windows boot on this laptop.
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      616447      307200    7  HPFS/NTFS/exFAT
/dev/sda2          616448   168388607    83886080    7  HPFS/NTFS/exFAT
/dev/sda3       168388608   197980159    14795776    7  HPFS/NTFS/exFAT
/dev/sda4       197980160   976773119   389396480    5  Extended
/dev/sda5       197982208   208457727     5237760    c  W95 FAT32 (LBA)
So the only partition change is that the HP Windows system on sda2 has expanded to fill the unused space between sda2 and sda3, just as I hoped. So moving sda3 down had been sufficient to stop the C drive being expanded to fill the whole disk.

I checked that Boot ESC F2 diagnostics started OK: yes. I checked that Boot ESC F11 brought up the HP Recovery Manager system: yes it did; I used the cancel button in its first window to avoid an actual recovery. I checked that the partition table was intact after that short venture into Recovery Manager: yes it was unchanged. Would a possible future actual HP recovery cause my linux partitions to disappear? Untested!

Dual boot laptop: partitioning for Linux

Booting from a Fedora 15 installation CD, I set up the following partitioning from a Ctl/Alt/F2 window using fdisk, for sda6 to sda10. I noticed that the physical sector size is 4096 (ie Advanced Format) so for efficiency the partitions need to start on 4 kiB boundaries, and that in practice fdisk was aligning the new partitions to a 1 MiB boundary (all the Start locations are a multiple of 2048), which is fine. That's why I used a recent (Fedora 15) system to partition: earlier systems may or may not be aware of advanced-format hard-disk requirements. Admittedly the parted tool should make it easy to partition to MiB boundaries too, provided you don't assume that parted will get the alignment right if you specify the same MiB number for the end of one partition and the start of the next. I made the Linux home area separate so that it might in the future be encrypted, while keeping the Linux system partition unencrypted.
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      616447      307200    7  HPFS/NTFS/exFAT
/dev/sda2          616448   168388607    83886080    7  HPFS/NTFS/exFAT
/dev/sda3       168388608   197980159    14795776    7  HPFS/NTFS/exFAT
/dev/sda4       197980160   976773119   389396480    5  Extended
/dev/sda5       197982208   208457727     5237760    c  W95 FAT32 (LBA)
/dev/sda6       208459776   669833215   230686720    7  [ Future D drive 220 GiB]
/dev/sda7       669835264   900521983   115343360   83  Linux [ home area 110 GiB ]
/dev/sda8       900524032   963438591    31457280   83  Linux [ system 30GiB ]
/dev/sda9       963440640   966295551     1427456   83  Linux [ boot area ]
/dev/sda10      966297600   976773119     5237760   82  Linux swap 

Installing a Linux system

Just to be awkward, after mentioning Fedora 15 a few times above, I decided to try Scientific Linux 6 64-bit on this laptop. This installed without problems. I chose to include KDE, which is version 4.3.4 on that system. Nothing more to say on installation of the system!

Installing skype: I chose the version on the www.skype.com website that says it is for Fedora 13+. (The name of the rpm implies Fedora 10 though). This installed without apparent dependencies. But this version is 32-bit, and running it showed I needed to install lots of 32-bit versions of packages, most of which were already installed in 64-bit: redhat-lsb.i686 alsa-lib.i686 libXv.i686 libXScrnSaver.i686 qt.i686 qt-x11.i686 (and qt.x86_64 to keep yum happy even though it was already installed). Installing those using yum brought in about 90 packages in all, on my system.

Checking through facilities on the notebook:

Software on the Windows system that I will remove

L.S.Lowe