Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Could anyone explain what happens in system after unplugging CD-ROM during working with LiveCD session?

Suppose that I'm using Ubuntu LiveCD and suddenly by accident the CD-ROM disconnect for a matter of second because of for example power outage in the case of external devices or just opening the CD tray if the OS allows to do it. Assume that after a while the CD-ROM is pluged in again.

Can anyone explain what exactly happens then, why the OS stops or rather is working but not as before it and how, if it's possible, the stability and usefullness can be brought back and user can continue working with?

According to my observations based on Ubuntu LiveCDs (versions under 12, the kernel version is probably 2.6.XX) the system reaction is like following:

  • all applications in X desktop disappear (I think it's due to automatic sending a kill signal to all processes as if the OS wanted to shut down but actually it seems to wait for something) and it looks like only the background image with the cursor which can be moved all the time
  • all TTYs are avaible and can be displayed but there are only error messages there like INFO: task <process name>:<pid> blocked for more than 120 seconds and SquashFS error: unable to read [...]
  • all the time I can see blinking '_' and I can type something but pressing enter just make it skipped to the new line and obviously the OS doesn't execute it
  • terminal's shortcuts for canceling and quit current process also don't work
  • magic SysRq combinations are generally working and I can see the actual output but I don't know which of them would be useful in this case

Can anyone explain this reaction and tell what exactly these errors mean? And what can one do then to fix it - is there any way for that and why not, if so?

Here: I've just read that "if a task is blocked, it waits for resources to become available again". So if I got it correctly it's waiting for resources - is it true or just wrong interpretation and it will wait endlessly - CD-ROM is surely pluged in again as fast as possible. How to understand it?

I know that processes are gone (or "blocked" as error messages are suggesting?), but how about files in the ramdisk, are they still there untill reboot? Is this possible to access them somehow? Or for example just extract text strings and so on?

There is a magic SysRq shourtcut which remount filesystems - are there any chances that it would help in such situations or should be tried eventually at the end after other trials? If the CD are working as virtual fs, what effects can bring remountig filesystems in that case?

share|improve this question

I'll take a stab at a few of the errors:

  • SquashFS error: unable to read [...] is an error when trying to access the file-system on the CD itself. SquashFS, as Wikipedia notes, is a compressed read-only file-system often used for system data on LiveCDs. Most of your system directories (probably /bin, /sbin, and a few others) are probably on these CD file-systems, so when a program has to access these directories, you get an error.
  • <process name>:<pid> blocked for more than 120 seconds is probably due to some process wanting to read something from a SquashFS and the kernel blocking it because it gets a read error.
  • The blinking _ is either normal (that is, Ubuntu doesn't run a getty on whatever TTY you're using - I get one by pressing Ctrl+Alt+F8 on a perfectly normal system). However, if it's on a lower TTY (anything below TTY 7), that's probably an indication that Ubuntu can't start the login program because it can't find it. However, if you can type something that means that you probably have a getty running.
  • SysRQ has many possible options - Wikipedia gives a helpful list. You can try Alt+SysRQ+u to see if Linux can successfully remount the SquashFS file-systems that you lost when the CD was removed. If it works, you should be able to get a shell again - although I don't know if any other of your processes will recover.

One thing you should try is to see what directories are associated with these read-only file-systems. To do this, you should try mount | grep squashfs. This will find out what file-systems are stored on the disk, and what will be affected when you remove it.

As for recovering files in RAM - they persist until reboot, but if you can't remount the file-system and get access to a login shell, they're almost certainly going to be clobbered when you reboot.

share|improve this answer

Your Answer


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.