LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can't boot to ubuntu: session lasted less than 10 sec. (https://www.linuxquestions.org/questions/linux-newbie-8/cant-boot-to-ubuntu-session-lasted-less-than-10-sec-559176/)

mhg 06-04-2007 07:14 PM

can't boot to ubuntu: session lasted less than 10 sec.
 
Hi All,

Just when I think I am getting close to thumbing my nose at Bill Gates, I get stuck again. Auuuuugh.

I always boot to Ubuntu first, today after I log in I get message along these lines:

Your session lasted less than 10 seconds, could be an installation problem or you are low on disk space, try booting in a safe mode.

Well damned if I know what to do.

I tried booting to Ubuntu recovery mode, which got me to something that looked like a terminal to enter a command. I entered my password and got the message "no such command", or "command unknown" and could go no further.

Then I tried booting off of Ubuntu CD. That worked fine, and after a little experimenting got to where I could browse my "/home". I thought I would try to delete some files, see if I could free up space, though I don't know how that could have happened. At any rate, it didn't matter, because the live cd would not let me move anything to the trash.

I was just going to make a post to see if I understood the partitions/file system in Linux.

When I installed Ubuntu 7.04 I had a clean hard drive, created a 1 gig swap, a 10 gig "/" and about 120 gig "/home". IF I understand the Linux file system, whatever I store in my home/user folder is written to this 120 gig /home partition? If that is so, there is no way I have run out of disk space.

I have a dual-boot system, and am now back in XP. Yuck.

Can anyone help me out, get me back to Ubuntu again?

Thanks for any help.

syg00 06-04-2007 08:16 PM

Quote:

Originally Posted by mhg
IF I understand the Linux file system, whatever I store in my home/user folder is written to this 120 gig /home partition? If that is so, there is no way I have run out of disk space.

The first bit is close enough, but the conclusion is a bit of a leap. Log files, downloads, lots of ways to fill the root partition.
Get back into recovery mode and try the following
Code:

df -hT
du / -Sx | sort -nr | head

Let's see the output of those (the second one will take a while)

mhg 06-04-2007 08:35 PM

Thank You.

I can not copy and paste your commands, as I have to reboot, and I do not know hoe to enter your last command line.

the df -hT did show that my "/" was completely used. It reported a size of 9.2 gig, with 9.2 used.

My /home was size of 115 gig, with 108 gig available.

Obviously I am doing something wrong. I did transfer five pictures, and ripped two CD's (lossless), but had hoped that I was storing them on the large home partition.

I have only been using V7.04 for a couple of weeks, and have only installed a few programs with synaptic. Just finding my way around my first Linux distro, so have not done very much. Very much the NOOB.

Many thanks for the reply.

Now can I find out how I filled up my root, and how I can free up space? Is that the next step?

syg00 06-04-2007 08:46 PM

Yep - that's what the other command (line) was for. I don't understand why you can't enter it - just type it in. It's 3 commands piped to each other (for convenience). That vertical line is the pipe command - usually above the backslash on the keyboard.
Be patient - might take minutes to come back; especially with the sort in it, and you having no disk space left.

mhg 06-04-2007 09:21 PM

Ya, you had me, I couldn't find the pipe.

Now I need more help with that command line. I must be missing the spacing or something, no matter how I try to type it, I get "no such command".

In other words, I can not tell when and where there should be spaces between what I am typing.

Also, is there something in particular you need to know from the reply I get from the command? You say there may be a lot of info coming back, what am I looking for?

Thanks for your patience, I really appreciate the help.

syg00 06-04-2007 10:03 PM

How about
Code:

du        /          -Sx          |        sort        -nr        |          head
Use as many (spaces) as you like. And yes, that is a capital S.

mhg 06-04-2007 10:16 PM

I was experimenting, and managed to type a correct command.

I will type what I wrote down from the reply.

6646336 /var/log
233988 /var/cache/apt/archives
217564 /usr/lib
153640 /usr/bin
146204 /usr/lib/openoffice/program
53132 /var/lib/gconfig/defaults
37660 /usr/share/fonts/truetype/arphic
36924 /var/cache/slimserver/MySQL
36872 /usr/lib/dri
36260 /var/lib/dpkg/info

Many thanks.

mhg 06-04-2007 10:26 PM

I have to crash for the night.

I'll catch up tomorrow.

Thanks for all the help.

syg00 06-04-2007 10:30 PM

O.k., so it is the logs (that's in units of "k", so it's 6+ Gig). Similar command string
Code:

du /var/log -a | sort -nr | head
This will list the (worst) actual files in descending order.

mhg 06-05-2007 05:53 PM

Thank You.

Here are the results.

6648600 /var/log
2216824 /var/log/syslog
2216404 /var/log kern.log
2210592 /var/log/messages
1180 /var/log/installer
832 /var/log/mysql
724 /var/log/dpkg.log.1
704 /var/log/installer/partman
568 /var/log/mysql/msql-bin.000002
320 var/log/scrollkeeper.log.1

Thanks for the help.

syg00 06-05-2007 06:24 PM

Obviously somebody is spitting out warnings - and they are going to all three logs. Tail each of the logs and see if you can see anything obvious - maybe try 20 lines; "tail /var/log/kern.log -n 20" (do it for each log in turn).
Fix whatever the problem is (if it still exists), else this will just keep happening.

Then erase a couple of those logs to free up some space - I'd probably only keep the syslog
Code:

echo "" > /var/log/kern.log
echo "" > /var/log/messages

Then reboot as normal. If logrotate doesn't clean up that syslog soon, erase that as well.

mhg 06-05-2007 07:53 PM

OK.

I can't tail the /var/log (error reading /var/log is a directory).

I can the other three large /var/log's. I am afraid it did not do me any good, as I can hardly make sense out of any of it. I do see a lot of "Bluetooth" in the /log/messages and /log/kern.log.

Now if I knew that was the problem, I would have to find what was creating a "bluetooth" log?

If I type the "echo "" " at the command line, will that erase the file?

I do not know how to type the arrow head symbol at any rate.

If I could type the echo line, followed by /var/log, I would delete that entire directory?

Sorry, I am getting very frustrated. I was determined to keep working through the Linux issues so I could migrate away from XP, but this is very discouraging. Ubuntu was working very well for me up to this point.

Is this typical Linux stuff? Does everyone have to go through these kinds of things to get their system to work? I hate to think of reinstalling some day and going through all of this again.

Thanks for trying to sort me out.

jay73 06-05-2007 09:12 PM

No, this is not what happens under normal circumstances. It only does when something is badly misconfigured. I have been running nine Linux systems for ten months and this has never happened - and I'm sure I'm not the only one.

As for the arrow, I'm afraid I don't know what your keyboard layout looks like being an azerty user - but I believe the arrows are next to the letter M.

You can't use the echo command on /var/log because it is a directory, not a file.

You should do as pointed out:
echo "" > /var/log/kern.log

or as an alternative

cat /dev/null > /var/log/kern.log

Either will clear out the logfile in question.
Repeat this for the other logs.

Simply clearing up logfiles is not a solution, of course. It is vital that you pinpoint the problem that is producing all those messages being logged. If you suspect it's bluetooth-related, you should verify whether some misconfiguration is involved - or if you don't use bluetooth at all, it may as well be disabled.

mhg 06-05-2007 09:31 PM

Thank You.

I only cleared the kern.log and the messages log. That freed up enough space so that I could boot to Ubuntu.

As you say, this is not the solution. That I fear could be a bigger problem to try and solve. I did uncheck bluetooth in administration/services. I guess time will tell if that helps. Presumably I still have a couple of gig in the syslog file taking up space.

Many thanks for getting me back in Ubuntu.

mhg 06-06-2007 06:09 PM

Thanks again to both of you for helping me out of this.

My experience so far with Linux has been an inconsistent one. One thing that has been consistent is the willingness of the Linux community to help out. I have been disappointed with a couple of the issues I have had, but every time there has been someone willing to take the time to work me through it.

I am going to monitor those log files for a while to see what happens.


All times are GMT -5. The time now is 09:02 PM.