Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was developing some code and had open qtcreator (software development IDE), gnome-terminal, and possibly firefox. I needed to restart to test something. So i restarted using sudo init 6. When my VirtualBox Fedora 15 VM came back up I got this great error:

... unexpected inconsistency run fsck manually fedora ...

fsck then proceeded to find lots of problems and prompted from my y or n. After running fsck the fedora system has booted up successfully.

Did sudo init 6 cause my file system to be corrupted? or was something else the culprit?

share|improve this question
6  
Should be harmless, did you modify /etc/inittab or your init/rc scripts? –  Stéphane Gimenez Sep 16 '11 at 20:50
    
no i did not edit the /etc/inittab –  Trevor Boyd Smith Sep 16 '11 at 20:51
    
although i did delete all shared memory... even though some of the shared memory was not owned by my application. (i incorrectly thought that all the shared memory listed via ipcs -m was from my app... so that is why i killed all of them) –  Trevor Boyd Smith Sep 16 '11 at 20:52
    
where did the error appear, inside the virtual machine or on the host system ? And where did you run sudo init 6, on the virtual machine or on the host ? –  Andre Holzner Sep 17 '11 at 14:55
    
RE - "where did the error appear?": the error appeared when the VM was booting up. –  Trevor Boyd Smith Sep 17 '11 at 20:36
show 3 more comments

2 Answers 2

up vote 3 down vote accepted

If you ran sudo init 6 in the system inside the VirtualBox and that system had corrupted files, then no, init 6 was not the cause of it. There are plenty of other possible causes though, that you may/should investigate.

If you ran sudo init 6 in the host OS, and the system inside VirtualBox had file system corruption, then yes, init 6 was the cause of that. If you suddenly reboot the host system, the virtual ones won't have the chance to umount their filesystems and shutdown properly.

share|improve this answer
add comment

Try to make a script for that.

the script needs to do shutdown for guest OS's y reboot the host system.

If the guest OS's are running when you shutdown the system you can get data lost.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.