Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub causing kernel panic [SOLVED!]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
mjpark
n00b
n00b


Joined: 22 Feb 2009
Posts: 4

PostPosted: Fri Feb 27, 2009 9:27 pm    Post subject: Reply with quote

jordanwb wrote:
DONAHUE wrote:
on ubuntu cd
Code:
mount /dev/sda1 /mnt/gentoo/boot


Oh right. This is getting confusing.


and why couldn't this be done using gentoo minimal? :P it's the kernel configurations man, no need to make this anymore complex.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Feb 27, 2009 9:29 pm    Post subject: Reply with quote

Code:
mk2fs /dev/sda1
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Fri Feb 27, 2009 9:39 pm    Post subject: Reply with quote

Alright, I am thoroughly becoming confused. What are we doing with:

Code:

mk2fs /dev/sda1


Are you, wanting me to boot back into Ubuntu livecd and run those commans again from your previous post:

Quote:

mkdir /mnt/gentoo
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
zcat /proc/config.gz /mnt/gentoo/boot/config
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge --sync
emerge grub
grub
root (hd0,0)
setup (hd0)
quit
exit
reboot


I just want everyone to be on the same page. :)
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Feb 27, 2009 9:39 pm    Post subject: Reply with quote

MJ: you are wrong about the current problem which is a loss of grub incident to a reinstall.
The reinstall occurred susequent to the kernel panic which was occurring after a satisfactory grub to kernel transfer.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Feb 27, 2009 9:45 pm    Post subject: Reply with quote

Yes to this. Assuming you never completed it. If you did complete it why the mount attempt?

Are you, wanting me to boot back into Ubuntu livecd and run those commans again from your previous post:

Boot the ubuntu cd, Then (check fdisk -l output shows correct partitions and file systems)


Code:
mkdir /mnt/gentoo
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
fdisk -l
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge --sync
emerge grub
grub
root (hd0,0)
setup (hd0)
quit
exit
reboot


I just want everyone to be on the same page. :)
_
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Fri Feb 27, 2009 9:56 pm    Post subject: Reply with quote

I noticed that whenever I got fdisk -l I had different partitions:

Code:

root@ubuntu:/home/ubuntu# fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0006f4b2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           5       40131   82  Linux swap / Solaris
/dev/sda2               6          68      506047+  83  Linux
/dev/sda3              69        7296    58058910   83  Linux
root@ubuntu:/home/ubuntu#



Originally, with gentoo install cd my partition were seen as:
Code:

/dev/hda1 was /boot partition
/dev/hda2 was swap partition
/dev/hda3 was root partition


The discrepancy here is between partitons 1 and 2 are reversed as to what I can see. hope that makes sense?
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
jordanwb
l33t
l33t


Joined: 10 Jul 2008
Posts: 642
Location: Ottawa, Canada

PostPosted: Fri Feb 27, 2009 9:58 pm    Post subject: Reply with quote

Similar thing happens to me. My disk order keeps changing because I threw an IDE drive into the mix and the IDE controller and SATA controller are seperate chips.
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Fri Feb 27, 2009 10:00 pm    Post subject: Reply with quote

Alright, so hat is to do about this situation? Is this what is causing the problem potentially?


Should I:
Code:

fdisk /dev/sda


and switch the partitons back? I think this where your post was going with mke2fs /dev/sda1?
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Feb 27, 2009 10:08 pm    Post subject: Reply with quote

assuming still at fdisk -l:
Code:
umount mnt/gentoo/boot    #if not mounted error --ignore it
fdisk /dev/sda
mke2fs /dev/sda1
mkswap /dev/sda2
mount mnt/gentoo/boot
fdisk -l

and continue

oops fdisk needed to change partition types
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Fri Feb 27, 2009 10:12 pm    Post subject: Reply with quote

Code:

root@ubuntu:/home/ubuntu# umount /mnt/gentoo/boot/
root@ubuntu:/home/ubuntu# mke2fs /dev/sda1
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
10040 inodes, 40128 blocks
2006 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=41156608
5 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
   8193, 24577

Writing inode tables: done                           
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 35 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@ubuntu:/home/ubuntu# mkswap /dev/sda2
/dev/sda2: Device or resource busy
root@ubuntu:/home/ubuntu# umount /dev/sda2
umount: /dev/sda2: not mounted
root@ubuntu:/home/ubuntu# mkswap /dev/sda2
/dev/sda2: Device or resource busy
root@ubuntu:/home/ubuntu#


I found this searching real quick:
Quote:

systems need to have partition 1 start at cyl 0, this is a must.


IMO, if Gentoo would release a new install cd with the new kernel using the new device drivers, this taks would not be needed at all.

Sorry about all the post sincerely, I appreciate the help greatly.
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Feb 27, 2009 10:28 pm    Post subject: Reply with quote

before a reboot
you will need to:
Code:
cd /usr/src/linux
cp arch/x86_64/boot/bzImage /boot/custom-2.6.27-r8

If you want to work on your kernel configuration before rebooting, you should be confident that grub will transfer control to the kernel.

Btw if fdisk -l still reported sda1 as type 82 swap i would unmount and fdisk sda and change the type to 83 and then repeat the mke2fs /dev/sda1 Would also change the type of sda2 to 82.
Quote:
IMO, if Gentoo would release a new install cd with the new kernel using the new device drivers, this taks would not be needed at all.
Agree. Actually the system rescue cd (gentoo based) is exactly this. Were I god the minimal cd would just be a link to sysresccd. This has been an exceptionally big year for change.

Last edited by DONAHUE on Fri Feb 27, 2009 11:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Fri Feb 27, 2009 10:35 pm    Post subject: Reply with quote

I now have:

Code:

root@ubuntu:/home/ubuntu# fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0006f4b2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1           5       40131   83  Linux
/dev/sda2               6          68      506047+  82  Linux swap / Solaris
/dev/sda3              69        7296    58058910   83  Linux
root@ubuntu:/home/ubuntu#


and

Code:

root@ubuntu:/home/ubuntu# mke2fs /dev/sda1
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
10040 inodes, 40128 blocks
2006 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=41156608
5 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
   8193, 24577

Writing inode tables: done                           
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


This looks correct, what is next? Continue again with:
Code:

mkdir /mnt/gentoo
mount /dev/sda3 /mnt/gentoo
mount /dev/sda1 /mnt/gentoo/boot
fdisk -l
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge --sync
emerge grub
grub
root (hd0,0)
setup (hd0)
quit
exit
reboot

_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Fri Feb 27, 2009 10:39 pm    Post subject: Reply with quote

mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge --sync
emerge grub
grub
root (hd0,0)
setup (hd0)
quit
cd /usr/src/linux
cp arch/x86_64/boot/bzImage /boot/custom-2.6.27-r8 #You may want to edit your menuconfig first
exit
reboot


Last edited by DONAHUE on Fri Feb 27, 2009 11:00 pm; edited 1 time in total
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Fri Feb 27, 2009 10:42 pm    Post subject: Reply with quote

As you can see, I cannot chroot?

Code:

root@ubuntu:/home/ubuntu# mount -t proc none /mnt/gentoo/proc/
root@ubuntu:/home/ubuntu# mount -o bind /dev /mnt/gentoo/dev/
root@ubuntu:/home/ubuntu# chroot /mnt/gentoo/ /bin/bash
chroot: cannot run command `/bin/bash': Exec format error
root@ubuntu:/home/ubuntu# exit
exit
ubuntu@ubuntu:~$ mount /dev/sda3 /mnt/gentoo/
mount: only root can do that

_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
jordanwb
l33t
l33t


Joined: 10 Jul 2008
Posts: 642
Location: Ottawa, Canada

PostPosted: Fri Feb 27, 2009 10:46 pm    Post subject: Reply with quote

sall wrote:
Code:
mount: only root can do that


sudo
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Fri Feb 27, 2009 10:49 pm    Post subject: Reply with quote

yes i know that but i was logged as root when I got the error on: chroot /mnt/gentoo /bin/bash.

Code:

oot@ubuntu:/home/ubuntu# mount -t proc none /mnt/gentoo/proc/
root@ubuntu:/home/ubuntu# mount -o bind /dev /mnt/gentoo/dev/
root@ubuntu:/home/ubuntu# chroot /mnt/gentoo/ /bin/bash
chroot: cannot run command `/bin/bash': Exec format error


I did a quick search and found:
Quote:

but i think the problem was that i was using a x86
cd for my 64 box and that was causing problems.


I am doing exactly that, I donwload an x86 ubuntu cd instead of 64 bit. Thinking I wouldn't waste a cd since this is the only 64 bit pc I have. Think this is the problem?[/code]
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4


Last edited by sall on Fri Feb 27, 2009 10:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
jordanwb
l33t
l33t


Joined: 10 Jul 2008
Posts: 642
Location: Ottawa, Canada

PostPosted: Fri Feb 27, 2009 10:50 pm    Post subject: Reply with quote

Is your install 64 bit and Ubuntu 32 bit? If so that could be the problem.
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Fri Feb 27, 2009 10:53 pm    Post subject: Reply with quote

haha good lookin'. We came to the same conclusion. I can't win for losing :). Anyways I'm going to go look on my other pc's for an k/ubuntu 64 bit iso so i don't have to wait for it download. Anyways, I'm looking at this ubuntu livecd and grinding my teeth bc compiz and everything works on it even my wireless nic. But I'm not turning back from here!


Figures I don't have one.. Downloading one now shouldn't take too awful long. I'll post the results once I get going again.
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
jordanwb
l33t
l33t


Joined: 10 Jul 2008
Posts: 642
Location: Ottawa, Canada

PostPosted: Fri Feb 27, 2009 11:11 pm    Post subject: Reply with quote

You can use the SystemRescueCD (google it), and to get a bit 64 environment type "rescue64" at the boot prompt.
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Sat Feb 28, 2009 2:07 am    Post subject: Reply with quote

That's okay jordanwb, I needed to take a break away from all of this, so waiting for ubuntu 64 bit live cd to download did exactly that. Not to mentiona nice filet mignon for dinner :). Plus it can't hurt to have the ubuntu live cd around, in case another situation like this takes place. Anyway back to business.

Inside a terminal in ubuntu 64 bit live cd:
Code:

mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
emerge --sync
emerge grub
(chroot) ubuntu / # grub
Probing devices to guess BIOS drives. This may take a long time.


    GNU GRUB  version 0.97  (640K lower / 7168K upper memory)

 [ Minimal BASH-like line editing is supported.  For the first word, TAB
   lists possible command completions.  Anywhere else TAB lists the possible
   completions of a device/filename. ]
grub> root (hd0,0)
root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub> quit
(chroot) ubuntu / # cd /usr/src/linux
(chroot) ubuntu linux # cp arch/x86_64/boot/bzImage /boot/
boot/       grub/       lost+found/
(chroot) ubuntu linux # cp arch/x86_64/boot/bzImage /boot/custom-2.6.27-r8
(chroot) ubuntu linux # exit


Alright, now as far as I can tell, that was a success! I am on the livecd right now, so I am going to hope I configured the kernel properly and reboot! Will post feedback in matter of minutes...

*UPDATE*

I rebooted and I get a not so good grub screen. :( Laptop just boots to grub>... I do not know where to go from here. Keep the ideas coming!
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
jordanwb
l33t
l33t


Joined: 10 Jul 2008
Posts: 642
Location: Ottawa, Canada

PostPosted: Sat Feb 28, 2009 2:21 am    Post subject: Reply with quote

Are you sure the enabled your root filesystem as builtin?

sall wrote:
Not to mentiona nice filet mignon for dinner :).

Sounds tasty.
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Sat Feb 28, 2009 2:24 am    Post subject: Reply with quote

I need to loin to the ubuntu cd again and copy and paste you some of my kernel config. Bare with me.. this cd takes awhile to load...

Also..
Quote:
2. Grub loading, please wait...

Situation

Code Listing 2.1: Grub output

GRUB loading stage 1.5
GRUB loading, please wait...

After this message, the system stops. If you attempt to boot the system using a grub floppy, the problem disappears.

Solution

According to The_Bell you could change the boot order in your BIOS.

Tell your BIOS to not boot from your floppy first.

penetrode wrote that this may also be due to bad CFLAGS settings. Although the current grub ebuild filters out -fstack-protector, it can't hurt to recompile grub with clean CFLAGS if nothing else helps.

Code Listing 2.2: Using a clean CFLAG to rebuild GRUB

# CFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe" emerge grub


Think this i an issue possibly?
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
jordanwb
l33t
l33t


Joined: 10 Jul 2008
Posts: 642
Location: Ottawa, Canada

PostPosted: Sat Feb 28, 2009 2:29 am    Post subject: Reply with quote

What are your CFLAG settings?
Back to top
View user's profile Send private message
sall
Guru
Guru


Joined: 08 Jun 2008
Posts: 314
Location: WV, USA

PostPosted: Sat Feb 28, 2009 2:35 am    Post subject: Reply with quote

Here is my make.conf:
Code:

  GNU nano 2.0.6                                      File: /etc/make.conf                                                                                   

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-march=k8 -O2 -pipe"
CXXFLAGS="-march=k8 -O2 -pipe"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="mmx sse sse2"
MAKE_OPTS="-j2"

GENTOO_MIRRORS="ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://mirror.datapipe.net/gentoo "

SYNC="rsync://rsync.gentoo.org/gentoo-portage"


Also, I notice that my grub.conf looks the same as if it was untouched from what i previously did with the grub install:
Code:

  GNU nano 2.0.6                                    File: /boot/grub/grub.conf                                                                               

# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook
# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2
# If you are not using Genkernel and you need help creating this file, you
# should consult the handbook. Alternatively, consult the grub.conf.sample that
# is included with the Grub documentation.

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

#title Gentoo Linux 2.6.24-r5
#root (hd0,0)
#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 real_root=/dev/sda3
#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5

# vim:ft=conf:


Should I edit this to the correct setting or leave it be since I just did the install manually.

What part of my kernel config do you need, to see if I have root file system built in?
_________________
Sall

* AMD Turion(tm) 64 Mobile Technology ML-32
* 1Gb RAM
* 2.6.27-gentoo-r8 x86_64
* Xfce4
Back to top
View user's profile Send private message
jordanwb
l33t
l33t


Joined: 10 Jul 2008
Posts: 642
Location: Ottawa, Canada

PostPosted: Sat Feb 28, 2009 2:43 am    Post subject: Reply with quote

When you reinstalled grub it overwrote your grub config, so yeah you'd want to modify it.

To see if you have the filesystem built-in go to the File System section of your kernel menuconfig.
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
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
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