Forums updated to SMF version 2.1.1

Can only boot to command line [SOLVED]

Started by RATTLEBACK.131, July 01, 2020, 07:06:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


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 <lots dif things> - prepareFiles (30 read-only file system)

ending with some:
w: Failed to fetch http; <us.archive.ubuntu.com/dists/xenial/Inrelease ; archive.canonical.com/dists/xenial/Inrelease ; dl.winehq.orgwine-builds ; repo linuxlites.com ;ppa.lauchpad.net ; repo.skype.com  ; repository.spotify.com ; etc.> Could not execute 'apt-key' to verify signature (is gnupg installed?)
E: failed to fetch <bunch of similar> could not open file /var/<yada yada>
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 Shift+\.  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.