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. |
boot in ubuntu recovery mode and fsck the partitions
then reboot |
how to fsck the partitions?
|
Quote:
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 |
or use the parted magic or gparted live cd for doing it on a GUI
|
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. |
Quote:
Quote:
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. |
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. |
You can also put a live image on a usb key. Have a google to find out how.
Evo2. |
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 |
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 ? |
Quote:
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. |
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. |
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. |
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 ?
|
Quote:
|
Quote:
Quote:
Evo2. |
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 ? |
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. |
Yes, I finally managed to make it boot from the cd.
Can you tell me exactly what I have to do from here ? |
Quote:
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. |
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"? |
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 :/).
|
Open a terminal and type in:
Code:
$sudo su Code:
$apropos e2fs Type Quote:
A set of Howto's should come up. Code:
apropos e2fs |
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"? |
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. |
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 |
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.
|
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 ? |
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. |
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 ? |
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. |
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. |
PHP Code:
|
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 |
You can try
PHP Code:
|
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 |
Try to reboot from the hard drive. Report any errors.
|
I rebooted in normal mode, as you asked.
The error is the very same. |
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. |
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 |
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. |
Quote:
This thread is becoming a long one. Time for a summary: =================== The current situation:
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 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 Tell us what the last line says for ____ total |
Quote:
|
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?) |
Quote:
Quote:
Quote:
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:
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. |
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) |
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.
|
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 ? |
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. |