The Debian Installer and Resizing Windows Partitions
Following an earlier blog about installing Debian Etch (a pre-release of Debian 4.0 due early next year) and my comments about the Debian installer’s inability to resize Windows partitions in the past, one of the Debian developers challenged me to retry it and document the results of the exercise. Specifically, he suggested I perform the following tests,
- Backup the NTFS partition
- Resize the NTFS partition with debian-installer (just make it some what smaller )
- Restart the computer, boot into MS-Windows to check the partition.
- Resize the NTFS partition with debian-installer (back to previous size)
- Restart the computer, boot into MS-Windows to check the partition.
- Report/blog about the NTFS resize excersize
I haven’t gotten around to 4. yet but hopefully people will find the rest useful (and I will try to get around to 4. at some stage, but it seems a shame to blow away a perfectly good Debian install).
Restoring the default Windows configuration
I started by taking our test PC and restoring it the same state that it came from the factory. The test PC is a HP dx5150 – an AMD Athlonâ„¢ 64 3200+ system with 1GB of memory and an 80GB SATA hard drive. As well as providing a Windows XP SP2 CD which can be used to install Windows in whatever configuration you desire, HP provide a Restore CD which repartitions the drive, installs Windows in a standard configuration and installs some additional tools and drivers. This is reasonably useful but has the unfortunate downside of insisting on using the entire drive for Windows. In our case, this is ideal, since we want a large NTFS partition that we can subsequently attempt to resize. After some time, the system had been wiped, repartitioned with one big Windows partition and Windows XP SP2 reinstalled.
Installing Debian Etch
I downloaded the latest Debian Etch installer from http://www.debian.org/devel/debian-installer/
and after burning the ISO image to a CD, rebooted our test PC with the CD in the drive.
There are various flavours of installer available from that page, I normally use the netinst CD image which contains a minimal set of software required to bootstrap the system – it then proceeds to download and install additional software from the Internet. Using this guarantees that you have the most current packages installed and is the best approach if you have a reasonable broadband connection to the system you are doing the installation on. The installation CD was booted using the default kernel (2.6.17-2-486) and no additional options.
Initial Install Steps
The initial steps of the install were the same as any standard installation, I selected language settings of English / Ireland, the keyboard layout was British English and the network settings were configured with an appropriate hostname and domain (the IP address for the system was automatically assigned by our DHCP server).
Partitioning
The following steps were followed when prompted for how to partition the system,
- Manual partitioning.
- Selected the primary partition on the primary disk – which was an NTFS partition spanning the entire disk as created by the HP Restore CD.
- Selected Resize the partition (currently 80.0GB)
- Set New partition size to 40.0 GB (I thought it was fairest to give each OS an equal share of the disk, I mean, 40GB should be enough for any OS, right?).
- After a brief delay I was returned to the main partitioning screen which listed the following partitions
- partition #1 – primary, ntfs, 40GB
- free space of 40GB
- partition #2 – primary, ext3, 279.7 MB /
- partition #5 – logical, ext3, 5.0 GB /usr
- partition #6 – logical, ext3, 3.0 GB /var
- partition #7 – logical, swap, 2.9 GB
- partition #8 – logical, ext3, 403.0 MB /tmp
- partition #9 – logical, ext3, 28.4 GB /home
Finishing the Installation
The installer wrote the changes to the partition table and proceeded to let me set a root password and create a non-root user for day to day use of the system. I opted to use a local Debian mirror in Ireland for the retrieval of additional packages and then proceeded to install the Desktop Environment and Standard System tasks. We have informally standardised on GNOME as our company Linux desktop environment and people seem to be generally happy with it. With Debian Etch, selecting those 2 tasks gives us a system which is generally suitable for our developers – I normally manually install a Sun JDK, the latest Eclipse and some Eclipse plugins to meet our development needs. Towards the end, the installer prompted on whether to install the GRUB bootloader indicating that it would also provide an option to boot the detected Windows XP Professional. I OK’ed this and rebooted to find a GRUB boot menu with options for both Debian and Windows.
I decide to boot first to Debian to make sure everything went ok – it automatically starts the GNOME Display Manager graphical login and logging in with the account setup earlier gives me a nice clean desktop – even sound was working out of the box. Overall, the Debian Etch installer is looking pretty solid at this stage.
I rebooted again and selected Windows this time. Windows XP performs a filesystem check during the boot process and then restarts the computer (no errors reported). Selected Windows XP Professional again at the boot menu and Windows booted all the way to the login^H^H^H^H^HWelcome screen without any further warnings. Logging in shows that everything seems to be working ok.
Conclusions
Partition Resizing in the Debian Installer works much better than it used to and seems to be good enough for daily use on production systems. I guess at some stage I should try a further resize of the Windows partition (up or down) to verify that works ok but I’m pretty happy with it now and the scenario I’ve just described is probably the norm for most people using partition resizing software. Thanks to the Debian Installer team for their work on this. Oh, and Merry Christmas to all!
No comments yet.