LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-06-2008, 06:26 AM   #1
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Rep: Reputation: 30
Lost + found?


The hdd (500GB SATA) of my new Ubuntu 8.04 install is set up:

Primary partitions:
sda1 46.7 GB NTFS (Cannot for the life of me remember why I formated sda1 as NTFS.)
sda2 1.86 /swap
sda3 7.45 /
Extended:
sda4 409.88
sda5 37.25 /home
sda6 372.66 /media/disk

Under "Places" there appear two (slightly different icons, presumeably having to do with the different formatting): 50 GB Media and 400.1 GB Media. These appear to be sda1 and sda6 respectively.

When I click on the 400 GB icon, it shows only one folder: Lost + Found, size 0, with properties as: contents unreadable and 350.9GB of free disk space. One forum post says:

Quote:
lost+found is a directory that fsck uses to store any unconnected files or directories it finds after a dirty shutdown

Don't recall any traumatic shutdowns, but I found all of this as a result of trying to copy files from my windows computer into this partition and got a "no permission to write to this.." denial. And when I right click into the empty space below the "Lost + Found" the Create Folder, Create Document, and Paste options are all greyed out. Also cannot delete the Lost + Found folder.

Any ideas how to figure out what, if anything, is in Lost + Found (doubt it), how to delete it, and what to do about restoring permissions?
 
Old 10-06-2008, 07:26 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Open up a terminal like konsole or gterm and use "sudo ls lost+found". It might be empty. If there are files in it, they will be named after the inode numbers. These are files and directories that were found but the directory entries for them were damaged, so you don't know the filenames. The file command will examine the contents of a file to determine what it is. Then you will have an idea what application you can use to examine them.

The lost+found directory should have rwx permissions for root.
 
Old 10-06-2008, 08:28 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,542
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

I would use the ; 'sudo ls -al lost+found' from the cli. That way you will get the directory/file permissions with these options. You could 'man ls' to get a better understanding of the command.
 
Old 10-06-2008, 05:23 PM   #4
NVRAM
LQ Newbie
 
Registered: Oct 2004
Location: Western USA
Distribution: Fedora,Suse,Redhat,Puppy,etc.
Posts: 13

Rep: Reputation: 1
First, I should say that it looks like things are fine. You aren't running as root, which is great. However, the mount point under which you're trying to copy files doesn't allow your user to do so.

So, you'll want to:
  • Open a command prompt (terminal window or Ctrl+Alt+F2), and
  • If not logged in as root, run: su - (I suggest you always use the dash)
  • Determine the mount point for the drive/partition in question (see below),
  • Create a user-owned directory under the mount point. If it is /media/disk then:
    Code:
    cd /media/disk
    ls -ld
    mkdir files
    chown yourlogin files
    chgrp yourgroup files
At that point, you may find everything works as you want.
Quote:
Originally Posted by Odyssey1942 View Post
The hdd (500GB SATA) of my new Ubuntu 8.04 install is set up:

Primary partitions:
sda1 46.7 GB NTFS (Cannot for the life of me remember why I formated sda1 as NTFS.)
sda2 1.86 /swap
sda3 7.45 /
Extended:
sda4 409.88
sda5 37.25 /home
sda6 372.66 /media/diskExtended:
sda4 409.88
sda5 37.25 /home
sda6 372.66 /media/disk
Notice that you don't have a "400.1GB" partition on this drive of any kind. Did you name the icon? Could it be there is another drive mounted?

If problems persist, run these and post the output:
fdisk -l | grep ^/dev
mount
df -h


- NVRAM

It's rare with on Linux (especially with a journalled file system) installation to have any files under the 'lost+found' directory.


As an aside: quoting output from GUI clients for system can make it nearly impossible for some of us (who aren't running Ubuntu) to help you. Please learn and love the CLI tools: the core ones are almost always the same between distros so we can more easily help, plus it means cut/paste will work, too.

That said, here is a list of CLI programs you may wish to read about, and which may help here: du df mount find fdisk chown chgrp

Oh, if you use Ctrl+Alt+F2 to get a console prompt, use Ctrl+F7 or Ctrl+F8 (or similar) to get back to X11.
 
Old 10-07-2008, 03:08 PM   #5
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Misery. I just spent an enormous amount of time composing a response and inadvertently deleted it. Argggggg! Here goes again.

NVRAM, Thanks for yours.

Quote:
As an aside: quoting output from GUI clients for system can make it nearly impossible for some of us (who aren't running Ubuntu) to help you. Please learn and love the CLI tools: the core ones are almost always the same between distros so we can more easily help, plus it means cut/paste will work, too.
I would like to be cli competent, but at my level of linux experience, the cli is very daunting and I have a hard time finding guidance that I can understand, and the man pages are at the top of the list of the ones that I cannot. I want to elevate my cli skills but because my use of it is usually only for problem solving, e.g., when I do a new install, not much sticks. Your kindness in having provided character by character guidance will probably make the difference between success and failure and I am most grateful.
Thanks again.

Quote:
Extended:
sda4 409.88
sda5 37.25 /home
sda6 372.66 /media/disk
Notice that you don't have a "400.1GB" partition on this drive of any kind. Did you name the icon? Could it be there is another drive mounted?
I may be off base here, but I think the two partitions sda5 & 6 constitute (logical?) partitions totaling 410.91 GTB making up the Extended partition (sda4) of 409.88. No? I recognize that the numbers are not equal, but when I am looking at partitions, the numbers never seem to add up for me. There definitely is no second hdd.

Anyway, I have managed to get into /device/disk and using: sudo ls -al lost+found:
Thanks again.

drwx------ 2 root root 16384 2008-09-23 13:03 .
drwxr-xr-x 3 root root 4096 2008-09-23 13:03 .

so these are directories, not files, no? If so, then there does not appear to be a problem associated with them and now I just need to work through the permissions thing.

So will work on that and come back with questions. If any of the above (partition stuff?) warrants your further comments, they are very welcome.

Thanks again.
 
Old 10-07-2008, 04:36 PM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,542
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

Quote:
Originally Posted by Odyssey1942 View Post
<snip>

I would like to be cli competent, but at my level of linux experience, the cli is very daunting and I have a hard time finding guidance that I can understand, and the man pages are at the top of the list of the ones that I cannot. I want to elevate my cli skills but because my use of it is usually only for problem solving, e.g., when I do a new install, not much sticks. Your kindness in having provided character by character guidance will probably make the difference between success and failure and I am most grateful.
Thanks again.
<snip>
I would suggest that you look at the next links to assist you with your cli needs;
 
Old 10-07-2008, 05:35 PM   #7
Odyssey1942
Member
 
Registered: Jul 2006
Posts: 287

Original Poster
Rep: Reputation: 30
Onebuck, Thanks for yours. In the deleted post, I had included a thank you for the URLs which were in your earlier post, but forgot to mention it in the reconstructed one. I am not only reading them but have committed them to my bookmarks and will copy bits into my desktop reference files.

NVRAM, your code worked like a charm, thanks again. Copying files over now. I'm astonished at how slow it is though.
 
Old 10-07-2008, 05:44 PM   #8
NVRAM
LQ Newbie
 
Registered: Oct 2004
Location: Western USA
Distribution: Fedora,Suse,Redhat,Puppy,etc.
Posts: 13

Rep: Reputation: 1
Quote:
Originally Posted by Odyssey1942 View Post
I may be off base here, but I think the two partitions sda5 & 6 constitute (logical?) partitions totaling 410.91 GTB making up the Extended partition (sda4) of 409.88. No?
From what you've posted, you are exactly right.

My point was that given the discrepancy between the numbers and the name of the "400.01GB" icon you mentioned might be another partition. But if there's only one HD and it's ~500GB, then that's not possible.

Quote:
Originally Posted by Odyssey1942 View Post
Anyway, I have managed to get into /device/disk and using: sudo ls -al lost+found:
Thanks again.

drwx------ 2 root root 16384 2008-09-23 13:03 .
drwxr-xr-x 3 root root 4096 2008-09-23 13:03 ..

so these are directories, not files, no? If so, then there does not appear to be a problem associated with them and now I just need to work through the permissions thing.
It seems you left off the second dot of the second line (".." not ".").

And yes, the very first character indicates what type of file it is ('d' = directory, '-' = regular file, 'l' = symbolic link, etc.).
the next 9 characters, taken in 3 triplets (sets of 3), show the permissions for owner, group and other, respectively.

The second line ("..") shows the parent directory, in this case the mount point, is indeed writable only by root -- the 1st "root" tells the owner/UID, and the only 'w' is in the first (owner) triplet.

Quote:
Originally Posted by Odyssey1942 View Post
NVRAM, your code worked like a charm, thanks again. Copying files over now. I'm astonished at how slow it is though.
Glad to help.
 
Old 10-07-2008, 06:31 PM   #9
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Rep: Reputation: 35
The Lost+found folder is created when the partiotion is formatted to ext2/3 (the most common linux filesystem) generally noting will be in it and everthing will be fine, but if somthing has gone AWOL after a messy powerdown (eg power outage) then its a good place to look
 
  


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
lost+found linxinfo SUSE / openSUSE 1 02-09-2007 05:04 PM
lost+found ? cnm Linux - Newbie 1 11-27-2006 08:50 AM
lost+found artificialGekko Slackware 2 03-21-2005 09:38 AM
What is lost+found for? ivanatora General 4 09-30-2003 12:17 AM
About lost+found. whepin Linux - General 6 01-08-2002 08:07 AM


All times are GMT -5. The time now is 10:33 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