LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   what should be done in emergency mode? and why...? (https://www.linuxquestions.org/questions/mandriva-30/what-should-be-done-in-emergency-mode-and-why-4175419859/)

irajjs 08-01-2012 06:18 PM

what should be done in emergency mode? and why...?
 
Recently i noticed that a misconfiguration of my flash memory which is a removable device and pulling out the mounted device without unmounting that causes falling into emergency mode at next boot time or causes a system crash while working!this made me to reinstall the OS at first but then when i discovered the reason and inserted the device problem was solved after rebooting!
My question is that why is that so? and what should be done when unexpectedly system crashes without any explanation or warning!? and what are the maintenance steps?
Thank you

frankbell 08-01-2012 07:48 PM

Many questions, no answers.

What distro/version of Linux and what type of flash device? What error messages, if any, did you see on the screen? How was the memory of the flash device "misconfigured" and how did that manifest itself?

You could check the logs. The most likely place you'd find something is /var/log/messages, but, if the crash was sudden, there's a chance the system didn't get the opportunity to log anything.

irajjs 08-02-2012 08:18 PM

answers
 
Quote:

Originally Posted by frankbell (Post 4743600)
Many questions, no answers.

What distro/version of Linux and what type of flash device? What error messages, if any, did you see on the screen? How was the memory of the flash device "misconfigured" and how did that manifest itself?

You could check the logs. The most likely place you'd find something is /var/log/messages, but, if the crash was sudden, there's a chance the system didn't get the opportunity to log anything.

Hi
1-Recently i was using Mandriva2011 and now i am using Mandriva2012.
2-Flash device's name is:
"Kingston DataTraveler 2.0"
3-The error messages have a long story! now i have to ...
some years ago i bought this flash memory to be able to transfer the Cafe-Net downloaded files to my computer because at that time i had no access to internet at home...
another reason for using flash memory was my cdrom problems....http://www.linuxquestions.org/questi...ml#post4732392
at that time i was using both Windows and Linux on my PC
after some time one of my operating systems(i do not remember which one!) informed me that this device shows some suspicious activity! then recommended to make a new entry for that..and i did and changed the original name to kinge ...it was working until next errors and disorders that prevented the mounting of device...then i formatted that device several times during the next months using other public computers which in some cases the result was a success ..
then i decided to not to use Windows anymore but because of my modem problem(my other post!) and no internet access at home i had to use this device again more and more..
Recently while upgrading to Mandriva2011 and Mandriva2012 afterwards , this device caused more problems:
-I could not mount that easily!
-the kinge entry was not mountable and the default name was returned again automatically! also a partition made automatically and labelled automatically
-system notification showed two names for one device! one of which was not mountable(did not exist message)
-sometimes the device could not be unmounted ..an error message saying that: ...can not unmount because one or more files are open in an application!!...i could not find that application...and in some cases there was no files in that!
so . i had to pull out the device without unmounting that!!
after restart system crashed and entered to emergency state..the first time i had to reinstall the OS but the next time i did a lot and found that pulling the device out had caused that so inserted the device again and restarted this time boot succeeded!
At last i could unmount the device and now i do not dare to attach that device to PC anymore!
This was the emergency state messages:
Quote:

...........
recovering journal ok
...
home started...
...
Dependency failed.Aborted start of /media/sdc1
Dependency failed.Aborted start of setup links in /boot for running kernel
Dependency failed.Aborted start of relabel all file systems if necessary
Welcome to emergency mode......
give root password..type "systemctl Default"or ^D.....type ctrl+D to continue
Regards

frankbell 08-02-2012 08:59 PM

So, if I understand your post correctly, it looks as if something on that flash device is hooked into the OS, causing the problem when you remove the drive, but you are not aware having any files on the flash drive open, say in a media player or text editor. Am I summarizing this accurately?

Can you shutdown the computer, remove the device, then restart the computer without the flash drive connected?

If so, you can use the ps command (ps -A, -A for list all) to display a list of processes.

Do this before you insert the drive, then again after you mount it.

When you go to unmount the drive, if you get the same error, that same command can help you figure out what process is hooked into the flash drive. I fear you'll have to do a bit of detective work to finger the culprit.

There are ways to manipulate the output of ps to make it easier to use and to save it in text files. This article describes them better than I can.

I particularly recommend the part about how to save the output to a file, since you can do that and then consult and compare the files later.

You might also run an fsck on the drive before mounting it. Can't hurt, might help.

I hope this helps.

I think there might be more going on here, but one step at a time.

irajjs 08-06-2012 06:18 PM

The device is successfully unmounted and removed
 
Quote:

Originally Posted by frankbell (Post 4744592)
So, if I understand your post correctly, it looks as if something on that flash device is hooked into the OS, causing the problem when you remove the drive, but you are not aware having any files on the flash drive open, say in a media player or text editor. Am I summarizing this accurately?

Can you shutdown the computer, remove the device, then restart the computer without the flash drive connected?

If so, you can use the ps command (ps -A, -A for list all) to display a list of processes.

Do this before you insert the drive, then again after you mount it.

When you go to unmount the drive, if you get the same error, that same command can help you figure out what process is hooked into the flash drive. I fear you'll have to do a bit of detective work to finger the culprit.

There are ways to manipulate the output of ps to make it easier to use and to save it in text files. This article describes them better than I can.

I particularly recommend the part about how to save the output to a file, since you can do that and then consult and compare the files later.

You might also run an fsck on the drive before mounting it. Can't hurt, might help.

I hope this helps.

I think there might be more going on here, but one step at a time.

Hi
As i said in my previous post the device was unmounted i could do that because there was a chance when there was no file open in any application!!
I did the
Code:

# ps -A
command as you see in my other post about "unknown process" ...and i will do the procedure as you said later
Right now i wanted to say that the device is successfully removed and there is no problem about that...just i do not dare to insert that again! specially because my system now is working better than ever in the past and a lot of new installed applications which i am afraid to lose them
I will post the final results later
Regards

frankbell 08-06-2012 08:32 PM

If you are hesitant to test it with your working system, why not try testing it with a Live CD?

irajjs 08-07-2012 10:19 AM

Live CD worked very slow...near to stop!
 
Quote:

Originally Posted by frankbell (Post 4747648)
If you are hesitant to test it with your working system, why not try testing it with a Live CD?

Hi
I used live CD few times when i had installed Mandriva2011 but that worked very slow and as progressed more it became slower! maybe because i had set permissions for home folder and especially sub-folders
That live CD was inside the downloaded OS package from Mandriva site.
thank you


All times are GMT -5. The time now is 03:44 AM.