I have an HP laptop that came with Windows 7 installed with a recovery partition which was accessible through the boot menu in the same way you could access the BIOS. I wanted to be able to create an Ubuntu recovery partition that would be able to be accessed and used to reinstall Ubuntu from scratch, if I ever need to, just like an HP or Dell would come with a Windows recovery partition. Is this possible and if so how?
Ubuntu – How to create recovery partition to reinstall Ubuntu
partitioningsystem-installation
Related Solutions
This has been well documented on the web with many tutorials. It will take as long as it takes to install windows and ubuntu. Which will be about 3 hours. If you want to recover that data on your previous install, that is a different problem.
You might already have the option to boot into windows. Check if these instructions on how Grub the application that loads the different operating system works. It may help you to just display the option to load the system you want windows or Ubuntu at start up.
https://help.ubuntu.com/community/Grub2#Boot Display Behavior
official Ubuntu documentation.
Here is a video going through the steps
http://screencasts.ubuntu.com/Installing_Ubuntu_with_Windows_Dual-Boot
If you want to install windows after Ubuntu. You will need to reinstall grub. Windows automatically over writes the MBR, portion of you hard drives partitions and breaks your ability to boot into Ubuntu. These instructions will explain how to fix your boot loader by reinstalling grub.
You will still need to create space for your windows installation. Assuming that you install Ubuntu on to your disk with one partition covering the whole disk.If you need to shrink a partition, you need to boot up on a live disk and open gparted. It gives you the option to resize a partition but you can not do this on a mounted or disk. Which is why you need to boot up into a live disk. Here are screen shot of how to do that.
I recommend understanding how partitioning works specifically the MBR or master boot record. You need to understand the limitations such as you can only have 4 primary partitions. An extended partition need to occupy the entire remaining disk space if you want to have more then 4 primary partitions.
There are two kind of disk in terms of legacy partition table.
- Primary - Generally OS are use this kind of partition.
- Extended - A special type of primary partition that holds many logical partition.
Max number of primary partition (including extended partition) can be 4. Extended partition doesn't take much space. Consider its a packing box and your logical partitions are packed inside it.
Filetypes of disk parition:
These defines how the files will written in disk. Earlier windows (upto xp) used FAT, FAT32. Newer windows file systems called NTFS.
Unix / Linux uses different file types like ext, ext3, ext4. In addition linux uses a partition with special format called
swap
.
Now I am assuming you want to have dual boot with windows. So first 50 GB is for ubuntu, second 50 GB for windows system and rest 150 GB for data.
Now ubuntu requires a swap partition (not necessarily if you have big amount of ram). Its generally calculated 1.5x RAM SIZE. If you have a 2GB RAM, preserve 1 GB for SWAP, have 4 GB RAM , preserve 512MB. Its your choice. Good amount of SWAP improves performance.
Steps
Click on unallocated space, click on
new
. Enter size as 48GB (you have to enter in mb), choose file system type asext4
, mount point/
, partition type primary This means ubuntu root partition.Click on unallocated space, click on new. Enter size as 2GB, choose
primary partition
, file system typeSWAP
.Click on unallocated space, click on new. Enter size 50 GB, choose
primary partition
, file typentfs
(I don't remember whether this option available, you can use gparted later to format if its not available .)Click on rest unallocated space, click on it. Choose
ntfs
as file system, partition typelogical
and create it. This will automatically create extended partition.
Explanation:
Why logical drive in ntfs? Its because it will be available to both windows and ubuntu. Windows can't work with ext file system.
If you don't want windows at all, you can create all file system with ext4. But remember if you ever try to install windows, you have to reformat everything. Otherwise those drives won't be visible.
If you don't want to install a windows system, in step 3, choose logical instead of primary.
Best Answer
The easiest way to make a partition backup is to use dd with cron. You can create the task that will run automatically in the time you want to.
The idea discribed here: click me
How to use cron: click here