Can only boot to command line [SOLVED]

Help !

Problem laptop is HP 15 notebook quad core. OS is linux lite 3.4 which is Ubuntu based. I’ve asked this on Linux lite forum but no reply so far & I’m anxious to sort this & get to my files (I’m on my old emergency backup laptop here.)

what happened/s:

Ran updates Ok a couple of days ago. needed to reboot for some to take effect. It rebooted through ‘safe’ mode &then wouldn’t connect to my wifi so shut down & logged back on all OK. Been on standby when not in use for last couple of days. Accidentally pressed on/off button tonight briefly & went into standby - I think. Pressed start button again to get back in & it shut down. now reboots to ‘safe’ (selects LL by default if left 30 secs.) I get the feather (splash screen?) but his takes longer than normal to clear. then goes to command line login request. Accepts this OK with password & goes to command line $ after some messages inc:

usr/lib/ubuntu-release-upgrader/ release-upgrade-motd: 39: usr/lib/ubuntu-release-upgrader/release-upgrade-motd: cannot create /var/lib/ubuntu-release-upgrader/release upgrade available: read-only file system
usr/lib/update-notifier/update-motd-fsck-at-reboot: 33: usr/lib/update-notifier/update-motd-fsck-at-reboot: cannot create /var/lib/update-notifier/fsck-at-reboot: read-only file system
cat: /var/lib/update-notifier/fsck-at-reboot: no such file or directory
run-parts: /etc/update-motd.d/98-fsck-at-reboot exited with return code 1

It has booted normally once since & stupidly I thought that if is shut down properly from there things might be OK but, no, only command line since then.

What do I do now ?

I note your other post elsewhere related to this issue, to which I have replied.

In the meantime I suggest that you do an update/upgrade:

sudo apt-get update

Followed by:

sudo apt-get upgrade

Then reboot. Worth a try , anyway.


Ah. Huston I think you’ve found the problem. Ran update (there are a lot of stuff that scrolls by so quickly) but I noticed 4-5 can not open files followed by lots of ign’s (ignores) & at the end it went bonkers with;
w: problem unlinking the file/ var/ lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_xenial-updates - prepareFiles (30 read-only file system)

ending with some:
w: Failed to fetch http; < ; ; dl.winehq.orgwine-builds ; repo ; ; ; ; etc.> Could not execute ‘apt-key’ to verify signature (is gnupg installed?)
E: failed to fetch could not open file /var/
w:problem unlinking file the file /var/cache/apt/pkgcache.bin - removeCaches (30 read-only file system)
w:problem unlinking file the file /var/cache/apt/srcpkcache.bin (30 read-only file system)

It’s probably worth mentioning that previous update I had trouble with ‘failed to update’ because of my botched Wine install from Wine.hq . I was instructed to remove that repository which I did & update was then successful. I (thought) I had removed all Wine from my system after that. I have also installed skype since last update, using the skype website. I’ll try & find & link the post on LL forum that dealt with wine. (I had also posted there about the trouble I’d had installing wine but - you may guess - got no reply.)

link to my update problem post on LL forum :

Have you considered re-installing LL?. If you do, then I suggest that you choose to overwrite/delete the old one or it might use bits of it and put you back where you are now. In any case, if you can’t update/upgrade then you may have to re-install anyway.
Reinstalling is a bit of a pain (because of all the other s/w that you will have installed) but might be worth a go.


I have but I need to back up a load of stuff 1st & I can’t get to the user interface to access folders etc, only the command line. This is my immediate concern.

No problem! The command line is the best way of backing up files. Use the rsync -a command. If you are not familiar with it, do let me know and I’ll provide some pointers.


I’ve not used that command or backed up anything from command line. Always from desktop. I have a SATA HDD in external I probable want to save. I’d appreciate as much help as you (or anyone else) can give in doing this.

Using an HDD is good as you probably don’t need to worry about running out of space, unless you know that the HDD is already fairly full - I’ll assume not.

Plug in the HDD and wait a bit for it to be registered.
At the command line, enter:

df | grep media

In the line that appears double click on “media” to highlight the whole expression and copy it (Ctrl+Shift+C)
Then paste it (Ctrl+Shift+V) into the following command:

usb={paste here}/Backup

… without the {} brackets.

mkdir $usb

You’ve now created a directory called “Backup” on the HDD.

Now decide on the list of directories/files in your home directory that you want to backup. Use the ls command to choose.
e.g. Documents Desktop Downloads Music Pictures .thunderbird .mozilla Videos (plus odd files that might be in the home directory).
For this example list you would now back them up as follows:

rsync -a Documents Desktop Downloads Music Pictures .thunderbird .mozilla Videos $usb 

…Note there are no commas and only single spaces.
Your files will now transfer and you’ll know when it’s finished when your user prompt appears. The -a in the rsync command is important as it preserves all the file metadata.
Don’t forget to check that the backup has worked, by looking at a few files and checking their integrity and dates: e.g.

ls -l $usb/Documents

[EDIT] When you have finished wiht the HDD you will need to unmount it. Do:

df | grep media

… and double-click on either the /media phrase or the /dev/sdb1 at the start of the line. Copy it (Ctrl+Shift+C) then paste it into:

umount {paste here}

You can now remove the HDD.

If this all looks a bit daunting, don’t worry as it will be easier next time. And, of course, you can rsync -a them back into your new operating system when you’ve installed it.
Let us know if you have problems.


Out of time again today. I’ll have a go tomorrow. Just checked my SATA HDD (in external case) has 150gb free so should be enough. I’ll let you know how I get on.

Problems straight away

on plugging my HDD to USB port I get the following line after the command line $ prompt:

[ 152.519172] sd 2:0:0:0 No Caching mode found [ 152.519426] sd 2:0:0:0 [sdb] assuming drive cache : write through

then using {df grep media} I get:

df: grep: no such file or directory
df: media: no such file or directory

when ever I try. I note in your instructions there is a vertical line after ‘df’ which I don’t know what it is & can’t find anything like it on my keyboard. I can access the external HDD on the laptop I’m writing this with & I could access it previously with the sick laptop.

Also in your instructions you say at one point ‘double click on media’. I don’t understand this. I can’t use a mouse in command line. To be clear it’s currently booting to an all black screen with command line login request at top left.

Also, I do have an option at switching on to select/goto ‘advanced options for LL GNU/Linux’. If I select that I have options for:

Linux Lite GNU/Linux, with 4.4.0-185 generic
{" " “/” " " " } (Upstart)
{" " “/” " " " } (recovery mode)

then the same 3 types with 4.0.0.-184 (&178 & 142). Would one of these get me to my desk top? Is there anyway to get to desktop using the command line?

Ah, me!
First of all, the “pipe” symbol (|) is near the bottom left hand corner of your keyboard and is probably [b]Shift+[/b]. The command I gave you won’t work without it. The “|” symbol “pipes” the output of df to the grep command. Actually, just df would do - it would just add extra lines to the output and I wanted to keep things simple!

I take it that your mouse is not controlling the cursor in the terminal. Are you sure? That’s unusual. If your keyboard is working I would expect the mouse to work as well. Please check again.
Anyway; Now that I know that you are getting
Linux Lite GNU/Linux, with 4.4.0-185 generic
{" " “/” " " " } (Upstart)
{" " “/” " " " } (recovery mode)

I suggest that you try them one at a time by using the up/down arrows on your keyboard (and the Enter key, of course) and see what happens. These are the only likely methods of getting to the desktop that I can think of.


[EDIT] Are USB sticks recognised by the system?

Latest update on what’s not happening with HP laptop.

Mouse does not do anything in command line. There is no mouse cursor. Clicking buttons, scroll wheel & moving it about does zero on screen to show for it. It will not highlight any text (as there is no mouse cursor to target anything with.) Mouse works in command line on this laptop though (also running LL) when summond from desktop. Maybe that’s because it’s not getting to command screen through the desktop?

Trying to get the desktop from generic options only results in command line/screen as per trying to boot with straight LL. Recovery mode lists lots of stuff before giving a recovery screen inc. failed actions & errors. Such as:
dev/sda1 contains a file system with errors. check forced.

I can list more if that might be useful. Recovery screen options :
dpkg repair broken packages.
grub update grub boot loader
root drop to root shell prompt

Choosing dpkg gives a warning about making certain files read-write (forgot take picture of that one) & I didn’t proceed.
Choosing system-summary gives a very brief flash of 2 lines of text such I had to photograph them to read:
cat: sys/devices/system/cpu/cpu0/cpufreq/scaling _available_frequencies: no such file or directory
/lib/recovery-mode/system summary:29:/lib/recovery-mode/options/system-summary: arithmetic expression: expecting primary: " / 1000"

It seems to recognise the external HDD as it returns:
[ 152.519172] sd 2:0:0:0 No Caching mode found [ 152.519426] sd 2:0:0:0 [sdb] assuming drive cache : write through
in the command prompt after plugging it in. Does similar with a USB flash drive but numbers in brackets differ. However running , df | grep media , returns to a blank command prompt with both. df media, same thing.

Do you agree with Darry’s suggestion that live USB OS would gain me access to my files for back up ? He suggested Puppy.

Thanks again both for the help you’ve given so far.

It looks like your system has a serious problem.
Your list of outputs mentions “root drop to root shell prompt”. Might be worth trying this. If it works, it starts a terminal session with root privelidges which will allow you to examine the system, back up files etc.

Failing that, then yes: using a Live USB looks like the best option. As for using Puppy: I suggest that you stick with Linux Lite on a Live USB as you are familiar with it and you probably have one lying around. Your laptop is easily able to cope with the more popular Ubuntu for which there is more expertise available here.


I feared as much. For me I think the live USB will be the less stressful. I’m not overly familiar with the workings of LL & not worked in root before. Running ls does show my home folder stuff so I don’t want to bugger that up if I can help it.
As I want to change to something else anyway I’ll make a new live USB ( have to make a fresh one anyway). Once I’ve done that I may need some help accessing my old files to back them up but deal with that at the time.


Root feels like ordinary terminal user access but allows one to do dangerous things, so best left until absolutely necessary.
If you are changing operating system, I suggest Ubuntu (with Classic View) as it has everything one needs and there is lots of help available.


Hi. Me again. Bit of an update. 1st I found I had another external HDD which allegedly had LL installed on it as an external OS. Unfortunately this didn’t want to boot.

So I bought a ready made live USB for Ubuntu 18.04 as I needed an new USB for install any way & for £7.15 got an 8gb (verbatim) stick with it already done. It came with a CD with 149 page install guide & the (old?) Linux manual too.
Fortunately I’d left the BIOS set up to boot to USB as first option & the stick boots fine. I’m actually very surprised just how fast working from it is. I also quite like the look of the desktop too, but I’ve only had a quick whizz round so far.

Now I need to find out how to use this to recover & back up my files from the old LL OS. Any pointers would be most welcome.

This is good news! And if you think this is quick you will be very pleased with the speed when it’s installed - running from a USB is always much slower.
The desktop you have is the “Unity Desktop”. I don’t know anyone who likes it, and if you wish you can add an optional desktop: “Classic View” which most people find much more intuitive.

To get your files:

  1. When running from the USB, select the file manager from the left-hand menu.
  2. At the bottom of the list, select “Other Locations”.
  3. Select “/dev/sda1”
  4. Select “Home”
  5. Click on your username.
    You now have access to all your files.

It’s safest to back up your files using Terminal Commands (Ctrl+T), and I suggest that you use the “archive” (-a) option. For example:
cp -a Documents … as that will preserve the metadata.
You can find the path-to-USB by

df  |  grep media

and copying the phrase beginning /media… which will be your backup-USB.

Let us know how you get on.

Thanks. Not sure if I’ve time left today to try. Should have tomorrow at any rate. Fingers crossed.

Just been having a go at backing up my files to the external HDD I have. Here’s what happened.

a) There is no ‘file manager’ in the left hand menu (or anywhere else I can find). There is a ‘Files’ folder that contains ‘+ other locations’. This doesn’t give stuff like “/dev/sda1” but drive icons instead. I was able to access the correct drive & find the drive files inc. “home” but these are folder/desktop type icons.

b) Cntl+T does nothing. I can only get a terminal from the applications selection (which I did).

c) I can not select the " | " symbol. [b]Shift+[/b] types > . [b]Cntl+[/b] types < . Just pressing the |\ key also types <. So and any combination of what follows doesn’t work. The /<> keys work normally with/out Shift.
I have a path name for the external HDD on this laptop from the ‘title bar’ (don’t know what else to call it). Along the lines /media///. Would that work?

d) I can just plain copy file/folders in the usual copy/paste manner between drives. These are readable when the external HDD is plugged into this laptop. How important is the metadata?

(finally - using the live USB for this is slower than normal. No big deal :slight_smile: )

Good progress.

a) The “Files” directory is of course the file manager - I could have been more explicit, but you worked it out OK. the Unity Desktop is all about icons, unfortunately, which is why so many people change to Classic View. Again; you worked it out OK.

b) Just to be clear: Ctrl+T does not mean click Ctrl then T - it means while holding down the “Ctrl” key press the “T” key. I would be very surprised if that doesn’t work.

c) The difficulty in finding the “|” symbol is just a keyboard mapping issue. Try Windows-key+Space (and remember item (b) above!). This should resolve the problem. In fact all the symbols are somewhere on the keyboard but it’s a faff finding them.
Your /media/// is exactly what’s required, so go ahead with that. Having to type it is a pain but that’s life.

d) Your usual “copy/paste” method of backing up is fine if you are comfortable with it and the metadata will probably be copied, too. I’m a bit surprised that you can copy/paste a directory but if it works for you…
The only likely metadata problem is that that the copied files might have today’s date substituted, but modern OSs have largely got that sussed. I’ve just tried it and it was OK. I was being cautious.

Let us know how you get on.