LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-03-2002, 03:38 AM   #1
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
how to delete an partition


Hi, I have a partition that was used as a boot partition on my previus linux system. That partition is'nt used any more. How to savly get rid of this partition? If I simply delete it with fdisk, won't the numbers of the other partitions change? If that happens I'l get a kernel panic when I boot in to linux again. I could give a "root=" option to lilo, but won't things be broken?
So my question is, how do I safely delete a partiton?
 
Old 12-03-2002, 03:48 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you should use the e2label program to give the partitions you are using descriptive names, so you can call them by name and not their partition number. eg:

Code:
LABEL=/        /             ext2    defaults              1 1
LABEL=/boot    /boot         ext2    defaults              1 2
LABEL=/usr     /usr          ext2    defaults              1 1
and then it's not a problem anymore. not sure about swap partitions though. i guess you could always let it fail easily enough and change it later.
 
Old 12-03-2002, 08:12 AM   #3
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Original Poster
Rep: Reputation: 45
I don't quite understand what I have to do. I looked at the man page of e2label and think it says to give an device a label you should do :
"e2label /dev/hda4 root" (hda4 is my root). Is this right? Then what? Can I call on "root" in fstab instead of /dev/hda4 ? So then My fstab should look something like :

root / ext2 errors=remount-ro 0 1

instead of

/dev/hda4 / ext2 errors=remount-ro 0 1

Is this right?
 
Old 12-03-2002, 08:16 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
uh huh, run something like "mount -l" to list the labels of the partitions (assuming they are already mounted) just to check you've got the right name.

what you do to fstab is copy my example.... LABEL= etc...
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How would I delete a partition? TroyR Linux - Newbie 3 03-13-2005 10:15 AM
Delete Linux partition oldi Linux - Newbie 7 12-07-2004 10:47 AM
delete third partition (what happens?) invasian Linux - General 1 09-24-2004 04:33 PM
How do I delete /tmp partition? akihandyman Mandriva 4 08-08-2004 02:38 PM
Cannot Delete Partition Tweaker Linux - Newbie 7 02-25-2003 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:42 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
Open Source Consulting | Domain Registration