LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2013, 06:32 AM   #1
schtocker
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Rep: Reputation: Disabled
Can I give Windows full hard drive back after partitioning?


Hello all; I'm a total Linux newbie, and I'm about to install Linux for the first time (for extra info, I'm installing Pinguy OS 12.04 on a HP Folio 13 which has Windows 7 preinstalled). After doing lots of reading and researching I'm going to partition my hard drive (I think!!)between Pinguy and Windows, but give Pinguy the vast majority. However, thinking into the future, I might one day want to sell this laptop and because the mass market is Windows, I'll want to have Windows installed on it. Now, once I've partitioned my hard drive, will there ever be a way to remove Pinguy AND give Windows the entire hard drive again?
 
Old 01-13-2013, 06:37 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello and welcome to LinuxQuestions,

The most logical first step would be to resize the Windows partition from within Windows itself so that the rest of the disk becomes available. Then you can install your Linux distribution onto that free diskspace, partitioning it like you want or need to. Once you want to go back, you can delete the Linux partitions which would indicate the recovered space as free disk space. And then from within Windows you could resize the Windows partition to occupy the full disk once again.

Be careful though! If you damage the Windows partition then you'll have to re-install from scratch. Make sure to make a complete backup of your disk (including partitions) with a tool like CloneZilla for example. That way if something goes wrong you can always revert to that backup.

Looking forward to your participation in the forums. Have fun with Linux.

Kind regards,

Eric
 
Old 01-13-2013, 08:08 AM   #3
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
I think in windows there is a key combination to bring the computer to its orinal stage which you would do anyway before selling or given it to another person. Anyway when you do that windows removes any partition you had manually added
Good look to you

Last edited by TroN-0074; 01-13-2013 at 09:04 AM.
 
1 members found this post helpful.
Old 01-13-2013, 08:12 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
Quote:
Originally Posted by schtocker View Post
I'm going to partition my hard drive (I think!!)between Pinguy and Windows, but give Pinguy the vast majority.
Quote:
Originally Posted by EricTRA View Post
The most logical first step would be to resize the Windows partition from within Windows itself
If you want to shrink the Windows partition by a large amount, it is best to disable the paging file before shrinking the partition and reenable it later. I provided more detail in this earlier post:
http://www.linuxquestions.org/questi...9/#post4841162

Quote:
Originally Posted by schtocker View Post
Now, once I've partitioned my hard drive, will there ever be a way to remove Pinguy AND give Windows the entire hard drive again?
When you install Linux, it is typical and easiest to install the first stage of grub (the Linux boot loader) into the MBR, so the dual boot is controlled by grub. When you want to uninstall Linux, you should fix the MBR back to Windows-only before you delete the Linux partition. There are Windows programs available to fix the MBR. You could research the details of doing that before installing Linux if you are paranoid enough, or wait until you decide to uninstall Linux.

So your three steps to uninstalling Linux are:
1) Fix the MBR for Windows
2) Delete the Linux partitions
3) Grow the Windows partition.

Step 2 is easiest using the GUI partitioning tool in the liveCD mode of the Linux install CD. But it is also possible to do inside Windows. Step 3 is easiest inside Windows.

If you know how to use the dd command in Linux, you can back up the first 512 bytes of the drive (after shrinking the Windows partition) to a file inside that partition, using the liveCD mode of your Linux install CD, before installing Linux. That file could be used later with dd from the same liveCD mode to fix the Windows MBR when you want to remove Linux, so you wouldn't need to find the Windows program for fixing the MBR. In your situation, I would do it via dd. But most people would just wait until they need to fix the MBR and then find the program that does it. That program is normally run from a Windows install CD because by the time you discover you need it you can't boot Windows. It is easier if you run it from the installed copy of Windows before you delete the partition containing grub. Once you delete grub, you can only fix the MBR from a CD.

Last edited by johnsfine; 01-13-2013 at 08:30 AM.
 
1 members found this post helpful.
Old 01-13-2013, 08:31 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853Reputation: 4853
Quote:
Originally Posted by EricTRA View Post
Once you want to go back, you can delete the Linux partitions which would indicate the recovered space as free disk space.
Keep in mind that you should re-install the Windows bootloader before removing the Linux partition, otherwise the system will be unbootable.
But anyways, TroN-0074 is right, when you want to sell the machine you should reset it to manufacturer settings, usually there is a recovery partition somewhere on the disk that can be starte d with a specific key combination at boot time.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard drive partitioning, backup and restore full disk images Tem2 Linux - Newbie 36 01-17-2012 09:33 AM
partitioning hard drive for ubuntu with windows xp already on it mikeprosceo Linux - Newbie 1 10-01-2008 08:18 PM
USB External Hard Drive - Slax v5.0.6 says it's full, Windows claims otherwise Django Linux - Newbie 4 11-18-2005 01:28 PM
mount windows hard drive without partitioning ultrashawn Linux - Hardware 1 04-09-2005 08:19 AM
Partitioning an all Windows hard drive GoDiddly Linux - Newbie 8 11-30-2003 04:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration