LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-24-2007, 12:47 PM   #1
Thirteenth Zodiac
LQ Newbie
 
Registered: Jul 2007
Posts: 13

Rep: Reputation: 0
GRUB Error 2 & boot partition questions - can't boot


I have installed Ubuntu 7.04 Feisty Fawn friday and spent the week-end getting familiar with the OS, downloading upgrades and new applications for my needs. It is running on an Acer machine, a Sempron 1.8ghz with 512mb RAM. Since the PC came with Windows Vista, I wanted to set up a dual boot environment in case I need something. I was booting into Ubuntu without problems for the whole week-end, then yesterday I wanted to test whether Windows was working OK (hadn't tried to boot into it since I had Ubuntu installed). Everything was fine. Then I rebooted to go into Ubuntu. My GRUB menu showed many entries, as usual, like (recalling from memory)
Ubuntu 6.0.20.16
Ubuntu 6.0.20.16 (Recovery)
Ubuntu 6.0.20.15
Ubuntu 6.0.20.15 (Recovery)
Windows Vista/LongHorn
Windows XP

Out of curiosity I tried the Windows XP. It took me to a tool created by Acer and included in their laptop, a sort of "recovery mode", which I assume they put on a separate partition with the bare basis of WinXP files required for their tool to work. Seeing that, I quit their tool without doing anything.
When I rebooted I got this message after selecting, as usual, the first option in my menu, Ubuntu 6.0.20.16 (my numbers are probably off). All was well, so I did usual stuff (email, showing photos to friends), and put the computer on suspend.

When I came back this morning, I resumed the session but everything was slown down to a crawl. Since I didn't know the keyboard command to open the system activity monitor and couldn't manage to click my way through "system" and stuff, I held the reset button on my pc to power it off. When I turned it back on, I got my usual boot menu and chose the same option as before. Instead of booting in Linux, I got this message:
Quote:
BusyBox v.1.1.3(Debian 1:1.1.3-ubuntu3
can't access tty; job control turned off
And then a prompt on initramfs. Not knowing what to do, I rebooted using the reboot command (I believe, I may have hit ctrl+alt+del though). Next when I booted I didn't even get the boot menu, only the following:
Quote:
Verifying DMI Pool Data
GRUB Loading stage1.5
GRUB loading, please wait
Error 2
And it's just frozen there. Everytime I restart my PC, I get this, so I cannot boot neither Ubuntu, Ubuntu recovery, or Windows Vista.

So I dug out the Ubuntu Live CD and booted from it, and I searched the web all morning and did the following stuff. I am not sure what to make of this.

1)sudo fdisk -l returns the following:
Quote:
Disk /dev/sda: 164.6GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 892 7164958+ 12 Compaq diagnostics
/dev/sda2 893 3326 19551105 6 FAT16
/dev/sda3 10198 19457 74380950 7 HPFS/NTFS
/dev/sda4 3327 10197 55191307 5 Extended
/dev/sda5 3327 10033 53873946 83 Linux
/dev/sda6 10034 10197 1317298+ 82 Linux swap/ Solaris

Partition table entries are not in disk order
2) Visually in GNOME Partition Editor, I see my partitions lined up. First time I booted there were 2 partitions flagged as Boot, sda2 (mountpoint /media/ACER, which is the folder in which Windows is I believe. It is a 20GB partition), and sda5 (mountpoint none, 72GB, which is my linux partition). I cannot mount the sda5 partition, which I think is the problem in all this.

My question is: is it a problem that my partition sda4 is an extended partition, in which there is sda5 which is my linux partition, and sda6 whcih is the linux swap partition? Should the linux partition have its own (physical) partition? And which one should I flag as Boot? Partition 5 which is the linux, or partition 4 which is the extended partition containing both the linux (sda5) and swap (sda6) partitions?

The message I get when I try to mount the linux partition is:
Quote:
Cannot mount volume
Unable to mount the volume.
(Details)
mount:wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or other error in some cases useful info is found in syslog -try dmesg(vertical bar, can't do on this keyb)tail or so
Any help would be greatly appreciated, as I cannot use my pc at all in the moment !! Thanks!
 
Old 07-25-2007, 07:28 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
GRUB error 2 is probably associated with GRUB being unable to open its config. file. From the sequence of events, it seems possible that this file got glitched. This would be consistent with the error you got when attempting to mount the Linux partition.

The partition table is fine--Linux does not use the "boot" flag.

The simplest thing might be to re-install Ubuntu, but with all your work, I'm sure that sounds unattractive.

You can try to troubleshoot by first running fsck on the Ubuntu partition, and then trying to access the Grub config. file (/boot/grub/menu.lst) From the live CD, do this as follows:
Code:
cd /mnt
mkdir ubuntu
mount /dev/sda5 ubuntu
cd ubuntu
cd boot/grub  ###Note there is no leading "/"--with reference to the "live Linux" tree, you are really going into /mnt/ubuntu/boot/grub---a  leading "/" would go to /boot/grub##
more menu.lst
See the link below on booting--it includes a link to the GRUB manual.
Also, post the contents of menu.lst (without all the lines beginning with "#"
 
Old 07-25-2007, 07:31 AM   #3
b0nd
Senior Member
 
Registered: Jan 2005
Distribution: Slackware, BackTrack, Windows XP
Posts: 1,020

Rep: Reputation: 45
Quote:
My question is: is it a problem that my partition sda4 is an extended partition, in which there is sda5 which is my linux partition, and sda6 whcih is the linux swap partition? Should the linux partition have its own (physical) partition? And which one should I flag as Boot? Partition 5 which is the linux, or partition 4 which is the extended partition containing both the linux (sda5) and swap (sda6) partitions?
Although i'm not comfortable with your fdisk -l output but knows that its not the problem keeping linux into extended partition.
Its perfectly right that sda5(linux) and sda6(swap) are logical drives inside the extended partition sda4.
sda5 should be the mount point in your case (not sda4).
hopefully someone else will give you the exact solution for your problem.

regards
 
Old 07-25-2007, 05:37 PM   #4
Thirteenth Zodiac
LQ Newbie
 
Registered: Jul 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Thank you for the help.

I typed the first commands (adding "sudo" in front since I would otherwise get "cannot create directory 'ubuntu': Permission denied"). When I type "sudo mount /dev/sda5 ubuntu" from the /mnt $ prompt, I get
Quote:
mount: wrong fs type, bad option, bad superblock on /dev/sda5, missing codepage or other error. In some cases useful info is found in syslog - try dmesg ! tail or so
...

If I try to mount my extended partition (sda4) containing sda5, I get
"mount: you must specify the filesystem type"

I tried to launch a "dmesg ! tail" to see if I would get "useful info". It sent back over a hundred lines of code, which I can't copy here. To the best of my knowledge, everything looks normal, except when I get to this part:
Quote:
[
[382.016000] EXT3-fs error (device sda5): ext3_check_descriptors: Block bitmap for group 214 not in group (block 3610429278)!
[382.020000] EXT3-fs: group descriptors corrupted!
These two messages are repeated, intersticed throughout a lot more lines:
Quote:
cramfs: wrong magic
attempt to access beyond end of device
sda4: rw=0, want=66, limit=2
isofs_fill_super: bread failed, dev=sda4, iso_blknum=16, block=32
SQUASHFS error: Can't find a SQUASHFS superblock on sda4
attempt to access beyond end of device
sda4: rw=0, want=4, limit=2
EXT3-fs: unable to read superblock
NTFS driver 2.1.28 [Flags: R/O MODULE].
NTFS-fs warning (device sda3): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel.
The rest is a succession of EXT3-fs error: Block bitmap not in group, group descriptors corrupted! and "Option utf8 is no longer supported", each of them repeated once for each other partition (device sda1, device sda5, device sda2).

I am beginning to panic here. Is there a solution anymore?
 
Old 07-25-2007, 06:10 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
You are getting messages indicating that the Linux partition is indeed glitched. Go back and try fsck, as I suggested.

Note that you cannot mount an extended partition, so don't worry about that part.
 
Old 07-25-2007, 09:16 PM   #6
Thirteenth Zodiac
LQ Newbie
 
Registered: Jul 2007
Posts: 13

Original Poster
Rep: Reputation: 0
I can't do what you've posted above, since "sudo mount /dev/sda5 ubuntu" returns the error I mentioned above. Typing "fsck /sda5" returns
Quote:
fsck 1.40-WIP (14-Nov-2006)
e2fsck 1.40-WIP (14-Nov-2006)
fsck.ext2: No such file or directory while trying to open /sda5

The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fcsk with an alternate superblock: e2fsck -b 8193 <device>
And then typing "e2fsck -b 8193 /sda5" returns the very same error message as typing "fsck /sda5".

Am I not executing a command as I should? Or is the problem deeper and I'm looking at a complete reinstall? If I do have to resort to that, then I think I'll completely scrap Windows and just have Linux on.
 
Old 07-27-2007, 07:41 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
fsck /dev/sda5

See "man fsck"---anytime a command wants the "device name", it will be /dev/something
 
Old 07-27-2007, 04:48 PM   #8
Thirteenth Zodiac
LQ Newbie
 
Registered: Jul 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Hurray! I could successfully mount and check the menu.lst file. Although it's a little weird; when running fsck, I ran into several "Block size is 377373. Should be 0. Fix? (Y/N)"-type messages, and answered Y to all of them, and then at about 65% or so the program froze and I couldn't do anything. I hard-rebooted (holding the reset button the PC's case) and then things were different, and okay somewhat. Should I run fsck again in case it hasn't completely done its job? Now when I boot I get into the GRUB menu, and then get the "can't access tty: job control turned off" message whichever Linux I choose to boot. It's still a step forward though

Here is the menu.lst content:
Quote:
ubuntu@ubuntu:/mnt/ubuntu/boot/grub$ more menu.lst

timeout 10

title Ubuntu, kernel 2.6.20-16-generic
root (hd0,4)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=372023de-2e2d-43d8-b8a
0-1aa7b6ffc59c ro quiet splash
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault

title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=372023de-2e2d-43d8-b8a
0-1aa7b6ffc59c ro single
initrd /boot/initrd.img-2.6.20-16-generic
 
Old 07-31-2007, 05:16 PM   #9
Thirteenth Zodiac
LQ Newbie
 
Registered: Jul 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Update. I tried replacing the "kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=372023de-2e2d-43d8-b8a
0-1aa7b6ffc59c ro quiet splash" with "kernel /boot/vmlinuz-2.6.20-16-generic root=/dev/sda5 ro quiet splash". No progress, still getting the "can't access tty; job control turned off" error.

Any last resort solution I can try? Or any advice on how I should reformat and repartition everything if I'm looking at a complete reinstall?
 
Old 08-06-2007, 12:21 PM   #10
Thirteenth Zodiac
LQ Newbie
 
Registered: Jul 2007
Posts: 13

Original Poster
Rep: Reputation: 0
End of topic. I completely reformatted and got Windows out. Everything works fine since. If someone ever gets a similar issue, though, I think it could have been resolved using the Super GRUB disk. Google it up and try it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
input/output error on grub.conf file on raid1 boot partition desimo Linux - Server 2 06-25-2007 08:53 AM
Grub error 17 Fedora 6 & WinXP dual boot R N Ghosh Fedora 3 01-21-2007 12:24 PM
GRUB: How to boot WinXP (NTLDR, NTDETECT.COM & BOOT.INI) from boot partition (EXT2) ? Rayen16 Linux - Software 1 05-25-2006 12:09 PM
Booting more than one linux - GRUB and \boot partition questions rozoweskarpetki Linux - Newbie 8 05-25-2005 05:58 AM
Grub Tripple Boot & Error Messages RJDavison Linux - Software 3 07-27-2004 11:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration