Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
rekonrad
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 176
Location: Winnipeg, MB

PostPosted: Sun Jun 24, 2012 11:21 pm    Post subject: grub error Reply with quote

Hi,

I've completed what seems like a good install of the 20120621 amd 64 minimal. When I reboot I get a grub error 22, "no such partition".

I am installing it on my usb external drive SDB. Because my internal drive is not working properly, I decided to write grub not to the MBR but to the usb drive. My usb drive is divided up as such:
sdb1 - swap
sdb2 - root
sdb3 - most of my important data - not involved in the installation
sdb4 - boot

This is my grub.conf file:

default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3
root (hd1,3)
kernel /boot/kernel-3 root=/dev/ram0 real_root=/dev/sdb2

******

I am a little uncertain when to indicate my boot or root partition....maybe this is the problem.

Cheers

Richard
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Sun Jun 24, 2012 11:50 pm    Post subject: Reply with quote

rekonrad,

Try
Code:
title Gentoo Linux 3
root (hd1,3)
kernel /kernel-3 root=/dev/sdb2 rootfstype=ext3

Change rootfstype= to the correct file system if it's not ext3

Good luck :wink:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
rekonrad
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 176
Location: Winnipeg, MB

PostPosted: Mon Jun 25, 2012 5:04 am    Post subject: Grub error Reply with quote

In the grub.conf, there are comments about what "root"
means. It says "the partition that has the disk image".my understanding
is the bzimage is on the boot partition but I understand root to
mean operating system. Maybe I should have put root as my true root which is
hda 1, 1.
Back to top
View user's profile Send private message
Deathwing00
Moderator
Moderator


Joined: 13 Jun 2003
Posts: 4074
Location: Barcelona, Spain

PostPosted: Mon Jun 25, 2012 10:20 pm    Post subject: Re: Grub error Reply with quote

rekonrad wrote:
In the grub.conf, there are comments about what "root"
means. It says "the partition that has the disk image".my understanding
is the bzimage is on the boot partition but I understand root to
mean operating system. Maybe I should have put root as my true root which is
hda 1, 1.


That is correct.

* root (X, Y) is the partition in which you have the grub files.
* The kernel parameter root=/dev/XdYZ is the root partition of your entire system.
Back to top
View user's profile Send private message
rekonrad
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 176
Location: Winnipeg, MB

PostPosted: Tue Jun 26, 2012 12:14 am    Post subject: grub error Reply with quote

This is my grub.conf file. The only change I made was the addition of "rootfstype=ext3"
When I setup grub I selected:
grub> root (hd1,3) which is where my /boot partition resides
grub>setup (hd1) where I want to install grub (not MBR). This is my external usb drive


default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3
root (hd1,3)
kernel /boot/kernel-3 root=/dev/ram0 real_root=/dev/sdb2 rootfstype=ext3

When I boot up and select gentoo linux 3, I get root (hd1,3) Error 22: no such partition

Any ideas where I can go from here?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Tue Jun 26, 2012 12:38 am    Post subject: Reply with quote

did you try kernel /kernel-3 root=/dev/sdb2 rootfstype=ext3 :?:

Since /boot is on its own partition, there's no need to precede /kernal with /boot
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
rekonrad
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 176
Location: Winnipeg, MB

PostPosted: Tue Jun 26, 2012 1:38 am    Post subject: grub error Reply with quote

I made the change (mounted via another linux system). I got the same message when I tried to boot. (root (hd1,3) Error 22: No such partition.

Is it ok to "setup (hd1)? I know the MBR is usually recommended (hd0) but as I said, my internal hard drive is corrupted.

Richard
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Tue Jun 26, 2012 2:27 am    Post subject: Re: grub error Reply with quote

rekonrad wrote:
Is it ok to "setup (hd1)? I know the MBR is usually recommended (hd0) but as I said, my internal hard drive is corrupted.


I've never installed any linux on an external hd, but others I know have. I'm pretty sure you can install grub to the external (not a partition) as long as you can select to boot it from your bios.

Get to the grub prompt and try

find /boot/grub/stage1

It should return (hd?,?) where the '?' will have actual values.

Then
root (hd?,?)
setup (hd1)
quit

If that doesn't work then try installing grub to hd0 - it probably can't hurt at this point if it's not working properly now.
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
rekonrad
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 176
Location: Winnipeg, MB

PostPosted: Tue Jun 26, 2012 3:24 am    Post subject: grub Reply with quote

Thanks for the info. I did the /find command and verified hd1,3 was correct so I decided to setup on MBR and I got it to boot kinda.......I ended up with Kernel panic and here are some of the messages as it quit:

List of all partitions:
0800 78150744 sda ddriver : sd
0801 78140128 sda1 000000(lots of 0's)
0802 1024 sda2

no filesystem could mount root,tried ext3
kernel panic - not syncing: VFS Unable to mount root fs on unknown-blcik (1,0)

If the issue is my bad sda, can I boot my system from a cd rather than from grub (or lilo)?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Tue Jun 26, 2012 4:13 am    Post subject: Re: grub Reply with quote

rekonrad wrote:
Thanks for the info. I did the /find command and verified hd1,3 was correct so I decided to setup on MBR and I got it to boot kinda.......I ended up with Kernel panic


That's a lot further than you ever got before :D That's actually a good sign

Can you boot a live cd, mount your '/' and /boot partition and paste your grub.conf, fstab file and the output of blkid :?:

As far as creating and booting from a cd, I don't think that will work until you get gentoo to boot. The method would be something like this
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
rekonrad
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 176
Location: Winnipeg, MB

PostPosted: Tue Jun 26, 2012 4:47 am    Post subject: grub Reply with quote

Nice to have your help - thanks again :)

Here is what you requested:


fstab

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/sdb4 /boot ext2 noauto,noatime 1 2
/dev/sdb2 / ext3 noatime 0 1
/dev/sdb1 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0

________________________________________
grub.conf

default 0
timeout 30
#splashimage=(hd0,0)/boot/grub/splash.xpm.gz

title Gentoo Linux 3
root (hd1,3)
kernel /kernel-3 root=/dev/ram0 real_root=/dev/sdb2 rootfstype=ext3
#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5

# vim:ft=conf:

Output of blkid

/dev/sdb1: UUID="bc8f72d0-c3a0-494e-b373-35cd236ea4ab" TYPE="swap"
/dev/sdb2: UUID="096abccf-d85e-421b-b9f2-c11782ed5238" TYPE="ext3"
/dev/sdb3: UUID="16542395-a826-4d1c-b1b9-d6d7d99713ee" TYPE="ext4"
/dev/sdb4: UUID="05b01752-32ad-4654-b905-be26163bbc75" TYPE="ext2"
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Tue Jun 26, 2012 5:01 am    Post subject: Reply with quote

Quote:
kernel /kernel-3 root=/dev/ram0 real_root=/dev/sdb2 rootfstype=ext3


Since you're not using a initramfs the root= is looking in the wrong place

Code:
kernel /kernel-3 root=/dev/sdb2 rootfstype=ext3

should boot this thing :?

The only thing it's complaining about is not finding your filesystem :cry:
Quote:
no filesystem could mount root,tried ext3
kernel panic - not syncing: VFS Unable to mount root fs on unknown-blcik (1,0)

_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
rekonrad
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 176
Location: Winnipeg, MB

PostPosted: Tue Jun 26, 2012 5:23 am    Post subject: grub Reply with quote

I did as you instructed....but still got kernel panic only it complained of the unknown blk (0,0) and not (1,0) as before. Also, I did the fix by mounting my sdb4 via another linux system and writing the change. Hope permissions in not a factor.

Richard
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1576
Location: US

PostPosted: Tue Jun 26, 2012 1:18 pm    Post subject: Re: grub Reply with quote

rekonrad wrote:
I did as you instructed....but still got kernel panic only it complained of the unknown blk (0,0) and not (1,0) as before. Also, I did the fix by mounting my sdb4 via another linux system and writing the change. Hope permissions in not a factor.


I had high hopes for that last modification :( The way you made the modifications shouldn't mess anything up.

I don't know if you set your filesystem in .config, but check that ext2 and 3 are built into the kernel.

<*> Second extended fs support │ │
│ │ [ ] Ext2 extended attributes │ │
│ │ [ ] Ext2 execute in place support │ │
│ │ <*> Ext3 journalling file system support │ │
│ │ [ ] Default to 'data=ordered' in ext3 │ │
│ │ [*] Ext3 extended attributes │ │
│ │ [*] Ext3 POSIX Access Control Lists │ │
│ │ [*] Ext3 Security Labels │ │
│ │ <*> The Extended 4 (ext4) filesystem │ │
│ │ [*] Ext4 extended attributes │ │
│ │
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 29963
Location: 56N 3W

PostPosted: Tue Jun 26, 2012 1:31 pm    Post subject: Reply with quote

rekonrad,

You need a kernel parameter
Code:
rootdelay=7
The problem with root on USB is that the kernel tries to mount root before it starts USB,
so it never finds root. rootdelay=<sec> tells the kernel to pause before attempting to mount root. During the pause, USB becomes ready.

Values of rootdelay betwee 7 and 30 are know to work. You can fine tune it if you like.

A couple of other gotchyas. USB and USB storage must be built in, not modules.
Some BIOSes call the boot drive (hd0) no matter where it is. Thats a trial and error thing unfortunately.

Code:
kernel /kernel-3 root=/dev/sdb2 rootdelay=7
should do nicely. The rootfstype=ext3 should not be needed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rekonrad
Apprentice
Apprentice


Joined: 01 Jun 2003
Posts: 176
Location: Winnipeg, MB

PostPosted: Tue Jun 26, 2012 2:23 pm    Post subject: (SOLVED.) grub error Reply with quote

Indeed it worked! Now to setup grub back on sdb....
Thanks to all!

Richard
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum