Author Topic: linux doesn't show up  (Read 5012 times)

0 Members and 1 Guest are viewing this topic.

james341

  • Member
  • Posts: 36
linux doesn't show up
« on: April 26, 2009, 06:06:03 PM »
good day to you
i have installed triple boot (vista osx86 and linux)
in Chameleon i see only vista and osx86 but no linux
i found something in other forum :

"1. Boot from a Live CD, like Ubuntu Live, Knoppix, Mepis, or similar.
2. Open a Terminal. Go SuperUser (that is, type "su"). Enter root passwords as necessary.
3. Type "grub" which makes a GRUB prompt appear.
4. Type "find /boot/grub/stage1". You'll get a response like "(hd0)" or in my case "(hd0,3)". Use whatever your computer spits out for the following lines.
5. Type "root (hd0,3)".
6. Type "setup (hd0,3)". This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".
7. Type "quit".
8. Restart the system. Remove the bootable CD."

but i can't do su because i don't know the password so i did sudo grub
but when i trying to do "find /boot/grub/stage1" I'm getting error 15 : file not found

what can i do to had linux to chameleon?

james341

  • Member
  • Posts: 36
Re: linux doesn't show up
« Reply #1 on: April 26, 2009, 06:30:10 PM »
i know that my linux partition is 2 so i did:
root (hd0,2)
and than:
setup (hd0,2)
but than i get - error 17: cannot mount selected partition

BladeRunner

  • Member
  • Posts: 88
Re: linux doesn't show up
« Reply #2 on: April 26, 2009, 06:55:15 PM »
Don't forget, grub numbers from zero (0) - so, to point to the second partition on disk one you would enter (hd0,1)
Base system: HP Pavilion P6340f Desktop  Intel� Core2Quad�  CPU: Speed: 2.66 GHz   Package: Socket 775 LGA:  L2 Cache 2 x 2048 KB  RAM : 8.0 GB:  DDR3

Disks : 2 eSATA @ 2 TB (hardware raid 1), NAS 4 x 2 TB raid 5 Display : 21" Samsung on EVGA GeForce 9400 GT - PCIe - 1900x1080  Keyboard/mouse :  USB connected  OS Version : 10.6.0 from retail DVD + SW update to 10.6.5 - Kernel:  Vanilla mach_kernel

james341

  • Member
  • Posts: 36
Re: linux doesn't show up
« Reply #3 on: April 26, 2009, 09:17:24 PM »
this is what i get :


is there something i do wrong
i tried "su" but i don't know the password

james341

  • Member
  • Posts: 36
Re: linux doesn't show up
« Reply #4 on: April 28, 2009, 06:31:05 AM »
someone?

BladeRunner

  • Member
  • Posts: 88
Re: linux doesn't show up
« Reply #5 on: April 28, 2009, 06:44:36 AM »
this is what i get :


is there something i do wrong
i tried "su" but i don't know the password

Well, to start off with, you don't run linux commands from inside grub.  Grub told you what was wrong.  Sudo and su are not grub commands.

Also, the format of the  "root (hd0,1)"  not "root(hd0)"

you also said that you knew linux was in partition 2.  So, your commands, once you are in grub, should be:

Code: [Select]
root (hd0,1)
setup (hd0,1)

grub numbers items starting with 0, not 1.
Base system: HP Pavilion P6340f Desktop  Intel� Core2Quad�  CPU: Speed: 2.66 GHz   Package: Socket 775 LGA:  L2 Cache 2 x 2048 KB  RAM : 8.0 GB:  DDR3

Disks : 2 eSATA @ 2 TB (hardware raid 1), NAS 4 x 2 TB raid 5 Display : 21" Samsung on EVGA GeForce 9400 GT - PCIe - 1900x1080  Keyboard/mouse :  USB connected  OS Version : 10.6.0 from retail DVD + SW update to 10.6.5 - Kernel:  Vanilla mach_kernel

walterav

  • Entrant
  • Posts: 1
Re: linux doesn't show up
« Reply #6 on: April 28, 2009, 10:06:50 AM »
Hi,

What kind of partition table are you using? Are you using "Guid/GPT" or "msdos" or other?
Do you have more or other Operating Systems on that linux harddisk?

From the terminal type:
sudo -s #brings you to super user ROOT
fdisk -l #shows harddisks and partition numbers, look at "Disk /dev/hda <<< or sda or hdb or sdb or hdX

I needed to mount the linux partition where /boot/grub was located so mount the partition with gnome, or parted or by hand:

#mkdir /mnt/bla                 
#mount /dev/hdaX /mnt/bla #harddisk can be hdaX, hdbX, hdc, sda, sdb, sdc etc
grub-install --root-directory=/mnt/bla /dev/hdaX

it might give a succesful message and a error or warning but it did work in my case.

Just be sure that your linux is on the second parition, because if you use GUID/GPT there are hidden partitions and and partition 2 is actualy partition 3, so for grub it is hd(x,2). I f you choose the wrong partition you migt screw up you osx install on the first partition... which is ofcourse the second if you count EFI parition with it.

goodluck


james341

  • Member
  • Posts: 36
Re: linux doesn't show up
« Reply #7 on: April 28, 2009, 12:33:27 PM »
hey walterav
i have triple boot on one hard drive with 3 partition for vista leopard and linux
everything was install but like i said i don't see linux in Chameleon boot menu
i dii what you told me but i'm not sure abot the :
#mount /dev/hdaX /mnt/bla #harddisk can be hdaX, hdbX, hdc, sda, sdb, sdc etc
grub-install --root-directory=/mnt/bla /dev/hdaX

this is what i get after fdisk -l:


if you can tell me what to do it will be great

james341

  • Member
  • Posts: 36
Re: linux doesn't show up
« Reply #8 on: April 29, 2009, 11:46:52 PM »
no one can help me solve this problem?
please.....
:)
thanks

james341

  • Member
  • Posts: 36
Re: linux doesn't show up
« Reply #9 on: April 30, 2009, 09:13:28 AM »
o.k this what i did:
sudo -s
fdisk -l # found my linux partition in /dev/sda2
mkdir /mnt/bla       
mount /dev/sda2 /mnt/bla
grub-install --root-directory=/mnt/bla /dev/sda2

now i see linux in Chameleon boot with vista and leopard
but when i choose to boot to linux i'm getting to grub>  screen

johnlocke2342

  • Entrant
  • Posts: 1
Re: linux doesn't show up
« Reply #10 on: May 18, 2009, 03:43:57 PM »
I'll try this tonight on my hackintosh, as I can't find how to get Linux showing into Chameleon 2.

Quote from: james341
when i choose to boot to linux i'm getting to grub>  screen

What do you mean? That you're in text mode or that Grub menu shows up?
If you complain that GRUB menu shows up, that's normal: it's required to boot Linux. But you can still hide it.
In a Linux terminal, type:
Code: [Select]
sudo gedit /boot/grub/menu.lst
The GRUB selection menu text file should appear.
Just search for
Code: [Select]
#hiddenmenu and replace it by
Code: [Select]
hiddenmenu (just erase the "#")