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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-17-2006, 09:04 AM
|
#1
|
|
Member
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34
Rep:
|
how to find unmounted partition
I accidently unmounted a partition that I had created when installing Linux. How can I retreive it. doest that hard disk space remain unused.
is there a command to find free hard disk space not used for any partitions?
I should have mentioned this earlier. after unmounting I tried "mkfs -t ext3 /dev/hda19"  where /dev/hda19 Label was /ext3Drive1 
Last edited by cnm; 11-17-2006 at 10:49 PM.
|
|
|
|
11-17-2006, 09:11 AM
|
#2
|
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
You can list the partitions on a device like this (example device is /dev/hda - the primary master IDE drive). Execute this command as root, or with sudo:
On my machine, the output looks like this:
Code:
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 1816 14586988+ 83 Linux
/dev/hda2 1817 7867 48604657+ 83 Linux
/dev/hda3 7868 7992 1004062+ 82 Linux swap / Solaris
/dev/hda4 * 7993 9729 13952452+ 83 Linux
I can see that there are mountable partitions /dev/hda1, /dev/hda2 and /dev/hda4. (hda3 is a swap partition).
|
|
|
|
11-17-2006, 09:39 AM
|
#3
|
|
LQ Newbie
Registered: Nov 2006
Posts: 16
Rep:
|
Well,
you can use,
#sfdisk -s
to list all your partitions,then you use fdisk to list all your active partitions.
comparing these two o/p,you should be able to make an educated guess on the parition name that you had accidentaly umounted.
hope this info helps.
-Alphy
|
|
|
|
11-17-2006, 02:41 PM
|
#4
|
|
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 1,567
Rep: 
|
Just login as root and run mount -a
That will mount all your partitions as specified in /etc/fstab. For those that are already mounted, nothing will happen. For the one that you accidently unmounted, it will be remounted.
|
|
|
|
11-17-2006, 02:47 PM
|
#5
|
|
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 1,567
Rep: 
|
p.s. - It seems you might have some confusion about what "unmounting" means. It does not free up any disk space. Think of it like removing a floppy disk from your floppy drive (if you still have one of those things!) Sure, you can't use the floppy when it's not in the drive ("unmounted"), but there's no damage or major change to your system. When you need the floppy, just stick it back in the drive ("mount" it) and continue on. Mounting/unmounting is no big deal. It's done all the time.
|
|
|
|
11-17-2006, 10:35 PM
|
#6
|
|
Member
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34
Original Poster
Rep:
|
Quote:
|
Originally Posted by alphy
Well,
you can use,
#sfdisk -s
to list all your partitions,then you use fdisk to list all your active partitions.
comparing these two o/p,you should be able to make an educated guess on the parition name that you had accidentaly umounted.
hope this info helps.
-Alphy
|
whta did you mean by "o/p"
|
|
|
|
11-17-2006, 10:39 PM
|
#7
|
|
Member
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34
Original Poster
Rep:
|
Quote:
|
Originally Posted by haertig
p.s. - It seems you might have some confusion about what "unmounting" means. It does not free up any disk space. Think of it like removing a floppy disk from your floppy drive (if you still have one of those things!) Sure, you can't use the floppy when it's not in the drive ("unmounted"), but there's no damage or major change to your system. When you need the floppy, just stick it back in the drive ("mount" it) and continue on. Mounting/unmounting is no big deal. It's done all the time.
|
Great example.
|
|
|
|
11-17-2006, 10:48 PM
|
#8
|
|
Member
Registered: Nov 2006
Distribution: RHEL 4
Posts: 34
Original Poster
Rep:
|
Quote:
|
Originally Posted by haertig
Just login as root and run mount -a
That will mount all your partitions as specified in /etc/fstab. For those that are already mounted, nothing will happen. For the one that you accidently unmounted, it will be remounted.
|
Ok But then it says
mount: special Device LABEL=/ext3Drive1 does not exist
mount: special Device LABEL=/opt1 does not exist
mount: special Device /dev/hda18 does not exist
I should have mentioned this earlier. after unmounting I tried "mkfs -t ext3 /dev/hda19"  where /dev/hda19 Label was /ext3Drive1 
|
|
|
|
11-18-2006, 12:34 AM
|
#9
|
|
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,466
Rep: 
|
Quote:
|
Originally Posted by cnm
whta did you mean by "o/p"
|
Original poster, i.e. you.
|
|
|
|
11-18-2006, 08:17 AM
|
#10
|
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
Quote:
|
Originally Posted by Nylex
Original poster, i.e. you.
|
Ah, I'd been wondering that too... 
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:47 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|