View previous topic :: View next topic |
Author |
Message |
raf Apprentice
Joined: 16 Jan 2005 Posts: 158
|
Posted: Wed Jul 06, 2005 2:50 pm Post subject: Remove my windows partition |
|
|
Hi,
Well I have not booted into my winXP partition for about a year now so I think it's about time I remove it all together as I wouldn't mind the extra space. I currently run grub with the following partition table:
Code: | Device Boot Start End Blocks Id System
/dev/hda1 1 4 32098+ de Dell Utility
/dev/hda2 * 5 1597 12795772+ 7 HPFS/NTFS
/dev/hda4 1598 4864 26242177+ f W95 Ext'd (LBA)
/dev/hda5 1598 1602 40131 83 Linux
/dev/hda6 1603 1727 1004031 82 Linux swap / Solaris
/dev/hda7 1728 4864 25197921 83 Linux |
What I would like to have is something like this:
Code: | Device Boot Start End Blocks Id System
/dev/hda1 * 1 X XXXXX+ 83 Linux
/dev/hda2 X XXXX XXXXXXXX+ 82 Linux swap / Solaris
/dev/hda3 XXXX XXXX XXXXXXXX+ 83 Linux |
Some questions:
1) Is there any danger of removing this "Dell Utility" partition? I think it contains some diagnostics, but I don't care about those as they are on my dell cd anyways.
2) Can I do this all with standard linux tools or do I need third-party tools? I was told I cannot change the beginning of a partition, I can only resize the end of it.
3) What is the general procedure to accomplish this? |
|
Back to top |
|
|
HAL_9000 Tux's lil' helper
Joined: 29 Sep 2004 Posts: 114 Location: Netherlands
|
Posted: Wed Jul 06, 2005 3:07 pm Post subject: Re: Remove my windows partition |
|
|
raf wrote: | Hi,
Some questions:
1) Is there any danger of removing this "Dell Utility" partition? I think it contains some diagnostics, but I don't care about those as they are on my dell cd anyways.
2) Can I do this all with standard linux tools or do I need third-party tools? I was told I cannot change the beginning of a partition, I can only resize the end of it.
3) What is the general procedure to accomplish this? |
Nah, don't worry.
I've got a Dell Laptop myself, and safely removed it for the same reasons.
You can easily install windows without it... the restore cd that came with your Dell just makes that configuration.
Any linux fdisk tool can remove these partitions... fdisk and cfdisk are the most common ones I believe... cfdisk is more userfriendly
check the locations of your partitions using /proc/partitions, disk sizes, an fdisk tool, whatever you need to be sure.
Once you've removed the Dell Utility partition and/or your Windows partition, you can do with that free space whatever you want...
resize other partitions ( with parted for instance), make new ones, etc...
_________________ We are the keepers of the sacred words: Ni peng and Nee wom! |
|
Back to top |
|
|
bonbons Apprentice
Joined: 04 Sep 2004 Posts: 250
|
Posted: Wed Jul 06, 2005 3:10 pm Post subject: Re: Remove my windows partition |
|
|
raf wrote: | 1) Is there any danger of removing this "Dell Utility" partition? I think it contains some diagnostics, but I don't care about those as they are on my dell cd anyways.
2) Can I do this all with standard linux tools or do I need third-party tools? I was told I cannot change the beginning of a partition, I can only resize the end of it.
3) What is the general procedure to accomplish this? | 1) If you never used it until now (and you don't plan to restore XP from their restore image) you may remove that partition. (I have heard of notebooks with mutimedia stuff that have a mini-os to use multimedia features without starting Windows, so for those be carefult not to delete that partition)
Otherwise just dd an image of it for some archive.
2) You can do it with standard linux tools like fdisk, parted and friends
3) If you have spare disk space somewhere else, then easiest is to copy ALL files (including their attributes/permissions) to a remote storage. (Do it from a live-CD partition by partition).
Then wipe the whole disk (remove all partitions) and create the new ones. Finally copy back all your files. (don't forget to update the boot-loader!) |
|
Back to top |
|
|
GaDDiM n00b
Joined: 01 Jan 2005 Posts: 38
|
Posted: Wed Jul 06, 2005 3:12 pm Post subject: |
|
|
1) Don't know, I know but it doesn't look big so why removing it ?
2) You can delete the partitions with fdisk or cfdisk. Perhaps you should consider tar everything to a file on another computer attached to a local network. fdisk or cfdisk the hd like you want it. Extract your tar file, don't forget to --preserve-permissions (-p) and to edit your /etc/fstab file after. Another option could be make 1 partition of the 3 partitions and mount it to a map in your home directory. I don't know any partitioning tools for ilnux though
3) I don't know the standard way |
|
Back to top |
|
|
raf Apprentice
Joined: 16 Jan 2005 Posts: 158
|
Posted: Wed Jul 06, 2005 3:20 pm Post subject: |
|
|
Hi,
Thanks for all the quick posts. I will give it a go when I go home... (at work now), but I will start all my backups right now just in case I screw someting up
SO assuming I get my partitions the way I want, I have to modify 1) grub, and 2) fstab and nothing else right? Grub itself should be completely unaffected as it is in the master boot record right?
Thanks,
Raf |
|
Back to top |
|
|
GaDDiM n00b
Joined: 01 Jan 2005 Posts: 38
|
Posted: Wed Jul 06, 2005 3:58 pm Post subject: |
|
|
I don't know if grub is completely unaffected for sure, I never tried out, but that shouldn't be a problem since you will be probably prepared for it with a grub diskette or a live cd |
|
Back to top |
|
|
raf Apprentice
Joined: 16 Jan 2005 Posts: 158
|
Posted: Thu Jul 07, 2005 4:32 pm Post subject: NIGHTMARE!!!!!!!!!!! |
|
|
Hi All,
Thought I would share my story with you as it's funny in a crying sort of way! To make this story even more pathetic I should mention I'm am quite good at all aspects computers and have an engineering background!
So I decided to go for it and re-design my partitions as I originally posted. I had 30 mins before I had to be somewhere so I was in a rush (big mistake). I modified my fstab and grub.conf and booted into bootitNG as I have found this tool to be quite handy in the past for all my partition work. Deleted my winxp and dell partitions and then that's when the trouble started. I couldn't figure out how to move an extended volume to a partition. Well this was a problem because my extended partition was hda1 and my boot partition was now hda2 and I modified both grub and fstab to boot from hda1. I really didn't feel like booting from my livecd and editing those entries, plus I really wanted to have a nice partition table as I originally posted.
SO I pressed some buttons while frustrated and magically my entire partition was collapsed into ONE hda0. EVERYTHING, boot, swap and / were now a nice little hda0. BootitNG automatically writes the partition information so there was no undo! Well fuck this is not what I wanted at all!
Well this was not the end of the world as I perform regular backups of my linux partition onto my usb drive. So I figure boot with livecd, create the partition table I wanted originally, mount my usb drive and dump the entire contents of the backup onto the new hda3 I created. OK proceed... what could go wrong?
Well, since my backups are on a public media, my backup script automatically encrypts all backups with pgp using a password located in /root/.backup_passwd Guess what.... I wrote this script so long ago I forgot the damn password!!! AND since I fucked up my partition tables there was no way to check this backup_passwd file. Ofcourse I never wrote it down or told anyone what it was! I tried for half the night and typed all passwords I ever used for anything with no luck! I went from having a great system (YEARS OF WORK) to having absolutely nothing!!! Not one damn script I wrote, not one crcuit I designed. I almost cried. All my data was "there" staring at me with a nice .pgp extention! What an idiot!
Ok finally my brain generated a good idea: All the data is still there... it's just not partitioned properly! I have to find a way to get my original partition table back, edit the grub and fstab that is there and I should have my system back to what it was before. Only one problem... I don't remember what my partition table looked like! I needed the EXACT start and end cylinders and who keeps that around?.... OH WAIT... I POSTED IT TO THE GENTOO FORUM (above) YES! I was so happy I did that! It was smooth sailing from there. Boot livecd, re-create original partition table, mount partitions, edit grub and fstab, boot and here I am writing about my experience to you!
First thing I did was look at that damn .backup_passwd... and... ofcourse! that's what it was!
Nothing accomplished, one day gone, feeling dumb, never again (until tomorrow)!
BTW: How DO I move my logical volumes which are in an extended partion to their own primary partitions? The only way I could have done it in bootitNG was to copy the data in the partitions, but ofcourse this only works if you have >50% free space left which ofcourse I did not have!
-Raf |
|
Back to top |
|
|
raf Apprentice
Joined: 16 Jan 2005 Posts: 158
|
Posted: Fri Jul 08, 2005 1:15 pm Post subject: DONE |
|
|
Hi,
Ok, I'm finished. Posting for furure readers:
NOTE: THIS IS ALL DONE FROM A LIVE CD NOT FROM A LIVE SYSTEM! EXACT COMMANDS NOT GIVEN, LOOK AND MAN FOR THEM YOURSELF. READ THE WHOLE THING BEFORE YOU DO ANYTHING.
1) Check your drive for bad blocks. If you have them *don't* do the following. If you do, it's a similar procedure but *DO NOT* use dd (use tar instead). Google around if you want to know why.
2) Copy ALL the partitions you care about (for me it was /boot and /) via dd to an external storage. For me it was a USB drive. If usb drive is FAT then pipe dd to split. You can also use netcat to pipe across network. Might want to also dd your MBR (including partition table) if you want just in case you want to go back to what you had before. You can be quite creative here if your storage has restrictions: pipe to split, gzip, netcat, etc.
3) I also tar'd just in case I did have bad blocks. (I skipped my own step 1 :) )
4) Delete your partition table and re-create. Keep in mind the new partitions must be >= to the old partitions (/boot and /) you will be copying back. In my case, I made /boot exacly the same as before, swap a bit bigger, and / to take up the rest of the drive. Until now you can go back :) by just loading your backed-up MBR as no data has been deleted. If you proceed, there is no going back!
5) Make the swap and turn it on as per the gentoo hand book.
6) Use dd to copy your images back to the respective partitions. If used split, cat the files and pipe to dd.
7) Mount / and /boot and chroot
8) Edit grub.conf and fstab to reflect your new partitions
9) Execute grub and run: root (hdX,X), setup (hdX), quit where X is location of your /boot in grub syntax
10) If any of the new partitions are bigger now then they were before you need to resize your filesystems using resize2fs or something similar.
11) Re-boot and enjoy
Even though this seems a bit complicated, when you think about it, each step makes perfect logical sense. I wish I did this right away instead of trying to use a third party comercial program which resulted in my previous post!
Enjoy,
-Raf |
|
Back to top |
|
|
GaDDiM n00b
Joined: 01 Jan 2005 Posts: 38
|
Posted: Fri Jul 08, 2005 1:28 pm Post subject: |
|
|
Well what can I say, Gentoo is always learning |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|