LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux doesn't start. (https://www.linuxquestions.org/questions/linux-newbie-8/linux-doesnt-start-787581/)

elishac 02-07-2010 09:48 AM

linux doesn't start.
 
Hello,

I have yet another problem with ubuntu :(.
I closed my laptop screen and afterwards the computer wouldn't come out of its hibernation, so I forced him to shut down.
Now, when I start the computer, grub loads, and then there's a ubuntu logo and then some lines appear ("fsck from..." (no time to read)) and then after one second or so, the screen becomes black, with only two '_' in the top center of the screen. Nothing happens next. To shut it down, I don't need to press the power button for 5 seconds : 1 time is enough.
What can I do ?

Thanks.

amani 02-07-2010 10:30 AM

boot in ubuntu recovery mode and fsck the partitions

then reboot

elishac 02-07-2010 11:16 AM

how to fsck the partitions?

tredegar 02-07-2010 11:21 AM

Quote:

how to fsck the partitions?
Easiest is to boot from a live CD

Check which they are with fdisk -l in a terminal.

Do not mount the partitions to be fsck'd. Check they are unmounted with mount and unmount them if necessary.

Then (as root) fsck /dev/sda1 or whatever the partition is.

See man fsck for all the options

amani 02-07-2010 11:26 AM

or use the parted magic or gparted live cd for doing it on a GUI

elishac 02-07-2010 03:51 PM

I don't have a live cd. When I use the recovery shell, there are many lines that don't stop coming, and I cannot do anything except force him to shut down.
Can someone give me a step by step walkthrough please ?
I'm a newbie I don't know what to do.

tredegar 02-07-2010 05:16 PM

Quote:

When I use the recovery shell, there are many lines that don't stop coming, and I cannot do anything except force him to shut down.
... Because your installation is broken (you probably powered it down badly, the filesystem is corrupted, so it will not work even in "recovery mode").

Quote:

I don't have a live cd.
Then download and burn one (on a different computer, if necessary).

You need a "live CD distro" to hand, in case of future problems. My knoppix CD from years ago (?2006) still rescues me from problems.

Otherwise, download and burn the current 'buntu, it'll run from "live CD" - and it will not use your HDD unless asked to do so. So you can probably use it to correct the fault(s) on your current installation.

Download a "live CD", burn it, boot from it, and we'll probably be able to help you.

elishac 02-07-2010 05:41 PM

I don't have any CDs at home to download a live CD. I don't use CDs. I only have usb keys and hard drives, they're cheaper. What can I do except downloading a live CD?
The second OS (windows) works just fine.

evo2 02-07-2010 08:23 PM

You can also put a live image on a usb key. Have a google to find out how.

Evo2.

EricTRA 02-08-2010 12:00 AM

Hello elishac,

Seems you're having quite some bad luck with your Ubuntu, isn't it? Just like tredegar said, if your system is that broken that you cannot even enter in recovery mode then there's no other option to follow the advice that evo2 posted. Download an image of Ubuntu LiveCD and use a tool like unetbootin to install it on a USB stick. Next boot from that USB stick and follow the procedure tredegar pointed out.

Good luck!

Kind regards,

Eric

elishac 02-09-2010 05:19 PM

So, I managed to borrow a CD from a friend for a couple of days, to solve this problem.
Can you please give me a step by step as to what I have to do exactly from here ?

tredegar 02-09-2010 05:36 PM

Quote:

Can you please give me a step by step as to what I have to do exactly from here ?
You could start by telling us which CD you have borrowed. They are all different: knoppix, and the 'buntus come to mind as possibilities, but there are many others.

If you would like "step by step" instructions then we have to know what, exactly, you have in front of you.

Try booting from it, what does it say? If you are in doubt, just tell us what it says, and then choose "Exit" or "Cancel". Then get back to us with the proper information.

Help is here, but you need to help us help you.

elishac 02-09-2010 06:22 PM

I'm sorry, you're right I wasn't clear enough.
What I meant is that I borrowed a cd, but that's it. I didn't do anything else. The cd is clean. There's no knoppix or 'buntus or whatever else in it.
It's a DVD+RW.

evo2 02-09-2010 07:09 PM

Burn an ubuntu (since that seems to be what you use) image to it. There are instructions here:

http://www.ubuntu.com/GetUbuntu/download

Evo2.

elishac 02-09-2010 07:22 PM

Ok, I'm downloading it at the moment. But it sounds weird to me that I have to download the whole thing. I won't lose my personal data and personal system settings, will I ?

muggie 02-09-2010 08:12 PM

Quote:

Originally Posted by tredegar (Post 3856048)
... Because your installation is broken (you probably powered it down badly, the filesystem is corrupted, so it will not work even in "recovery mode").


Then download and burn one (on a different computer, if necessary).

You need a "live CD distro" to hand, in case of future problems. My knoppix CD from years ago (?2006) still rescues me from problems.

Otherwise, download and burn the current 'buntu, it'll run from "live CD" - and it will not use your HDD unless asked to do so. So you can probably use it to correct the fault(s) on your current installation.

Download a "live CD", burn it, boot from it, and we'll probably be able to help you.

Here is your answer :-)

evo2 02-09-2010 08:20 PM

Quote:

Originally Posted by elishac (Post 3858428)
Ok, I'm downloading it at the moment. But it sounds weird to me that I have to download the whole thing.

No there are other ways to fix your system, but this is probably the easiest way.

Quote:

I won't lose my personal data and personal system settings, will I ?
When you boot the cd there will be an option to install or to use as a live system. As long ans you do not choose the install option your settings/data will be untouched.

Evo2.

elishac 02-09-2010 08:25 PM

So, I downloaded the file and put it in my dvd using cdburnerxp.
Is it normal that windows explorer can see the contents of the file (directories and files), or did I do the burning wrong and the file should only be seen as a .iso ?

evo2 02-09-2010 08:50 PM

I have no idea about "windows explorer" or how to burn a cd under windows, but there are instructions in a link from the URL I posted in post #14.

Did you read the instructions? Have you tried booting the CD?

Evo2.

elishac 02-10-2010 09:54 AM

Yes, I finally managed to make it boot from the cd.
Can you tell me exactly what I have to do from here ?

tredegar 02-10-2010 11:57 AM

Quote:

Can you tell me exactly what I have to do from here ?
You have not told us what you have booted, it might have helped if you want "exactly"

So here goes.
Boot from the CD
When you get to the desktop, go through the menus and find gparted. It might be referred to as "Partition Editor" if you have booted one of the 'buntus.
Start it.
A window opens.
Click Gparted (menu at top left) then click Devices, and choose the device that holds your ubuntu HDD partition.
It'll probably show up as an ext3 filesystem. It is NOT NTFS.
If you are not sure which disk is which, go through them all, just looking at them, until you work it out.

When you have the right device/HDD selected,
in the lower window, where it says "Partition Filesystem Size etc." R-click on your ubuntu partition.
If the option to "Check" the partition is greyed out, click on "Unmount" to ummount it, then try to check it again.

You'll see a list of things gparted is going to do in the lowest window.
It should now say "Check & repair filesystem on ....."
Click the green "Apply" Button. Or do "Edit" -> "Apply operations".

Once it has checked (and hopefully fixed) your ubuntu partition(s), shutdown the PC, remove the CD and reboot to see if it has mended your broken ubuntu installation.

If not, I think you'll need a reinstall, but at least you have a CD you can use now.

elishac 02-10-2010 12:10 PM

The CD I have booted from is the one I got here :
http://www.ubuntu.com/GetUbuntu/download (9.10, 32 bit).
The first screen requires me to choose a language. Beneath it, there are various options (f1 to f6).
Should I choose one of the options or just press "enter"?

elishac 02-10-2010 03:36 PM

I'll be waiting for specific instructions, because I don't know anything about system manipulation and I don't want to do anything that might harm my computer (more than it already is, that is :/).

Mr-Bisquit 02-10-2010 05:19 PM

Open a terminal and type in:
Code:

$sudo su
# fdisk -l
<output of fdsik -l>

Open a new tabon the terminal and type in
Code:

$apropos e2fs
<output of e2fs search>

Open an instance of firefox or a version there of and put http://www.google.com/linux in the url
Type
Quote:

fixing ext3 partitions
or a similar query in the box.
A set of Howto's should come up.
Code:

apropos e2fs
dumpe2fs            (8)  - dump ext2/ext3/ext4 filesystem information
e2fsck              (8)  - check a Linux ext2/ext3/ext4 file system
e2fsck [fsck]        (8)  - check a Linux ext2/ext3/ext4 file system
e2fsck.conf [e2fsck] (5)  - Configuration file for e2fsck
mke2fs              (8)  - create an ext2/ext3/ext4 filesystem
mke2fs [mkfs]        (8)  - create an ext2/ext3/ext4 filesystem
mke2fs.conf [mke2fs] (5)  - Configuration file for mke2fs
resize2fs            (8)  - ext2/ext3/ext4 file system resizer
tune2fs              (8)  - adjust tunable filesystem parameters on ext2/ext3/ext4 filesystems


elishac 02-10-2010 05:44 PM

errr. How to open a terminal ?
I'm stuck here. I have a window that asks me to choose a language. Beneath it, there are various options (from f1 to f6).
Should I choose one of the options or just press "enter"?

Mr-Bisquit 02-10-2010 05:55 PM

Choose the language you speak and write.
Follow the instructions allowing auto detection and fill-in when possible.
Let it boot up and tell us when you get to the desktop.
We will go from there.

The f key you choose is the answer- see first part of this post.

elishac 02-10-2010 06:38 PM

So I pressed enter.
now the options are :
try ubuntu without any change to your computer
install ubuntu
check disc for defects
test memory
boot from first hard disk
press f4 to select alternative start up and installation modes
f1 help f2 language f3 keymap f4 modes f5 accessibility f6 other options

damgar 02-10-2010 06:53 PM

Everyone has been guiding you towards booting into a live environment. That would be the option to "try ubuntu......" it is going to bring you into a working Ubuntu desktop THAT IS NOT YOUR INSTALLED SYSTEM.

elishac 02-10-2010 07:18 PM

ok. Sorry I'm not familiar with all these admin tasks.
So I chose the option try ubuntu, and now I opened a terminal.
should i type sudo fdisk -l then ?

damgar 02-10-2010 07:44 PM

You can probably use gparted. I'm assuming that you are looking at a Ubuntu Gnome desktop that looks like mine.

IF ANY OF MY ASSUMPTIONS ARE INCORRECT, OR YOU ARE NOT SURE WHAT TO DO ....DON'T DO ANYTHING THAT FOLLOWS!

At the top click:
system
administration
partition editor

You will see different partitions, and I'm assuming only one hard drive.
The partitions you are interested in will be of type ext3 or ext4 more than likely. The will have mount points listed probably as / and /home. LEAVE ANYTHING MARKED FAT OR NTFS ALONE!

Right click on one of the pertinent partitions. If there is an option to unmount select it, and when that has completed, right click again and choose "check"

Repeat for the other partition, partitions.

You may get errors, prompts about fixing, or completion notifications that everything is fine or has been repaired. If either fine or repaired, you can shutdown, remove the CD and try and reboot. To see if anything has been fixed.

elishac 02-10-2010 08:54 PM

err well you're right, i'm not sure what to do...
can you give me a secure step by step procedure to recover the system in the state it was prior to this problem ?

damgar 02-10-2010 09:20 PM

Please don't take this the wrong way, but you are going to have to stop saying "please give step by ....." and start asking specific questions.

How far did you get with my previous post? Did you get to the point of checking the partitions. If you did what were the results? When someone asks you to do something, they are trying to help and if you don't understand what to do, or what something means, please ask about that particular issue, so that they can help you.

elishac 02-11-2010 11:05 AM

I sometimes have some troubles expressing myself, because I'm not English native. Sorry about that.
So far, I have burnt the linux cd, and booted with it. Then I chose the option "try ubuntu", and then I opened a terminal. I didn't do anything else.

damgar 02-11-2010 11:21 AM

PHP Code:

fdisk -

Post the output here.

elishac 02-11-2010 12:42 PM

The output is none.
But I wrote sudo fdisk -l, and I got this :

Disk /dev/sda : 200GB

device boot start end blocks id system
dev/sda1 * ... ... ... 7 htfs/ntfs
dev/sda2 ... ... ... 7 htfs/ntfs
dev/sda3 ... ... ... 7 w95 ext'd lba
dev/sda5 (no 4) ... 83 linux
dev/sda6 ... ... ... 82 linux swap/solaris

damgar 02-11-2010 01:06 PM

You can try
PHP Code:

sudo umount /dev/sda5

sudo e2fsck 
-fp /dev/sda5 

The first command unmounts your linux partition and might return an error saying it isn't mounted, and that's fine. The second will check the filesystem on that partiton and try to repair any errors it finds. After that try to reboot Ubuntu from the hard drive.

elishac 02-11-2010 02:14 PM

sudo umount /dev/sda5
umount: /dev/sda5: not mounted.
sudo e2fsck -fp /dev/sda5
/dev/sda5 368706/5124480 files (1.7% non contiguous), 2559314/5120000 blocks

damgar 02-11-2010 03:18 PM

Try to reboot from the hard drive. Report any errors.

elishac 02-11-2010 03:44 PM

I rebooted in normal mode, as you asked.
The error is the very same.

damgar 02-11-2010 04:17 PM

It doesn't look so good. Had you set up a seperate /home partition you could just install a fresh copy of Ubuntu and your files and settings would remain.

At this point you can try rebooting with the live cd and try to backup /home prior to re-installing, or you can inspect /boot and look for the reason the system won't boot, or lastly, try again to boot into the ubuntu recovery mode and see if there isn't something useful in there.

EricTRA 02-13-2010 12:41 AM

Hello elishac,

I've been reading through this thread and various possibilities have been offered. One question first, do you have an USB stick at hand to make backup of your documents? Or space on one of the other partitions to put your files on?

I ask that because it seems to me that the fastest way to solve your problems is to install Ubuntu again.

You could try the solution offered by tredegar in post 21 of this thread, if you haven't done so already, to try to fix the filesystem. But I'm personally more in favor of a complete new installation.

Kind regards,

Eric

elishac 02-13-2010 10:59 AM

Yes I have an USB stick at hand. I'm not sure it will be enough to backup everything though. In my opinion reinstalling ubuntu brings quite a lot of problems. Here are some of them that come to my mind, though I'm sure they're not the only ones :
- I'd need to figure out what files need to be saved, and I'd need to get usb keys or something else to save them.
- I don't know how to access the files (when I boot with the DVD, there's a different home folder).
- I wasn't the one that made the first installation. So I'm not exactly sure how to make it, and I'm not sure if some softwares were installed or not after the basic installation (so I'd have to find out both).
- I'd have to reinstall and reconfigure every software I have, as well as system preferences.

Is there a command/software that would allow me to figure out everything (files and softwares, and if possible system settings) that has been added since the installation ? I'm sure there's something like this at least for softwares...

But if reinstalling is my best option, then I will. It's just that it seems weird to me that I'd have to reinstall everything just because I didn't shut it down correctly. I do this all the time with windows (well not all the time but you get the picture), and linux is supposed to be more stable, right ?

Regarding the post 21.
I opened gparted, and clicked on gparted on the menu, then devices.
There is only one option, which is /dev/sda.

tredegar 02-13-2010 12:01 PM

Quote:

I opened gparted, and clicked on gparted on the menu, then devices.
There is no need to run gparted now, you have already fsck'd the partition.

This thread is becoming a long one.

Time for a summary:
===================
The current situation:
  • You have rendered your system unbootable. We do not know how you did that.
  • You have run fsck on /dev/sda5 which is your only linux partition ( apart from swap which we do not care about)
  • You still cannot boot.
An analysis of your problem:
  • There is a problem with the boot process, not the filesystem.
  • You can still rescue your personal files to an external USB HDD (borrow one).

Action to be taken:

Boot from the live CD (you know how to do that by now)
Open a terminal and type:
Code:

sudo  mkdir  /OLD
sudo  mount  /dev/sda5  /OLD
ls  -l  /OLD/home

Do you see your old username listed?
If so, you are ready to save your data to a USB drive.

What data do you need to save?
- Emails ? (in which case what email program were you using)
- Music ?
- Documents ?
- Browser bookmarks ?
- Everything ?

We need to know how much data needs saving.
In a terminal, give this command:

Code:

du  -ch  /OLD/home/yourusername
Some text scrolls past.
Tell us what the last line says for ____ total

damgar 02-13-2010 12:08 PM

Quote:

Code:

du -ch /OLD/home/yourusername

Now I learned something, thanks! :)

elishac 02-13-2010 12:24 PM

Yes I do see my username listed.
I added sudo to du otherwise many things aren't listed.
It only says 770M total (210M without sudo). Is that everything that has been added since the installation ?
(can you quickly explain why there's need to create a new directory and mount it?)

tredegar 02-13-2010 01:09 PM

Quote:

Yes I do see my username listed.
Good. There is hope yet.
Quote:

I added sudo to du otherwise many things aren't listed.
Ok, you appear to be learning :) . I was trying to keep things as simple as possible, and do I not know the permissions you have set on your /home files (and you are not telling us).
Quote:

Is that everything that has been added since the installation ?
No, that is just your personal data. When you think about it, the OS data doesn't really matter, because you can always reinstall that.
If you want to know which OS packages (as opposed to personal data) were installed after the base-install of your OS, there's probably a way of doing this, but your base-system seems to be broken, so this may not be possible or even advisable.

770MB of data is easy to back up, but you did not answer my Qs: Eg: "What data do you need to save?"

If we can forget about the emails and bookmarks, but save the video, music and documents, life will be easier.

Quote:

(can you quickly explain why there's need to create a new directory and mount it?)
You created the /OLD directory because you need to create a "mountpoint" (which is just a directory) before you can mount a filesystem ( Eg your sda5 ) to it.

Once the mountpoint directory was created, the partition could be mounted to it, and your files appeared at the mountpoint.

When you understand this, you'll realise that this is very different from the windows way of doing things, and the linux way of managing disks is much more flexible and generally "better".

So, let us know the answers to the Qs when you have a USB HDD (with 1GB of free space) available.

elishac 02-13-2010 01:15 PM

oh sorry, I read the question but forgot to answer it. Well the answer is obviously everything, if possible :).
As you can see, there's not much (no video or music or photos, there are elsewhere, and 700MB, that's not much afterall)

damgar 02-13-2010 02:30 PM

If you have the USB stick you can now insert it and either drag and drop all the files from /OLD/home/yourusername to your USB stick (I would create a new folder there like OLDHOME and drag the files there) or you can use gparted to look at the USB stick and figure out how it is set up to manually mount it like you did your sda5 partition. It will show up in gparted as sdb, but it's partions may vary.

elishac 02-13-2010 04:20 PM

okay, I selected all the files and copied them. Most of the files aren't "mine" (I mean, I didn't create and edited them myself, they were either here before or automatically added).
I didn't really understand the part about gparted so I didn't do that.
Yet this isn't enough, is it?
I mean, what about all the programs that I installed and the system personal settings, for instance ?

damgar 02-13-2010 04:35 PM

Determining the programs that were installed after installation will be harder. Many of the programs will be installed with Ubuntu, such as open office. The beauty of Ubuntu is that it's as easy as searching synaptic for the programs you want. It's doubtful many or any for that matter programs can't simply be searched for and installed. It's free and you just click and install.

What you've done so far is back up all the configuration files and data for those programs, so that if you have a live cd of the same version of Ubuntu that you had installed, then you can just go forward with the install, delete the contents of the new /home folder after you reboot and add whatever programs,and copy your backed up data over in it's place.


All times are GMT -5. The time now is 09:13 AM.