LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-26-2008, 07:40 AM   #1
poisonborz
LQ Newbie
 
Registered: Apr 2008
Posts: 18

Rep: Reputation: 10
Can't get GRUB to work... (supergrub used)


Hola, I've installed Hardy recently (wanted to dualboot with XP), and after a reboot, grub gave error 17. I've tried to edit devices.map, reinstalled grub (trough livecd, to hd0) without luck (error 17 remained). Then I tried supergrub - it could boot into windows, but it didn't found my ubuntu installation at all. When choosing Grub&Linux option from main menu, grub gave error 21 (disk not found).

I did not yet dare to use more advanced options of supergrub to find my ubuntu partition... (which is installed for sure, I can see the partition from livecd)

I can't understand what could go wrong, my partition list is simple as a stick:
Code:
sda
1. win system
2. ---
3. linux system
sdb
1 ---
sdc
1 ---
Anyone any ideas? Maybe supegrub could fix it with some advanced option, but I fear of breaking something.. Thanks.

Last edited by poisonborz; 04-26-2008 at 07:45 AM.
 
Old 04-26-2008, 08:09 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,889

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Quote:
Error 17 : Cannot mount selected partition
This error is returned if the partition requested exists, but the
filesystem type cannot be recognized by GRUB.
The problem seems to be that grub doesn't recognize the filesystem type of the Ubuntu partition.

Please post the output of 'fdisk -l' , the contents of /etc/fstab, and the Ubuntu menu entry from /boot/grub/menu.lst.

EDIT: I should have given more complete instructions.

Boot Ubuntu from the installation cd. Mount the partition in which you installed Ubuntu in order to get the information from /etc/fstab and /boot/grub/menu.lst. Then run fdisk -l.

You should be able to establish an internet connection from the booted cd to post the information I've requested.

Last edited by bigrigdriver; 04-26-2008 at 08:42 AM.
 
Old 04-26-2008, 08:10 AM   #3
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
Take a look at this Grub Howto.

Quote:
but I fear of breaking something
At boot time when you edit the Grub menu.lst all changes are temp.

When you edit from the grub console keep a log of what you have done, when you find the right combo and boot into the system edit /boot/grub/menu.lst to make the changes permanent.
 
Old 04-26-2008, 08:48 AM   #4
poisonborz
LQ Newbie
 
Registered: Apr 2008
Posts: 18

Original Poster
Rep: Reputation: 10
don't know why, but fdisk -l won't give anything (is it because I'm using livecd?) but the linux partition's fstab seems to be also somewhat empty:

Code:
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda3
UUID=54986e14-3367-443c-b7a6-1b06c3ddc16f /               ext2    relatime,errors=remount-ro 0       1
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
menu.lst ubuntu entry (I guess it's what it should be - but because of the error, grub won't load the menu anyways)
Code:
title		Ubuntu 8.04, kernel 2.6.24-16-generic
root		(hd0,2)
kernel		/boot/vmlinuz-2.6.24-16-generic root=UUID=54986e14-3367-443c-b7a6-1b06c3ddc16f ro quiet splash
initrd		/boot/initrd.img-2.6.24-16-generic
quiet
Don't know if it means something, but sometimes if I go into livecd grub shell, it says grub is installed on a different hd (hd0, or hd1) I did not remove/attached any drives...
Anyway, grub is surely installed on both now, but gives error 17 if I install it from livecd, and error 21 if from supergrub.

UPDATE: I guess bigrigdriver is right, the linux partition is simply not recognized by grub (even if it can be installed on it?) I looked at the partitions from supegrub, and the linux partition was displayed as unrecognized (can't read any data). What should I do? I've reinstalled ubuntu 2 times with the same results. From both livecd and WinXP I can see that it's a proper ext2 drive...

Last edited by poisonborz; 04-26-2008 at 09:17 AM.
 
Old 04-26-2008, 09:36 AM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
It sounds like you need to be in terminal as "root" with your live cd to get the results bigrigdriver asked for.
 
Old 04-26-2008, 09:45 AM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,889

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
I don't know if this will work or not, but here goes.

I've read of instances in which people were having boot problems. Their fstab and menu.lst files used UUID strings to name devices instead of /dev names. Editing fstab and menu.lst to replace UUID with /dev names fixed their problems.

So, I'd suggest commenting out the UUID line in /etc/fstab, and immediately beneath it, enter the same infomation, but using /dev/sda3 instead of the UUID string, like so:
Quote:
/dev/sda3 / ext2 relatime,errors=remount-ro 0 1
Then make a similar edit in /boot/grub/menu.lst. Comment out the existing kernel line, and make a new one:
Quote:
kernel /boot/vmlinuz-2.6.24-16-generic root=/dev/sda3 ro quiet splash
By commenting out the existing lines, it's much easier to go back to the original config if necessary. Just delete lines you've added and uncomment the original line.

As for fdisk, try fdisk -l /dev/sda.
 
Old 04-26-2008, 10:11 AM   #7
poisonborz
LQ Newbie
 
Registered: Apr 2008
Posts: 18

Original Poster
Rep: Reputation: 10
Hola, here is the fdisk result - I've removed the unnecessary disk info - the boot drive is the second one.

As you can see, first and second partitions swapped places again: grub is also reported to be installed on hd1... (?) Although I don't think this has to do anything with my problem (maybe it will once the linux partition is recognized, but maybe it's just because of the livecd), is rather strange.

As you can see, the main problem is, that as it seems, linux drive is not recognized (?) ('Linux' is the partition label - this is the same result that supergrub boot disk gives).

This is strange, since I can browse it.. What can I do now? Modifying menu.lst, or grub files on that drive seems to be of no use, since at boot, grub won't read anything off of it anyway.

Could the fact, that initially, when I partitioned the drive in windows, I've formatted the linux drive with paragon partitioner to ext2 anything to do with this? Ubuntu installer formatted the drive again later on

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       36482   293036152    7  HPFS/NTFS


   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1      284445   143360248+   7  HPFS/NTFS
/dev/sdb2          284446      751747   235520208    7  HPFS/NTFS
/dev/sdb3          751748      775216    11828376   83  Linux

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               2       24792   199133707+   f  W95 Ext'd (LBA)
/dev/sdc5               2       24792   199133676    7  HPFS/NTFS
(just to recap: reinstall gives the same result, I can never boot into ubuntu)

Last edited by poisonborz; 04-26-2008 at 11:38 AM.
 
Old 04-26-2008, 11:32 AM   #8
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
This may sound like driving around the problem instead of fixing it. What about putting grub in its own partiton and chainloading?
 
Old 05-10-2008, 03:06 PM   #9
poisonborz
LQ Newbie
 
Registered: Apr 2008
Posts: 18

Original Poster
Rep: Reputation: 10
Okay, for anyone interested, I've finally found the solution, partly by mistake. In the bios, AHCPI mode (so in fact, SATA itself) was not turned on, this caused GRUB somehow not to see any Linux partitions. So, if you install to SATA drives, remember to check in the BIOS if they're set as SATA.
 
Old 05-10-2008, 03:56 PM   #10
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Thanks for posting the solution.
 
  


Reply

Tags
grub, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GRUB won't work faux_05 Linux - Newbie 13 11-03-2007 06:00 AM
Grub does not work satimis Linux - General 7 06-20-2006 03:10 AM
? grub changes - why it does not work ? ibex Linux - General 7 04-17-2006 09:43 PM
Getting Grub to work r0wb0t Fedora - Installation 5 11-12-2004 06:35 AM
commands work with interactive grub, but not in grub.conf richardg Linux - Newbie 2 11-23-2003 04:36 AM


All times are GMT -5. The time now is 06:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration