From Fortech I.T. Solutions - SANDBOX

Assorted-Reference: Hp-mini-netbook-linux-dual-boot-notes

CONTEXT

Oct/2010: By good fortune, I am now the happy owner of an HP Mini 5103 netbook. This is a nice step up from my previous netbook (an original Asus EEEPC Surf 2G, with a ~800mhz celeron-Mobile CPU) - far more usable keyboard size, bigger screen, astonishing battery life, and better whomph in the CPU capability (hyperthreaded Intel Atom CPU, 'current variety' so pretty decent performance for a non-dual-core atom).

By default, the HP Mini 5103 is configured to boot up to Windows 7 Professional. Of course, it was important for me to install Linux - and with my recent success with Ubuntu 10.04 on my primary workstation (Laptop) - this was the first thing to try.

Oddly enough, HP has the hard drive in the mini sliced up in a way that makes it 'not immediately trivial' to just 'add in' Ubuntu. There are 4 primary partitions on the 250gig HDD by factory default; so no room to add an extended / or other partitions into which Linux can reside. I was reluctant to entirely throw away Windows, since 'sometimes' it is a handy thing to have around. Additionally, being a modern netbook, it comes with NO recovery media of any kind; nor the option of generating recovery media. (Instead, there is a hidden partition on the HDD which you can elect to boot from at startup, if you wish to recovery to stock factory install Windows config).

So, it required a bit of digging, first to determine how the unit was configured and what the slices were doing; and then a bit of effort to reconfigure things.

The basic config of the 4 slices in the factory default config are, more or less:

  1. Boot partition, ~315Mb, NTFS, contains windows 7 boot loader and associated files
  2. Windows 7 OS partition, ~231Gb, NTFS, the actual windows instance
  3. Windows recovery partition, hidden, NTFS, ~16 Gb, contains 'WIM" windows image / HP restore app.
  4. HP _TOOLS partition, Win95-Fat32, ~2 Gb, contains 2 small linux HP custom boot environments: One to support "quicklook" (quick boot mini-OS that displays Outlook data/schedules/contacts) and "QuickWeb" - a mini linux distro which gives you wireless & wired network; a web browser with flash support; and not much else - but it boots quickly.

I wasn't keen to throw away the "QuickWeb" mini-linux environment in particular, so I didn't want to clobber slice 4 outright.

I was concerned that any major changes to Slice 1 or Slice 2 would render Win7 unbootable, which was an endpoint to avoid, all things being equal

I wanted to preserve, if possible, slice 3 since it contained my only official windows install media / recovery option.

So. Steps taken, concisely:

Once I had backups created to my satisfaction...

Once this resize and reallocation of slices was completed.. it is possible to proceed to the next phase.

I've been using this machine for a few days now and it works really smoothly. Suspend when lid is closed; battery life is great (easily above 6 hours - maybe 8+ depending on what you are doing, I haven't had enough days of testing yet). The keyboard is really easy to use, the spacing is almost 'normal'.

Funny enough, my 14" screen laptop now feels positively 'huge' after working on the netbook. So I suspect I will still use my 'big' laptop as my primary workstation, and use the netbook as my 'onsite project, meeting, or travel' machine. Certainly the battery life on the netbook is way better than the laptop, and the size / weight is excellent on the netbook.

So. This is all written up here, in this kind of brief-ish format, with a fair bit of technical detail, in case it is of any use or interest to others with similar model HP netbooks / who are in a bind for setting up dual-boot Linux/Windows environments and would prefer to not simply throw away the content of the factory install HDD.


Misc Tech Ref Capture Info:

SFDISK Slice Layout - Before and after

BEFORE
------
# partition table of /dev/sdb
unit: sectors

/dev/sdb1 : start=     2048, size=   614400, Id= 7, bootable
/dev/sdb2 : start=   616448, size=452124672, Id= 7
/dev/sdb3 : start=452741120, size= 31457280, Id= 7
/dev/sdb4 : start=484198400, size=  4184064, Id= c

# note that sda was boot device, USB key, in this instance.


AFTER
-----
# partition table of /dev/sda
unit: sectors

/dev/sda1 : start=     2048, size=   614400, Id= 7, bootable
/dev/sda2 : start=   616448, size=368637577, Id= 7
/dev/sda3 : start=452741120, size= 31457280, Id= 7

EXTENDED PARTITION:
/dev/sda4 : start=369254086, size= 83473679, Id= 5

LOGICAL PARTITIONS WITHIN THE EXTENDED:
/dev/sda5 : start=369254088, size=   514017, Id=83
/dev/sda6 : start=451185588, size=  1542177, Id= b
/dev/sda7 : start=369768448, size=  3905536, Id=82
/dev/sda8 : start=373676032, size= 77508608, Id=83


FDISK CAPTURE - AFTER:
----------------------
root@tim-hp-mini:/copy# fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x34606539

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          39      307200    7  HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sda2              39       22985   184318788+   7  HPFS/NTFS
/dev/sda3           28182       30140    15728640    7  HPFS/NTFS
/dev/sda4           22986       28181    41736839+   5  Extended
/dev/sda5           22986       23017      257008+  83  Linux
/dev/sda6           28086       28181      771088+   b  W95 FAT32
/dev/sda7           23018       23261     1952768   82  Linux swap / Solaris
/dev/sda8           23261       28085    38754304   83  Linux

note that things are even more confused here than I realized - sda8 is not the last cyl block allocated slice on the disk; because of how I actually created sda6 for the HP_TOOLS slice. Great fun.  But it still works, amazingly enough.  This suggests .. whatever is called on HP_MINI when you press the "quickWeb" power-button -- must be seeking out the slice labelled "HP_TOOLS" and booting from that device.


FOOTNOTE:

Why? WHY? You can just use WUBI to install Ubuntu 'inside' Windows. Well, yes, that is true. However, it is 'nicer' in theory to not have your linux install depend on filesystem integrity of windows? Plus purists might suggest performance is better? And additionally, amusing: When I first did a wubi install, it was fine, but it also was 'poisoned' and failed to boot due to presence of the SDB SD-memory 4gig "smart cache" card - and initially I didn't recognize the pattern / or the cause for the failure of Ubuntu to boot up. So at that point I proceeded with the 'proper' install of Ubuntu - which amazingly enough worked pretty well.

So. Lots of fun.

Retrieved from http://sandbox.fortechitsolutions.ca/pmwiki.php/Assorted-Reference/Hp-mini-netbook-linux-dual-boot-notes
Page last modified on October 20, 2010, at 12:22 AM