Shrinking 4 parititions on a new HP laptop

rank1seeker at rank1seeker at
Tue Oct 25 19:55:35 UTC 2011

When Win comes with machine, you don't use it at all.
YOU install Win, set it up and THEN use it.

You must have bootable USB stick, which you have already setup-ed (Must be able to compile/install BSD itself and in it, you have your BSD confs).
Stick it and enter boot menu on laptop and choose USB.
When BSD boots, at this step, you will ONLY SLICE HDD:

# dd if=/dev/zero of=/dev/ada0 bs=8m
    Nuke HDD and pRe-installed $oft Win

# gpart create -s MBR ada0
    You wana dual boot right?
# gpart bootcode -b /boot/mbr ada0

You said 1 slice, but I say 2 slices (which will preserve ntfs data, if win is nuked)
Use max 35 Gb for win install slice and choose yourself how much Gb you wana for slice 2
# gpart add -s 30g -t ntfs ada0
# gpart add -s 50g -t \!15 ada0
    Append slice 2, of type 'Extended DOS (LBA)' -> holds all oher added letters (D:, E:, ...)

... Here you can add max 2 slices for FreeBSD and something else ...

Reboot, as we ONLY SLICED HDD.

Now install Win7 (it reads MBR and replaces it with it's own MBR) and set it up.
After Win7 has been installed:
Boot USB stick and:
# boot0cfg -B ada0
# boot0cfg -m 0x5 ada0
	# In boot options, show only slices 1 (Win7) and 3 (FreeBSD)

Here you would mount slice 3 and install FreeBSD into it ... (about which I'll not chatter ...)

Domagoj Smolčić

More information about the freebsd-hackers mailing list